-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
More responsive player gestures on mobile #3554
Copy link
Copy link
Closed
Labels
Description
We have a logic that when clicking on the Player, we wait 200 milliseconds to see if another click is coming.
If another click is happening, we trigger fullscreen. If no other click is happening, we play/pause the video.
I find that this pattern does not apply to mobile. You do not double-tap on mobile to go to fullscreen.
The current logic is here:
remotion/packages/player/src/PlayerUI.tsx
Lines 490 to 494 in 93c6aa8
| const [handleClick, handleDoubleClick] = useClickPreventionOnDoubleClick( | |
| onSingleClick, | |
| onDoubleClick, | |
| doubleClickToFullscreen, | |
| ); |
New logic
- Keep the same logic on desktop
- On mobile, if tapping the Player, it should reveal the controls immediately (this might already work!)
- You can use https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType to check if a mouse or tap was used.
- Don't wait for double tap
- Update the documentation for
doubleClickToFullscreento say that it does not apply on mobile.
💎 This issue has a bounty on it!
Read our contributing guidelines:
- How to contribute: https://www.remotion.dev/docs/contributing/
- Implementing a new feature: https://www.remotion.dev/docs/contributing/feature
- Implementing a new option: https://www.remotion.dev/docs/contributing/option
- Write documentation: https://www.remotion.dev/docs/contributing/docs
- Bounty information: https://www.remotion.dev/docs/contributing/bounty
/bounty 100
Reactions are currently unavailable