Optionalconstraints: MediaTrackConstraints
Signals to the SDK whether or not the mediaTrack should be managed (i.e. released and reacquired) internally by the SDK
OptionalloggerOptions: LoggerOptionsReadonlykindOptionallastOptionalpublishOptionalsidsid is set after track is published to server, or if it's a remote track
Optionalsignalcurrent receive bits per second
indicates current state of stream, it'll indicate paused if the track
has been paused by congestion controller
creates a new HTMLAudioElement or HTMLVideoElement, attaches to it, and returns it
attaches track to an existing HTMLAudioElement or HTMLVideoElement
Detaches from all attached elements
Detach from a single element
DeviceID of the device that is currently being used for this track
Returns the processor currently set on this track, or undefined if there is none. A track
that was stopped by an unpublish or a disconnect has none. See TrackProcessor.
Gets the RTCStatsReport for the LocalTrack's underlying RTCRtpSender See https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
Promise
pauses publishing to the server without disabling the local MediaStreamTrack this is used to display a user's own video locally while pausing publishing to the server. this API is unsupported on Safari < 12 due to a bug
Experimental
Designed for lower powered devices, reduces video publishing quality and disables simulcast.
Optionaloptions: ReplaceTrackOptionsOptionaluserProvidedTrack: booleanOptionaloptions: VideoCaptureOptionsSets a processor on this track, and wires its processed track into the simulcast codecs.
The processor is destroyed when the track is stopped, which unpublishing and disconnecting both do by default, so it has to be set again after reconnecting. See TrackProcessor for the full lifecycle.
Stops the track processor See https://github.com/livekit/track-processors-js for example usage
Only needed to remove a processor from a track that stays published. Unpublishing or disconnecting already destroys it. See TrackProcessor.
MediaTrackConstraints that are being used when restarting or reacquiring tracks