David Baker
2023-07-12 16:49:27 +01:00
parent c11259d2aa
commit 4fe6ac6b2d
3 changed files with 83 additions and 34 deletions

View File

@@ -36,7 +36,6 @@ import { UserChoices } from "../livekit/useLiveKit";
import { findDeviceByName } from "../media-utils";
import { OpenIDLoader } from "../livekit/OpenIDLoader";
import { ActiveCall } from "./InCallView";
import { Config } from "../config/Config";
declare global {
interface Window {
@@ -220,20 +219,13 @@ export function GroupCallView({
undefined
);
const livekitServiceURL =
groupCall.foci[0]?.livekitServiceUrl ??
Config.get().livekit.livekit_service_url;
if (!livekitServiceURL) {
return <ErrorView error={new Error("No livekit_service_url defined")} />;
}
if (error) {
return <ErrorView error={error} />;
} else if (state === GroupCallState.Entered && userChoices) {
return (
<OpenIDLoader
client={client}
livekitServiceURL={livekitServiceURL}
groupCall={groupCall}
roomName={`${groupCall.room.roomId}-${groupCall.groupCallId}`}
>
<ActiveCall