public class RemoteVideoTrack extends VideoTrack
Modifier and Type | Method and Description |
---|---|
void |
addSink(VideoSink videoSink)
Add a video sink to receive frames from the video track.
|
TrackPriority |
getPriority()
Get the subscriber's
TrackPriority for this RemoteVideoTrack . |
java.lang.String |
getSid()
Returns the remote video track's server identifier.
|
boolean |
isSwitchedOff()
Return whether the track is switched off.
|
void |
removeSink(VideoSink videoSink)
Remove a video sink to stop receiving video from the video track.
|
void |
setContentPreferences(VideoContentPreferences videoContentPreferences)
Sets the
VideoContentPreferences for the RemoteVideoTrack . |
void |
setPriority(TrackPriority priority)
Set the subscriber's
TrackPriority for this RemoteVideoTrack . |
void |
switchOff()
Request to switch off a
RemoteVideoTrack , if it is currently switched on. |
void |
switchOn()
Request to switch on a
RemoteVideoTrack , if it is currently switched off. |
getName, getSinks, isEnabled
@NonNull public java.lang.String getSid()
Room
.public void addSink(@NonNull VideoSink videoSink)
VideoTrack
addSink
in class VideoTrack
videoSink
- video sink that receives video.public void removeSink(@NonNull VideoSink videoSink)
VideoTrack
removeSink
in class VideoTrack
videoSink
- the video sink that should no longer receives video.public void switchOn()
RemoteVideoTrack
, if it is currently switched off. This method
must be called only if the ClientTrackSwitchOffControl
is set to ClientTrackSwitchOffControl.MANUAL
in video bandwidth profile options. Tracks may still
remain switched off when available bandwidth is limited.java.lang.IllegalStateException
- if the following preconditions exist:
BandwidthProfileOptions
has not been set.
ClientTrackSwitchOffControl.AUTO
is set.
VideoBandwidthProfileOptions.Builder.maxTracks(Long)
is set.
public void switchOff()
RemoteVideoTrack
, if it is currently switched on. This method
must be called only if the ClientTrackSwitchOffControl
is set to ClientTrackSwitchOffControl.MANUAL
in video bandwidth profile options.java.lang.IllegalStateException
- if the following preconditions exist:
BandwidthProfileOptions
has not been set.
ClientTrackSwitchOffControl.AUTO
is set.
VideoBandwidthProfileOptions.Builder.maxTracks(Long)
is set.
public void setContentPreferences(VideoContentPreferences videoContentPreferences)
VideoContentPreferences
for the RemoteVideoTrack
. This method must
be called only if the VideoContentPreferencesMode
is set to VideoContentPreferencesMode.MANUAL
in video bandwidth profile options.videoContentPreferences
- The VideoContentPreferences
for this RemoteVideoTrack
.java.lang.IllegalStateException
- if the following preconditions exist:
BandwidthProfileOptions
has not been set.
VideoContentPreferencesMode.AUTO
is set.
VideoBandwidthProfileOptions.Builder.renderDimensions(Map)
is set.
public boolean isSwitchedOff()
@Nullable public TrackPriority getPriority()
TrackPriority
for this RemoteVideoTrack
. The default
subscriber priority is null
, which indicates that the subscriber has not set a
priority for this RemoteVideoTrack
.public void setPriority(@Nullable TrackPriority priority)
TrackPriority
for this RemoteVideoTrack
. Providing
null
clears the subscriber's TrackPriority
for this RemoteVideoTrack
.
This method is a no-op if the RemoteVideoTrack
has been unsubscribed from.priority
- The priority to be set.6.4.1