Constructor
Methods
async join()
Join the voice chat room. Fetches a token, connects to the LiveKit server, subscribes to audio, and enables the mic if configured.
async leave()
Disconnect from the room.
async toggleMic()
Toggle the local microphone on or off.
sendMessage(text)
Send a text message to all participants in the room.
async muteAllRemote()
Mute all remote participants locally (you stop hearing them).
async unmuteAllRemote()
Unmute all remote participants locally.
async muteSelected(identity)
Mute a specific participant locally.
async unmuteSelected(identity)
Unmute a specific participant locally.
onMessage(callback)
Register a callback for incoming messages (including your own).
onParticipantUpdate(callback)
Register a callback for participant list changes and speaking state updates.
Next steps
Voice and text chat guide
End-to-end guide with full usage examples.
SFU streaming
Pair voice chat with one-to-many SFU sessions.