From 26d32632c76fd1906ee619aff4cba6d74309894b Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 15 Sep 2026 22:50:08 +0200 Subject: [PATCH] Hide the cursor over the video once the bottom bar auto-hides Asked for directly: the auto-hide behavior itself (bottom bar collapses to just its seek line after a stretch of no activity) already shipped earlier - a mouse cursor left sitting over the video afterward is the same kind of clutter that was the point of hiding in the first place. .playerWrap now gets a .cursorHidden class alongside #bottomBar's own .minimal, toggled at the exact same two call sites (scheduleControlsHide/showControls) so the two states can never drift out of sync with each other. cursor: none on that class does the rest - no new listener needed, since playerWrap's own pointermove/pointerdown already call showControls() on any mouse activity, which is exactly when the cursor should reappear too. Verified: typecheck + build (client). Confirmed the compiled bundle carries both the classList calls and the CSS rule. Not verified in an actual running player - no Emby login reachable from this sandbox to open a real video party and let the auto-hide timer elapse. Co-Authored-By: Claude Sonnet 5 --- client/src/views/player/Player.css | 9 +++++++++ client/src/views/player/Player.ts | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/client/src/views/player/Player.css b/client/src/views/player/Player.css index ab8be56..421805d 100644 --- a/client/src/views/player/Player.css +++ b/client/src/views/player/Player.css @@ -16,6 +16,15 @@ object-fit: contain; } +/* Toggled alongside .bottomBar.minimal (see Player.ts's scheduleControlsHide/ + showControls) - a mouse cursor left sitting over the video is the same + kind of clutter the bar itself was, once there's nothing left under it + to interact with. Any pointermove/pointerdown anywhere in .playerWrap + already calls showControls(), so the cursor reappears the instant the + mouse moves again - same convention as any other video player's + auto-hiding controls. */ +.playerWrap.cursorHidden { cursor: none; } + /* Two stacked rows, both part of the same top gradient overlay: the action bar (title/members/next/settings/leave) and, below it, the presence avatars - see .presenceOverlay in styles/presence.css. Stacking them in diff --git a/client/src/views/player/Player.ts b/client/src/views/player/Player.ts index 269e62d..d5b80f8 100644 --- a/client/src/views/player/Player.ts +++ b/client/src/views/player/Player.ts @@ -530,7 +530,11 @@ function renderVideoPlayer(root: HTMLElement, partyId: string, party: PartyPubli * sitting on the bar itself, and re-arms on every discrete playback * event too (onDriverStateChanged above), not just raw pointer * activity - resuming from pause has to restart the countdown, not - * leave the bar stuck open forever. + * leave the bar stuck open forever. .playerWrap also gets + * .cursorHidden alongside .minimal (see Player.css) - asked for + * directly too: a mouse cursor left sitting over the video is exactly + * the same kind of clutter the bar itself was, once there's nothing + * left under it to interact with. */ function clearControlsHideTimer() { if (controlsHideTimer) { @@ -544,11 +548,13 @@ function renderVideoPlayer(root: HTMLElement, partyId: string, party: PartyPubli controlsHideTimer = window.setTimeout(() => { if (activeDriver.paused || isPointerOverBottomBar) return; bottomBar.classList.add('minimal'); + playerWrap.classList.add('cursorHidden'); }, CONTROLS_HIDE_DELAY_MS); } function showControls() { bottomBar.classList.remove('minimal'); + playerWrap.classList.remove('cursorHidden'); scheduleControlsHide(); } -- 2.45.2