Package com.twilio.video
Class VideoBandwidthProfileOptions.Builder
- java.lang.Object
-
- com.twilio.video.VideoBandwidthProfileOptions.Builder
-
- Enclosing class:
- VideoBandwidthProfileOptions
public static class VideoBandwidthProfileOptions.Builder extends java.lang.Object
Builder class forVideoBandwidthProfileOptions
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
dominantSpeakerPriority
public VideoBandwidthProfileOptions.Builder dominantSpeakerPriority(@Nullable TrackPriority priority)
Set the minimumTrackPriority
of the Dominant Speaker'sRemoteVideoTrack
s. This property isnull
by default and can be set tonull
. Anull
value results in the Twilio Media Server selecting the Dominant Speaker's priority. This property will only be enabled if the Dominant Speaker feature is enabled viaConnectOptions.Builder.enableDominantSpeaker(boolean)
.- Parameters:
priority
- The track priority to use ornull
.
-
maxSubscriptionBitrate
public VideoBandwidthProfileOptions.Builder maxSubscriptionBitrate(@Nullable java.lang.Long maxSubscriptionBitrate)
Set the maximum downlink video bandwidth in Kilobits per second (Kbps). This property is 2,400 Kbps by default and can be set tonull
. Anull
value results in the maximum allowed bitrate for aRoom
.- Parameters:
maxSubscriptionBitrate
- The maximum bitrate for subscribeRemoteVideoTrack
s ornull
.
-
maxTracks
@Deprecated public VideoBandwidthProfileOptions.Builder maxTracks(@Nullable java.lang.Long maxTracks)
Deprecated.This property is deprecated in favor ofClientTrackSwitchOffControl
. Attempting to set maxTracks whenClientTrackSwitchOffControl
is already set will throw an exception.Set the maximum number of visibleRemoteVideoTrack
s selected first usingTrackPriority
and second using an N-Loudest policy. This property isnull
by default and can be set tonull
. Anull
value results in no limits on the number of visibleRemoteVideoTrack
s.- Parameters:
maxTracks
- The maximum number of video tracks ornull
.
-
mode
public VideoBandwidthProfileOptions.Builder mode(@Nullable BandwidthProfileMode mode)
Set howRemoteVideoTrack
sTrackPriority
values are mapped to bandwidth allocation in Group Rooms. This property isnull
by default and can be set tonull
. Anull
value results in the Twilio Media Server selecting the mode.- Parameters:
mode
- TheBandwidthProfileMode
to use ornull
.
-
renderDimensions
@Deprecated public VideoBandwidthProfileOptions.Builder renderDimensions(@NonNull java.util.Map<TrackPriority,VideoDimensions> dimensions)
Deprecated.This property is deprecated in favor ofvideoContentPreferencesMode(VideoContentPreferencesMode)
. Attempting to set renderDimensions when the content preferences mode is already set will throw an exception.Set the desired render dimensions ofRemoteVideoTrack
s based onTrackPriority
and theRemoteVideoTrack
s of the Dominant Speaker. The bandwidth allocation algorithm will distribute the available downlink bandwidth proportional to the requested render dimensions.- Parameters:
dimensions
- A map containing at most one entry for eachTrackPriority
.
-
trackSwitchOffMode
public VideoBandwidthProfileOptions.Builder trackSwitchOffMode(@Nullable TrackSwitchOffMode mode)
Configure howRemoteVideoTrack
s are switched off. This property isnull
by default and can be set tonull
. Anull
value results in the Twilio Media Server selecting the track switch off mode.- Parameters:
mode
- TheTrackSwitchOffMode
to use ornull
.
-
clientTrackSwitchOffControl
public VideoBandwidthProfileOptions.Builder clientTrackSwitchOffControl(@Nullable ClientTrackSwitchOffControl control)
Configure howRemoteVideoTrack
s are switched on and off based on the providedClientTrackSwitchOffControl
. This cannot be set along withmaxTracks(Long)
, otherwise aIllegalArgumentException
will be thrown whenbuild()
is invoked. This property isnull
by default and can be set tonull
. Anull
value results in automatically selectingClientTrackSwitchOffControl.AUTO
.- Parameters:
control
- TheClientTrackSwitchOffControl
to use ornull
.
-
videoContentPreferencesMode
public VideoBandwidthProfileOptions.Builder videoContentPreferencesMode(@Nullable VideoContentPreferencesMode mode)
Configure how the video content preferences are determined based on theVideoContentPreferencesMode
. This cannot be set along withrenderDimensions(Map)
, otherwise aIllegalArgumentException
will be thrown whenbuild()
is invoked. This property isnull
by default and can be set tonull
. Anull
value results in automatically selectingVideoContentPreferencesMode.AUTO
.- Parameters:
mode
- TheVideoContentPreferencesMode
to use ornull
.
-
build
public VideoBandwidthProfileOptions build()
-
-