Merge branch 'livekit' into toger5/dont-trap-in-invalid-config
This commit is contained in:
@@ -36,7 +36,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,
|
||||
@@ -49,6 +49,7 @@ function createMockLivekitRoom(
|
||||
isLocal: true,
|
||||
url: wsUrl,
|
||||
room: mockRoom,
|
||||
livekitAlias: "TestAlias",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -72,6 +73,7 @@ describe("DeveloperSettingsTab", () => {
|
||||
room: LivekitRoom;
|
||||
url: string;
|
||||
isLocal?: boolean;
|
||||
livekitAlias: string;
|
||||
}[] = [
|
||||
createMockLivekitRoom(
|
||||
"wss://local-sfu.example.org",
|
||||
@@ -80,6 +82,7 @@ describe("DeveloperSettingsTab", () => {
|
||||
),
|
||||
{
|
||||
isLocal: false,
|
||||
livekitAlias: "TestAlias2",
|
||||
url: "wss://remote-sfu.example.org",
|
||||
room: {
|
||||
localParticipant: { identity: "localParticipantIdentity" },
|
||||
|
||||
@@ -51,7 +51,12 @@ import { getSFUConfigWithOpenID } from "../livekit/openIDSFU";
|
||||
interface Props {
|
||||
client: MatrixClient;
|
||||
roomId?: string;
|
||||
livekitRooms?: { room: LivekitRoom; url: string; isLocal?: boolean }[];
|
||||
livekitRooms?: {
|
||||
room: LivekitRoom;
|
||||
url: string;
|
||||
isLocal?: boolean;
|
||||
livekitAlias?: string;
|
||||
}[];
|
||||
env: ImportMetaEnv;
|
||||
}
|
||||
|
||||
@@ -343,6 +348,7 @@ export const DeveloperSettingsTab: FC<Props> = ({
|
||||
url: livekitRoom.url || "unknown",
|
||||
})}
|
||||
</h4>
|
||||
<p>LivekitAlias: {livekitRoom.livekitAlias}</p>
|
||||
{livekitRoom.isLocal && <p>ws-url: {localSfuUrl?.href}</p>}
|
||||
<p>
|
||||
{t("developer_mode.livekit_server_info")}(
|
||||
|
||||
@@ -355,6 +355,10 @@ exports[`DeveloperSettingsTab > renders and matches snapshot 1`] = `
|
||||
<h4>
|
||||
LiveKit SFU: wss://local-sfu.example.org
|
||||
</h4>
|
||||
<p>
|
||||
LivekitAlias:
|
||||
TestAlias
|
||||
</p>
|
||||
<p>
|
||||
ws-url:
|
||||
wss://local-sfu.example.org/
|
||||
@@ -393,6 +397,10 @@ exports[`DeveloperSettingsTab > renders and matches snapshot 1`] = `
|
||||
<h4>
|
||||
LiveKit SFU: wss://remote-sfu.example.org
|
||||
</h4>
|
||||
<p>
|
||||
LivekitAlias:
|
||||
TestAlias2
|
||||
</p>
|
||||
<p>
|
||||
LiveKit Server Info
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user