Cleaner autoplay with embed frame

This commit is contained in:
Eliot Berriot 2020-03-11 12:14:52 +01:00
parent 19e647636e
commit 1f1e6fdcf2
No known key found for this signature in database
GPG Key ID: 6B501DFD73514E14
1 changed files with 1 additions and 4 deletions

View File

@ -61,7 +61,7 @@
:key="currentIndex" :key="currentIndex"
ref="player" ref="player"
class="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"> <audio preload="none">
<source v-for="source in currentTrack.sources" :src="source.src" :type="source.type"/> <source v-for="source in currentTrack.sources" :src="source.src" :type="source.type"/>
</audio> </audio>
@ -383,9 +383,6 @@ export default {
}, },
tracks () { tracks () {
this.currentIndex = 0 this.currentIndex = 0
if (this.autoplay) {
this.play(this.currentIndex)
}
} }
} }
} }