Class LowLatencyProfile


  • public class LowLatencyProfile
    extends Object
    Profile that groups all the relevant parameters related to low latency live streaming.

    This profile can be applied to an existing Bundle or PlaybackState *before* passing it to PlayerController.open(Bundle).

    All the fields defined in this class will override the values from other configurations.

    To get an instance use the LowLatencyProfile.Builder.

    • Constructor Detail

      • LowLatencyProfile

        public LowLatencyProfile()
        Create a new low latency profile with the default params
      • LowLatencyProfile

        public LowLatencyProfile​(CustomUtcTimingElement customUtcTimingElement,
                                 int liveEdgeLatencyMs,
                                 int hlsLiveTailSegmentIndex,
                                 float hlsPlaylistUpdateTargetDurationCoefficient,
                                 boolean hlsForcePlaylistUpdateTargetDuration,
                                 int minPlaybackStartMs,
                                 int minRebufferStartMs)
        Create a low latency profile
        Parameters:
        customUtcTimingElement - Custom UTCTiming element to use
        liveEdgeLatencyMs - Number of milliseconds that the playback should lag behind the live edge
        hlsLiveTailSegmentIndex - The HLS live tail segment index
        hlsPlaylistUpdateTargetDurationCoefficient - The target duration coefficient for playlist update interval.
        hlsForcePlaylistUpdateTargetDuration - Whether to force the target duration coefficient when defining the playlist update interval
        minPlaybackStartMs - The minimum duration of data that must be buffered for playback to start or resume following a user action such as a seek
        minRebufferStartMs - The minimum duration of data that must be buffered for playback to resume after a player invoked rebuffer
    • Method Detail

      • applyTo

        public Bundle applyTo​(@NonNull
                              Bundle bundle)
        Apply the profile to the given Bundle
        Parameters:
        bundle - Bundle where to get the current configuration
        Returns:
        a Bundle with the modified configuration
      • applyTo

        public PlayerConfig applyTo​(@NonNull
                                    PlayerConfig playerConfig)
        Apply the profile to the given PlaybackState
        Parameters:
        playerConfig - where to get the current configuration
        Returns:
        a Playbackstate with the modified configuration