From e37806242d2623c6bc7518ad6cc7ff5094eabcf1 Mon Sep 17 00:00:00 2001 From: Cyril Date: Mon, 13 Jul 2026 15:41:11 +0200 Subject: [PATCH] =?UTF-8?q?fixup!=20=E2=9C=A8(frontend)=20add=20ScreenShar?= =?UTF-8?q?eZoomableVideo=20component=20for=20zoomable=20screen=20shares?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../livekit/components/ScreenShareZoomControls.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/features/rooms/livekit/components/ScreenShareZoomControls.tsx b/src/frontend/src/features/rooms/livekit/components/ScreenShareZoomControls.tsx index b672921f..0e9458da 100644 --- a/src/frontend/src/features/rooms/livekit/components/ScreenShareZoomControls.tsx +++ b/src/frontend/src/features/rooms/livekit/components/ScreenShareZoomControls.tsx @@ -47,13 +47,14 @@ export const ScreenShareZoomControls = ({ // Only this tile's instance announces to avoid duplicates with multiple shares. useEffect(() => { const onChange = () => { - const entered = !!document.fullscreenElement - setIsFullscreen(entered) + const isThisTileFullscreen = + document.fullscreenElement === containerRef.current + setIsFullscreen(isThisTileFullscreen) - if (entered && document.fullscreenElement === containerRef.current) { + if (isThisTileFullscreen) { wasThisTileFullscreen.current = true announce(t('fullScreenEntered'), 'assertive') - } else if (!entered && wasThisTileFullscreen.current) { + } else if (wasThisTileFullscreen.current) { wasThisTileFullscreen.current = false announce(t('fullScreenExited'), 'assertive') } @@ -64,7 +65,7 @@ export const ScreenShareZoomControls = ({ const toggleFullScreen = useCallback(async () => { try { - if (document.fullscreenElement) { + if (document.fullscreenElement === containerRef.current) { await document.exitFullscreen() } else { // Tile container so zoom controls stay visible in fullscreen.