]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/peertube-videojs-plugin.ts
Hide big play button on autoplay
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / peertube-videojs-plugin.ts
index 83df24af6d59cf8d7351224c5d75b235b0d544e2..60c291a50fc4c6f7e856c0ade89444ed708616c9 100644 (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)