From 124c6223e43a5aee255b0ce15b94adee1243b039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 7 Jul 2023 16:08:30 +0200 Subject: [PATCH] Fallback to config LiveKit URL if there is no URL coming from the js-sdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/room/GroupCallView.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index 64c3e96..87b6795 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -36,6 +36,7 @@ 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 { @@ -219,7 +220,9 @@ export function GroupCallView({ undefined ); - const livekitServiceURL = groupCall.foci[0]?.livekitServiceUrl; + const livekitServiceURL = + groupCall.foci[0]?.livekitServiceUrl ?? + Config.get().livekit.livekit_service_url; if (!livekitServiceURL) { return ; }