diff --git a/web/src/components/player/DynamicVideoPlayer.tsx b/web/src/components/player/DynamicVideoPlayer.tsx index d3ef4f9e0..23f25a85e 100644 --- a/web/src/components/player/DynamicVideoPlayer.tsx +++ b/web/src/components/player/DynamicVideoPlayer.tsx @@ -152,6 +152,19 @@ export default function DynamicVideoPlayer({ onKeyboardShortcut, ); + // mobile tap controls + + useEffect(() => { + if (isDesktop || !playerRef) { + return; + } + + const callback = () => setControls(!controls); + playerRef.on("touchstart", callback); + + return () => playerRef.off("touchstart", callback); + }, [controls, playerRef]); + // initial state const initialPlaybackSource = useMemo(() => { @@ -238,14 +251,6 @@ export default function DynamicVideoPlayer({ } : undefined } - onClick={ - isMobile - ? (e) => { - e.stopPropagation(); - setControls(!controls); - } - : undefined - } >
{ setPlayerRef(player); }}