aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player')
-rw-r--r--client/src/assets/player/peertube-videojs-plugin.ts16
1 files changed, 9 insertions, 7 deletions
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts
index d9dc2615b..8c131c9e9 100644
--- a/client/src/assets/player/peertube-videojs-plugin.ts
+++ b/client/src/assets/player/peertube-videojs-plugin.ts
@@ -235,9 +235,7 @@ const peertubePlugin = function (options: PeertubePluginOptions) {
235 if (err) return handleError(err) 235 if (err) return handleError(err)
236 236
237 this.renderer = renderer 237 this.renderer = renderer
238 player.play() 238 player.play().then(done)
239
240 return done()
241 }) 239 })
242 }) 240 })
243 241
@@ -323,10 +321,14 @@ const peertubePlugin = function (options: PeertubePluginOptions) {
323 player.updateVideoFile() 321 player.updateVideoFile()
324 } else { 322 } else {
325 player.one('play', () => { 323 player.one('play', () => {
326 // Pause, we wait the video to load before 324 // On firefox, we need to wait to load the video before playing
327 player.pause() 325 if (navigator.userAgent.toLowerCase().indexOf('firefox') !== -1) {
328 326 player.pause()
329 player.updateVideoFile(undefined, () => player.play()) 327 player.updateVideoFile(undefined, () => player.play())
328 return
329 }
330
331 player.updateVideoFile(undefined)
330 }) 332 })
331 } 333 }
332 334