From 78eff5fa9e4e1049c36b1ec2afe80586b1c8e570 Mon Sep 17 00:00:00 2001 From: Robert Long Date: Tue, 18 Jan 2022 14:56:15 -0800 Subject: [PATCH] Ensure webcam is turned off when leaving --- src/room/GroupCallView.jsx | 3 +-- src/room/LobbyView.jsx | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/room/GroupCallView.jsx b/src/room/GroupCallView.jsx index 2d9b5853..5808f1f4 100644 --- a/src/room/GroupCallView.jsx +++ b/src/room/GroupCallView.jsx @@ -58,12 +58,11 @@ export function GroupCallView({ const history = useHistory(); const onLeave = useCallback(() => { + setLeft(true); leave(); if (!isPasswordlessUser) { history.push("/"); - } else { - setLeft(true); } }, [leave, history]); diff --git a/src/room/LobbyView.jsx b/src/room/LobbyView.jsx index 68249b11..dd4b96b4 100644 --- a/src/room/LobbyView.jsx +++ b/src/room/LobbyView.jsx @@ -30,6 +30,7 @@ export function LobbyView({ useEffect(() => { // TODO: Only init once + console.log("onInitLocalCallFeed"); onInitLocalCallFeed(); }, [onInitLocalCallFeed]);