Interface UIConfiguration

Describes the UI configuration of the player.

interface UIConfiguration {
    fluid?: boolean;
    fullscreenOptions?: FullscreenOptions;
    height?: string | number;
    language?: string | UILanguage;
    languages?: Record<string, UILanguage>;
    userActions?: UserActions;
    width?: string | number;
}

Properties

fluid?: boolean

Whether the UI of the player is responsive.

Default Value

false

fullscreenOptions?: FullscreenOptions

Options to control transitions to fullscreen mode.

Remarks


- Available since v2.90.0.

height?: string | number

The height of the player.

Remarks

Possible formats
- A number as the amount of pixels.
- A percentage string (XX%).

language?: string | UILanguage

The language which is used for localization.

Remarks


- This can be a language map.
- Otherwise it can be a language code which is the key to a language map in UIConfiguration.languages.

Example

Localize statically to one language.

ui: {
language: {
"Play": "Reproducir",
"Pause": "Pausa",
"Current Time": "Tiempo actual",
// [...]
}
}

Example

Localize dynamically to one of multiple languages.

ui: {
language: 'es',
languages: {
"es": {
"Play": "Reproducir",
"Pause": "Pausa",
"Current Time": "Tiempo actual",
// [...]
},
"fr": {
// [...]
}
}
}
languages?: Record<string, UILanguage>

A record used to localize to multiple languages. Each entry contains a language code with associated language map.

userActions?: UserActions

Actions that define the behavior of the player.

Remarks


- Available since v4.3.0

width?: string | number

The width of the player.

Remarks

Possible formats
- A number as the amount of pixels.
- A percentage string (XX%).