diff --git a/client/src/assets/player/shared/mobile/peertube-mobile-plugin.ts b/client/src/assets/player/shared/mobile/peertube-mobile-plugin.ts index 247e6190a..008eab112 100644 --- a/client/src/assets/player/shared/mobile/peertube-mobile-plugin.ts +++ b/client/src/assets/player/shared/mobile/peertube-mobile-plugin.ts @@ -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