aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/peertube-videojs-plugin.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player/peertube-videojs-plugin.ts')
-rw-r--r--client/src/assets/player/peertube-videojs-plugin.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts
index 40da5f1f7..4fd5a9be2 100644
--- a/client/src/assets/player/peertube-videojs-plugin.ts
+++ b/client/src/assets/player/peertube-videojs-plugin.ts
@@ -111,6 +111,8 @@ class PeerTubePlugin extends Plugin {
111 const muted = getStoredMute() 111 const muted = getStoredMute()
112 if (muted !== undefined) this.player.muted(muted) 112 if (muted !== undefined) this.player.muted(muted)
113 113
114 this.player.duration(options.videoDuration)
115
114 this.initializePlayer() 116 this.initializePlayer()
115 this.runTorrentInfoScheduler() 117 this.runTorrentInfoScheduler()
116 this.runViewAdd() 118 this.runViewAdd()
@@ -302,6 +304,9 @@ class PeerTubePlugin extends Plugin {
302 304
303 this.flushVideoFile(previousVideoFile) 305 this.flushVideoFile(previousVideoFile)
304 306
307 // Update progress bar (just for the UI), do not wait rendering
308 if (options.seek) this.player.currentTime(options.seek)
309
305 const renderVideoOptions = { autoplay: false, controls: true } 310 const renderVideoOptions = { autoplay: false, controls: true }
306 renderVideo(torrent.files[ 0 ], this.playerElement, renderVideoOptions, (err, renderer) => { 311 renderVideo(torrent.files[ 0 ], this.playerElement, renderVideoOptions, (err, renderer) => {
307 this.renderer = renderer 312 this.renderer = renderer