Options for when creating a new room

interface RoomOptions {
    adaptiveStream?: boolean | AdaptiveStreamSettings;
    audioCaptureDefaults?: AudioCaptureOptions;
    audioOutput?: AudioOutputOptions;
    disconnectOnPageLeave?: boolean;
    dynacast?: boolean;
    e2ee?: E2EEOptions;
    loggerName?: string;
    publishDefaults?: TrackPublishDefaults;
    reconnectPolicy?: ReconnectPolicy;
    stopLocalTrackOnUnpublish?: boolean;
    videoCaptureDefaults?: VideoCaptureOptions;
    webAudioMix?: boolean | WebAudioSettings;
}

Hierarchy

  • Partial<InternalRoomOptions>
    • RoomOptions

Properties

adaptiveStream?: boolean | AdaptiveStreamSettings

AdaptiveStream lets LiveKit automatically manage quality of subscribed video tracks to optimize for bandwidth and CPU. When attached video elements are visible, it'll choose an appropriate resolution based on the size of largest video element it's attached to.

When none of the video elements are visible, it'll temporarily pause the data flow until they are visible again.

audioCaptureDefaults?: AudioCaptureOptions

default options to use when capturing user's audio

audioOutput?: AudioOutputOptions

audio output for the room

disconnectOnPageLeave?: boolean

specifies whether the sdk should automatically disconnect the room on 'pagehide' and 'beforeunload' events

dynacast?: boolean

enable Dynacast, off by default. With Dynacast dynamically pauses video layers that are not being consumed by any subscribers, significantly reducing publishing CPU and bandwidth usage.

Dynacast will be enabled if SVC codecs (VP9/AV1) are used. Multi-codec simulcast requires dynacast

loggerName?: string
publishDefaults?: TrackPublishDefaults

default options to use when publishing tracks

reconnectPolicy?: ReconnectPolicy

policy to use when attempting to reconnect

stopLocalTrackOnUnpublish?: boolean

should local tracks be stopped when they are unpublished. defaults to true set this to false if you would prefer to clean up unpublished local tracks manually.

videoCaptureDefaults?: VideoCaptureOptions

default options to use when capturing user's video

webAudioMix?: boolean | WebAudioSettings

mix all audio tracks in web audio, helps to tackle some audio auto playback issues allows for passing in your own AudioContext instance, too