Package com.brightcove.player.config
Class LoadControlConfig.Builder
- java.lang.Object
-
- com.brightcove.player.config.LoadControlConfig.Builder
-
- Enclosing class:
- LoadControlConfig
public static class LoadControlConfig.Builder extends java.lang.ObjectThe LoadControlConfig Builder.
-
-
Constructor Summary
Constructors Constructor Description Builder()Instantiates a new LoadControlConfig.Builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LoadControlConfigbuild()Builds the LoadControlConfig.LoadControlConfig.BuildersetAllocatorConfig(AllocatorConfig allocatorConfig)Sets theAllocatorConfig.LoadControlConfig.BuildersetBufferForPlaybackAfterRebufferMs(int bufferForPlaybackAfterRebufferMs)Sets the default duration of media that must be buffered for playback to resume after a rebuffer, in milliseconds.LoadControlConfig.BuildersetBufferForPlaybackMs(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.BuildersetMaxBufferMs(int maxBufferMs)Sets the maximum duration of media that the player will attempt buffer, in milliseconds.LoadControlConfig.BuildersetMinBufferMs(int minBufferMs)Sets the minimum duration of media that the player will attempt to ensure is buffered at all times, in milliseconds.LoadControlConfig.BuildersetPrioritizeTimeOverSizeThresholds(boolean prioritizeTimeOverSizeThresholds)Sets whether the load control prioritizes buffer time constraints over buffer size constraints.LoadControlConfig.BuildersetTargetBufferBytes(int targetBufferBytes)Sets the target buffer size in bytes.
-
-
-
Method Detail
-
setMinBufferMs
public 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.- Parameters:
minBufferMs- the min buffer in milliseconds- Returns:
- the builder instance
- See Also:
DefaultLoadControl
-
setMaxBufferMs
public LoadControlConfig.Builder setMaxBufferMs(int maxBufferMs)
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
public 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.- 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
public LoadControlConfig.Builder setTargetBufferBytes(int targetBufferBytes)
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
public LoadControlConfig.Builder setAllocatorConfig(AllocatorConfig allocatorConfig)
Sets theAllocatorConfig. Note that the AllocatorConfig must not be null.- Parameters:
allocatorConfig- the allocator config- Returns:
- the builder instance
- See Also:
AllocatorConfig
-
build
public LoadControlConfig build()
Builds the LoadControlConfig.
-
-