Member Junction
    Preparing search index...

    Options for configuring LiveKitWorkerRoomClient.

    interface LiveKitWorkerRoomClientOptions {
        avatarStatus?: NativeAvatarStatus;
        channels: number;
        connectTimeoutMs?: number;
        disconnectTimeoutMs?: number;
        fallbackFactory?: () => TelemetryRoomClient;
        healthyResetMs?: number;
        inboundSampleRate: number;
        maxRejoinTokenAgeMs?: number;
        maxRestartAttempts?: number;
        preBufferMs?: number;
        restartBackoffBaseMs?: number;
        restartBackoffMaxMs?: number;
        sampleRate: number;
        telemetryPollMs?: number;
        video?: NativeRoomVideoOptions;
        videoEncodeWorker?: boolean;
        workerFactory?: () => IMediaWorker;
    }

    Hierarchy (View Summary)

    Index

    Properties

    avatarStatus?: NativeAvatarStatus

    Where the agent's avatar stands at this join. A worker restarted after the avatar was taken down joins with audio-only, so the in-worker client re-applies the bot's attribute (the token still says on) and publishes no avatar. Absent on a first join.

    channels: number

    Outbound capture channel count (typically 1 for mono).

    connectTimeoutMs?: number

    Reject (and fall back) if the worker has not joined the room within this many ms (default: 20000).

    disconnectTimeoutMs?: number

    Max wait for a graceful worker disconnect before terminating it (default: 5000).

    fallbackFactory?: () => TelemetryRoomClient

    Builds the in-process client used when the worker cannot be started or joined. No fallback when omitted.

    healthyResetMs?: number

    The restart counter only resets after the worker has stayed connected this long (default: 60000).

    inboundSampleRate: number

    Inbound audio stream sample rate (Hz).

    maxRejoinTokenAgeMs?: number

    Do not rejoin with a join token older than this many ms (default: 600000). See file header.

    maxRestartAttempts?: number

    Max consecutive restart attempts if the worker crashes (default: 3).

    preBufferMs?: number

    Outbound pre-buffer target in milliseconds (default: 150ms).

    restartBackoffBaseMs?: number

    First restart delay in ms; doubles per attempt (default: 250).

    restartBackoffMaxMs?: number

    Upper bound for the restart delay in ms (default: 5000).

    sampleRate: number

    Outbound capture sample rate (Hz).

    telemetryPollMs?: number

    Interval (ms) of the background telemetry refresh while connected (default: 1000; 0 disables).

    What the in-worker room client reads for the agent when it watches the meeting. Absent: no video is read (and every video track is unsubscribed). The watcher runs inside the worker: it reads attributes and events there.

    videoEncodeWorker?: boolean

    Whether the in-worker room client encodes participant video on its own encode worker (nested in the media worker) rather than on the media worker's thread. The module factory sets it from MJ_LIVEKIT_VIDEO_ENCODE_WORKER and its VideoEncodeWorker option; absent means the media worker's thread encodes.

    workerFactory?: () => IMediaWorker

    Optional factory for injecting custom or mock media workers (e.g. for testing).