aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/assets/player/mobile/peertube-mobile-plugin.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/client/src/assets/player/mobile/peertube-mobile-plugin.ts b/client/src/assets/player/mobile/peertube-mobile-plugin.ts
index 95864c817..a4810d720 100644
--- a/client/src/assets/player/mobile/peertube-mobile-plugin.ts
+++ b/client/src/assets/player/mobile/peertube-mobile-plugin.ts
@@ -54,7 +54,7 @@ class PeerTubeMobilePlugin extends Plugin {
54 } 54 }
55 55
56 private initTouchStartEvents () { 56 private initTouchStartEvents () {
57 this.player.on('touchstart', (event: TouchEvent) => { 57 const handleTouchStart = (event: TouchEvent) => {
58 event.stopPropagation() 58 event.stopPropagation()
59 59
60 if (this.tapTimeout) { 60 if (this.tapTimeout) {
@@ -79,7 +79,16 @@ class PeerTubeMobilePlugin extends Plugin {
79 }, PeerTubeMobilePlugin.DOUBLE_TAP_DELAY_MS) 79 }, PeerTubeMobilePlugin.DOUBLE_TAP_DELAY_MS)
80 80
81 this.lastTapEvent = event 81 this.lastTapEvent = event
82 }
83
84 this.player.on('touchstart', (event: TouchEvent) => {
85 // Only enable user active on player touch, we listen event on peertube mobile buttons to disable it
86 if (this.player.userActive()) return
87
88 handleTouchStart(event)
82 }) 89 })
90
91 this.peerTubeMobileButtons.on('touchstart', handleTouchStart)
83 } 92 }
84 93
85 private onDoubleTap (event: TouchEvent) { 94 private onDoubleTap (event: TouchEvent) {