-
Notifications
You must be signed in to change notification settings - Fork 12
/
styleConfig.ts
121 lines (119 loc) · 3.34 KB
/
styleConfig.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/**
* Contains config values which can be used to alter the visual presentation and behaviour of the player UI.
*/
export interface StyleConfig {
/**
* Sets if the UI should be enabled or not. Default value is `true`.
* @example
* ```
* const player = new Player({
* styleConfig: {
* isUiEnabled: false,
* },
* });
* ```
*/
isUiEnabled?: boolean;
/**
* 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
*/
userInterfaceType?: UserInterfaceType;
/**
* 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
*/
playerUiCss?: 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
*/
supplementalPlayerUiCss?: 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
*/
playerUiJs?: string;
/**
* 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,
* },
* });
* ```
*/
scalingMode?: ScalingMode;
}
/**
* Specifies how the video content is scaled or stretched.
*/
export enum ScalingMode {
/**
* Specifies that the player should preserve the video’s aspect ratio and fit the video within the container's bounds.
*/
Fit = 'Fit',
/**
* Specifies that the video should be stretched to fill the container’s bounds. The aspect ratio may not be preserved.
*/
Stretch = 'Stretch',
/**
* Specifies that the player should preserve the video’s aspect ratio and fill the container’s bounds.
*/
Zoom = 'Zoom',
}
/**
* Indicates which type of UI should be used.
*/
export enum UserInterfaceType {
/**
* Indicates that Bitmovin's customizable UI should be used.
*/
Bitmovin = 'Bitmovin',
/**
* Indicates that the system UI should be used.
* @platform iOS, tvOS
*/
System = 'System',
/**
* Indicates that only subtitles should be displayed along with the video content.
*/
Subtitle = 'Subtitle',
}