From 3da3f39f5ae33655e919e27b32b080d8abd20f5f Mon Sep 17 00:00:00 2001 From: Norbaev Date: Thu, 27 Jun 2024 17:44:14 +0500 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=B5=D1=81=D1=82=D1=80=D1=83=D0=BA?= =?UTF-8?q?=D1=82=D1=83=D1=80=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=20=D0=BD?= =?UTF-8?q?=D1=83=D0=B6=D0=BD=D1=8B=D0=B5=20=D0=BE=D0=B1=D1=8A=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D1=8B=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D1=80=D0=B5=D0=B4?= =?UTF-8?q?=D0=B2=D0=B0=D1=80=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE?= =?UTF-8?q?=D0=B9=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=B2=20initializationInfo()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/player.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/client/src/components/player.vue b/client/src/components/player.vue index d50d9a9..87c4442 100644 --- a/client/src/components/player.vue +++ b/client/src/components/player.vue @@ -161,7 +161,6 @@ export default { }, mounted() { this.$store.dispatch('initPlayer'); - // console.log(this.$store.state); if (this.user?.id) { this.checkSongIsFavorite(); this.getSongList(); @@ -193,14 +192,15 @@ export default { app .getNowplaying() .then((responce) => { - console.log(responce.now_playing.song); + const { art, title, artist } = responce.now_playing.song; + this.$store.dispatch('setCurrentPlay', { ...this.currentPlay, isLoader: false, - ...responce.now_playing.song, + art, + title, + artist, }); - console.log(this.player.target.src); - // console.log(this.$store.state); }) .catch((error) => console.log(error)); }, @@ -236,6 +236,7 @@ export default { }, getPlaying(e) { const jsonData = JSON.parse(e.data); + if (jsonData?.pub?.data) { const data = jsonData?.pub?.data; if (this.currentPlay.live) { @@ -358,6 +359,7 @@ export default { app .getAudio(id) .then((res) => { + console.log('res в методе getAudio', res); const blob = new Blob([res], { type: 'application/audio' }); const audioUrl = URL.createObjectURL(blob); this.$store.dispatch('changePlayer', audioUrl);