удалил initializationInfo() из player

This commit is contained in:
Norbaev 2024-06-30 00:24:02 +05:00
parent f6834ff973
commit 3f3086c141
1 changed files with 2 additions and 33 deletions

View File

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