fix: hide cursor during fullscreen playback

This commit is contained in:
kuekhaoyang
2026-07-08 22:12:34 +08:00
parent f2667d42de
commit dedf496761
4 changed files with 82 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
export interface PlayerCursorVisibilityState {
isFullscreen: boolean;
isPlaying: boolean;
showControls: boolean;
hasInteractiveOverlay?: boolean;
}
export function shouldHidePlayerCursor({
isFullscreen,
isPlaying,
showControls,
hasInteractiveOverlay = false,
}: PlayerCursorVisibilityState): boolean {
return isFullscreen && isPlaying && !showControls && !hasInteractiveOverlay;
}