Bypass lobby in embedded mode
This commit is contained in:
parent
aeec2c076e
commit
b31c6c6780
1 changed files with 31 additions and 20 deletions
|
@ -61,7 +61,10 @@ export function GroupCallView({
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
window.groupCall = groupCall;
|
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);
|
useSentryGroupCallHandler(groupCall);
|
||||||
|
|
||||||
|
@ -128,24 +131,32 @@ export function GroupCallView({
|
||||||
} else if (left) {
|
} else if (left) {
|
||||||
return <CallEndedView client={client} />;
|
return <CallEndedView client={client} />;
|
||||||
} else {
|
} else {
|
||||||
return (
|
if (isEmbedded) {
|
||||||
<LobbyView
|
return (
|
||||||
client={client}
|
<FullScreenView>
|
||||||
groupCall={groupCall}
|
<h1>Loading room...</h1>
|
||||||
hasLocalParticipant={hasLocalParticipant}
|
</FullScreenView>,
|
||||||
roomName={groupCall.room.name}
|
);
|
||||||
avatarUrl={avatarUrl}
|
} else {
|
||||||
state={state}
|
return (
|
||||||
onInitLocalCallFeed={initLocalCallFeed}
|
<LobbyView
|
||||||
localCallFeed={localCallFeed}
|
client={client}
|
||||||
onEnter={enter}
|
groupCall={groupCall}
|
||||||
microphoneMuted={microphoneMuted}
|
hasLocalParticipant={hasLocalParticipant}
|
||||||
localVideoMuted={localVideoMuted}
|
roomName={groupCall.room.name}
|
||||||
toggleLocalVideoMuted={toggleLocalVideoMuted}
|
avatarUrl={avatarUrl}
|
||||||
toggleMicrophoneMuted={toggleMicrophoneMuted}
|
state={state}
|
||||||
roomId={roomId}
|
onInitLocalCallFeed={initLocalCallFeed}
|
||||||
isEmbedded={isEmbedded}
|
localCallFeed={localCallFeed}
|
||||||
/>
|
onEnter={enter}
|
||||||
);
|
microphoneMuted={microphoneMuted}
|
||||||
|
localVideoMuted={localVideoMuted}
|
||||||
|
toggleLocalVideoMuted={toggleLocalVideoMuted}
|
||||||
|
toggleMicrophoneMuted={toggleMicrophoneMuted}
|
||||||
|
roomId={roomId}
|
||||||
|
isEmbedded={isEmbedded}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue