Skip to content

RoomOptions

Defined in: client-sdk-js/src/room/options.ts:41

Top-level options for a Room instance.

adaptiveStream?: boolean | AdaptiveStreamSettings;

Defined in: client-sdk-js/src/room/options.ts:47

Automatically manage subscribed video quality based on the size and visibility of attached elements. Pass true to enable with defaults or provide AdaptiveStreamSettings for fine-grained control.


audioCaptureDefaults?: AudioCaptureOptions;

Defined in: client-sdk-js/src/room/options.ts:79

Default capture options used when creating microphone tracks.


disconnectOnPageLeave?: boolean;

Defined in: client-sdk-js/src/room/options.ts:69

Automatically disconnect from the room when the page is being unloaded or frozen (beforeunload / pagehide / freeze).

true


dynacast?: boolean;

Defined in: client-sdk-js/src/room/options.ts:53

Enable Dynacast — dynamically pause video layers that have no subscribers on the server.


lastN?: number;

Defined in: client-sdk-js/src/room/options.ts:111

Maximum number of remote participants whose audio/video tracks this client will receive. 0 (default) means receive all participants.

When set to a positive number, the server will only auto-subscribe this participant to at most lastN publishers’ media tracks.


metadata?: string;

Defined in: client-sdk-js/src/room/options.ts:102

Room metadata (e.g. meeting topic) sent in the JoinRequest when the room is auto-created. Only takes effect for the first participant that causes the room to be created. Maximum size: 64 KB.


publishDefaults?: TrackPublishDefaults;

Defined in: client-sdk-js/src/room/options.ts:85

Default publish parameters applied to every track unless overridden per-track.


reconnectPolicy?: ReconnectPolicy;

Defined in: client-sdk-js/src/room/options.ts:61

Custom reconnection policy controlling retry delays after a connection interruption. See DefaultReconnectPolicy.

new DefaultReconnectPolicy()


stopLocalTrackOnUnpublish?: boolean;

Defined in: client-sdk-js/src/room/options.ts:95

Automatically stop local tracks when they are unpublished, including via LocalParticipant.setCameraEnabled et al. with false. Pass false explicitly to LocalParticipant.unpublishTrack to keep a track alive across unpublish/republish cycles.

true


videoCaptureDefaults?: VideoCaptureOptions;

Defined in: client-sdk-js/src/room/options.ts:74

Default capture options used when creating camera tracks.