From 7c5f07b498bbc49963cac45bbd8b832d1aeea2c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 25 Jul 2023 15:49:59 +0200 Subject: [PATCH] Add a comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/livekit/useLiveKit.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/livekit/useLiveKit.ts b/src/livekit/useLiveKit.ts index aa8d1e42..37fcffbb 100644 --- a/src/livekit/useLiveKit.ts +++ b/src/livekit/useLiveKit.ts @@ -63,8 +63,10 @@ export function useLiveKit( return options; }, [userChoices.video, userChoices.audio, e2eeOptions]); + // We have to create the room manually here due to a bug inside + // @livekit/components-react. JSON.stringify() is used in deps of a + // useEffect() with an argument that references itself, if E2EE is enabled const roomWithoutProps = useMemo(() => new Room(roomOptions), [roomOptions]); - const { room } = useLiveKitRoom({ token: sfuConfig?.jwt, serverUrl: sfuConfig?.url,