1
0
Fork 0

Hide big play button on autoplay

This commit is contained in:
Chocobozzz 2018-04-17 09:54:53 +02:00
parent 244e76a552
commit e6f627975b
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 11 additions and 4 deletions

View file

@ -85,6 +85,8 @@ class PeerTubePlugin extends Plugin {
this.playerElement = options.playerElement
if (this.autoplay === true) this.player.addClass('vjs-has-autoplay')
this.player.ready(() => {
const volume = getStoredVolume()
if (volume !== undefined) this.player.volume(volume)
@ -314,10 +316,8 @@ class PeerTubePlugin extends Plugin {
if (this.autoplay === true) {
this.player.posterImage.hide()
this.updateVideoFile(undefined, 0, () => {
this.seek(this.startTime)
this.player.play()
})
this.updateVideoFile(undefined, 0, () => this.seek(this.startTime))
} else {
// Proxy first play
const oldPlay = this.player.play.bind(this.player)

View file

@ -115,6 +115,13 @@ $setting-transition-easing: ease-out;
}
}
// Hide the big play button on autoplay
&.vjs-has-autoplay {
.vjs-big-play-button {
display: none !important;
}
}
.vjs-control-bar,
.vjs-big-play-button,
.vjs-settings-dialog {