Member Junction
    Preparing search index...

    mj-livekit-room — a full-featured, framework-portable LiveKit room UI. Owns a room controller (ILiveKitRoomController; LiveKit's by default), renders a participant grid/spotlight, control bar, chat, device picker, and participants roster, and re-surfaces the core's cancelable event model as @Output()s.

    Every feature is gated by an @Input so a host can compose exactly the experience it wants (voice-only widget, full conferencing surface, embedded co-agent panel, …) without forking the component.

    Public class members are PascalCase (MJ convention); private/protected members are camelCase.

    Implements

    • OnInit
    • OnChanges
    • OnDestroy
    • AfterViewChecked
    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    ActiveSpeakersChanged: EventEmitter<LiveKitActiveSpeakersEvent> = ...

    Fired when the active-speaker set changes.

    AgentAvatarUrl: string | null = null

    Optional avatar URL for the agent participant (matched by agent role).

    AgentVisionChange: EventEmitter<boolean> = ...

    The user asked to let agents see their camera and shared screen (true) or to stop (false). The room changes nothing itself: the host records the choice (in a LiveKit room, the server sets the person's attribute), and the room shows it once its controller reports it.

    AutoConnect: boolean = true

    Connect automatically once ServerUrl + Token are present.

    BeforeConnect: EventEmitter<LiveKitBeforeConnectEvent> = ...

    Fired before connecting. Cancelable.

    BeforeDeviceSwitch: EventEmitter<LiveKitBeforeDeviceSwitchEvent> = ...

    Fired before the active device is switched. Cancelable.

    BeforeDisconnect: EventEmitter<LiveKitBeforeDisconnectEvent> = ...

    Fired before disconnecting/leaving. Cancelable (e.g. confirm "leave call?").

    BeforeMediaToggle: EventEmitter<LiveKitBeforeMediaToggleEvent> = ...

    Fired before a local-media track is toggled. Cancelable.

    BeforeSendData: EventEmitter<LiveKitBeforeSendDataEvent> = ...

    Fired before a data-channel message is sent. Cancelable; Text is mutable.

    CanEndForAll: boolean = false

    Turns the leave button into a Zoom/Teams-style split offering Leave vs. End meeting for everyone. Purely presentational here — this generic component has no notion of "ending for everyone"; it just emits EndForAll so the host (e.g. the MJ binding) can tear down agents/the room. Default false (plain Leave).

    ChatMessage: EventEmitter<LiveKitChatMessage> = ...

    Fired when a chat message (chat-topic data) is received, and when the user's own message has gone out. A message that does not go out is not reported here: the chat marks it not sent, and the controller's failure, if any, comes through ErrorOccurred.

    ChatMessages: LiveKitChatMessage[] = []

    The accumulated chat messages.

    ChatOpenByDefault: boolean = false

    Open the chat panel by default on connect.

    Connected: EventEmitter<LiveKitRoomState> = ...

    Fired when the room connects.

    DataReceived: EventEmitter<LiveKitDataMessage> = ...

    Fired for every inbound data-channel message (all topics).

    DeviceMenuOpen: boolean = false

    Whether the device menu popover is open.

    Devices: LiveKitDeviceLists = ...

    The device lists for the device menu.

    Disconnected: EventEmitter<LiveKitDisconnectedEvent> = ...

    Fired when the room disconnects.

    DisplayName: string | null = null

    The display name to publish for the local participant.

    E2EEPassphrase: string | null = null

    End-to-end-encryption passphrase. When set with E2EEWorker, the room connects with E2EE.

    E2EEWorker: Worker | null = null

    The E2EE web worker (host-provided, bundler-specific). Required for E2EEPassphrase.

    EnableAgentVisionControl: boolean = true

    Offer the "Let the agent see me" switch ("Let agents see me" with more than one agent) while an agent in the room watches (LiveKitRoomState.AgentWatching). The switch only asks: see AgentVisionChange.

    EnableBackgroundEffects: boolean = false

    Expose the background-blur toggle in the settings menu.

    EnableCameraControl: boolean = true

    Allow toggling the camera.

    EnableDeviceSettings: boolean = true

    Allow opening the device-settings menu.

    EnableLayoutSwitcher: boolean = true

    Show the layout switcher (gallery / active speaker / split / audio-only).

    EnableLeaveControl: boolean = true

    Allow leaving the room from the control bar.

    EnableMicrophoneControl: boolean = true

    Allow toggling the microphone.

    EnableNoiseFilter: boolean = false

    Expose the Krisp noise-filter toggle in the settings menu (LiveKit Cloud).

    EnablePinning: boolean = true

    Allow pinning a participant to the spotlight (hover pin button on tiles).

    EnableScreenShareControl: boolean = true

    Allow screen sharing.

    EndForAll: EventEmitter<void> = ...

    Fired when the user chooses "End meeting for everyone" from the split-leave menu (only reachable when CanEndForAll). The host should tear down the meeting (e.g. stop all agents), then disconnect.

    ErrorOccurred: EventEmitter<LiveKitRoomError> = ...

    Fired when a room error occurs.

    IsRecording: boolean = false

    Whether a recording is currently in progress (host-managed).

    LastErrorMessage: string | null = null

    The last room error message, surfaced in the overlay.

    Layout: LiveKitRoomLayout = 'grid'

    The stage layout mode.

    LayoutChange: EventEmitter<LiveKitRoomLayout> = ...

    Fired when the user changes the layout via the layout switcher.

    LayoutMenuOpen: boolean = false

    Whether the layout switcher popover is open.

    LayoutOptions: LiveKitLayoutOption[] = ...

    The available layout options for the switcher.

    LobbyMicrophoneLevel: (() => number) | null = null

    Reads the lobby microphone's level, for the camera check's meter; null outside the lobby.

    LobbyState: MediaPreviewState | null = null

    What the lobby shows: the camera, the devices and the user's choices; null outside the lobby.

    LocalMediaChanged: EventEmitter<LiveKitLocalMediaState> = ...

    Fired when the local-media toggle state changes.

    MediaDevices: MediaDevice[] = []

    Devices as one /media list, for the device menu.

    MeterSettings: Readonly<Partial<AudioLevelSmootherOptions>> = LIVEKIT_METER_SETTINGS

    How the tiles' meters move: as LiveKit's meter always did.

    ParticipantJoined: EventEmitter<LiveKitParticipantJoinedEvent> = ...

    Fired when a participant joins.

    ParticipantLeft: EventEmitter<LiveKitParticipantLeftEvent> = ...

    Fired when a participant leaves.

    PipRects: ReadonlyMap<string, MediaPipRect> = ...

    Where the user put picture-in-picture boxes, by participant identity, as PipRectsChange gave them to the host.

    PipRectsChange: EventEmitter<ReadonlyMap<string, MediaPipRect>> = ...

    Fired when the user moves or resizes a picture-in-picture box, or resets the layout: every box, by participant identity, for the host to save and give back through PipRects.

    PreJoinChoices: LiveKitPreJoinChoices | null = null

    The PreJoin choices, once confirmed.

    PreJoinComplete: boolean = false

    Whether the user has passed the PreJoin lobby (or PreJoin is disabled).

    Reconnected: EventEmitter<LiveKitRoomState> = ...

    Fired when reconnection succeeds.

    Reconnecting: EventEmitter<void> = ...

    Fired when reconnection begins.

    RoomOptions?: RoomOptions

    Advanced livekit-client room options merged into the constructed Room (overrides speech defaults).

    SelectedCameraId: string | null = null

    The active camera deviceId, used to pre-select it in the device menu.

    SelectedMicrophoneId: string | null = null

    The active microphone deviceId, used to pre-select it in the device menu.

    SelectedSpeakerId: string | null = null

    The active speaker deviceId, used to pre-select it in the device menu.

    SelfViewHidden: boolean = false

    Whether the user hid their self-view (Hide on their tile); the camera stays on, so others still see them. A host that saves it gives it back here, as SelfViewHiddenChange gave it; otherwise it lasts for the session.

    SelfViewHiddenChange: EventEmitter<boolean> = ...

    Fired when the user hides their self-view (true), or shows it again from the "Self-view hidden" chip or resets the layout (false), for the host to save and give back through SelfViewHidden.

    SharePanels: readonly MediaSharePanel[] = []

    The panels of the page the Share menu offers under "This panel", such as the room's whiteboard: those on screen, in page order, leaving out any that holds this room. Empty where the browser cannot share a single panel.

    ShowActiveSpeakerHighlight: boolean = true

    Highlight active speakers with a ring.

    ShowAgentState: boolean = false

    Show the agent-state visualizer (listening/thinking/speaking) for the agent participant.

    ShowAudioMeters: boolean = true

    Show per-tile audio meters.

    ShowChat: boolean = true

    Enable the data-channel chat feature (toggle + panel).

    ShowConnectionOverlay: boolean = true

    Render the connecting/reconnecting/error overlay.

    ShowConnectionQuality: boolean = true

    Show per-tile connection-quality indicators.

    ShowControlBar: boolean = true

    Show the control bar at all.

    ShowHeader: boolean = true

    Show the header bar.

    ShowNameBadges: boolean = true

    Show participant name badges on tiles.

    ShowParticipantCount: boolean = true

    Show the participant count in the header.

    ShowParticipantsPanel: boolean = true

    Enable the participants roster panel (toggle + panel).

    ShowPreJoin: boolean = false

    Show a device-preview PreJoin lobby before connecting (suppresses auto-connect until the user joins).

    ShowRecordingControl: boolean = false

    Show the recording toggle in the control bar (the host wires the actual egress call).

    ShowSelfView: boolean = true

    Show the local participant's self-view tile.

    ShowWhiteboard: boolean = false

    Enable the collaborative whiteboard surface (data-channel-synced; agent co-authoring supported).

    SidePanel: LiveKitSidePanel = 'none'

    Which side panel is currently open.

    SplitRatio: number = 0.62

    The split-view ratio (left/screen pane fraction, 0.2–0.8).

    StartWithCamera: boolean = false

    Start with the camera enabled.

    StartWithMicrophone: boolean = true

    Start with the microphone enabled.

    State: LiveKitRoomState = ...

    The current normalized room state snapshot.

    StateChanged: EventEmitter<LiveKitRoomState> = ...

    Fired on every normalized room state change.

    TileMovesChange: EventEmitter<readonly MediaPlacementMove[]> = ...

    Fired when the user moves a participant's tile or resets the layout: the room's moves, oldest first, for the host to save and give back through TileMoves.

    Title: string | null = null

    The header title.

    ToggleRecording: EventEmitter<void> = ...

    Fired when the user toggles recording (the host performs the server-side egress call).

    UnreadChatCount: number = 0

    The unread chat count (since the chat panel was last open).

    WhiteboardActive: boolean = false

    Whether the whiteboard surface is currently shown (replaces the participant stage).

    Accessors

    • get AgentCount(): number

      The number of agents in the room. The agent-vision words (the tiles' chips, the self-view and the "Let the agent see me" control) are plural only when there is more than one.

      Returns number

    • get AgentParticipant(): LiveKitParticipantView | null

      The agent participant whose name/state the agent indicator shows. In a MULTI-agent room this prefers the agent that is currently speaking (so the indicator reads e.g. "Marketing Agent · speaking", not whichever agent merely joined first), falling back to the first agent when none is speaking.

      Returns LiveKitParticipantView | null

    • get PinnedIdentity(): string | null

      The participant the user put in the spotlight (the pin), or null: their tile was moved to the stage (MoveTile), pinning is on, and they are in the room. Setting it moves that participant's tile there; null sends the pinned tile back to the strip.

      Returns string | null

    • set PinnedIdentity(identity: string | null): void

      Parameters

      • identity: string | null

      Returns void

    • get ShowAgentVisionControl(): boolean

      Whether the bar offers the "Let the agent see me" switch: the host allows it, and an agent in the room watches.

      Returns boolean

    • get ShowSelfViewChip(): boolean

      Whether the "Self-view hidden" chip shows: the host allows a self-view and the user hid theirs.

      Returns boolean

    Methods

    • Connects to the room using the current inputs. Safe to call repeatedly.

      Returns Promise<void>

    • Moves a participant's tile: to the spotlight (stage), back among the others (tab, the filmstrip or the grid), or into a picture-in-picture box (pip), and tells the host (TileMovesChange). One participant holds the spotlight: a newer move there sends the last one back. The grid has no spotlight, so a move there switches the room to the Active speaker layout. Moving to the spotlight needs EnablePinning.

      Parameters

      Returns void

    • A callback method that is invoked immediately after the default change detector has completed one change-check cycle for a component's view.

      Returns void

    • A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.

      Parameters

      • _changes: { [propName: string]: SimpleChange<any> }

      Returns void

    • A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

      Returns void

    • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

      Returns void

    • Toggles camera background blur.

      Parameters

      • enabled: boolean

      Returns void

    • Shares something else, from the preview's Change: the browser's picker opens again.

      Returns void

    • Resumes audio playback after a browser autoplay block (must run from a user gesture).

      Returns void

    • The user turned the lobby's camera on or off.

      Parameters

      • on: boolean

      Returns void

    • The user turned the lobby's microphone on or off.

      Parameters

      • on: boolean

      Returns void

    • Toggles the Krisp noise filter.

      Parameters

      • enabled: boolean

      Returns void

    • Opens the device menu and (re)loads device lists.

      Returns Promise<void>

    • Shares one panel of the page alone, picked under "This panel" in the Share menu: the browser's picker offers this tab, and the share shows only the panel (Chrome and Edge). A panel that went away since the menu listed it shares nothing.

      Parameters

      • key: string

      Returns void

    • "Reset layout": every tile goes back where the call places it, so the pin and the boxes are cleared, every box's position is forgotten, and a hidden self-view shows again, as the realtime call's reset brings back a hidden camera box. The host hears all three, the self-view's on every reset, hidden or not.

      Returns void

    • Sends a message marked not sent again, from its Retry: the marked message goes, and the text is sent as a new message at the end of the chat, where the others will see it. Does nothing for a message that is not marked not sent or is no longer in the chat.

      Parameters

      Returns void

    • Shows the user's self-view again, from the "Self-view hidden" chip or Reset layout, and tells the host.

      Returns void

    • Updates the split ratio while dragging the divider, clamped to 20–80%.

      Parameters

      • event: PointerEvent
      • container: HTMLElement

      Returns void

    • Begins dragging the split-view divider.

      Parameters

      • event: PointerEvent

      Returns void

    • Pins/unpins a participant to the spotlight (toggles off if already pinned): a move to the spotlight and back.

      Parameters

      • identity: string

      Returns void

    • Toggles recording intent (the host performs the actual server-side egress call).

      Returns void

    • Broadcasts a local whiteboard snapshot to the room over the data channel.

      Parameters

      • json: string

      Returns void

    • Where a participant's tile may go from where it shows, for its "Move to…" menu, or null for no menu. The participant the call put in the spotlight may be pinned there or boxed, but not sent to the strip, where the call would not keep them while they speak. Without pinning the spotlight is not offered. The screen-share pane has no menu, and a picture-in-picture box has its menu on its bar (PipMoves).

      Parameters

      • identity: string
      • place: LiveKitTilePlace

      Returns readonly MediaPlacement[] | null