From 541b2a509b9c4f7a7420869d0da9b31bffa92014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Tue, 4 Aug 2026 23:41:57 +0000 Subject: [PATCH] the player chrome can actually hide now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The auto-hide timer was there and correct; `position` was in its dependency list. That advances about four times a second while a video plays, so the effect re-ran and cleared the pending timeout every ~250ms and the 2.5s never elapsed. The chrome could only hide while playback was stopped — which is exactly when the code deliberately keeps it up — so in practice it never hid at all. Not a fullscreen bug, though fullscreen is where a permanent scrubber is impossible to ignore. Co-Authored-By: Claude Opus 5 --- .../officerdev/src/apps/Jellyfin/VideoPlayer.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) => {