Properties:
Name | Type | Description |
---|---|---|
audioTracks |
Map.<Track.SID, RemoteAudioTrackPublication> | |
dataTracks |
Map.<Track.SID, RemoteDataTrackPublication> | |
tracks |
Map.<Track.SID, RemoteTrackPublication> | |
videoTracks |
Map.<Track.SID, RemoteVideoTrackPublication> |
Fires:
- RemoteParticipant#event:reconnected
- RemoteParticipant#event:reconnecting
- RemoteParticipant#event:trackDimensionsChanged
- RemoteParticipant#event:trackDisabled
- RemoteParticipant#event:trackEnabled
- RemoteParticipant#event:trackMessage
- RemoteParticipant#event:trackPublished
- RemoteParticipant#event:trackPublishPriorityChanged
- RemoteParticipant#event:trackStarted
- RemoteParticipant#event:trackSubscribed
- RemoteParticipant#event:trackSubscriptionFailed
- RemoteParticipant#event:trackSwitchedOff
- RemoteParticipant#event:trackSwitchedOn
- RemoteParticipant#event:trackUnpublished
- RemoteParticipant#event:trackUnsubscribed
Extends
Events
-
disconnected
-
The Participant has disconnected.
Parameters:
Name Type Description participant
Participant The Participant that disconnected.
- Inherited From:
- Overrides:
-
networkQualityLevelChanged
-
The Participant's NetworkQualityLevel changed.
Parameters:
Name Type Argument Description networkQualityLevel
NetworkQualityLevel The new NetworkQualityLevel
networkQualityStats
NetworkQualityStats <nullable>
The NetworkQualityStats based on which NetworkQualityLevel is calculated, if any
- Inherited From:
- Overrides:
-
reconnected
-
The RemoteParticipant has reconnected to the Room after a signaling connection disruption.
- Overrides:
-
reconnecting
-
The RemoteParticipant is reconnecting to the Room after a signaling connection disruption.
- Overrides:
-
trackDimensionsChanged
-
One of the RemoteParticipant's RemoteVideoTrack's dimensions changed.
Parameters:
Name Type Description track
RemoteVideoTrack The RemoteVideoTrack whose dimensions changed
- Overrides:
-
trackDisabled
-
A RemoteTrack was disabled by the RemoteParticipant.
Parameters:
Name Type Description publication
RemoteTrackPublication The RemoteTrackPublication associated with the disabled RemoteTrack
-
trackEnabled
-
A RemoteTrack was enabled by the RemoteParticipant.
Parameters:
Name Type Description publication
RemoteTrackPublication The RemoteTrackPublication associated with the enabled RemoteTrack
-
trackMessage
-
A message was received over one of the RemoteParticipant's RemoteDataTracks.
Parameters:
Name Type Description data
string | ArrayBuffer track
RemoteDataTrack The RemoteDataTrack over which the message was received
-
trackPublished
-
A RemoteTrack was published by the RemoteParticipant after connecting to the Room. This event is not emitted for RemoteTracks that were published while the RemoteParticipant was connecting to the Room.
Parameters:
Name Type Description publication
RemoteTrackPublication The RemoteTrackPublication which represents the published RemoteTrack
Example
function trackPublished(publication) { console.log(`Track ${publication.trackSid} was published`); } room.on('participantConnected', participant => { // Handle RemoteTracks published while connecting to the Room. participant.trackPublications.forEach(trackPublished); // Handle RemoteTracks published after connecting to the Room. participant.on('trackPublished', trackPublished); });
-
trackPublishPriorityChanged
-
The RemoteTrackPublication's publish Track.Priority was changed by the RemoteParticipant.
Parameters:
Name Type Description priority
Track.Priority the RemoteTrack's new publish Track.Priority;
publication
RemoteTrackPublication The RemoteTrackPublication for the RemoteTrack that changed priority
-
trackStarted
-
One of the RemoteParticipant's RemoteTracks started.
Parameters:
Name Type Description track
RemoteTrack The RemoteTrack that started
- Overrides:
-
trackSubscribed
-
A RemoteParticipant's RemoteTrack was subscribed to.
Parameters:
Name Type Description track
RemoteTrack The RemoteTrack that was subscribed to
publication
RemoteTrackPublication The RemoteTrackPublication for the RemoteTrack that was subscribed to
-
trackSubscriptionFailed
-
A RemoteParticipant's RemoteTrack could not be subscribed to.
Parameters:
Name Type Description error
TwilioError The reason the RemoteTrack could not be subscribed to
publication
RemoteTrackPublication The RemoteTrackPublication for the RemoteTrack that could not be subscribed to
-
trackSwitchedOff
-
A RemoteParticipant's RemoteTrack was switched off. The media server stops sending media or data for the RemoteTrack until it is switched back on. Just before the event is raised,
isSwitchedOff
is set totrue
andswitchOffReason
is set to a TrackSwitchOffReason. Also, if the RemoteTrack receives either audio or video media, themediaStreamTrack
property is set tonull
.Parameters:
Name Type Argument Description track
RemoteTrack The RemoteTrack that was switched off
publication
RemoteTrackPublication The RemoteTrackPublication for the RemoteTrack that was switched off
switchOffReason
TrackSwitchOffReason <nullable>
The reason the RemoteMediaTrack was switched off
-
trackSwitchedOn
-
A RemoteParticipant's RemoteTrack was switched on. The media server starts sending media for the RemoteTrack until it is switched off. Just before the event is raised,
isSwitchedOff
is set tofalse
andswitchOffReason
is set tonull
. Also, if the RemoteTrack receives either audio or video media, themediaStreamTrack
property is set to a MediaStreamTrack that is the source of the RemoteTrack's media.Parameters:
Name Type Description track
RemoteTrack The RemoteTrack that was switched on.
publication
RemoteTrackPublication The RemoteTrackPublication for the RemoteTrack that was switched on
-
trackUnpublished
-
A RemoteTrack was unpublished by the RemoteParticipant.
Parameters:
Name Type Description publication
RemoteTrackPublication The RemoteTrackPublication which represents the unpublished RemoteTrack
-
trackUnsubscribed
-
A RemoteParticipant's RemoteTrack was unsubscribed from.
Parameters:
Name Type Description track
RemoteTrack The RemoteTrack that was unsubscribed from
publication
RemoteTrackPublication The RemoteTrackPublication for the RemoteTrack that was unsubscribed from