Hook

useIdleControls

Auto-hides controls and cursor after 3 seconds of mouse inactivity in fullscreen.

Behavior rules

ConditionControls visible?
Fullscreen + playing + idle 3sHidden
Fullscreen + playing + mouse movesVisible (timer resets)
Fullscreen + pausedAlways visible
Fullscreen + popover openAlways visible
Windowed mode (any state)CSS group-hover only

Usage

idle-controls.tsx
const { controlsVisible, showControls } = useIdleControls({
  isPlaying: state.isPlaying,
  isFullscreen: state.isFullscreen,
  isSettingsOpen,
})

Returns

PropTypeDefaultDescription
controlsVisiblebooleanWhether the controls should be rendered visible right now.
showControls() => voidManually show controls and reset the idle timer.

Cursor hiding

How cursor hiding works

cursor-none is applied to the player container (not the iframe) when controls are hidden in fullscreen. The iframe has pointer-events: noneso the container's cursor style governs what the user sees.