Builder to simplify the configuration process of the player.

Constructors

  • Creates a new PlayerConfigBuilder instance.

    Either a player key or an existing player configuration can be provided. Any build steps that are executed later on may override the provided configuration.

    Parameters

    • playerKeyOrConfig: string | PlayerConfig

      The player key or an existing player configuration to start with.

    Returns PlayerConfigBuilder

Methods

  • Enables low latency live playback.

    Low latency live playback is supported for DASH streams with chunked CMAF segments and LL-HLS streams.

    Applies the following to the player configuration:

    Default LowLatencyConfig:

    {
    targetLatency: 5,
    catchup: {
    playbackRateThreshold: 0.075,
    seekThreshold: 5,
    playbackRate: 1.2,
    },
    fallback: {
    playbackRateThreshold: 0.075,
    seekThreshold: 5,
    playbackRate: 0.95,
    },
    }

    Parameters

    Returns this

  • Merges the given configuration into the current configuration.

    The given configuration will overwrite any existing values in the current configuration. This can be called at any point during the configuration building process, allowing you to control which part of the configuration you want to override.

    Parameters

    • config: Partial<PlayerConfig>

      The configuration to merge into the current configuration.

    Returns this

  • Optimizes for each platform based on best practices.

    Supports config optimization for WebOs and Tizen.

    Parameters

    Returns this