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);