client assigned identity, encoded in JWT token
if participant is currently speaking
Optional
lastOptional
metadataclient metadata, opaque to livekit
Optional
nameclient assigned display name, encoded in JWT token
Optional
permissionsserver assigned unique id
map of track sid => all published tracks
participant attributes, similar to metadata, but as a key/value map
when participant joined the room
Creates a screen capture tracks with getDisplayMedia(). A LocalVideoTrack is always created and returned. If { audio: true }, and the browser supports audio capture, a LocalAudioTrack is also created.
Optional
options: ScreenShareCaptureOptionsCreate local camera and/or microphone tracks
Optional
options: CreateLocalTracksOptionsFinds the first track that matches the source filter, for example, getting the user's camera track with getTrackBySource(Track.Source.Camera).
Finds the first track that matches the track's name.
Publish a new data payload to the room. Data will be forwarded to each participant in the room if the destination field in publishOptions is empty
Uint8Array of the payload. To send string data, use TextEncoder.encode
optionally specify a reliable
, topic
and destination
Publish a new track to the room
Optional
options: TrackPublishOptionsOptional
options: TrackPublishOptionsSet or update participant attributes. It will make updates only to keys that
are present in attributes
, and will not override others.
Note: this requires canUpdateOwnMetadata
permission.
attributes to update
Enable or disable a participant's camera track.
If a track has already published, it'll mute or unmute the track.
Resolves with a LocalTrackPublication
instance if successful and undefined
otherwise
Optional
options: VideoCaptureOptionsOptional
publishOptions: TrackPublishOptionsEnable or disable a participant's microphone track.
If a track has already published, it'll mute or unmute the track.
Resolves with a LocalTrackPublication
instance if successful and undefined
otherwise
Optional
options: AudioCaptureOptionsOptional
publishOptions: TrackPublishOptionsStart or stop sharing a participant's screen
Resolves with a LocalTrackPublication
instance if successful and undefined
otherwise
Optional
options: ScreenShareCaptureOptionsOptional
publishOptions: TrackPublishOptionsControl who can subscribe to LocalParticipant's published tracks.
By default, all participants can subscribe. This allows fine-grained control over who is able to subscribe at a participant and track level.
Note: if access is given at a track-level (i.e. both [allParticipantsAllowed] and [ParticipantTrackPermission.allTracksAllowed] are false), any newer published tracks will not grant permissions to any participants and will require a subsequent permissions update to allow subscription.
Allows all participants to subscribe all tracks. Takes precedence over [[participantTrackPermissions]] if set to true. By default this is set to true.
Full list of individual permissions per participant/track. Any omitted participants will not receive any permissions.
Optional
stopOnUnpublish: boolean
audio level between 0-1.0, 1 being loudest, 0 being softest