Connects to the MJ-native LiveKit room as a bot participant and brings the bot online. Returns the bot's identity + the room name.
Connect parameters (room URL, signed access token, bot name).
The bot identity + room handles.
Disconnects from the room and releases SDK resources.
Flushes all pending/queued outbound audio (the agent's voice). Called on barge-in so the agent stops talking immediately instead of draining already-buffered audio after the model is cut off.
Returns the current participant list (including the bot).
The current participants.
Subscribes inbound per-participant audio frames (what the agent hears, carrying the speaker identity for diarization). "Latest handler wins." The SFU never echoes the bot's own published audio back, so frames here are always from OTHER participants.
Invoked with each inbound, per-participant audio frame.
OptionalonSubscribes changes in what the room client shows of the avatar (published, or taken down with a reason). Optional, like publishAvatarMedia. "Latest handler wins."
Invoked with each change.
Registers a callback fired when the room disconnects the bot (SFU closed / bot removed). "Latest handler wins."
Invoked when the room has disconnected.
Registers a callback fired when a participant connects. "Latest handler wins."
Invoked with the participant who joined.
Registers a callback fired when a participant disconnects. "Latest handler wins."
Invoked with the participant identity that left.
OptionalonSubscribes the end of a camera or screen the room client was reading. Optional, like onVideoTrack. "Latest handler wins."
Invoked with each source that ended.
OptionalonSubscribes sampled camera and screen frames from people who let agents see them (what the agent SEES). Only fires when the session's configuration asked the room client to watch. Optional: an SDK without inbound video omits it. "Latest handler wins."
Invoked with each sampled frame.
Publishes one raw PCM audio frame on the bot's audio track (the agent's voice into the room).
The PCM audio bytes to publish.
OptionalpublishPublishes one piece of the agent's live avatar: the room client decodes it, publishes the face on the bot's camera track (at its first frame) and the voice on its audio track, lip-synced. This is the bot's only video out. Optional: an SDK without avatar publishing omits it, and the avatar's pieces are dropped.
The avatar piece.
Sends a text message on the LiveKit data channel (reliable publish to all participants) — the room-native "chat".
The chat/data message text.
The minimal LiveKit room SDK surface the import('./livekit-bridge').LiveKitBridge depends on. Production binds this to
livekit-server-sdk+ a room client; tests inject aFakeLiveKitRoomSdk.