Package com.brightcove.player.config
Class LoadControlConfig.Builder
java.lang.Object
com.brightcove.player.config.LoadControlConfig.Builder
- Enclosing class:
- LoadControlConfig
The LoadControlConfig Builder.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the LoadControlConfig.setAllocatorConfig
(AllocatorConfig allocatorConfig) Sets theAllocatorConfig
.setBufferForPlaybackAfterRebufferMs
(int bufferForPlaybackAfterRebufferMs) Sets the default duration of media that must be buffered for playback to resume after a rebuffer, in milliseconds.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.setMaxBufferMs
(int maxBufferMs) Sets the maximum duration of media that the player will attempt buffer, in milliseconds.setMinBufferMs
(int minBufferMs) Sets the minimum duration of media that the player will attempt to ensure is buffered at all times, in milliseconds.setPrioritizeTimeOverSizeThresholds
(boolean prioritizeTimeOverSizeThresholds) Sets whether the load control prioritizes buffer time constraints over buffer size constraints.setTargetBufferBytes
(int targetBufferBytes) Sets the target buffer size in bytes.
-
Constructor Details
-
Builder
public Builder()Instantiates a new LoadControlConfig.Builder.
-
-
Method Details
-
setMinBufferMs
Sets the minimum duration of media that the player will attempt to ensure is buffered at all times, in milliseconds.- Parameters:
minBufferMs
- the min buffer in milliseconds- Returns:
- the builder instance
- See Also:
-
DefaultLoadControl
-
setMaxBufferMs
Sets the maximum duration of media that the player will attempt buffer, in milliseconds.- Parameters:
maxBufferMs
- the max buffer in milliseconds- Returns:
- the builder instance
- See Also:
-
DefaultLoadControl
-
setBufferForPlaybackMs
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.- Parameters:
bufferForPlaybackMs
- the buffer for playback in milliseconds- Returns:
- the builder instance
- See Also:
-
DefaultLoadControl
-
setBufferForPlaybackAfterRebufferMs
public LoadControlConfig.Builder setBufferForPlaybackAfterRebufferMs(int bufferForPlaybackAfterRebufferMs) Sets the default duration of media that must be buffered for playback to resume after a rebuffer, in milliseconds. A rebuffer is defined to be caused by buffer depletion rather than a user action.- Parameters:
bufferForPlaybackAfterRebufferMs
- the buffer for playback after rebuffer ms- Returns:
- the builder instance
- See Also:
-
DefaultLoadControl
-
setTargetBufferBytes
Sets the target buffer size in bytes. If set toC.LENGTH_UNSET
, the target buffer size will be calculated usingcom.google.android.exoplayer2.DefaultLoadControl#calculateTargetBufferSize(Renderer[], TrackSelectionArray)
.- Parameters:
targetBufferBytes
- the target buffer bytes- Returns:
- the builder instance
- See Also:
-
DefaultLoadControl
-
setPrioritizeTimeOverSizeThresholds
public LoadControlConfig.Builder setPrioritizeTimeOverSizeThresholds(boolean prioritizeTimeOverSizeThresholds) Sets whether the load control prioritizes buffer time constraints over buffer size constraints.- Parameters:
prioritizeTimeOverSizeThresholds
- the prioritize time over size thresholds- Returns:
- the builder instance
- See Also:
-
DefaultLoadControl
-
setAllocatorConfig
Sets theAllocatorConfig
. Note that the AllocatorConfig must not be null.- Parameters:
allocatorConfig
- the allocator config- Returns:
- the builder instance
- See Also:
-
build
Builds the LoadControlConfig.
-