фикс initializationInfo - запись поля isLoader
This commit is contained in:
parent
21481aca98
commit
23d25d25fa
|
|
@ -156,8 +156,8 @@ export default {
|
|||
},
|
||||
},
|
||||
created() {
|
||||
this.connectionPlayer();
|
||||
this.initializationInfo();
|
||||
this.connectionPlayer();
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch('initPlayer');
|
||||
|
|
@ -189,12 +189,20 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
async initializationInfo() {
|
||||
return app.getNowplaying().then((responce) => {
|
||||
console.log(responce.now_playing.song);
|
||||
this.$store.dispatch('setCurrentPlay', responce.now_playing.song);
|
||||
console.log(this.$store.state);
|
||||
});
|
||||
initializationInfo() {
|
||||
app
|
||||
.getNowplaying()
|
||||
.then((responce) => {
|
||||
console.log(responce.now_playing.song);
|
||||
this.$store.dispatch('setCurrentPlay', {
|
||||
...this.currentPlay,
|
||||
isLoader: false,
|
||||
...responce.now_playing.song,
|
||||
});
|
||||
console.log(this.player.target.src);
|
||||
// console.log(this.$store.state);
|
||||
})
|
||||
.catch((error) => console.log(error));
|
||||
},
|
||||
|
||||
connectionPlayer() {
|
||||
|
|
@ -237,6 +245,7 @@ export default {
|
|||
data.np.station.listen_url,
|
||||
);
|
||||
this.$store.dispatch('changePlayer', data.np.station.listen_url);
|
||||
console.log(this.player);
|
||||
const params = {
|
||||
...this.currentPlay,
|
||||
...data.np.now_playing.song,
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ export default createStore({
|
|||
state.player.target.pause();
|
||||
}
|
||||
if (params.play) {
|
||||
console.log(state);
|
||||
if (state.player.target.readyState >= 3) {
|
||||
state.currentPlay.isPlay = true;
|
||||
state.player.target.play();
|
||||
|
|
|
|||
Loading…
Reference in New Issue