mirror of
https://github.com/vector-im/element-call.git
synced 2026-12-04 10:21:10 +08:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5dde739fca | ||
|
|
aeeaa73021 | ||
|
|
dd8c820638 |
@@ -19,10 +19,10 @@ services:
|
||||
- ./backend/playwright_homeserver-othersite.yaml:/data/cfg/homeserver.yaml:Z
|
||||
element-web:
|
||||
# Pin to a SHA so that upstream cannot break our tests. Renovate handles regular updates.
|
||||
image: ghcr.io/element-hq/element-web:develop@sha256:5c9a8288deccb648e0d590776dff747ba674fe45c32cada6f804776800a38d2c
|
||||
image: ghcr.io/element-hq/element-web:develop@sha256:a9fba6e7ea9a32f62bc1459fcdad790662476ff1b2bcebc62fe47e5cf51e3932
|
||||
element-web-1:
|
||||
# Pin to a SHA so that upstream cannot break our tests. Renovate handles regular updates.
|
||||
image: ghcr.io/element-hq/element-web:develop@sha256:5c9a8288deccb648e0d590776dff747ba674fe45c32cada6f804776800a38d2c
|
||||
image: ghcr.io/element-hq/element-web:develop@sha256:a9fba6e7ea9a32f62bc1459fcdad790662476ff1b2bcebc62fe47e5cf51e3932
|
||||
volumes:
|
||||
# The other site opens the embedded package under test in place of the
|
||||
# copy its image bundles (the first site opens the dev server's app.
|
||||
|
||||
+1
-1
@@ -96,7 +96,6 @@
|
||||
},
|
||||
"mute_all_audio": "Mute all audio (participants, reactions, join sounds)",
|
||||
"show_connection_stats": "Show connection statistics",
|
||||
"throw_error_button": "Throw test error",
|
||||
"url_params": "URL parameters"
|
||||
},
|
||||
"disconnected_banner": "Connectivity to the server has been lost.",
|
||||
@@ -143,6 +142,7 @@
|
||||
},
|
||||
"handset": {
|
||||
"overlay_back_button": "Back to Speaker Mode",
|
||||
"overlay_description": "Only works while using app",
|
||||
"overlay_title": "Handset Mode"
|
||||
},
|
||||
"hangup_button_label": "End call",
|
||||
|
||||
@@ -422,9 +422,6 @@ test.describe("a background of one's own", () => {
|
||||
).toBeVisible();
|
||||
await expect(mine).toHaveCount(0);
|
||||
await page.keyboard.press("Escape");
|
||||
// While it animates out the menu still counts as visible: addImage would
|
||||
// then leave it closed instead of opening it again
|
||||
await expect(page.getByRole("menu")).toBeHidden();
|
||||
|
||||
await addImage(page, red);
|
||||
await expect(mine).toBeVisible();
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
Copyright 2026 Element Creations Ltd.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
import { widgetTest } from "../fixtures/widget-user.ts";
|
||||
import { TestHelpers } from "./test-helpers.ts";
|
||||
|
||||
widgetTest.skip(
|
||||
({ browserName }) => browserName === "firefox",
|
||||
"Widget specs only run on Chromium, see simple-create.spec.ts",
|
||||
);
|
||||
|
||||
widgetTest(
|
||||
"Switching rooms away from a crashed call dismisses it for good",
|
||||
async ({ asWidget }) => {
|
||||
test.slow();
|
||||
const { brooks } = asWidget;
|
||||
const page = brooks.page;
|
||||
const call = page.locator('iframe[title="Element Call"]');
|
||||
const callFrame = call.contentFrame();
|
||||
|
||||
// Somewhere to switch to once the call has crashed
|
||||
await TestHelpers.createRoom("Other Room", page);
|
||||
await TestHelpers.switchToRoomNamed(page, "Welcome Room");
|
||||
|
||||
await TestHelpers.startCallInCurrentRoom(page);
|
||||
// A dev server compiles the widget on first load
|
||||
await expect(callFrame.getByTestId("lobby_joinCall")).toBeVisible({
|
||||
timeout: 30000,
|
||||
});
|
||||
await TestHelpers.joinCallFromLobby(page);
|
||||
await expect(
|
||||
callFrame.getByRole("button", { name: "End call" }),
|
||||
).toBeVisible();
|
||||
|
||||
// Crash the call from its developer settings
|
||||
await callFrame.getByRole("button", { name: "Settings" }).click();
|
||||
await callFrame.getByRole("tab", { name: "Preferences" }).click();
|
||||
await callFrame.getByText("Developer mode", { exact: true }).check();
|
||||
await callFrame.getByRole("tab", { name: "Developer" }).click();
|
||||
await callFrame.getByRole("button", { name: "Throw test error" }).click();
|
||||
await expect(callFrame.getByText("Something went wrong")).toBeVisible();
|
||||
|
||||
// Showing the call collapses the room list
|
||||
await TestHelpers.expandRoomList(page);
|
||||
await TestHelpers.switchToRoomNamed(page, "Other Room");
|
||||
await expect(
|
||||
page.getByRole("main").getByRole("heading", { name: "Other Room" }),
|
||||
).toBeVisible();
|
||||
|
||||
// The crashed call is gone and stays gone: no restart, no reconnect
|
||||
await expect(call).toHaveCount(0);
|
||||
await page.waitForTimeout(5000);
|
||||
await expect(call).toHaveCount(0);
|
||||
await expect(
|
||||
page.getByRole("main").getByRole("heading", { name: "Other Room" }),
|
||||
).toBeVisible();
|
||||
},
|
||||
);
|
||||
@@ -228,6 +228,8 @@ export interface MatrixRTCClientOptions {
|
||||
timings?: Partial<SessionTimings>;
|
||||
/** Limits on what is published; LiveKit's defaults otherwise. */
|
||||
mediaQuality?: MediaQuality;
|
||||
/** Whether remote video is received from the first connection on; true when left out. */
|
||||
receiveVideo?: boolean;
|
||||
/** Use this transport instead of asking the homeserver. */
|
||||
transport?: Transport;
|
||||
/** Use this transport when the homeserver advertises none of the backend's type. */
|
||||
@@ -343,6 +345,14 @@ export interface MatrixRTCClient {
|
||||
*/
|
||||
setAudioOutputDeviceId(deviceId: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Whether remote video is received. While false no remote camera is
|
||||
* subscribed, and screen shares are received at their lowest layer, on
|
||||
* every transport, including transports connected later and after a
|
||||
* reconnection; audio is unaffected. Defaults to true.
|
||||
*/
|
||||
setReceiveVideo(receive: boolean): void;
|
||||
|
||||
/**
|
||||
* Sends a short text to every member on the local transport, over a
|
||||
* reliable data channel beside the media. A packet holds about 15 KiB;
|
||||
|
||||
@@ -105,6 +105,7 @@ interface FakeBackend {
|
||||
connectionState$: BehaviorSubject<MediaConnectionState | Error>;
|
||||
data$: Subject<DataPacket>;
|
||||
setPublishing: Mock<(publish: boolean) => void>;
|
||||
setReceiveVideo: Mock<(receive: boolean) => void>;
|
||||
delegateDelayedLeave: Mock<(delayId: string) => Promise<void>>;
|
||||
mediaFor: Mock<(scope: ObservableScope, member: RTCMember) => MemberMedia>;
|
||||
}
|
||||
@@ -152,6 +153,7 @@ function setup(
|
||||
),
|
||||
data$: new Subject<DataPacket>(),
|
||||
setPublishing: vi.fn(),
|
||||
setReceiveVideo: vi.fn(),
|
||||
delegateDelayedLeave: vi.fn(async () => Promise.resolve()),
|
||||
mediaFor: vi.fn(() => ({
|
||||
tracks$: constant(null),
|
||||
@@ -178,6 +180,7 @@ function setup(
|
||||
mediaFor: fake.mediaFor,
|
||||
connections$: constant([]),
|
||||
setAudioOutputDeviceId: vi.fn(),
|
||||
setReceiveVideo: fake.setReceiveVideo,
|
||||
sendData: vi.fn(),
|
||||
data$: fake.data$,
|
||||
};
|
||||
@@ -375,6 +378,21 @@ describe("createRTCParticipation", () => {
|
||||
scope.end();
|
||||
});
|
||||
|
||||
it("hands the receive video choice to the backend, from the join options on", () => {
|
||||
const { participation, fake, scope } = setup({ receiveVideo: false });
|
||||
expect(fake.setReceiveVideo.mock.calls).toEqual([[false]]);
|
||||
|
||||
participation.setReceiveVideo(true);
|
||||
expect(fake.setReceiveVideo).toHaveBeenLastCalledWith(true);
|
||||
scope.end();
|
||||
});
|
||||
|
||||
it("leaves the backend receiving video when the join options say nothing", () => {
|
||||
const { fake, scope } = setup();
|
||||
expect(fake.setReceiveVideo).not.toHaveBeenCalled();
|
||||
scope.end();
|
||||
});
|
||||
|
||||
it("gives the backend the keys the session holds and the ones that follow", () => {
|
||||
const { fake, session, mockedSession, scope } = setup();
|
||||
const keys: MediaKey[] = [];
|
||||
|
||||
@@ -151,6 +151,7 @@ export function createRTCParticipation(
|
||||
timings,
|
||||
logger,
|
||||
});
|
||||
if (options.receiveVideo === false) backend.setReceiveVideo(false);
|
||||
|
||||
// If the backend is LiveKit, we check it for transports as well, as a
|
||||
// fallback: another member's SFU may let us publish (MSC4195). LiveKit only,
|
||||
@@ -320,6 +321,7 @@ export function createRTCParticipation(
|
||||
connectedTransports$: transports.connected$,
|
||||
setAudioOutputDeviceId: async (deviceId) =>
|
||||
backend.setAudioOutputDeviceId(deviceId),
|
||||
setReceiveVideo: (receive) => backend.setReceiveVideo(receive),
|
||||
sendData: async (topic, text) => backend.sendData(topic, text),
|
||||
data$,
|
||||
},
|
||||
|
||||
@@ -92,6 +92,7 @@ function idleBackend(): MediaBackend {
|
||||
mediaFor: vi.fn(),
|
||||
connections$: constant([]),
|
||||
setAudioOutputDeviceId: vi.fn(),
|
||||
setReceiveVideo: vi.fn(),
|
||||
sendData: vi.fn(),
|
||||
data$: EMPTY,
|
||||
};
|
||||
|
||||
@@ -127,6 +127,11 @@ export interface RTCParticipationOptions {
|
||||
timings?: Partial<SessionTimings>;
|
||||
/** Limits on what is published; LiveKit's defaults otherwise. */
|
||||
mediaQuality?: MediaQuality;
|
||||
/**
|
||||
* Whether remote video is received from the first connection on, as
|
||||
* `setReceiveVideo` would set it. True when left out.
|
||||
*/
|
||||
receiveVideo?: boolean;
|
||||
/**
|
||||
* Use this transport instead of asking the homeserver. Any shape the
|
||||
* backend serves: for LiveKit a `url`, a `livekit_service_url` or both.
|
||||
@@ -216,6 +221,14 @@ export interface RTCParticipation {
|
||||
*/
|
||||
setAudioOutputDeviceId(deviceId: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Whether remote video is received. While false no remote camera is
|
||||
* subscribed, and screen shares are received at their lowest layer, on
|
||||
* every transport, including transports connected later and after a
|
||||
* reconnection; audio is unaffected. Defaults to true.
|
||||
*/
|
||||
setReceiveVideo(receive: boolean): void;
|
||||
|
||||
/**
|
||||
* Sends a short text to every member on the local transport, over a
|
||||
* reliable data channel beside the media. A packet holds about 15 KiB;
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ export interface MediaQuality {
|
||||
max_bitrate?: number;
|
||||
/** Max framerate. Default 30. */
|
||||
max_framerate?: number;
|
||||
/** Simulcast layers, lowest quality first. Without them LiveKit adds one layer at half resolution. */
|
||||
/** Simulcast layers, lowest quality first. Default one layer of 540p at 15 fps and 625 kbps. */
|
||||
simulcast_layers?: Array<{
|
||||
height: number;
|
||||
bitrate: number;
|
||||
|
||||
@@ -159,6 +159,15 @@ export interface MediaBackend {
|
||||
*/
|
||||
setAudioOutputDeviceId(deviceId: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Whether remote cameras are subscribed. While false, screen shares are
|
||||
* still subscribed, capped at their lowest layer. Remembered across
|
||||
* connections: every connection, existing or created later, follows it,
|
||||
* including after a reconnection. Audio is always subscribed. True until
|
||||
* first set.
|
||||
*/
|
||||
setReceiveVideo(receive: boolean): void;
|
||||
|
||||
/**
|
||||
* A text channel beside the media: sent on the local transport, received on every one.
|
||||
* This could well be just another track kind. Not needed for element call. just for the sdk target.
|
||||
|
||||
@@ -25,9 +25,11 @@ import {
|
||||
RoomEvent,
|
||||
Track,
|
||||
ConnectionState as LivekitConnectionState,
|
||||
VideoQuality,
|
||||
} from "livekit-client";
|
||||
import fetchMock from "fetch-mock";
|
||||
import EventEmitter from "events";
|
||||
import { BehaviorSubject } from "rxjs";
|
||||
import { MatrixError } from "matrix-js-sdk";
|
||||
import { logger, type Logger } from "matrix-js-sdk/lib/logger";
|
||||
import {
|
||||
@@ -56,6 +58,7 @@ let testScope: ObservableScope;
|
||||
let client: MockedObject<ClientGetTokenParts & ClientOpenIDParts>;
|
||||
|
||||
let fakeLivekitRoom: MockedObject<LivekitRoom>;
|
||||
let receiveVideo$: BehaviorSubject<boolean>;
|
||||
|
||||
let localParticipantEventEmiter: EventEmitter;
|
||||
let fakeLocalParticipant: MockedObject<LocalParticipant>;
|
||||
@@ -83,12 +86,14 @@ function connectionOpts(): ConnectionOpts {
|
||||
serverName: "m.localhost",
|
||||
scope: testScope,
|
||||
ownMembershipIdentity: ownMemberMock,
|
||||
receiveVideo$,
|
||||
livekitRoomFactory: () => fakeLivekitRoom,
|
||||
};
|
||||
}
|
||||
|
||||
function setupTest(): void {
|
||||
testScope = new ObservableScope();
|
||||
receiveVideo$ = new BehaviorSubject(true);
|
||||
client = vi.mocked<ClientGetTokenParts & ClientOpenIDParts>({
|
||||
getOpenIdToken: vi.fn().mockResolvedValue({
|
||||
access_token: "rYsmGUEwNjKgJYyeNUkZseJN",
|
||||
@@ -388,6 +393,7 @@ describe("Start connection states", () => {
|
||||
expect(fakeLivekitRoom.connect).toHaveBeenCalledWith(
|
||||
"wss://sfu",
|
||||
testJWTToken,
|
||||
{ autoSubscribe: true },
|
||||
);
|
||||
expect(connection.livekitAlias).toBe("!example_room_id");
|
||||
});
|
||||
@@ -676,6 +682,230 @@ describe("remote participants", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("receiving video", () => {
|
||||
it("connects without subscribing while video is not received", async () => {
|
||||
setupTest();
|
||||
receiveVideo$.next(false);
|
||||
const connection = setupRemoteConnection();
|
||||
|
||||
await connection.start();
|
||||
|
||||
expect(fakeLivekitRoom.connect).toHaveBeenCalledWith(
|
||||
expect.any(String),
|
||||
expect.any(String),
|
||||
{ autoSubscribe: false },
|
||||
);
|
||||
});
|
||||
|
||||
it("subscribes audio and not video as tracks are published", () => {
|
||||
setupTest();
|
||||
receiveVideo$.next(false);
|
||||
new Connection(connectionOpts(), logger);
|
||||
const { bob, publications } = remoteParticipantWithTracks(undefined);
|
||||
|
||||
for (const publication of Object.values(publications))
|
||||
fakeLivekitRoom.emit(RoomEvent.TrackPublished, publication, bob);
|
||||
|
||||
expect(subscriptions(publications)).toEqual(VIDEO_OFF);
|
||||
});
|
||||
|
||||
it("unsubscribes the video of a participant who connects while video is not received", () => {
|
||||
setupTest();
|
||||
receiveVideo$.next(false);
|
||||
new Connection(connectionOpts(), logger);
|
||||
// Published under autoSubscribe, as after a full reconnect
|
||||
const { bob, publications } = remoteParticipantWithTracks(undefined);
|
||||
|
||||
fakeLivekitRoom.emit(RoomEvent.ParticipantConnected, bob);
|
||||
|
||||
expect(subscriptions(publications)).toEqual(VIDEO_OFF);
|
||||
});
|
||||
|
||||
it.each([RoomEvent.Connected, RoomEvent.Reconnected])(
|
||||
"sweeps every remote publication on %s",
|
||||
(event) => {
|
||||
setupTest();
|
||||
receiveVideo$.next(false);
|
||||
new Connection(connectionOpts(), logger);
|
||||
const { publications } = remoteParticipantWithTracks(undefined);
|
||||
|
||||
fakeLivekitRoom.emit(event);
|
||||
|
||||
expect(subscriptions(publications)).toEqual(VIDEO_OFF);
|
||||
},
|
||||
);
|
||||
|
||||
it("follows every change of the choice, without resending what is already asked", () => {
|
||||
setupTest();
|
||||
new Connection(connectionOpts(), logger);
|
||||
const { publications } = remoteParticipantWithTracks(undefined);
|
||||
|
||||
receiveVideo$.next(false);
|
||||
expect(subscriptions(publications)).toEqual(VIDEO_OFF);
|
||||
expect(publications.microphone.setSubscribed).not.toHaveBeenCalled();
|
||||
|
||||
receiveVideo$.next(true);
|
||||
expect(subscriptions(publications)).toEqual(VIDEO_ON);
|
||||
});
|
||||
|
||||
it("subscribes video again on a connection made while video was not received", () => {
|
||||
setupTest();
|
||||
receiveVideo$.next(false);
|
||||
new Connection(connectionOpts(), logger);
|
||||
// Published under autoSubscribe: false
|
||||
const { publications } = remoteParticipantWithTracks(false);
|
||||
fakeLivekitRoom.emit(RoomEvent.Connected);
|
||||
expect(subscriptions(publications)).toEqual(VIDEO_OFF);
|
||||
|
||||
receiveVideo$.next(true);
|
||||
|
||||
expect(subscriptions(publications)).toEqual(VIDEO_ON);
|
||||
});
|
||||
|
||||
it("receives a screen share at its lowest layer while video is not received", () => {
|
||||
setupTest();
|
||||
receiveVideo$.next(false);
|
||||
new Connection(connectionOpts(), logger);
|
||||
// Published under autoSubscribe: false
|
||||
const { publications } = remoteParticipantWithTracks(false);
|
||||
|
||||
fakeLivekitRoom.emit(RoomEvent.Connected);
|
||||
|
||||
expect(publications.screenShare.isDesired).toBe(true);
|
||||
expect(publications.screenShare.quality).toBe(VideoQuality.LOW);
|
||||
expect(publications.camera.setVideoQuality).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("lifts the cap on screen shares when video is received again", () => {
|
||||
setupTest();
|
||||
new Connection(connectionOpts(), logger);
|
||||
const { publications } = remoteParticipantWithTracks(undefined);
|
||||
|
||||
receiveVideo$.next(false);
|
||||
expect(publications.screenShare.quality).toBe(VideoQuality.LOW);
|
||||
|
||||
receiveVideo$.next(true);
|
||||
expect(publications.screenShare.quality).toBe(VideoQuality.HIGH);
|
||||
expect(publications.screenShare.setSubscribed).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("caps the screen shares a full reconnect recreates", () => {
|
||||
setupTest();
|
||||
receiveVideo$.next(false);
|
||||
new Connection(connectionOpts(), logger);
|
||||
remoteParticipantWithTracks(undefined);
|
||||
fakeLivekitRoom.remoteParticipants.clear();
|
||||
const { publications } = remoteParticipantWithTracks(undefined);
|
||||
|
||||
fakeLivekitRoom.emit(RoomEvent.Reconnected);
|
||||
|
||||
expect(publications.screenShare.quality).toBe(VideoQuality.LOW);
|
||||
});
|
||||
|
||||
it("stops following the choice once its scope ends", () => {
|
||||
setupTest();
|
||||
new Connection(connectionOpts(), logger);
|
||||
const { publications } = remoteParticipantWithTracks(undefined);
|
||||
testScope.end();
|
||||
|
||||
receiveVideo$.next(false);
|
||||
fakeLivekitRoom.emit(RoomEvent.Reconnected);
|
||||
|
||||
expect(subscriptions(publications)).toEqual(VIDEO_ON);
|
||||
});
|
||||
});
|
||||
|
||||
const VIDEO_OFF = {
|
||||
microphone: true,
|
||||
camera: false,
|
||||
screenShare: true,
|
||||
screenShareAudio: true,
|
||||
};
|
||||
const VIDEO_ON = {
|
||||
microphone: true,
|
||||
camera: true,
|
||||
screenShare: true,
|
||||
screenShareAudio: true,
|
||||
};
|
||||
|
||||
type MockPublication = RemoteTrackPublication & {
|
||||
setSubscribed: ReturnType<typeof vi.fn>;
|
||||
setVideoQuality: ReturnType<typeof vi.fn>;
|
||||
quality: VideoQuality | undefined;
|
||||
};
|
||||
type Publications = Record<keyof typeof VIDEO_ON, MockPublication>;
|
||||
|
||||
/**
|
||||
* Bob in the room with a microphone, a camera and a screen share with audio,
|
||||
* each with the subscription LiveKit gave it: undefined under autoSubscribe.
|
||||
*/
|
||||
function remoteParticipantWithTracks(subscribed: boolean | undefined): {
|
||||
bob: RemoteParticipant;
|
||||
publications: Publications;
|
||||
} {
|
||||
const publications: Publications = {
|
||||
microphone: mockPublication(
|
||||
Track.Kind.Audio,
|
||||
Track.Source.Microphone,
|
||||
subscribed,
|
||||
),
|
||||
camera: mockPublication(Track.Kind.Video, Track.Source.Camera, subscribed),
|
||||
screenShare: mockPublication(
|
||||
Track.Kind.Video,
|
||||
Track.Source.ScreenShare,
|
||||
subscribed,
|
||||
),
|
||||
screenShareAudio: mockPublication(
|
||||
Track.Kind.Audio,
|
||||
Track.Source.ScreenShareAudio,
|
||||
subscribed,
|
||||
),
|
||||
};
|
||||
const bob = mockRemoteParticipant({
|
||||
identity: "@bob:example.org:DEV111",
|
||||
trackPublications: new Map(
|
||||
Object.entries(publications) as [string, RemoteTrackPublication][],
|
||||
),
|
||||
});
|
||||
fakeLivekitRoom.remoteParticipants.set(bob.identity, bob);
|
||||
return { bob, publications };
|
||||
}
|
||||
|
||||
function mockPublication(
|
||||
kind: Track.Kind,
|
||||
source: Track.Source,
|
||||
subscribed: boolean | undefined,
|
||||
): MockPublication {
|
||||
const publication = {
|
||||
kind,
|
||||
source,
|
||||
subscribed,
|
||||
quality: undefined as VideoQuality | undefined,
|
||||
get isDesired(): boolean {
|
||||
return this.subscribed !== false;
|
||||
},
|
||||
setSubscribed: vi.fn((value: boolean) => {
|
||||
publication.subscribed = value;
|
||||
}),
|
||||
// As LiveKit, which ignores it on a publication not subscribed
|
||||
setVideoQuality: vi.fn((value: VideoQuality) => {
|
||||
if (publication.isDesired) publication.quality = value;
|
||||
}),
|
||||
};
|
||||
return publication as unknown as MockPublication;
|
||||
}
|
||||
|
||||
function subscriptions(
|
||||
publications: Publications,
|
||||
): Record<keyof Publications, boolean> {
|
||||
return Object.fromEntries(
|
||||
Object.entries(publications).map(([name, publication]) => [
|
||||
name,
|
||||
publication.isDesired,
|
||||
]),
|
||||
) as Record<keyof Publications, boolean>;
|
||||
}
|
||||
|
||||
describe("remote track logging", () => {
|
||||
it("logs remote participant and track events on the connection logger", () => {
|
||||
setupTest();
|
||||
|
||||
@@ -19,13 +19,15 @@ import {
|
||||
type RemoteParticipant,
|
||||
type RemoteTrackPublication,
|
||||
type Room as LivekitRoom,
|
||||
type RoomConnectOptions,
|
||||
RoomEvent,
|
||||
type SubscriptionError,
|
||||
type Track,
|
||||
Track,
|
||||
type TrackPublication,
|
||||
VideoQuality,
|
||||
} from "livekit-client";
|
||||
import { type UnstableLivekitTransport } from "matrix-js-sdk/lib/matrixrtc";
|
||||
import { BehaviorSubject } from "rxjs";
|
||||
import { BehaviorSubject, distinctUntilChanged, skip } from "rxjs";
|
||||
import { type Logger } from "matrix-js-sdk/lib/logger";
|
||||
import { type CallMembershipIdentityParts } from "matrix-js-sdk/lib/matrixrtc/EncryptionManager";
|
||||
|
||||
@@ -73,6 +75,12 @@ export interface ConnectionOpts {
|
||||
slotId: string;
|
||||
/** The observable scope to use for this connection. */
|
||||
scope: ObservableScope;
|
||||
/**
|
||||
* Whether remote cameras are subscribed and screen shares received at full
|
||||
* quality. Read at connect and followed for the connection's lifetime;
|
||||
* audio and screen shares are always subscribed.
|
||||
*/
|
||||
receiveVideo$: Behavior<boolean>;
|
||||
|
||||
/** Optional factory to create the LiveKit room, mainly for testing purposes. */
|
||||
livekitRoomFactory: () => LivekitRoom;
|
||||
@@ -151,6 +159,7 @@ export class Connection {
|
||||
private readonly slotId: string;
|
||||
private readonly logger: Logger;
|
||||
private readonly ownMembershipIdentity: CallMembershipIdentityParts;
|
||||
private readonly receiveVideo$: Behavior<boolean>;
|
||||
/**
|
||||
* Creates a new connection to a matrix RTC LiveKit backend.
|
||||
*
|
||||
@@ -176,12 +185,14 @@ export class Connection {
|
||||
this.client = client;
|
||||
this.flow = opts.flow;
|
||||
this.onCsApiMissing = opts.onCsApiMissing;
|
||||
this.receiveVideo$ = opts.receiveVideo$;
|
||||
|
||||
this.remoteParticipants$ = scope.behavior(
|
||||
// Only tracks remote participants
|
||||
connectedParticipantsObserver(this.livekitRoom),
|
||||
);
|
||||
this.logRemoteTrackEvents();
|
||||
this.applyReceivePolicy();
|
||||
|
||||
scope.onEnd(() => {
|
||||
this.logger.info(`Connection scope ended, stopping connection`);
|
||||
@@ -189,6 +200,53 @@ export class Connection {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Keeps every remote publication subscribed or not, and every screen share
|
||||
* at the quality, that `receiveVideo$` asks for. A full reconnect recreates
|
||||
* the remote participants with the subscriptions the room first connected
|
||||
* with, and events for participants already in the room are not emitted
|
||||
* while it connects, so the whole room is swept again on `Connected` and
|
||||
* `Reconnected`.
|
||||
*/
|
||||
private applyReceivePolicy(): void {
|
||||
const room = this.livekitRoom;
|
||||
const reconcile = (publication: RemoteTrackPublication): void => {
|
||||
const receiveVideo = this.receiveVideo$.value;
|
||||
const isScreenShare = publication.source === Track.Source.ScreenShare;
|
||||
const wanted =
|
||||
publication.kind !== Track.Kind.Video || isScreenShare || receiveVideo;
|
||||
// Every call sends a subscription update, wanted or not
|
||||
if (publication.isDesired !== wanted) publication.setSubscribed(wanted);
|
||||
// Ignored by LiveKit until the publication is subscribed
|
||||
if (isScreenShare)
|
||||
publication.setVideoQuality(
|
||||
receiveVideo ? VideoQuality.HIGH : VideoQuality.LOW,
|
||||
);
|
||||
};
|
||||
const reconcileParticipant = (participant: RemoteParticipant): void =>
|
||||
participant.trackPublications.forEach(reconcile);
|
||||
const reconcileAll = (): void =>
|
||||
room.remoteParticipants.forEach(reconcileParticipant);
|
||||
const onTrackPublished = (publication: RemoteTrackPublication): void =>
|
||||
reconcile(publication);
|
||||
|
||||
room
|
||||
.on(RoomEvent.TrackPublished, onTrackPublished)
|
||||
.on(RoomEvent.ParticipantConnected, reconcileParticipant)
|
||||
.on(RoomEvent.Connected, reconcileAll)
|
||||
.on(RoomEvent.Reconnected, reconcileAll);
|
||||
this.receiveVideo$
|
||||
.pipe(distinctUntilChanged(), skip(1), this.scope.bind())
|
||||
.subscribe(reconcileAll);
|
||||
this.scope.onEnd(() => {
|
||||
room
|
||||
.off(RoomEvent.TrackPublished, onTrackPublished)
|
||||
.off(RoomEvent.ParticipantConnected, reconcileParticipant)
|
||||
.off(RoomEvent.Connected, reconcileAll)
|
||||
.off(RoomEvent.Reconnected, reconcileAll);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs the lifecycle of remote participants and their tracks as seen by
|
||||
* livekit-client, so that rageshakes show what a tile should have been
|
||||
@@ -400,7 +458,7 @@ export class Connection {
|
||||
|
||||
private async connectLivekitRoom(url: string, jwt: string): Promise<void> {
|
||||
try {
|
||||
await this.livekitRoom.connect(url, jwt);
|
||||
await this.livekitRoom.connect(url, jwt, this.connectOptions());
|
||||
} catch (e) {
|
||||
// Behind a proxy, Firefox fails the first WebSocket to a host after trying
|
||||
// it over HTTP/2, so a join that fails on the WebSocket gets a second try.
|
||||
@@ -411,10 +469,15 @@ export class Connection {
|
||||
e.reason === ConnectionErrorReason.WebSocket;
|
||||
if (this.stopped || !failedOnFirefoxWebSocket) throw e;
|
||||
this.logger.info(`livekitRoom.connect RETRY ${url}`, e);
|
||||
await this.livekitRoom.connect(url, jwt);
|
||||
await this.livekitRoom.connect(url, jwt, this.connectOptions());
|
||||
}
|
||||
}
|
||||
|
||||
/** A connection made while cameras are not received never asks the SFU for them. */
|
||||
private connectOptions(): RoomConnectOptions {
|
||||
return { autoSubscribe: this.receiveVideo$.value };
|
||||
}
|
||||
|
||||
protected async getSFUConfig(): Promise<SFUConfig> {
|
||||
try {
|
||||
return await getSFUConfig({
|
||||
|
||||
@@ -7,15 +7,19 @@ Please see LICENSE in the repository root for full details.
|
||||
|
||||
import {
|
||||
ConnectionState as LivekitConnectionState,
|
||||
type RemoteParticipant,
|
||||
type RemoteTrackPublication,
|
||||
type RoomOptions,
|
||||
Track,
|
||||
} from "livekit-client";
|
||||
import { BehaviorSubject } from "rxjs";
|
||||
import { logger } from "matrix-js-sdk/lib/logger";
|
||||
import { type UnstableLivekitTransport } from "matrix-js-sdk/lib/matrixrtc";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { type MediaQuality } from "../../config";
|
||||
import { type PublishRequest } from "../../media-api";
|
||||
import { constant } from "../../reactive/Behavior";
|
||||
import { type Behavior, constant } from "../../reactive/Behavior";
|
||||
import { ownMemberMock, testScope } from "../../utils/test";
|
||||
import { testJWTToken } from "../../utils/test-fixtures";
|
||||
import {
|
||||
@@ -51,6 +55,7 @@ function create(
|
||||
mediaQuality?: MediaQuality,
|
||||
audioOutputDeviceId?: string,
|
||||
transport = exampleTransport,
|
||||
receiveVideo$: Behavior<boolean> = constant(true),
|
||||
): { connection: ResolvedConnection; options: RoomOptions } {
|
||||
const factory = new LivekitConnectionFactory(
|
||||
client(),
|
||||
@@ -59,6 +64,7 @@ function create(
|
||||
"m.call#ROOM",
|
||||
publish,
|
||||
constant(audioOutputDeviceId),
|
||||
receiveVideo$,
|
||||
undefined,
|
||||
mediaQuality,
|
||||
);
|
||||
@@ -75,6 +81,29 @@ function create(
|
||||
}
|
||||
|
||||
describe("LivekitConnectionFactory", () => {
|
||||
it("gives each connection the receive video choice to follow", () => {
|
||||
const receiveVideo$ = new BehaviorSubject(true);
|
||||
const { connection } = create(
|
||||
[],
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
receiveVideo$,
|
||||
);
|
||||
const camera = {
|
||||
kind: Track.Kind.Video,
|
||||
isDesired: true,
|
||||
setSubscribed: vi.fn(),
|
||||
} as unknown as RemoteTrackPublication;
|
||||
connection.livekitRoom.remoteParticipants.set("@bob:example.org:DEV", {
|
||||
trackPublications: new Map([["camera", camera]]),
|
||||
} as unknown as RemoteParticipant);
|
||||
|
||||
receiveVideo$.next(false);
|
||||
|
||||
expect(camera.setSubscribed).toHaveBeenCalledWith(false);
|
||||
});
|
||||
|
||||
it("builds the room on the defaults where nothing is requested", () => {
|
||||
const { options } = create([]);
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@ export class LivekitConnectionFactory implements ConnectionFactory {
|
||||
private readonly slotId: string,
|
||||
private readonly publish: PublishRequest[],
|
||||
private readonly audioOutputDeviceId$: Behavior<string | undefined>,
|
||||
private readonly receiveVideo$: Behavior<boolean>,
|
||||
private readonly keyProvider: BaseKeyProvider | undefined,
|
||||
private readonly mediaQuality: MediaQuality | undefined,
|
||||
) {}
|
||||
@@ -133,6 +134,7 @@ export class LivekitConnectionFactory implements ConnectionFactory {
|
||||
client: this.client,
|
||||
onCsApiMissing: this.onCsApiMissing,
|
||||
scope,
|
||||
receiveVideo$: this.receiveVideo$,
|
||||
livekitRoomFactory: () =>
|
||||
new LivekitRoom(
|
||||
roomOptions(
|
||||
|
||||
@@ -169,6 +169,10 @@ describe("createLivekitBackend", () => {
|
||||
state$: BehaviorSubject<ConnectionState>;
|
||||
}[];
|
||||
let onCsApiMissing: () => void;
|
||||
/** What the backend built the factory with. */
|
||||
let factoryArgs: ConstructorParameters<
|
||||
typeof connectionFactory.LivekitConnectionFactory
|
||||
>;
|
||||
const connected: ConnectionState = {
|
||||
state: "authenticated",
|
||||
livekitState: LivekitConnectionState.Connected,
|
||||
@@ -177,8 +181,14 @@ describe("createLivekitBackend", () => {
|
||||
/** Stands in for the factory: connections whose state and participants the test drives. */
|
||||
function stubFactory(initialState: ConnectionState): void {
|
||||
vi.spyOn(connectionFactory, "LivekitConnectionFactory").mockImplementation(
|
||||
function (this: unknown, _client, onMissing) {
|
||||
onCsApiMissing = onMissing;
|
||||
function (
|
||||
this: unknown,
|
||||
...args: ConstructorParameters<
|
||||
typeof connectionFactory.LivekitConnectionFactory
|
||||
>
|
||||
) {
|
||||
factoryArgs = args;
|
||||
onCsApiMissing = args[1];
|
||||
return {
|
||||
createConnection: (
|
||||
scope: ObservableScope,
|
||||
@@ -263,6 +273,17 @@ describe("createLivekitBackend", () => {
|
||||
},
|
||||
);
|
||||
|
||||
it("hands every connection the factory makes the receive video choice, true until set", () => {
|
||||
const b = backend();
|
||||
const receiveVideo$ = factoryArgs[6];
|
||||
expect(receiveVideo$.value).toBe(true);
|
||||
|
||||
b.setReceiveVideo(false);
|
||||
expect(receiveVideo$.value).toBe(false);
|
||||
b.setReceiveVideo(true);
|
||||
expect(receiveVideo$.value).toBe(true);
|
||||
});
|
||||
|
||||
it("prepares a remote SFU's transport on its homeserver, where delegation is not possible", async () => {
|
||||
// A token through the homeserver means delegation, unless the SFU is
|
||||
// another homeserver's.
|
||||
|
||||
@@ -104,6 +104,7 @@ export function createLivekitBackend(
|
||||
const audioOutputDeviceId$ = new BehaviorSubject<string | undefined>(
|
||||
undefined,
|
||||
);
|
||||
const receiveVideo$ = new BehaviorSubject(true);
|
||||
const connectionFactory = new LivekitConnectionFactory(
|
||||
client,
|
||||
// The MSC defines no unstable feature flag. If the transport names a
|
||||
@@ -117,6 +118,7 @@ export function createLivekitBackend(
|
||||
slotId,
|
||||
publish,
|
||||
audioOutputDeviceId$,
|
||||
receiveVideo$,
|
||||
keyProvider,
|
||||
mediaQuality,
|
||||
);
|
||||
@@ -300,6 +302,7 @@ export function createLivekitBackend(
|
||||
mediaFor,
|
||||
connections$,
|
||||
setAudioOutputDeviceId: localMedia_.setAudioOutputDeviceId,
|
||||
setReceiveVideo: (receive) => receiveVideo$.next(receive),
|
||||
sendData,
|
||||
data$,
|
||||
};
|
||||
|
||||
@@ -197,9 +197,24 @@ describe("buildLiveKitOptions", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("does not include screenShareSimulcastLayers when not configured", () => {
|
||||
it("sends one low screen share layer fit for Low bandwidth mode when not configured", () => {
|
||||
const opts = buildLiveKitOptions();
|
||||
expect(opts.publishDefaults?.screenShareSimulcastLayers).toBeUndefined();
|
||||
const layers = opts.publishDefaults?.screenShareSimulcastLayers;
|
||||
expect(layers).toHaveLength(1);
|
||||
expect(layers?.[0]).toMatchObject({
|
||||
width: 960,
|
||||
height: 540,
|
||||
encoding: { maxBitrate: 625_000, maxFramerate: 15 },
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps the low screen share layer when only the top encoding is configured", () => {
|
||||
const opts = buildLiveKitOptions({
|
||||
screen_share: { max_bitrate: 8_000_000, max_framerate: 60 },
|
||||
});
|
||||
expect(opts.publishDefaults?.screenShareSimulcastLayers).toEqual(
|
||||
buildLiveKitOptions().publishDefaults?.screenShareSimulcastLayers,
|
||||
);
|
||||
});
|
||||
|
||||
it("backupCodec always uses stock VP8 720p encoding", () => {
|
||||
|
||||
@@ -17,6 +17,13 @@ import {
|
||||
|
||||
import { defaultMediaQuality, type MediaQuality } from "../../config";
|
||||
|
||||
const lowBandwidthScreenShareLayer = new VideoPresetClass(
|
||||
960,
|
||||
540,
|
||||
625_000,
|
||||
15,
|
||||
);
|
||||
|
||||
/**
|
||||
* Find the closest matching VideoPreset for a given height.
|
||||
*/
|
||||
@@ -71,7 +78,7 @@ function buildPublishOptions(
|
||||
};
|
||||
|
||||
// Screen share simulcast layers
|
||||
let screenShareSimulcastLayers: VideoPreset[] | undefined;
|
||||
let screenShareSimulcastLayers: VideoPreset[];
|
||||
if (screenConf?.simulcast_layers) {
|
||||
screenShareSimulcastLayers = screenConf.simulcast_layers.map(
|
||||
(layer) =>
|
||||
@@ -82,6 +89,8 @@ function buildPublishOptions(
|
||||
layer.framerate ?? screenConf?.max_framerate ?? 30,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
screenShareSimulcastLayers = [lowBandwidthScreenShareLayer];
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -94,9 +103,7 @@ function buildPublishOptions(
|
||||
simulcast: true,
|
||||
videoSimulcastLayers: videoSimulcastLayers as VideoPreset[],
|
||||
screenShareEncoding,
|
||||
...(screenShareSimulcastLayers && {
|
||||
screenShareSimulcastLayers: screenShareSimulcastLayers as VideoPreset[],
|
||||
}),
|
||||
screenShareSimulcastLayers,
|
||||
stopMicTrackOnMute: false,
|
||||
videoCodec: codec,
|
||||
videoEncoding,
|
||||
|
||||
@@ -32,6 +32,7 @@ export function mockRemoteParticipant(
|
||||
({}) as Partial<RemoteTrackPublication> as RemoteTrackPublication,
|
||||
// this will only get used for `getTrackPublications().length`
|
||||
getTrackPublications: () => [0],
|
||||
trackPublications: new Map(),
|
||||
...mockEmitter(),
|
||||
...participant,
|
||||
} as RemoteParticipant;
|
||||
|
||||
@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { type FC } from "react";
|
||||
import { BigIcon, Button, Heading } from "@vector-im/compound-web";
|
||||
import { BigIcon, Button, Heading, Text } from "@vector-im/compound-web";
|
||||
import { VoiceCallIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
@@ -27,6 +27,7 @@ export const EarpieceOverlay: FC<Props> = ({ show, onBackToVideoPressed }) => {
|
||||
<Heading as="h2" weight="semibold" size="md">
|
||||
{t("handset.overlay_title")}
|
||||
</Heading>
|
||||
<Text>{t("handset.overlay_description")}</Text>
|
||||
<Button
|
||||
kind="primary"
|
||||
size="md"
|
||||
|
||||
@@ -145,6 +145,11 @@ exports[`InCallView > rendering > renders 1`] = `
|
||||
>
|
||||
Handset Mode
|
||||
</h2>
|
||||
<p
|
||||
class="_typography_6v6n8_153 _font-body-md-regular_6v6n8_50"
|
||||
>
|
||||
Only works while using app
|
||||
</p>
|
||||
<button
|
||||
class="_button_1nw83_8"
|
||||
data-kind="primary"
|
||||
|
||||
@@ -30,9 +30,6 @@ import {
|
||||
} from "@element-hq/matrixrtc-sdk";
|
||||
import type * as MatrixRTCSdk from "@element-hq/matrixrtc-sdk";
|
||||
import { exampleTransport, mockConfig } from "../utils/test";
|
||||
import { GroupCallErrorBoundary } from "../room/GroupCallErrorBoundary";
|
||||
import { LeaveToHomeProvider } from "../LeaveToHomeContext";
|
||||
import { ElementCallError, ErrorCode } from "../utils/errors";
|
||||
|
||||
// Mock url params hook to avoid environment-dependent snapshot churn.
|
||||
vi.mock("../UrlParams", () => ({
|
||||
@@ -544,38 +541,4 @@ describe("DeveloperSettingsTab", () => {
|
||||
);
|
||||
});
|
||||
});
|
||||
describe("throw test error", () => {
|
||||
it("throws an ElementCallError that the error boundary shows", async () => {
|
||||
const user = userEvent.setup();
|
||||
const client = createMockMatrixClient();
|
||||
const onError = vi.fn();
|
||||
|
||||
render(
|
||||
<LeaveToHomeProvider value={vi.fn()}>
|
||||
<GroupCallErrorBoundary
|
||||
onError={onError}
|
||||
recoveryActionHandler={vi.fn()}
|
||||
>
|
||||
<TooltipProvider>
|
||||
<DeveloperSettingsTab
|
||||
client={client}
|
||||
env={{} as unknown as ImportMetaEnv}
|
||||
vm={outOfCallDeveloperSettingsTabViewModel}
|
||||
/>
|
||||
</TooltipProvider>
|
||||
</GroupCallErrorBoundary>
|
||||
</LeaveToHomeProvider>,
|
||||
);
|
||||
|
||||
await user.click(
|
||||
screen.getByRole("button", { name: "Throw test error" }),
|
||||
);
|
||||
|
||||
expect(await screen.findByText("Something went wrong")).toBeVisible();
|
||||
expect(onError).toHaveBeenCalledOnce();
|
||||
const error = onError.mock.calls[0][0] as unknown;
|
||||
expect(error).toBeInstanceOf(ElementCallError);
|
||||
expect((error as ElementCallError).code).toBe(ErrorCode.UNKNOWN_ERROR);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -22,7 +22,6 @@ import {
|
||||
import { logger } from "matrix-js-sdk/lib/logger";
|
||||
import { type UnstableLivekitTransport } from "matrix-js-sdk/lib/matrixrtc";
|
||||
import {
|
||||
Button,
|
||||
EditInPlace,
|
||||
ErrorMessage,
|
||||
Root as Form,
|
||||
@@ -73,7 +72,6 @@ import {
|
||||
} from "@element-hq/matrixrtc-sdk";
|
||||
import { useBehavior } from "../useBehavior";
|
||||
import { type ViewModel } from "../state/ViewModel.ts";
|
||||
import { type ElementCallError, UnknownCallError } from "../utils/errors.ts";
|
||||
|
||||
/**
|
||||
* The state of MatrixRTC's media key rotation.
|
||||
@@ -214,22 +212,6 @@ export const DeveloperSettingsTab: FC<Props> = ({
|
||||
|
||||
const urlParams = useUrlParams();
|
||||
|
||||
// An error thrown from a click handler never reaches an error boundary, so
|
||||
// the button only records it and the next render throws it instead.
|
||||
const [errorToThrow, setErrorToThrow] = useState<ElementCallError | null>(
|
||||
null,
|
||||
);
|
||||
const throwTestError = useCallback(
|
||||
() =>
|
||||
setErrorToThrow(
|
||||
new UnknownCallError(
|
||||
new Error("Test error thrown from the developer settings"),
|
||||
),
|
||||
),
|
||||
[],
|
||||
);
|
||||
if (errorToThrow !== null) throw errorToThrow;
|
||||
|
||||
const MediaQualitySettings: React.FC<{
|
||||
id: string;
|
||||
header: string;
|
||||
@@ -696,10 +678,6 @@ export const DeveloperSettingsTab: FC<Props> = ({
|
||||
<Separator />
|
||||
<AudioProcessingSettings />
|
||||
<Separator />
|
||||
<Button kind="secondary" destructive onClick={throwTestError}>
|
||||
{t("developer_mode.throw_error_button")}
|
||||
</Button>
|
||||
<Separator />
|
||||
<p>{t("developer_mode.environment_variables")}</p>
|
||||
<pre className={styles.pre}>{JSON.stringify(env, null, 2)}</pre>
|
||||
<p>{t("developer_mode.url_params")}</p>
|
||||
|
||||
@@ -635,21 +635,6 @@ exports[`DeveloperSettingsTab > renders and matches snapshot 1`] = `
|
||||
data-orientation="horizontal"
|
||||
role="separator"
|
||||
/>
|
||||
<button
|
||||
class="_button_1nw83_8 _destructive_1nw83_110"
|
||||
data-kind="secondary"
|
||||
data-size="lg"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
Throw test error
|
||||
</button>
|
||||
<div
|
||||
class="_separator_13qwf_8"
|
||||
data-kind="primary"
|
||||
data-orientation="horizontal"
|
||||
role="separator"
|
||||
/>
|
||||
<p>
|
||||
Environment variables
|
||||
</p>
|
||||
|
||||
@@ -574,6 +574,7 @@ function mockSlotWithParticipation(
|
||||
keyRotationSuppressed$,
|
||||
connectedTransports$,
|
||||
setAudioOutputDeviceId: vi.fn(async () => Promise.resolve()),
|
||||
setReceiveVideo: vi.fn(),
|
||||
sendData: vi.fn(async () => Promise.resolve()),
|
||||
data$: NEVER,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user