diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/assets/player/peertube-videojs-plugin.ts | 8 | ||||
-rw-r--r-- | client/src/sass/video-js-custom.scss | 7 |
2 files changed, 11 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) |
diff --git a/client/src/sass/video-js-custom.scss b/client/src/sass/video-js-custom.scss index cae7ab431..f77447e97 100644 --- a/client/src/sass/video-js-custom.scss +++ b/client/src/sass/video-js-custom.scss | |||
@@ -115,6 +115,13 @@ $setting-transition-easing: ease-out; | |||
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
118 | // Hide the big play button on autoplay | ||
119 | &.vjs-has-autoplay { | ||
120 | .vjs-big-play-button { | ||
121 | display: none !important; | ||
122 | } | ||
123 | } | ||
124 | |||
118 | .vjs-control-bar, | 125 | .vjs-control-bar, |
119 | .vjs-big-play-button, | 126 | .vjs-big-play-button, |
120 | .vjs-settings-dialog { | 127 | .vjs-settings-dialog { |