RemoteTrackPublication
Summary
A RemoteTrackPublication represents a remote track that has been published to the room.Remarks
Use the setSubscribed
method to subscribe or unsubscribe to this remotetrack.
The TrackEvent.SubscriptionStatusChanged and the events TrackEvent.Subscribed
/ TrackEvent.Unsubscribed will be emitted when the subscription status changes.Properties
dimensions
optional
dimension of the original published stream, video-only
dimension of the original published stream, video-only
Type
Dimensions
kind
The kind of track that is published
Type
Track.Kind
mimeType
optional
MimeType of the published track
MimeType of the published track
Type
string
simulcasted
optional
true if track was simulcasted to server, video-only
true if track was simulcasted to server, video-only
Type
boolean
source
Source of the published track
Type
Track.Source
track
optional
The actual RemoteTrack instance. Will be undefined if not subscribed.
The actual RemoteTrack instance. Will be undefined if not subscribed.
Type
RemoteTrack
trackName
Name of the published track
Type
string
trackSid
Server-generated unique ID of the published track
Type
string
Accessors
audioTrack
an [AudioTrack] if this publication holds an audio track
isSubscribed
Returns true if track is subscribed, and ready for playback
Type
boolean
videoTrack
an [VideoTrack] if this publication holds a video track
Methods
setEnabled
disable server from sending down data for this track. this is useful when
the participant is off screen, you may disable streaming down their video
to reduce bandwidth requirements
Signature
setEnabled(enabled: boolean)
Name | Type | Description |
---|---|---|
enabled | boolean |
Returns
void
setSubscribed
Subscribe or unsubscribe to this remote track
Signature
setSubscribed(subscribed: boolean)
Name | Type | Description |
---|---|---|
subscribed | boolean | true to subscribe to a track, false to unsubscribe |
Returns
void
setVideoQuality
for tracks that support simulcasting, adjust subscribed quality
This indicates the highest quality the client can accept. if network
bandwidth does not allow, server will automatically reduce quality to
optimize for uninterrupted video
Signature
setVideoQuality(quality: VideoQuality)
Name | Type | Description |
---|---|---|
quality | VideoQuality |
Returns
void