Fix embed that does not start on firefox

This commit is contained in:
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) { if (options.autoplay === true) {
player.updateVideoFile() player.updateVideoFile()
} else { } 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(() => { setInterval(() => {