Utilities

Utility API and PlayerConfigBuilder

ConfigBuilderLowLatencyOptions

Type

Ƭ ConfigBuilderLowLatencyOptions: Object

Options for the low latency configuration builder.

Type declaration

NameTypeDescription
targetLatency?numberThe desired target latency in seconds. Default: 5

OptimizeForPlatformInput

Type

Ƭ OptimizeForPlatformInput: Object

Input type for supporting various different platform specifics

Type declaration

NameTypeDescription
appId?stringRequired if your application is loaded through the file protocol.

PlayerConfigBuilder

Class

Builder to simplify the configuration process of the player.

Constructors

constructor

new PlayerConfigBuilder(playerKeyOrConfig): PlayerConfigBuilder

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

NameTypeDescription
playerKeyOrConfigstring | PlayerConfigThe player key or an existing player configuration to start with.

Returns

PlayerConfigBuilder

Methods

build

build(): PlayerConfig

Builds the finished configuration.

Returns

PlayerConfig


enableLowLatency

enableLowLatency(options?): this

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

NameTypeDescription
options?ConfigBuilderLowLatencyOptionsOptional parameters to customize the low latency configuration.

Returns

this


mergeWith

mergeWith(config): 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

NameTypeDescription
configPartial<PlayerConfig>The configuration to merge into the current configuration.

Returns

this


optimizeForPlatform

optimizeForPlatform(input?): this

Optimizes for each platform based on best practices.

Supports config optimization for WebOs and Tizen.

Parameters

NameTypeDescription
input?OptimizeForPlatformInputRequired for platform specifics like the input.appId

Returns

this


UtilApi

Interface

The util API is exposed on the global namespace under bitmovin.player.util

Properties

PlayerConfigBuilder

PlayerConfigBuilder: typeof PlayerConfigBuilder