From 70cbe73fc008abef4b53868dcbffd4db4a6c3125 Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Thu, 9 May 2019 11:01:45 +0200
Subject: [PATCH] Fixed some player issues

---
 front/src/components/audio/Player.vue | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/front/src/components/audio/Player.vue b/front/src/components/audio/Player.vue
index 0ad8fe7c6f..af672876c8 100644
--- a/front/src/components/audio/Player.vue
+++ b/front/src/components/audio/Player.vue
@@ -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)
       }
-- 
GitLab