удалил initializationInfo() из player
This commit is contained in:
parent
f6834ff973
commit
3f3086c141
|
|
@ -171,7 +171,6 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.initializationInfo();
|
|
||||||
this.connectionPlayer();
|
this.connectionPlayer();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -203,23 +202,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
connectionPlayer() {
|
||||||
if (this.connection) {
|
if (this.connection) {
|
||||||
this.connection.removePlay();
|
this.connection.removePlay();
|
||||||
|
|
@ -270,7 +252,7 @@ export default {
|
||||||
// console.log('data.np.station.listen_url', dataUrl);
|
// console.log('data.np.station.listen_url', dataUrl);
|
||||||
this.$store.dispatch('changePlayer', dataUrl);
|
this.$store.dispatch('changePlayer', dataUrl);
|
||||||
// console.log(this.player);
|
// console.log(this.player);
|
||||||
const params = {
|
const currentPlay = {
|
||||||
...this.currentPlay,
|
...this.currentPlay,
|
||||||
// Инфа про текущий трек
|
// Инфа про текущий трек
|
||||||
...data.np.now_playing.song,
|
...data.np.now_playing.song,
|
||||||
|
|
@ -281,7 +263,7 @@ export default {
|
||||||
};
|
};
|
||||||
// console.log('params in getPlaying ', params);
|
// console.log('params in getPlaying ', params);
|
||||||
// delete params.unique_id;
|
// delete params.unique_id;
|
||||||
this.$store.dispatch('setCurrentPlay', params);
|
this.$store.dispatch('setCurrentPlay', currentPlay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -367,19 +349,6 @@ export default {
|
||||||
this.$emit('shopAuthentication', true);
|
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() {
|
changeVolume() {
|
||||||
console.log(this.songVolume);
|
console.log(this.songVolume);
|
||||||
this.$store.dispatch('handlerPlayer', { volume: this.songVolume });
|
this.$store.dispatch('handlerPlayer', { volume: this.songVolume });
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue