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