Package com.twilio.video
Enum ClientTrackSwitchOffControl
- java.lang.Object
-
- java.lang.Enum<ClientTrackSwitchOffControl>
-
- com.twilio.video.ClientTrackSwitchOffControl
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ClientTrackSwitchOffControl>
public enum ClientTrackSwitchOffControl extends java.lang.Enum<ClientTrackSwitchOffControl>
Configures the mode for switching off/on subscribedRemoteVideoTrack
s based on the subscriber's rendering environment. Switching off aRemoteVideoTrack
means no media is sent by the media server to the client for that track even though it has been subscribed to by the client. This feature helps in conserving network bandwidth and CPU resources by avoiding unnecessary transmission and decoding of remote tracks. This feature supersedes the `maxTracks` parameter. Attempting to set `clientTrackSwitchOffControl` when `maxTracks` is already set will throw an exception.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTO
In this mode, the SDK determines whetherRemoteVideoTrack
s should be switched off based onVideoSink
attachment andView
visibility.MANUAL
In this mode, the application requests that specificRemoteVideoTrack
s be switched off or on using theRemoteVideoTrack.switchOff()
/RemoteVideoTrack.switchOn()
methods on theRemoteVideoTrack
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ClientTrackSwitchOffControl
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ClientTrackSwitchOffControl[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AUTO
public static final ClientTrackSwitchOffControl AUTO
In this mode, the SDK determines whetherRemoteVideoTrack
s should be switched off based onVideoSink
attachment andView
visibility. OnlyVideoTextureView
s andVideoView
s are supported. If a customVideoSink
s is added to theRemoteVideoTrack
, then this mode will be disabled and the track will remain switched on until the sink is removed from the track.
-
MANUAL
public static final ClientTrackSwitchOffControl MANUAL
In this mode, the application requests that specificRemoteVideoTrack
s be switched off or on using theRemoteVideoTrack.switchOff()
/RemoteVideoTrack.switchOn()
methods on theRemoteVideoTrack
.
-
-
Method Detail
-
values
public static ClientTrackSwitchOffControl[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ClientTrackSwitchOffControl c : ClientTrackSwitchOffControl.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClientTrackSwitchOffControl valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-