Utility API and PlayerConfigBuilder
ConfigBuilderLowLatencyOptions
Type
Ƭ ConfigBuilderLowLatencyOptions: Object
Options for the low latency configuration builder.
Type declaration
| Name | Type | Description |
|---|---|---|
targetLatency? | number | The desired target latency in seconds. Default: 5 |
OptimizeForPlatformInput
Type
Ƭ OptimizeForPlatformInput: Object
Input type for supporting various different platform specifics
Type declaration
| Name | Type | Description |
|---|---|---|
appId? | string | Required 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
| Name | Type | Description |
|---|---|---|
playerKeyOrConfig | string | PlayerConfig | The player key or an existing player configuration to start with. |
Returns
Methods
build
▸ build(): PlayerConfig
Builds the finished configuration.
Returns
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:
- A low latency configuration with sensible default values
- A client-clock synchronization configuration using
https://time.akamai.com - Additional parameters in player tweaks to facilitate low latency playback
Default LowLatencyConfig:
{
targetLatency: 5,
catchup: {
playbackRateThreshold: 0.075,
seekThreshold: 5,
playbackRate: 1.2,
},
fallback: {
playbackRateThreshold: 0.075,
seekThreshold: 5,
playbackRate: 0.95,
},
}Parameters
| Name | Type | Description |
|---|---|---|
options? | ConfigBuilderLowLatencyOptions | Optional 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
| Name | Type | Description |
|---|---|---|
config | Partial<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
| Name | Type | Description |
|---|---|---|
input? | OptimizeForPlatformInput | Required 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