Properties:
Name | Type | Argument | Description |
---|---|---|---|
isSubscribed |
boolean | whether the published RemoteTrack is subscribed to |
|
isTrackEnabled |
boolean |
|
|
kind |
Track.Kind | kind of the published RemoteTrack |
|
publishPriority |
Track.Priority | the Track.Priority of the published RemoteTrack set by the RemoteParticipant |
|
track |
RemoteTrack |
<nullable> |
Unless you have subscribed to the RemoteTrack, this property is null |
Fires:
- RemoteTrackPublication#event:publishPriorityChanged
- RemoteTrackPublication#event:subscribed
- RemoteTrackPublication#event:subscriptionFailed
- RemoteTrackPublication#event:trackDisabled
- RemoteTrackPublication#event:trackEnabled
- RemoteTrackPublication#event:trackSwitchedOff
- RemoteTrackPublication#event:trackSwitchedOn
- RemoteTrackPublication#event:unsubscribed
Extends
Events
-
publishPriorityChanged
-
The RemoteTrack's publish Track.Priority was changed by the RemoteParticipant.
Parameters:
Name Type Description priority
Track.Priority the RemoteTrack's new publish Track.Priority; RemoteTrackPublication#publishPriority is also updated accordingly
-
subscribed
-
Your LocalParticipant subscribed to the RemoteTrack.
Parameters:
Name Type Description track
RemoteTrack the RemoteTrack that was subscribed to
-
subscriptionFailed
-
Your LocalParticipant failed to subscribe to the RemoteTrack.
Parameters:
Name Type Description error
TwilioError the reason the RemoteTrack could not be subscribed to
-
trackDisabled
-
The RemoteTrack was disabled. In large group Rooms, it is fired only if
.isSubscribed
is set totrue
(Deprecated only for large group Rooms).- Overrides:
- Deprecated:
-
- Use
trackSwitchedOff
(track.switchOffReason === "disabled-by-publisher"
) instead
- Use
-
trackEnabled
-
The RemoteTrack was enabled. In large group Rooms, it is fired only if
.isSubscribed
is set totrue
(Deprecated only for large group Rooms).- Overrides:
- Deprecated:
-
- Use
trackSwitchedOn
instead
- Use
-
trackSwitchedOff
-
The 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 in large group Rooms (switchOffReason
isnull
non-large group Rooms). Also, if the RemoteTrack receives either audio or video media, themediaStreamTrack
property is set tonull
. (only in large group Rooms)Parameters:
Name Type Argument Description track
RemoteTrack the RemoteTrack that was switched off
switchOffReason
TrackSwitchOffReason <nullable>
the reason the RemoteTrack was switched off
-
trackSwitchedOn
-
The RemoteTrack was switched on. The media server starts sending media or data for the RemoteMediaTrack 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
-
unsubscribed
-
Your LocalParticipant unsubscribed from the RemoteTrack.
Parameters:
Name Type Description track
RemoteTrack the RemoteTrack that was unsubscribed from