Merge branch 'voip-team/rebased-multiSFU' into valere/multi-sfu/connection_states

This commit is contained in:
Valere
2025-10-10 16:51:09 +02:00
4 changed files with 8 additions and 21 deletions

View File

@@ -67,6 +67,7 @@ export const trackProcessorSync = (
videoTrack$: Behavior<LocalVideoTrack | null>, videoTrack$: Behavior<LocalVideoTrack | null>,
processor$: Behavior<ProcessorState>, processor$: Behavior<ProcessorState>,
): void => { ): void => {
// TODO-MULTI-SFU: Bind to an ObservableScope to avoid leaking resources.
combineLatest([videoTrack$, processor$]).subscribe( combineLatest([videoTrack$, processor$]).subscribe(
([videoTrack, processorState]) => { ([videoTrack, processorState]) => {
if (!processorState) return; if (!processorState) return;

View File

@@ -436,10 +436,7 @@ export const GroupCallView: FC<Props> = ({
client={client} client={client}
matrixInfo={matrixInfo} matrixInfo={matrixInfo}
muteStates={muteStates} muteStates={muteStates}
onEnter={async () => { onEnter={() => setJoined(true)}
setJoined(true);
return Promise.resolve();
}}
confineToRoom={confineToRoom} confineToRoom={confineToRoom}
hideHeader={header === HeaderStyle.None} hideHeader={header === HeaderStyle.None}
participantCount={participantCount} participantCount={participantCount}

View File

@@ -57,7 +57,7 @@ interface Props {
client: MatrixClient; client: MatrixClient;
matrixInfo: MatrixInfo; matrixInfo: MatrixInfo;
muteStates: MuteStates; muteStates: MuteStates;
onEnter: () => Promise<void>; onEnter: () => void;
enterLabel?: JSX.Element | string; enterLabel?: JSX.Element | string;
confineToRoom: boolean; confineToRoom: boolean;
hideHeader: boolean; hideHeader: boolean;
@@ -183,14 +183,6 @@ export const LobbyView: FC<Props> = ({
useTrackProcessorSync(videoTrack); 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 // TODO: Unify this component with InCallView, so we can get slick joining
// animations and don't have to feel bad about reusing its CSS // animations and don't have to feel bad about reusing its CSS
return ( return (
@@ -220,12 +212,12 @@ export const LobbyView: FC<Props> = ({
> >
<Button <Button
className={classNames(styles.join, { className={classNames(styles.join, {
[styles.wait]: waiting, [styles.wait]: waitingForInvite,
})} })}
size={waiting ? "sm" : "lg"} size={waitingForInvite ? "sm" : "lg"}
disabled={waiting} disabled={waitingForInvite}
onClick={() => { onClick={() => {
if (!waiting) onEnterCall(); if (!waitingForInvite) onEnter();
}} }}
data-testid="lobby_joinCall" data-testid="lobby_joinCall"
> >

View File

@@ -169,10 +169,7 @@ export const RoomPage: FC = () => {
: E2eeType.NONE, : E2eeType.NONE,
}, },
}} }}
onEnter={async (): Promise<void> => { onEnter={(): void => knock?.()}
knock?.();
return Promise.resolve();
}}
enterLabel={label} enterLabel={label}
waitingForInvite={groupCallState.kind === "waitForInvite"} waitingForInvite={groupCallState.kind === "waitForInvite"}
confineToRoom={confineToRoom} confineToRoom={confineToRoom}