Class LoadControlConfig.Builder

  • Enclosing class:
    LoadControlConfig

    public static class LoadControlConfig.Builder
    extends java.lang.Object
    The LoadControlConfig Builder.
    • Constructor Detail

      • Builder

        public Builder()
        Instantiates a new LoadControlConfig.Builder.
    • 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 to C.LENGTH_UNSET, the target buffer size will be calculated using com.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