public static class LoadControlConfig.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder()
Instantiates a new LoadControlConfig.Builder.
|
Modifier and Type | Method and Description |
---|---|
LoadControlConfig |
build()
Builds the LoadControlConfig.
|
LoadControlConfig.Builder |
setAllocatorConfig(AllocatorConfig allocatorConfig)
Sets the
AllocatorConfig . |
LoadControlConfig.Builder |
setBufferForPlaybackAfterRebufferMs(int bufferForPlaybackAfterRebufferMs)
Sets the default duration of media that must be buffered for
playback to resume after a rebuffer, in milliseconds.
|
LoadControlConfig.Builder |
setBufferForPlaybackMs(int bufferForPlaybackMs)
Sets the duration of media that must be buffered for playback to start or
resume following a user action such as a seek, in milliseconds.
|
LoadControlConfig.Builder |
setMaxBufferMs(int maxBufferMs)
Sets the maximum duration of media that the player will attempt buffer, in
milliseconds.
|
LoadControlConfig.Builder |
setMinBufferMs(int minBufferMs)
Sets the minimum duration of media that the player will attempt to ensure is
buffered at all times, in milliseconds.
|
LoadControlConfig.Builder |
setPrioritizeTimeOverSizeThresholds(boolean prioritizeTimeOverSizeThresholds)
Sets whether the load control prioritizes buffer time
constraints over buffer size constraints.
|
LoadControlConfig.Builder |
setTargetBufferBytes(int targetBufferBytes)
Sets the target buffer size in bytes.
|
public LoadControlConfig.Builder setMinBufferMs(int minBufferMs)
minBufferMs
- the min buffer in millisecondsDefaultLoadControl
public LoadControlConfig.Builder setMaxBufferMs(int maxBufferMs)
maxBufferMs
- the max buffer in millisecondsDefaultLoadControl
public LoadControlConfig.Builder setBufferForPlaybackMs(int bufferForPlaybackMs)
bufferForPlaybackMs
- the buffer for playback in millisecondsDefaultLoadControl
public LoadControlConfig.Builder setBufferForPlaybackAfterRebufferMs(int bufferForPlaybackAfterRebufferMs)
bufferForPlaybackAfterRebufferMs
- the buffer for playback after rebuffer msDefaultLoadControl
public LoadControlConfig.Builder setTargetBufferBytes(int targetBufferBytes)
C.LENGTH_UNSET
, the
target buffer size will be calculated using
DefaultLoadControl.calculateTargetBufferSize(Renderer[], TrackSelectionArray)
.targetBufferBytes
- the target buffer bytesDefaultLoadControl
public LoadControlConfig.Builder setPrioritizeTimeOverSizeThresholds(boolean prioritizeTimeOverSizeThresholds)
prioritizeTimeOverSizeThresholds
- the prioritize time over size thresholdsDefaultLoadControl
public LoadControlConfig.Builder setAllocatorConfig(AllocatorConfig allocatorConfig)
AllocatorConfig
. Note that the AllocatorConfig must not be null.allocatorConfig
- the allocator configAllocatorConfig
public LoadControlConfig build()