From b31c6c6780bca4b47525298eac0870cee0530e37 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 8 Jul 2022 20:55:18 +0100 Subject: [PATCH] Bypass lobby in embedded mode --- src/room/GroupCallView.jsx | 51 +++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/src/room/GroupCallView.jsx b/src/room/GroupCallView.jsx index 2403bf6..defcf80 100644 --- a/src/room/GroupCallView.jsx +++ b/src/room/GroupCallView.jsx @@ -61,7 +61,10 @@ export function GroupCallView({ useEffect(() => { window.groupCall = groupCall; - }, [groupCall]); + + // In embedded mode, bypass the lobby and just enter the call straight away + if (isEmbedded) groupCall.enter(); + }, [groupCall, isEmbedded]); useSentryGroupCallHandler(groupCall); @@ -128,24 +131,32 @@ export function GroupCallView({ } else if (left) { return ; } else { - return ( - - ); + if (isEmbedded) { + return ( + +

Loading room...

+
, + ); + } else { + return ( + + ); + } } }