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
Dimensionskind
The kind of track that is published
Type
Track.KindmimeType
optional
MimeType of the published track
MimeType of the published track
Type
stringsimulcasted
optional
true if track was simulcasted to server, video-only
true if track was simulcasted to server, video-only
Type
booleansource
Source of the published track
Type
Track.Sourcetrack
optional
The actual RemoteTrack instance. Will be undefined if not subscribed.
The actual RemoteTrack instance. Will be undefined if not subscribed.
Type
RemoteTracktrackName
Name of the published track
Type
stringtrackSid
Server-generated unique ID of the published track
Type
stringAccessors
audioTrack
an [AudioTrack] if this publication holds an audio track
isSubscribed
Returns true if track is subscribed, and ready for playback
Type
booleanvideoTrack
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
voidsetSubscribed
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
voidsetVideoQuality
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