Merge branch 'feat/improve-fullscreen-detection' into feat/support-safari-fullscreen-video-mode

This commit is contained in:
Timothy Z. 2026-05-04 21:54:57 +03:00 committed by GitHub
commit 06ce7410ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -105,6 +105,8 @@ const FullscreenProvider = ({ children }: Props) => {
};
}, [shell, toggleFullscreen, exitFullscreen, escExitFullscreen]);
const supported = shell.active || document.fullscreenEnabled === true;
const value = useMemo<FullscreenContextValue>(
() => [fullscreen, requestFullscreen, exitFullscreen, toggleFullscreen, supported, setVideoElement],
[fullscreen, requestFullscreen, exitFullscreen, toggleFullscreen, supported, setVideoElement]