Fix embed that does not start on firefox

pull/108/head
Chocobozzz 2017-10-18 18:19:35 +02:00
parent 49347a0a8b
commit 4dd551a066
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 6 additions and 1 deletions

View File

@ -216,7 +216,12 @@ const peertubePlugin = function (options: PeertubePluginOptions) {
if (options.autoplay === true) {
player.updateVideoFile()
} else {
player.one('play', () => player.updateVideoFile())
player.one('play', () => {
// Pause, we wait the video to load before
player.pause()
player.updateVideoFile(undefined, () => player.play())
})
}
setInterval(() => {