ExperimentalExperimentalactivelist of participants that are actively speaking. when this changes a [[RoomEvent.ActiveSpeakersChanged]] event is fired
ExperimentalbufferedExperimentalisreflects the sender encryption status of the local participant
Experimentallocalthe current participant
Experimentaloptionsoptions of room
Experimentalremotemap of identity: [[RemoteParticipant]]
Optional ExperimentalserverExperimentalstateExperimental
Returns true if audio playback is enabled
Experimental
Returns true if video playback is enabled
Experimental
Experimental
if the current room has a participant with recorder: true in its JWT grant
Experimental
room metadata
Experimental
user assigned name, derived from JWT token
Experimental
Experimental
Experimental
Optionalopts: RoomConnectOptionsExperimental
disconnects the room, emits [[RoomEvent.Disconnected]]
Experimental
Releases everything the room holds: disconnects if connected, disposes the extensions and removes global listeners. The room cannot connect again afterwards.
Experimental
Experimental
Experimental
retrieves a participant by identity
Experimental
server assigned unique room id. returns once a sid has been issued by the server.
Experimental
prepareConnection should be called as soon as the page is loaded, in order to speed up the connection attempt. This function will
With LiveKit Cloud, it will also determine the best edge data center for the current client to connect to if a token is provided.
Optionaltoken: stringExperimental
Establishes the participant as a receiver for calls of the specified RPC method.
The name of the indicated RPC method
Will be invoked when an RPC request for this method is received
A promise that resolves when the method is successfully registered
room.localParticipant?.registerRpcMethod(
'greet',
async (data: RpcInvocationData) => {
console.log(`Received greeting from ${data.callerIdentity}: ${data.payload}`);
return `Hello, ${data.callerIdentity}!`;
}
);
The handler should return a Promise that resolves to a string.
If unable to respond within responseTimeout, the request will result in an error on the caller's side.
You may throw errors of type RpcError with a string message in the handler,
and they will be received on the caller's side with the message intact.
Other errors thrown in your handler will not be transmitted as-is, and will instead arrive to the caller as 1500 ("Application Error").
Experimental
Experimental
Allows to populate a room with simulated participants. No actual connection to a server will be established, all state is
Experimental
Browsers have different policies regarding audio playback. Most requiring some form of user interaction (click/tap/etc). In those cases, audio will be silent until a click/tap triggering one of the following
startAudiogetUserMediaExperimental
Experimental
Switches all active devices used in this room to the given device.
Note: setting AudioOutput is not supported on some browsers. See setSinkId
use videoinput for camera track,
audioinput for microphone track,
audiooutput to set speaker for all incoming audio tracks
Experimental
Experimental
Unregisters a previously registered RPC method.
The name of the RPC method to unregister
Experimental
The room without optional features. Use
CoreRoom.with(...extensions)to build a room class with the features an application needs, or useRoomfrom the main entry for all of them.In LiveKit, a room is the logical grouping for a list of participants. Participants in a room can publish tracks, and subscribe to others' tracks.
a Room fires [[RoomEvent | RoomEvents]].
No Inherit Doc