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.
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.
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.
Publishes one raw screen-share frame on the bot's screen track (e.g. a Remote Browser channel's viewport). LiveKit does full screen share.
The encoded/raw screen frame bytes to publish.
Publishes one raw video frame on the bot's camera track. LiveKit does full video; the realtime models light audio first, so this is wired but typically unused until a model emits video.
The encoded/raw video frame bytes to publish.
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.