From 3f3086c141bc8fbbd7b890285c4067a045f1ada6 Mon Sep 17 00:00:00 2001 From: Norbaev Date: Sun, 30 Jun 2024 00:24:02 +0500 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D0=B8=D0=BB=20initiali?= =?UTF-8?q?zationInfo()=20=D0=B8=D0=B7=20player?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/player.vue | 35 ++------------------------------ 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/client/src/components/player.vue b/client/src/components/player.vue index 40cf703..68e057b 100644 --- a/client/src/components/player.vue +++ b/client/src/components/player.vue @@ -171,7 +171,6 @@ export default { }, }, created() { - // this.initializationInfo(); this.connectionPlayer(); }, mounted() { @@ -203,23 +202,6 @@ export default { } }, methods: { - initializationInfo() { - app - .getNowplaying() - .then((responce) => { - const { art, title, artist } = responce.now_playing.song; - console.log(art, title, artist); - this.$store.dispatch('setCurrentPlay', { - ...this.currentPlay, - isLoader: false, - art, - title, - artist, - }); - }) - .catch((error) => console.log(error)); - }, - connectionPlayer() { if (this.connection) { this.connection.removePlay(); @@ -270,7 +252,7 @@ export default { // console.log('data.np.station.listen_url', dataUrl); this.$store.dispatch('changePlayer', dataUrl); // console.log(this.player); - const params = { + const currentPlay = { ...this.currentPlay, // Инфа про текущий трек ...data.np.now_playing.song, @@ -281,7 +263,7 @@ export default { }; // console.log('params in getPlaying ', params); // delete params.unique_id; - this.$store.dispatch('setCurrentPlay', params); + this.$store.dispatch('setCurrentPlay', currentPlay); } } }, @@ -367,19 +349,6 @@ export default { this.$emit('shopAuthentication', true); } }, - // changeVolume(type) { - // let volume = this.songVolume; - // console.log(volume); - // console.log(this.songVolume); - // if (type === 'set') { - // volume = this.songVolume === 0 ? 0.9 : 0.01; - // this.songVolume = this.songVolume === 0 ? 100 : 0; - // } else { - // volume = this.songVolume / 100; - // } - // if (volume === 0) volume = 0.01; - // this.$store.dispatch('handlerPlayer', { volume }); - // }, changeVolume() { console.log(this.songVolume); this.$store.dispatch('handlerPlayer', { volume: this.songVolume });