Fixed some player issues

This commit is contained in:
Eliot Berriot 2019-05-09 11:01:45 +02:00
parent bfe28cc12e
commit 70cbe73fc0
No known key found for this signature in database
GPG Key ID: DD6965E2476E5C27
1 changed files with 3 additions and 2 deletions

View File

@ -379,7 +379,7 @@ export default {
},
onunlock: function () {
if (this.$store.state.player.playing) {
self.soundId = self.sound.play()
self.soundId = self.sound.play(self.soundId)
}
},
onload: function () {
@ -518,7 +518,8 @@ export default {
let onlyTrack = this.$store.state.queue.tracks.length === 1
if (this.looping === 1 || (onlyTrack && this.looping === 2)) {
this.currentSound.seek(0)
this.soundId = this.currentSound.play()
this.$store.dispatch('player/updateProgress', 0)
this.soundId = this.currentSound.play(this.soundId)
} else {
this.$store.dispatch('player/trackEnded', this.currentTrack)
}