Backport deviceSetup await (#2522)
This commit is contained in:
@@ -190,7 +190,7 @@ export const GroupCallView: FC<Props> = ({
|
|||||||
const onJoin = async (
|
const onJoin = async (
|
||||||
ev: CustomEvent<IWidgetApiRequest>,
|
ev: CustomEvent<IWidgetApiRequest>,
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
defaultDeviceSetup(ev.detail.data as unknown as JoinCallData);
|
await defaultDeviceSetup(ev.detail.data as unknown as JoinCallData);
|
||||||
await enterRTCSession(rtcSession, perParticipantE2EE);
|
await enterRTCSession(rtcSession, perParticipantE2EE);
|
||||||
await widget!.api.transport.reply(ev.detail, {});
|
await widget!.api.transport.reply(ev.detail, {});
|
||||||
};
|
};
|
||||||
@@ -199,9 +199,12 @@ export const GroupCallView: FC<Props> = ({
|
|||||||
widget!.lazyActions.off(ElementWidgetActions.JoinCall, onJoin);
|
widget!.lazyActions.off(ElementWidgetActions.JoinCall, onJoin);
|
||||||
};
|
};
|
||||||
} else if (widget && !preload && skipLobby) {
|
} else if (widget && !preload && skipLobby) {
|
||||||
// No lobby and no preload: we enter the rtc session right away
|
const join = async (): Promise<void> => {
|
||||||
defaultDeviceSetup({ audioInput: null, videoInput: null });
|
await defaultDeviceSetup({ audioInput: null, videoInput: null });
|
||||||
enterRTCSession(rtcSession, perParticipantE2EE);
|
await enterRTCSession(rtcSession, perParticipantE2EE);
|
||||||
|
};
|
||||||
|
// No lobby and no preload: we enter the RTC Session right away.
|
||||||
|
join();
|
||||||
}
|
}
|
||||||
}, [rtcSession, preload, skipLobby, perParticipantE2EE]);
|
}, [rtcSession, preload, skipLobby, perParticipantE2EE]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user