Member Junction
    Preparing search index...

    Controls a single LiveKit room: connect/disconnect, local-media toggles, data messages, device switching, and a normalized observable state snapshot. One controller == one room connection.

    Implements

    Index

    Constructors

    Properties

    The room's cancelable event bus (Before-events + notifications). Subscribe with Events.On(...); the Angular layer re-surfaces these as @Output() emitters. See LiveKitRoomEventBus.

    Accessors

    Methods

    • Connects to a LiveKit room and brings the local participant online with the requested media.

      Only the connection can fail the join: then it rejects, the status is 'error' and a connect error is emitted. The microphone and camera are turned on once connected, each on its own; one that fails (the browser refused it, or it is in use) is left off and reported as a device error, and the join goes on, so the user is in the room and can turn it on again. If the user leaves while a device starts (the browser's permission prompt can stay open a while), no other device starts and no connected is emitted.

      Parameters

      • serverUrl: string

        The LiveKit server URL (e.g. wss://livekit.myorg.com).

      • token: string

        The signed access token authorizing this participant to join a specific room.

      • options: LiveKitRoomConnectOptions = {}

        Initial media + display-name options.

      Returns Promise<void>

    • Disconnects from the room and releases all resources. Safe to call when not connected.

      Parameters

      • userInitiated: boolean = true

        Whether the user requested the leave (raises a cancelable beforeDisconnect). Internal reconnect cycles pass false to skip the veto hook. Defaults to true.

      Returns Promise<boolean>

      true if the disconnect proceeded, false if a beforeDisconnect handler canceled it.

    • Returns the deviceId of the currently-active device for a given kind, or null when no room is connected or the active device is unknown. Used by hosts to pre-select the active device in a device-picker UI.

      Parameters

      • kind: "audioinput" | "videoinput" | "audiooutput"

        The device kind to query.

      Returns string | null

      The active deviceId, or null if unavailable.

    • Sends a text message on the LiveKit data channel (reliable publish to all participants).

      Parameters

      • text: string

        The message text.

      • Optionaltopic: string

        Optional topic to publish under (for routing on the receiving side).

      Returns Promise<boolean>

      true once LiveKit sent the message (while LiveKit reconnects, it holds the message and sends it when the session resumes); false when it was not sent: no room, a beforeSendData handler canceled it, or the publish failed, which is also raised as an error of kind data.

    • Enables/disables the Krisp noise filter on the local microphone (LiveKit Cloud).

      Parameters

      • enabled: boolean

        Whether the filter should be on.

      Returns Promise<boolean>

      true if applied; false if unsupported or the SDK is unavailable.

    • Starts or stops local screen sharing, through /media display capture published as this participant's screen share (capped at 1080p and 30 fps, as LiveKit's own capture is). request is the kind of surface the browser's picker offers first (Chromium reads it; the user can still pick another kind), or the share's options: one panel of the page to share alone (Panel, Chrome and Edge), with its name (PanelLabel). A picker the user closes shares nothing and is no error; a share the browser refuses is a device error.

      Parameters

      Returns Promise<void>

    • Switches the active device for a given kind.

      Parameters

      • kind: "audioinput" | "videoinput" | "audiooutput"

        The device kind to switch.

      • deviceId: string

        The deviceId to switch to.

      Returns Promise<void>