Add warning for existing call session

This commit is contained in:
Robert Long 2021-10-21 14:22:59 -07:00
parent 250099b81d
commit 27e2ab16f3

View file

@ -104,6 +104,7 @@ export function GroupCallView({ client, groupCall }) {
isScreensharing, isScreensharing,
localScreenshareFeed, localScreenshareFeed,
screenshareFeeds, screenshareFeeds,
hasLocalParticipant,
} = useGroupCall(groupCall); } = useGroupCall(groupCall);
if (error) { if (error) {
@ -132,6 +133,7 @@ export function GroupCallView({ client, groupCall }) {
} else { } else {
return ( return (
<RoomSetupView <RoomSetupView
hasLocalParticipant={hasLocalParticipant}
roomName={groupCall.room.name} roomName={groupCall.room.name}
state={state} state={state}
onInitLocalCallFeed={initLocalCallFeed} onInitLocalCallFeed={initLocalCallFeed}
@ -176,6 +178,7 @@ function RoomSetupView({
localVideoMuted, localVideoMuted,
toggleLocalVideoMuted, toggleLocalVideoMuted,
toggleMicrophoneMuted, toggleMicrophoneMuted,
hasLocalParticipant,
}) { }) {
const { stream } = useCallFeed(localCallFeed); const { stream } = useCallFeed(localCallFeed);
const videoRef = useMediaStream(stream, true); const videoRef = useMediaStream(stream, true);
@ -193,6 +196,9 @@ function RoomSetupView({
</CenterNav> </CenterNav>
</Header> </Header>
<div className={styles.joinRoom}> <div className={styles.joinRoom}>
{hasLocalParticipant && (
<p>Warning, you are signed into this call on another device.</p>
)}
<div className={styles.preview}> <div className={styles.preview}>
{state === GroupCallState.LocalCallFeedUninitialized && ( {state === GroupCallState.LocalCallFeedUninitialized && (
<p className={styles.webcamPermissions}> <p className={styles.webcamPermissions}>