The time in seconds after which an empty room will be automatically closed.
Connects to a LiveKit room using the provided URL and access token.
The WebSocket URL of the LiveKit server
A valid LiveKit access token for authentication
Optional
opts: RoomOptionsOptional room configuration options
Disconnects from the room and cleans up all resources. This will stop all tracks and close the connection.
Gets the room's server ID. This ID is assigned by the LiveKit server and is unique for each room session. SID is assigned asynchronously after connection.
Promise that resolves to the room's server ID, or empty string if not connected
Registers a handler for incoming byte data streams on a specific topic. Byte streams are used for receiving binary data like files from other participants.
The topic to listen for byte streams on
Function to handle incoming byte stream data
Registers a handler for incoming text data streams on a specific topic. Text streams are used for receiving structured text data from other participants.
The topic to listen for text streams on
Function to handle incoming text stream data
The time in seconds after which a room will be closed after the last participant has disconnected.