Enable users to join calls from multiple devices
This commit is contained in:
parent
46e429c37b
commit
13def24f7e
11 changed files with 199 additions and 216 deletions
|
|
@ -79,7 +79,6 @@ export function GroupCallView({
|
|||
isScreensharing,
|
||||
screenshareFeeds,
|
||||
participants,
|
||||
calls,
|
||||
unencryptedEventsFromUsers,
|
||||
} = useGroupCall(groupCall);
|
||||
|
||||
|
|
@ -173,9 +172,14 @@ export function GroupCallView({
|
|||
const onLeave = useCallback(() => {
|
||||
setLeft(true);
|
||||
|
||||
let participantCount = 0;
|
||||
for (const deviceMap of groupCall.participants.values()) {
|
||||
participantCount += deviceMap.size;
|
||||
}
|
||||
|
||||
PosthogAnalytics.instance.eventCallEnded.track(
|
||||
groupCall.room.name,
|
||||
groupCall.participants.length
|
||||
participantCount
|
||||
);
|
||||
|
||||
leave();
|
||||
|
|
@ -187,14 +191,7 @@ export function GroupCallView({
|
|||
if (!isPasswordlessUser && !isEmbedded) {
|
||||
history.push("/");
|
||||
}
|
||||
}, [
|
||||
groupCall.room.name,
|
||||
groupCall.participants.length,
|
||||
leave,
|
||||
isPasswordlessUser,
|
||||
isEmbedded,
|
||||
history,
|
||||
]);
|
||||
}, [groupCall, leave, isPasswordlessUser, isEmbedded, history]);
|
||||
|
||||
useEffect(() => {
|
||||
if (widget && state === GroupCallState.Entered) {
|
||||
|
|
@ -236,7 +233,6 @@ export function GroupCallView({
|
|||
roomName={groupCall.room.name}
|
||||
avatarUrl={avatarUrl}
|
||||
participants={participants}
|
||||
calls={calls}
|
||||
microphoneMuted={microphoneMuted}
|
||||
localVideoMuted={localVideoMuted}
|
||||
toggleLocalVideoMuted={toggleLocalVideoMuted}
|
||||
|
|
@ -253,12 +249,6 @@ export function GroupCallView({
|
|||
/>
|
||||
);
|
||||
}
|
||||
} else if (state === GroupCallState.Entering) {
|
||||
return (
|
||||
<FullScreenView>
|
||||
<h1>{t("Entering room…")}</h1>
|
||||
</FullScreenView>
|
||||
);
|
||||
} else if (left) {
|
||||
if (isPasswordlessUser) {
|
||||
return <CallEndedView client={client} />;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue