-
- All Implemented Interfaces:
-
com.twilio.video.Track
public class RemoteVideoTrack extends VideoTrack
A remote video track represents a remote video source.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringsidprivate booleanisSwitchedOffprivate TrackPrioritypriority
-
Method Summary
Modifier and Type Method Description StringgetSid()Returns the remote video track's server identifier. booleanisSwitchedOff()Return whether the track is switched off. TrackPrioritygetPriority()Get the subscriber's TrackPriority for this RemoteVideoTrack. voidsetPriority(@Nullable() TrackPriority priority)Set the subscriber's TrackPriority for this RemoteVideoTrack. synchronized voidaddSink(@NonNull() VideoSink videoSink)Add a video sink to receive frames from the video track. synchronized voidremoveSink(@NonNull() VideoSink videoSink)Remove a video sink to stop receiving video from the video track. voidswitchOn()Request to switch on a RemoteVideoTrack, if it is currently switched off. voidswitchOff()Request to switch off a RemoteVideoTrack, if it is currently switched on. voidsetContentPreferences(VideoContentPreferences videoContentPreferences)Sets the VideoContentPreferences for the RemoteVideoTrack. -
-
Method Detail
-
getSid
@NonNull() String getSid()
Returns the remote video track's server identifier. This value uniquely identifies the remotevideo track within the scope of a Room.
-
isSwitchedOff
boolean isSwitchedOff()
Return whether the track is switched off.
-
getPriority
@Nullable() TrackPriority getPriority()
Get the subscriber's TrackPriority for this RemoteVideoTrack. The defaultsubscriber priority is
{@code null}, which indicates that the subscriber has not set apriority for this RemoteVideoTrack.
-
setPriority
void setPriority(@Nullable() TrackPriority priority)
Set the subscriber's TrackPriority for this RemoteVideoTrack. Providing
{@code null}clears the subscriber's TrackPriority for this RemoteVideoTrack.This method is a no-op if the RemoteVideoTrack has been unsubscribed from.- Parameters:
priority- The priority to be set.
-
addSink
synchronized void addSink(@NonNull() VideoSink videoSink)
Add a video sink to receive frames from the video track.
- Parameters:
videoSink- video sink that receives video.
-
removeSink
synchronized void removeSink(@NonNull() VideoSink videoSink)
Remove a video sink to stop receiving video from the video track.
- Parameters:
videoSink- the video sink that should no longer receive video.
-
switchOn
void switchOn()
Request to switch on a RemoteVideoTrack, if it is currently switched off. This methodmust be called only if the ClientTrackSwitchOffControl is set to in video bandwidth profile options. Tracks may stillremain switched off when available bandwidth is limited.
-
switchOff
void switchOff()
Request to switch off a RemoteVideoTrack, if it is currently switched on. This methodmust be called only if the ClientTrackSwitchOffControl is set to in video bandwidth profile options.
-
setContentPreferences
void setContentPreferences(VideoContentPreferences videoContentPreferences)
Sets the VideoContentPreferences for the RemoteVideoTrack. This method mustbe called only if the VideoContentPreferencesMode is set to in video bandwidth profile options.
- Parameters:
videoContentPreferences- The VideoContentPreferences for this .
-
-
-
-