Creates a new Room, the primary construct for a LiveKit session.
Optional
options: RoomOptionslist of participants that are actively speaking. when this changes a [[RoomEvent.ActiveSpeakersChanged]] event is fired
reflects the sender encryption status of the local participant
the current participant
options of room
map of identity: [[RemoteParticipant]]
Optional
serverReturns true if audio playback is enabled
Returns true if video playback is enabled
if the current room has a participant with recorder: true
in its JWT grant
room metadata
user assigned name, derived from JWT token
Optional
opts: RoomConnectOptionsretrieves a participant by identity
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.
Optional
token: stringSwitches 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
Static
getgetLocalDevices abstracts navigator.mediaDevices.enumerateDevices. In particular, it requests device permissions by default if needed and makes sure the returned device does not consist of dummy devices
Optional
kind: MediaDeviceKinda list of available local devices
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