aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-02 15:10:06 +0200
committerChocobozzz <me@florianbigard.com>2020-07-02 15:10:06 +0200
commit35f0a5e665a565ffc9d4b88c5a12d45c88b0a090 (patch)
treecbcec5f21cfb21a1424f61cc4a60e9581f5acefa /client/src/assets
parent1e904cde34ba41a16256da1073336dd652368592 (diff)
downloadPeerTube-35f0a5e665a565ffc9d4b88c5a12d45c88b0a090.tar.gz
PeerTube-35f0a5e665a565ffc9d4b88c5a12d45c88b0a090.tar.zst
PeerTube-35f0a5e665a565ffc9d4b88c5a12d45c88b0a090.zip
Fix player menu on mobile
Diffstat (limited to 'client/src/assets')
-rw-r--r--client/src/assets/player/peertube-plugin.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/client/src/assets/player/peertube-plugin.ts b/client/src/assets/player/peertube-plugin.ts
index a5a706420..a2b038b77 100644
--- a/client/src/assets/player/peertube-plugin.ts
+++ b/client/src/assets/player/peertube-plugin.ts
@@ -233,12 +233,20 @@ class PeerTubePlugin extends Plugin {
233 } 233 }
234 234
235 private alterInactivity () { 235 private alterInactivity () {
236 if (this.menuOpened || this.mouseInControlBar) { 236 if (this.menuOpened) {
237 this.player.options_.inactivityTimeout = this.savedInactivityTimeout 237 this.player.options_.inactivityTimeout = this.savedInactivityTimeout
238 return 238 return
239 } 239 }
240 240
241 this.player.options_.inactivityTimeout = 1 241 if (!this.mouseInControlBar && !this.isTouchEnabled()) {
242 this.player.options_.inactivityTimeout = 1
243 }
244 }
245
246 private isTouchEnabled () {
247 return ('ontouchstart' in window) ||
248 navigator.maxTouchPoints > 0 ||
249 navigator.msMaxTouchPoints > 0
242 } 250 }
243 251
244 private initCaptions () { 252 private initCaptions () {