fix(viewer): reveal overlays from fullscreen (#261)

This commit is contained in:
AAA authored and GitHub committed 2026-08-25 17:24:04 +08:00
1 parent 43ff37bed9
commit b25ea5c0d1
1 file changed
+24
+24
View File
@@ -1534,6 +1534,30 @@ export function ViewerPage({ roomId, viewerGrant }: ViewerPageProps) {
);
}, [frameProofEpoch, presentationState.connection, remoteMedia]);
useEffect(() => {
if (presentation.overlay === "none") {
return;
}
const video = videoRef.current as
| (HTMLVideoElement & {
webkitDisplayingFullscreen?: boolean;
webkitExitFullscreen?: () => void;
})
| null;
if (!video) {
return;
}
if (document.fullscreenElement === video) {
void document.exitFullscreen().catch(() => undefined);
return;
}
if (video.webkitDisplayingFullscreen) {
try {
video.webkitExitFullscreen?.();
} catch {}
}
}, [presentation.overlay]);
useEffect(() => {
dispatchPresentation({
type: "retry-available",