aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/peertube-videojs-plugin.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-11-16 09:16:41 +0100
committerChocobozzz <me@florianbigard.com>2018-11-16 09:16:41 +0100
commitfe05c3acbd48c72ac7e503bebde91830121a0bf1 (patch)
tree2f019d9fbc092c564bb5b79bad03b94eb061503b /client/src/assets/player/peertube-videojs-plugin.ts
parent8cf998733496d44fa564e2e252356b871756c984 (diff)
downloadPeerTube-fe05c3acbd48c72ac7e503bebde91830121a0bf1.tar.gz
PeerTube-fe05c3acbd48c72ac7e503bebde91830121a0bf1.tar.zst
PeerTube-fe05c3acbd48c72ac7e503bebde91830121a0bf1.zip
Fix player progress bar when changing resolution
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