diff options
author | Chocobozzz <me@florianbigard.com> | 2022-02-04 09:23:07 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-02-04 09:23:07 +0100 |
commit | 457c83486ed2037a8cf0e55b06b1ae9370ed4d93 (patch) | |
tree | 382c272580a5cc2b24b5a3124645c627dd330ae7 | |
parent | 6e0ee5a53a6464ab9ed0fee8a1fe0a44aacd541f (diff) | |
download | PeerTube-457c83486ed2037a8cf0e55b06b1ae9370ed4d93.tar.gz PeerTube-457c83486ed2037a8cf0e55b06b1ae9370ed4d93.tar.zst PeerTube-457c83486ed2037a8cf0e55b06b1ae9370ed4d93.zip |
Fix hidding mobile overlay
-rw-r--r-- | client/src/assets/player/mobile/peertube-mobile-plugin.ts | 11 |
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) { |