Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Don't add mobile buttons without player controls

Chocobozzze2c7d9491514
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 247e6190a8..008eab1127 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