From 3a2cee581e3315e88cb761606f66dc46174aaabe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 27 Jun 2023 17:25:35 +0200 Subject: [PATCH 1/3] Get LK info 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/ClientContext.tsx | 12 ++++++++++++ src/room/InCallView.tsx | 5 ++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/ClientContext.tsx b/src/ClientContext.tsx index 08593a4b..acd9511c 100644 --- a/src/ClientContext.tsx +++ b/src/ClientContext.tsx @@ -138,6 +138,16 @@ export const ClientProvider: FC = ({ children }) => { const { user_id, device_id, access_token, passwordlessUser } = session; + const livekit = Config.get().livekit; + const foci = livekit + ? [ + { + url: livekit.server_url, + jwtServiceUrl: livekit.jwt_service_url, + }, + ] + : undefined; + try { return { client: await initClient( @@ -147,6 +157,7 @@ export const ClientProvider: FC = ({ children }) => { userId: user_id, deviceId: device_id, fallbackICEServerAllowed: fallbackICEServerAllowed, + foci, }, true ), @@ -163,6 +174,7 @@ export const ClientProvider: FC = ({ children }) => { userId: user_id, deviceId: device_id, fallbackICEServerAllowed: fallbackICEServerAllowed, + foci, }, false // Don't need the crypto store just to log out ); diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index 71257200..07f32523 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -72,7 +72,6 @@ import { MatrixInfo } from "./VideoPreview"; import { useJoinRule } from "./useJoinRule"; import { ParticipantInfo } from "./useGroupCall"; import { ItemData, TileContent } from "../video-grid/VideoTile"; -import { Config } from "../config/Config"; import { NewVideoGrid } from "../video-grid/NewVideoGrid"; import { OTelGroupCallMembership } from "../otel/OTelGroupCallMembership"; import { SettingsModal } from "../settings/SettingsModal"; @@ -96,8 +95,8 @@ interface ActiveCallProps extends Omit { export function ActiveCall(props: ActiveCallProps) { const livekitRoom = useLiveKit(props.userChoices, { - sfuUrl: Config.get().livekit!.server_url, - jwtUrl: `${Config.get().livekit!.jwt_service_url}/token`, + sfuUrl: props.groupCall.foci[0]!.url, + jwtUrl: `${props.groupCall.foci[0]!.jwtServiceUrl}/token`, roomName: props.matrixInfo.roomName, userDisplayName: props.matrixInfo.displayName, userIdentity: `${props.client.getUserId()}:${props.client.getDeviceId()}`, From 30ba12ccb84621d6d12ac3e3d5bf66bf8d62957e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 27 Jun 2023 17:31:54 +0200 Subject: [PATCH 2/3] Update js-sdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6a077d05..f600b0f5 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "i18next-http-backend": "^1.4.4", "livekit-client": "^1.9.7", "lodash": "^4.17.21", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#af10b0c44b4a427c8d2224bfd6feb03a12cfd27e", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#28492043ad64aa28718da169ec04ec893afeb975", "matrix-widget-api": "^1.3.1", "mermaid": "^8.13.8", "normalize.css": "^8.0.1", From 792067ef224696aa2a4ac65f45bbdd2030c2bc41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 4 Jul 2023 17:44:41 +0200 Subject: [PATCH 3/3] Update js-sd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 183bdfb0..2fed945c 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "i18next-http-backend": "^1.4.4", "livekit-client": "^1.9.7", "lodash": "^4.17.21", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#28492043ad64aa28718da169ec04ec893afeb975", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#426d29d6b9a9d71a3c0d7fe6f7bac3473cd10832", "matrix-widget-api": "^1.3.1", "mermaid": "^8.13.8", "normalize.css": "^8.0.1",