Represents a single media track (either audio or video).
the rtc instance
the WebRTC MediaStream instance
the WebRTC MediaStreamTrack instance, must be part of the given stream.
the function that will handle onended/oninactive events of the stream.
the media type of the JitsiTrack
Optional
videoType: VideoTypethe VideoType for this track if any
Attaches the MediaStream of this track to an HTML container. Adds the container to the list of containers that are displaying the track.
the HTML container which can be 'video' or 'audio' element.
Removes this JitsiTrack from the passed HTML container.
Optional
container: HTMLElementthe HTML container to detach from this JitsiTrack. If null or undefined, all containers are removed. A container can be a 'video', 'audio' or 'object' HTML element instance to which this JitsiTrack is currently attached.
Removes attached event listeners.
Returns the height of the track in normalized landscape format.
Returns id of the track.
id of the track or null if this is fake track.
Returns the WebRTC MediaStream instance.
Returns the source name of the track.
Returns the primary SSRC associated with the track.
Returns the ID of the underlying WebRTC Media Stream(if any)
Return the underlying WebRTC MediaStreamTrack
Returns the ID of the underlying WebRTC MediaStreamTrack(if any)
Return the underlying WebRTC MediaStreamTrack label
Returns the type (audio or video) of this track.
Return meaningful usage label for this track depending on it's media and eventual video type.
Returns the video type (camera or desktop) of this track.
Returns the width of the track in normalized landscape format.
Checks whether the MediaStream is active/not ended. When there is no check for active we don't have information and so will return that stream is active (in case of FF).
whether MediaStream is active.
Check if this is an audio track.
Abstract
isChecks whether this is a local track.
'true' if it's a local track or 'false' otherwise.
Check whether this is a local audio track.
Abstract
isChecks whether this track is muted.
Check if this is a video track.
Sets the audio level for the stream
value between 0 and 1
Optional
tpc: TraceablePeerConnectionthe peerconnection instance which is source for the audio level. It can be undefined for a local track if the audio level was measured outside of the peerconnection (see /modules/statistics/LocalStatsCollector.js).
Sets new audio output device for track's DOM elements. Video tracks are
ignored. Emits JitsiTrackEvents.TRACK_AUDIO_OUTPUT_CHANGED
.
id of 'audiooutput' device from navigator.mediaDevices.enumerateDevices(), '' for default device
Assigns the source name to a track.
The name to be assigned to the track.
Represents a single media track (either audio or video).