Overview
TheJitsiRemoteTrack class represents a single remote media track (either audio or video) received from another participant in the conference.
Constructor
The RTC service instance
The conference to which this track belongs
The endpoint ID of the track owner
WebRTC MediaStream, parent of the track
Underlying WebRTC MediaStreamTrack
The type of the media (‘audio’ or ‘video’)
The type of the video (‘camera’ or ‘desktop’)
The SSRC number of the Media Stream
The initial muted state
Indicates whether this track belongs to a P2P session
The source name signaled for the track
Methods
dispose()
Removes attached event listeners and disposes the track streaming status.Resolves when disposal is complete
setMute()
Sets the current muted status and fires events for the change.The muted status to set
isMuted()
Returns the current muted status of the track.True if the track is muted, false otherwise
getParticipantId()
Returns the participant ID which owns the track.The ID of the participant (corresponds to Colibri endpoint ID/MUC nickname)
getSsrc()
Returns the synchronization source identifier (SSRC) of this remote track.The SSRC of this remote track
getSourceName()
Returns the track’s source name.The source name identifier
setOwner()
Updates the properties when the track is remapped to another source.The endpoint ID of the new owner
setSourceName()
Sets the name of the source associated with the remote track.The source name to be associated with the track
getTrackStreamingStatus()
Returns the track’s streaming status.The streaming status of the track, or null if not initialized. Possible values:
ACTIVE- Track is actively receiving mediaINACTIVE- Track is not receiving mediaRESTORING- Track is in the process of restoringINTERRUPTED- Track streaming was interrupted
toString()
Creates a text representation of this remote track instance.String representation including user ID, type, SSRC, P2P status, source name, and track status
Internal Methods
The following methods are marked as internal and are primarily used by the library itself.
_setVideoType()
Changes the video type of the track.The new video type (‘camera’ or ‘desktop’)
_setTrackStreamingStatus()
Updates the track’s streaming status.The current track streaming state
_setEnteredForwardedSourcesTimestamp()
Updates the timestamp of when the track entered forwarded sources.The time in milliseconds
_getEnteredForwardedSourcesTimestamp()
Returns the timestamp of when the track entered forwarded sources.The time in milliseconds or null
_clearEnteredForwardedSourcesTimestamp()
Clears the timestamp of when the track entered forwarded sources.Properties
The endpoint ID of the participant who owns this track
Indicates whether this track belongs to a peer-to-peer session
The RTC identifier for this track
Events
JitsiRemoteTrack extends JitsiTrack and emits additional events:TRACK_MUTE_CHANGED- Fired when the mute status changesTRACK_VIDEOTYPE_CHANGED- Fired when the video type changesTRACK_STREAMING_STATUS_CHANGED- Fired when the streaming status changesREMOTE_TRACK_MUTE- Fired when the remote track is mutedREMOTE_TRACK_UNMUTE- Fired when the remote track is unmuted
Track Streaming Status
TheTrackStreamingStatus indicates the current state of media reception:
- ACTIVE - Track is actively receiving media data
- INACTIVE - Track is not receiving media data
- RESTORING - Track entered forwarded sources and is attempting to restore
- INTERRUPTED - Track streaming was interrupted (no data received within timeout)