]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/peertube-videojs-plugin.ts
Fix embed that does not start on firefox
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / peertube-videojs-plugin.ts
index 090cc53ba67c42fcc886d1f9ca2f184d4dea0820..7cf3ea6ccb414f65c3c2a94ae49d8037c5bc011c 100644 (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(() => {