atmoky Engage Server SDK is now available! Check out the documentation to learn more.
API Reference
Classes
RemoteTrackPublication

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
Type
Dimensions

kind

The kind of track that is published

mimeType

optional
MimeType of the published track
Type
string

simulcasted

optional
true if track was simulcasted to server, video-only
Type
boolean

source

Source of the published track

track

optional
The actual RemoteTrack instance. Will be undefined if not subscribed.

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)
NameTypeDescription
enabledboolean
Returns
void

setSubscribed

Subscribe or unsubscribe to this remote track
Signature
setSubscribed(subscribed: boolean)
NameTypeDescription
subscribedbooleantrue 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)
NameTypeDescription
qualityVideoQuality
Returns
void

atmoky Logo

© 2024 atmoky, GmbH.
All rights reserved.

We use cookies to measure and improve your browsing experience, and serve personalized ads or content.