diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-17 09:54:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-17 09:54:53 +0200 |
commit | e6f627975bebd00d396d11442e582d80856bc6bd (patch) | |
tree | b932bdbf4522f1ccede87dc9a90d253ad5906ea7 /client/src/assets/player/peertube-videojs-plugin.ts | |
parent | 244e76a552ef05a5067134b1065d26dd89246d8c (diff) | |
download | PeerTube-e6f627975bebd00d396d11442e582d80856bc6bd.tar.gz PeerTube-e6f627975bebd00d396d11442e582d80856bc6bd.tar.zst PeerTube-e6f627975bebd00d396d11442e582d80856bc6bd.zip |
Hide big play button on autoplay
Diffstat (limited to 'client/src/assets/player/peertube-videojs-plugin.ts')
-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) |