From 1f1e6fdcf20cc258d33d6cb0f93df6fb3e1dcd93 Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Wed, 11 Mar 2020 12:14:52 +0100
Subject: [PATCH] Cleaner autoplay with embed frame

---
 front/src/EmbedFrame.vue | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/front/src/EmbedFrame.vue b/front/src/EmbedFrame.vue
index ade4717fa6..5f6a2f8ce1 100644
--- a/front/src/EmbedFrame.vue
+++ b/front/src/EmbedFrame.vue
@@ -61,7 +61,7 @@
               :key="currentIndex"
               ref="player"
               class="player"
-              :options="{loadSprite: false, controls: controls, duration: currentTrack.sources[0].duration}">
+              :options="{loadSprite: false, controls: controls, duration: currentTrack.sources[0].duration, autoplay}">
               <audio preload="none">
                 <source v-for="source in currentTrack.sources" :src="source.src" :type="source.type"/>
               </audio>
@@ -383,9 +383,6 @@ export default {
     },
     tracks () {
       this.currentIndex = 0
-      if (this.autoplay) {
-        this.play(this.currentIndex)
-      }
     }
   }
 }
-- 
GitLab