Skip to content

Commit

Permalink
Don't add mobile buttons without player controls
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Oct 7, 2024
1 parent 7c3eaf8 commit e2c7d94
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ class PeerTubeMobilePlugin extends Plugin {

this.seekAmount = 0

this.peerTubeMobileButtons = player.addChild('PeerTubeMobileButtons', { reportTouchActivity: false }) as PeerTubeMobileButtons

if (videojs.browser.IS_ANDROID && screen.orientation) {
this.handleFullscreenRotation()
}

// Don't add buttons if the player doesn't have controls
if (!player.controls()) return

this.peerTubeMobileButtons = player.addChild('PeerTubeMobileButtons', { reportTouchActivity: false }) as PeerTubeMobileButtons

if (!this.player.options_.userActions) this.player.options_.userActions = {};

// FIXME: typings
Expand Down

0 comments on commit e2c7d94

Please sign in to comment.