diff options
Diffstat (limited to 'client/src/assets/player')
-rw-r--r-- | client/src/assets/player/peertube-videojs-plugin.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts index 83df24af6..60c291a50 100644 --- a/client/src/assets/player/peertube-videojs-plugin.ts +++ b/client/src/assets/player/peertube-videojs-plugin.ts | |||
@@ -85,6 +85,8 @@ class PeerTubePlugin extends Plugin { | |||
85 | 85 | ||
86 | this.playerElement = options.playerElement | 86 | this.playerElement = options.playerElement |
87 | 87 | ||
88 | if (this.autoplay === true) this.player.addClass('vjs-has-autoplay') | ||
89 | |||
88 | this.player.ready(() => { | 90 | this.player.ready(() => { |
89 | const volume = getStoredVolume() | 91 | const volume = getStoredVolume() |
90 | if (volume !== undefined) this.player.volume(volume) | 92 | if (volume !== undefined) this.player.volume(volume) |
@@ -314,10 +316,8 @@ class PeerTubePlugin extends Plugin { | |||
314 | 316 | ||
315 | if (this.autoplay === true) { | 317 | if (this.autoplay === true) { |
316 | this.player.posterImage.hide() | 318 | this.player.posterImage.hide() |
317 | this.updateVideoFile(undefined, 0, () => { | 319 | |
318 | this.seek(this.startTime) | 320 | this.updateVideoFile(undefined, 0, () => this.seek(this.startTime)) |
319 | this.player.play() | ||
320 | }) | ||
321 | } else { | 321 | } else { |
322 | // Proxy first play | 322 | // Proxy first play |
323 | const oldPlay = this.player.play.bind(this.player) | 323 | const oldPlay = this.player.play.bind(this.player) |