Don't add mobile buttons without player controls
This commit is contained in:
parent
7c3eaf868c
commit
e2c7d94915
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue