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 subscribedRemoteVideoTracks based on the subscriber's rendering environment. Switching off aRemoteVideoTrackmeans 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 AUTOIn this mode, the SDK determines whetherRemoteVideoTracks should be switched off based onVideoSinkattachment andViewvisibility.MANUALIn this mode, the application requests that specificRemoteVideoTracks 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 ClientTrackSwitchOffControlvalueOf(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 whetherRemoteVideoTracks should be switched off based onVideoSinkattachment andViewvisibility. OnlyVideoTextureViews andVideoViews are supported. If a customVideoSinks 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 specificRemoteVideoTracks 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
-
-