fix(player): re-arm the cursor idle timer when playback changes

The idle countdown that hides the cursor and the play/pause overlay was only
started from mousemove. A cursor that stayed still over the player while a
click, a key or a scrub release started playback never got a countdown, so
the overlay stayed on the video until the mouse moved again.

Arm the timer from one place and rerun it whenever playback or fullscreen
changes, keeping the cursor-over-player state in a ref so the same rule
applies from every entry point.
This commit is contained in:
2026-09-08 12:55:30 +03:00
parent 79bba5e7a1
commit b2070c1030
3 changed files with 107 additions and 14 deletions
-1
View File
@@ -214,7 +214,6 @@ export function VideoPageContent({
setActiveVersionId,
});
// Cursor idle detection: hide overlay when cursor idle for 3s while playing
// Memoize version selection handler to prevent recreating on each render
const handleVersionSelect = useCallback(
(versionId: string) => {