Enable users to join calls from multiple devices
This commit is contained in:
@@ -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} />;
|
||||
|
||||
Reference in New Issue
Block a user