aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-17 09:54:53 +0200
committerChocobozzz <me@florianbigard.com>2018-04-17 09:54:53 +0200
commite6f627975bebd00d396d11442e582d80856bc6bd (patch)
treeb932bdbf4522f1ccede87dc9a90d253ad5906ea7 /client
parent244e76a552ef05a5067134b1065d26dd89246d8c (diff)
downloadPeerTube-e6f627975bebd00d396d11442e582d80856bc6bd.tar.gz
PeerTube-e6f627975bebd00d396d11442e582d80856bc6bd.tar.zst
PeerTube-e6f627975bebd00d396d11442e582d80856bc6bd.zip
Hide big play button on autoplay
Diffstat (limited to 'client')
-rw-r--r--client/src/assets/player/peertube-videojs-plugin.ts8
-rw-r--r--client/src/sass/video-js-custom.scss7
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 {