Package com.castlabs.android.player

# Class LowLatencyProfile.Builder

java.lang.Object
com.castlabs.android.player.LowLatencyProfile.Builder

Enclosing class:
  `LowLatencyProfile`

public static final class LowLatencyProfile.Builder extends Object
Builder class for creating LowLatencyProfile instances. This builder provides methods to configure all parameters for low latency playback.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder()`
  Create a new builder with default values
  `Builder(LowLatencyProfile cfg)`
  Create a new builder starting with the value from the given configuration

- ## Method Summary

  Modifier and Type
  Method
  Description
  `LowLatencyProfile.Builder`
  `customUtcTimingElement(CustomUtcTimingElement customUtcTimingElement)`
  Custom UTCTiming element to use.
  `LowLatencyProfile`
  `get()`
  Builds the instance
  `LowLatencyProfile.Builder`
  `hlsLiveTailSegmentIndex(int hlsLiveTailSegmentIndex)`
  Defines the HLS segment index counting from the tail from which the live playback should start.
  `LowLatencyProfile.Builder`
  `hlsPlaylistUpdateTargetDurationCoefficient(float hlsPlaylistUpdateTargetDurationCoefficient, boolean hlsForcePlaylistUpdateTargetDuration)`
  Defines the default coefficient applied to playlist update interval when calculating the playlist update interval.
  `LowLatencyProfile.Builder`
  `liveEdgeLatencyMs(int liveEdgeLatencyMs)`
  Defines the number of milliseconds that the playback should lag behind the "live edge"
  `LowLatencyProfile.Builder`
  `minPlaybackStartMs(int minPlaybackStartMs)`
  The minimum duration of data that must be buffered for playback to start or resume following a user action such as a seek
  `LowLatencyProfile.Builder`
  `minRebufferStartMs(int minRebufferStartMs)`
  The minimum duration of data that must be buffered for playback to resume after a player invoked rebuffer

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Builder

    public Builder()
    Create a new builder with default values

  - ### Builder

    public Builder(LowLatencyProfile cfg)
    Create a new builder starting with the value from the given configuration
    Parameters:
      `cfg` - The configuration

- ## Method Details

  - ### customUtcTimingElement

    public LowLatencyProfile.Builder customUtcTimingElement(CustomUtcTimingElement customUtcTimingElement)
    Custom UTCTiming element to use.
    Parameters:
      `customUtcTimingElement` - Custom UTCTiming element to use
    Returns:
      The builder

  - ### liveEdgeLatencyMs

    public LowLatencyProfile.Builder liveEdgeLatencyMs(int liveEdgeLatencyMs)
    Defines the number of milliseconds that the playback should lag behind the "live edge"
    Parameters:
      `liveEdgeLatencyMs` - time to the live edge
    Returns:
      The builder

  - ### hlsLiveTailSegmentIndex

    public LowLatencyProfile.Builder hlsLiveTailSegmentIndex(int hlsLiveTailSegmentIndex)
    Defines the HLS segment index counting from the tail from which the live playback should start. Should be larger or equal to `0`. In case the value goes out of the segment size boundaries the very first segment counting from the segments head is used.
    Parameters:
      `hlsLiveTailSegmentIndex` - The HLS live tail segment index
    Returns:
      Builder instance

  - ### hlsPlaylistUpdateTargetDurationCoefficient

    public LowLatencyProfile.Builder hlsPlaylistUpdateTargetDurationCoefficient(float hlsPlaylistUpdateTargetDurationCoefficient, boolean hlsForcePlaylistUpdateTargetDuration)
    Defines the default coefficient applied to playlist update interval when calculating the playlist update interval. Applied when the currently loaded playlist is not renewed or unconditionally when forced.
    Parameters:
      `hlsPlaylistUpdateTargetDurationCoefficient` - The target duration coefficient for playlist update interval.
      `hlsForcePlaylistUpdateTargetDuration` - Whether to force the target duration coefficient when defining the playlist update interval
    Returns:
      Builder instance

  - ### minPlaybackStartMs

    public LowLatencyProfile.Builder minPlaybackStartMs(int minPlaybackStartMs)
    The minimum duration of data that must be buffered for playback to start or resume following a user action such as a seek
    Parameters:
      `minPlaybackStartMs` - minimum data duration to start playback
    Returns:
      The builder

  - ### minRebufferStartMs

    public LowLatencyProfile.Builder minRebufferStartMs(int minRebufferStartMs)
    The minimum duration of data that must be buffered for playback to resume after a player invoked rebuffer
    Parameters:
      `minRebufferStartMs` - minimum data duration to resume playback
    Returns:
      The builder

  - ### get

    public LowLatencyProfile get()
    Builds the instance
    Returns:
      an instance of LowLatencyProfile