From 73e1ce547d1fa25c451902f039ca31bdd3f52589 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 12 Jul 2023 17:20:02 +0100 Subject: [PATCH] Fix other FocusInfo / livekit service URL instances --- src/ClientContext.tsx | 11 ++--------- src/widget.ts | 6 ++---- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/ClientContext.tsx b/src/ClientContext.tsx index ba1b217b..a84d7932 100644 --- a/src/ClientContext.tsx +++ b/src/ClientContext.tsx @@ -139,13 +139,6 @@ export const ClientProvider: FC = ({ children }) => { session; const livekit = Config.get().livekit; - const foci = livekit - ? [ - { - livekitServiceUrl: livekit.livekit_service_url, - }, - ] - : undefined; try { return { @@ -156,7 +149,7 @@ export const ClientProvider: FC = ({ children }) => { userId: user_id, deviceId: device_id, fallbackICEServerAllowed: fallbackICEServerAllowed, - foci, + livekitServiceURL: livekit?.livekit_service_url, }, true ), @@ -173,7 +166,7 @@ export const ClientProvider: FC = ({ children }) => { userId: user_id, deviceId: device_id, fallbackICEServerAllowed: fallbackICEServerAllowed, - foci, + livekitServiceURL: livekit?.livekit_service_url, }, false // Don't need the crypto store just to log out ); diff --git a/src/widget.ts b/src/widget.ts index a7ea1b0f..93107fcd 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -164,7 +164,7 @@ export const widget: WidgetHelpers | null = (() => { // message so that we can use the widget API in less racy mode, but we need to change // element-web to use waitForIFrameLoad=false. Once that change has rolled out, // we can just start the client after we've fetched the config. - foci: [], + livekitServiceURL: undefined, } ); @@ -178,9 +178,7 @@ export const widget: WidgetHelpers | null = (() => { // Now we've fetched the config, be evil and use the getter to inject the focus // into the client (see above XXX). if (focus) { - client.getFoci().push({ - livekitServiceUrl: livekit.livekit_service_url, - }); + client.setLivekitServiceURL(livekit.livekit_service_url); } await client.startClient(); resolve(client);