mirror of
https://github.com/vector-im/element-call.git
synced 2026-01-30 03:15:55 +00:00
Merge branch 'voip-team/rebased-multiSFU' into valere/multi-sfu/connection_states
This commit is contained in:
@@ -67,6 +67,7 @@ export const trackProcessorSync = (
|
||||
videoTrack$: Behavior<LocalVideoTrack | null>,
|
||||
processor$: Behavior<ProcessorState>,
|
||||
): void => {
|
||||
// TODO-MULTI-SFU: Bind to an ObservableScope to avoid leaking resources.
|
||||
combineLatest([videoTrack$, processor$]).subscribe(
|
||||
([videoTrack, processorState]) => {
|
||||
if (!processorState) return;
|
||||
|
||||
@@ -436,10 +436,7 @@ export const GroupCallView: FC<Props> = ({
|
||||
client={client}
|
||||
matrixInfo={matrixInfo}
|
||||
muteStates={muteStates}
|
||||
onEnter={async () => {
|
||||
setJoined(true);
|
||||
return Promise.resolve();
|
||||
}}
|
||||
onEnter={() => setJoined(true)}
|
||||
confineToRoom={confineToRoom}
|
||||
hideHeader={header === HeaderStyle.None}
|
||||
participantCount={participantCount}
|
||||
|
||||
@@ -57,7 +57,7 @@ interface Props {
|
||||
client: MatrixClient;
|
||||
matrixInfo: MatrixInfo;
|
||||
muteStates: MuteStates;
|
||||
onEnter: () => Promise<void>;
|
||||
onEnter: () => void;
|
||||
enterLabel?: JSX.Element | string;
|
||||
confineToRoom: boolean;
|
||||
hideHeader: boolean;
|
||||
@@ -183,14 +183,6 @@ export const LobbyView: FC<Props> = ({
|
||||
|
||||
useTrackProcessorSync(videoTrack);
|
||||
|
||||
const [waitingToEnter, setWaitingToEnter] = useState(false);
|
||||
const onEnterCall = useCallback(() => {
|
||||
setWaitingToEnter(true);
|
||||
void onEnter().finally(() => setWaitingToEnter(false));
|
||||
}, [onEnter]);
|
||||
|
||||
const waiting = waitingForInvite || waitingToEnter;
|
||||
|
||||
// TODO: Unify this component with InCallView, so we can get slick joining
|
||||
// animations and don't have to feel bad about reusing its CSS
|
||||
return (
|
||||
@@ -220,12 +212,12 @@ export const LobbyView: FC<Props> = ({
|
||||
>
|
||||
<Button
|
||||
className={classNames(styles.join, {
|
||||
[styles.wait]: waiting,
|
||||
[styles.wait]: waitingForInvite,
|
||||
})}
|
||||
size={waiting ? "sm" : "lg"}
|
||||
disabled={waiting}
|
||||
size={waitingForInvite ? "sm" : "lg"}
|
||||
disabled={waitingForInvite}
|
||||
onClick={() => {
|
||||
if (!waiting) onEnterCall();
|
||||
if (!waitingForInvite) onEnter();
|
||||
}}
|
||||
data-testid="lobby_joinCall"
|
||||
>
|
||||
|
||||
@@ -169,10 +169,7 @@ export const RoomPage: FC = () => {
|
||||
: E2eeType.NONE,
|
||||
},
|
||||
}}
|
||||
onEnter={async (): Promise<void> => {
|
||||
knock?.();
|
||||
return Promise.resolve();
|
||||
}}
|
||||
onEnter={(): void => knock?.()}
|
||||
enterLabel={label}
|
||||
waitingForInvite={groupCallState.kind === "waitForInvite"}
|
||||
confineToRoom={confineToRoom}
|
||||
|
||||
Reference in New Issue
Block a user