diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index 5b80db3d..5ceb30f5 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -842,6 +842,7 @@ export const InCallView: FC = ({ .getConnections() .map((connectionItem) => ({ room: connectionItem.livekitRoom, + livekitAlias: connectionItem.livekitAlias, // TODO compute is local or tag it in the livekit room items already isLocal: undefined, url: connectionItem.transport.livekit_service_url, diff --git a/src/settings/DeveloperSettingsTab.test.tsx b/src/settings/DeveloperSettingsTab.test.tsx index 23fa67a7..c19e4f4d 100644 --- a/src/settings/DeveloperSettingsTab.test.tsx +++ b/src/settings/DeveloperSettingsTab.test.tsx @@ -25,7 +25,7 @@ function createMockLivekitRoom( wsUrl: string, serverInfo: object, metadata: string, -): { isLocal: boolean; url: string; room: LivekitRoom } { +): { isLocal: boolean; url: string; room: LivekitRoom; livekitAlias: string } { const mockRoom = { serverInfo, metadata, @@ -38,6 +38,7 @@ function createMockLivekitRoom( isLocal: true, url: wsUrl, room: mockRoom, + livekitAlias: "TestAlias", }; } @@ -61,6 +62,7 @@ describe("DeveloperSettingsTab", () => { room: LivekitRoom; url: string; isLocal?: boolean; + livekitAlias: string; }[] = [ createMockLivekitRoom( "wss://local-sfu.example.org", @@ -69,6 +71,7 @@ describe("DeveloperSettingsTab", () => { ), { isLocal: false, + livekitAlias: "TestAlias2", url: "wss://remote-sfu.example.org", room: { localParticipant: { identity: "localParticipantIdentity" }, diff --git a/src/settings/DeveloperSettingsTab.tsx b/src/settings/DeveloperSettingsTab.tsx index a187e4b5..a94dca26 100644 --- a/src/settings/DeveloperSettingsTab.tsx +++ b/src/settings/DeveloperSettingsTab.tsx @@ -48,7 +48,12 @@ import { useUrlParams } from "../UrlParams"; interface Props { client: MatrixClient; - livekitRooms?: { room: LivekitRoom; url: string; isLocal?: boolean }[]; + livekitRooms?: { + room: LivekitRoom; + url: string; + isLocal?: boolean; + livekitAlias?: string; + }[]; env: ImportMetaEnv; } @@ -310,6 +315,7 @@ export const DeveloperSettingsTab: FC = ({ url: livekitRoom.url || "unknown", })} +

LivekitAlias: {livekitRoom.livekitAlias}

{livekitRoom.isLocal &&

ws-url: {localSfuUrl?.href}

}

{t("developer_mode.livekit_server_info")}( diff --git a/src/settings/__snapshots__/DeveloperSettingsTab.test.tsx.snap b/src/settings/__snapshots__/DeveloperSettingsTab.test.tsx.snap index 2ee3710b..57afe4d9 100644 --- a/src/settings/__snapshots__/DeveloperSettingsTab.test.tsx.snap +++ b/src/settings/__snapshots__/DeveloperSettingsTab.test.tsx.snap @@ -355,6 +355,10 @@ exports[`DeveloperSettingsTab > renders and matches snapshot 1`] = `

LiveKit SFU: wss://local-sfu.example.org

+

+ LivekitAlias: + TestAlias +

ws-url: wss://local-sfu.example.org/ @@ -393,6 +397,10 @@ exports[`DeveloperSettingsTab > renders and matches snapshot 1`] = `

LiveKit SFU: wss://remote-sfu.example.org

+

+ LivekitAlias: + TestAlias2 +

LiveKit Server Info ( diff --git a/src/state/CallViewModel/remoteMembers/Connection.ts b/src/state/CallViewModel/remoteMembers/Connection.ts index f286b0cd..028b28f6 100644 --- a/src/state/CallViewModel/remoteMembers/Connection.ts +++ b/src/state/CallViewModel/remoteMembers/Connection.ts @@ -117,6 +117,14 @@ export class Connection { */ public readonly remoteParticipants$: Behavior; + /** + * The alias of the LiveKit room. + */ + public get livekitAlias(): string | undefined { + return this._livekitAlias; + } + private _livekitAlias?: string; + /** * Whether the connection has been stopped. * @see Connection.stop @@ -144,9 +152,10 @@ export class Connection { this._state$.next(ConnectionState.FetchingConfig); // We should already have this information after creating the localTransport. // only call getSFUConfigWithOpenID for connections where we do not have a token yet. (existingJwtTokenData === undefined) - const { url, jwt } = + const { url, jwt, livekitAlias } = this.existingSFUConfig ?? (await this.getSFUConfigForRemoteConnection()); + this._livekitAlias = livekitAlias; // If we were stopped while fetching the config, don't proceed to connect if (this.stopped) return;