diff --git a/src/workspaces/officerdev/src/apps/Jellyfin/VideoPlayer.tsx b/src/workspaces/officerdev/src/apps/Jellyfin/VideoPlayer.tsx index 3b336de5..320e4657 100644 --- a/src/workspaces/officerdev/src/apps/Jellyfin/VideoPlayer.tsx +++ b/src/workspaces/officerdev/src/apps/Jellyfin/VideoPlayer.tsx @@ -255,11 +255,16 @@ export const VideoPlayer = ({ id }: { id: string }) => { }, []); // Auto-hide, but never while paused — a paused player with no controls looks broken rather than clean. + // + // `position` must NOT be a dependency, however much it reads like activity. It advances ~4x a second from + // onTimeUpdate, so naming it here re-ran this effect — and so cleared the pending timer — long before 2.5s + // had passed. The chrome could then only hide while playback was stopped, which is to say never. Real + // activity is `wake()`, which sets `chrome` back to true and restarts the timer through the dep below. useEffect(() => { if (!chrome || !playing) return; const timer = setTimeout(() => setChrome(false), CHROME_HIDE_MS); return () => clearTimeout(timer); - }, [chrome, playing, position]); + }, [chrome, playing]); const seek = useCallback( (seconds: number) => {