fix(viewer): reveal overlays from fullscreen (#261)
This commit is contained in:
1 parent
43ff37bed9
commit
b25ea5c0d1
1 file changed
+24
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user