Contains config values which can be used to alter the visual presentation and behaviour of the player UI.

interface StyleConfig {
    isUiEnabled?: boolean;
    playerUiCss?: string;
    playerUiJs?: string;
    scalingMode?: ScalingMode;
    supplementalPlayerUiCss?: string;
    userInterfaceType?: UserInterfaceType;
}

Properties

isUiEnabled?: boolean

Sets if the UI should be enabled or not. Default value is true.

Example

const player = new Player({
styleConfig: {
isUiEnabled: false,
},
});
playerUiCss?: string

Sets the CSS file that will be used for the UI. The default CSS file will be completely replaced by the CSS file set with this property.

Example

const player = new Player({
styleConfig: {
playerUiCss: 'https://domain.tld/path/to/bitmovinplayer-ui.css',
},
});

Platform

iOS, Android

playerUiJs?: string

Sets the JS file that will be used for the UI. The default JS file will be completely replaced by the JS file set with this property.

Example

const player = new Player({
styleConfig: {
playerUiJs: 'https://domain.tld/path/to/bitmovinplayer-ui.js',
},
});

Platform

iOS, Android

scalingMode?: ScalingMode

Determines how the video content is scaled or stretched within the parent container’s bounds. Possible values are defined in ScalingMode. Default value is ScalingMode.fit.

Example

const player = new Player({
styleConfig: {
scalingMode: ScalingMode.Zoom,
},
});
supplementalPlayerUiCss?: string

Sets a CSS file which contains supplemental styles for the player UI. These styles will be added to the default CSS file or the CSS file set with StyleConfig.playerUiCss.

Example

const player = new Player({
styleConfig: {
supplementalPlayerUiCss: 'https://domain.tld/path/to/bitmovinplayer-supplemental-ui.css',
},
});

Platform

iOS, Android

userInterfaceType?: UserInterfaceType

Sets which user interface type should be used. Default value is UserInterfaceType.bitmovin on iOS and UserInterfaceType.system on tvOS. This setting only applies if StyleConfig.isUiEnabled is set to true.

Example

const player = new Player({
styleConfig: {
userInterfaceType: UserInterfaceType.System,
},
});

Platform

iOS, tvOS