@theoplayer/web-ui 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/THEOplayerUI.d.ts +320 -94
- package/dist/THEOplayerUI.es5.js +1 -1
- package/dist/THEOplayerUI.es5.mjs +1 -1
- package/dist/THEOplayerUI.js +1 -1
- package/dist/THEOplayerUI.js.map +1 -1
- package/dist/THEOplayerUI.mjs +1 -1
- package/dist/THEOplayerUI.mjs.map +1 -1
- package/dist/THEOplayerUI.node.mjs +1 -1
- package/dist/THEOplayerUI.node.mjs.map +1 -1
- package/package.json +2 -1
package/dist/THEOplayerUI.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* THEOplayer Open Video UI for Web (v2.1.
|
|
2
|
+
* THEOplayer Open Video UI for Web (v2.1.2)
|
|
3
3
|
* License: MIT
|
|
4
4
|
*/
|
|
5
5
|
import * as lit from 'lit';
|
|
@@ -36,7 +36,28 @@ declare function buttonTemplate(button: string, extraCss?: string): string;
|
|
|
36
36
|
/**
|
|
37
37
|
* A basic button.
|
|
38
38
|
*
|
|
39
|
-
* @
|
|
39
|
+
* @cssproperty `--theoplayer-control-height` - The height of the button's control area (and default icon size). Defaults to `24px`.
|
|
40
|
+
* @cssproperty `--theoplayer-control-padding` - The padding around the button's content. Defaults to `10px`.
|
|
41
|
+
* @cssproperty `--theoplayer-control-background` - The background of the button. Defaults to `transparent`.
|
|
42
|
+
* @cssproperty `--theoplayer-control-hover-background` - The background of the button when hovered.
|
|
43
|
+
* Defaults to `--theoplayer-control-background`.
|
|
44
|
+
* @cssproperty `--theoplayer-text-color` - The text color of the button. Defaults to `#fff`.
|
|
45
|
+
* @cssproperty `--theoplayer-text-font-size` - The font size of the button's text. Defaults to `14px`.
|
|
46
|
+
* @cssproperty `--theoplayer-text-content-height` - The line-height of the button's text. Defaults to `--theoplayer-control-height`.
|
|
47
|
+
* @cssproperty `--theoplayer-icon-color` - The color of the button's icon. Defaults to `#fff`.
|
|
48
|
+
* @cssproperty `--theoplayer-focus-ring-color` - The color of the focus ring around focused buttons. Defaults to `rgba(27, 127, 204, 0.9)`.
|
|
49
|
+
* @cssproperty `--theoplayer-button-text-color` - The text color of the button. Defaults to `--theoplayer-text-color`.
|
|
50
|
+
* @cssproperty `--theoplayer-button-icon-width` - The width of the button's icon. Defaults to `--theoplayer-control-height`.
|
|
51
|
+
* @cssproperty `--theoplayer-button-icon-height` - The height of the button's icon. Defaults to `--theoplayer-control-height`.
|
|
52
|
+
* @cssproperty `--theoplayer-button-icon-transition` - The CSS transition applied to the button's icon. Defaults to `none`.
|
|
53
|
+
* @cssproperty `--theoplayer-button-icon-shadow` - A drop-shadow applied to the icon. Defaults to `none`.
|
|
54
|
+
* @cssproperty `--theoplayer-button-hover-icon-shadow` - A drop-shadow applied to the icon on hover. Defaults to `0 0 4px rgba(255, 255, 255, 0.5)`.
|
|
55
|
+
* @cssproperty `--theoplayer-button-checked-background` - The background of a toggled-on button (e.g. mute, fullscreen). Defaults to `#fff`.
|
|
56
|
+
* @cssproperty `--theoplayer-button-checked-color` - The color of a toggled-on button. Defaults to `#000`.
|
|
57
|
+
* @cssproperty `--theoplayer-button-disabled-text-color` - The text color of a disabled button. Defaults to `#ccc`.
|
|
58
|
+
* @cssproperty `--theoplayer-before-first-play-display` - The CSS `display` of the button before first play.
|
|
59
|
+
* The {@link UIContainer | `<theoplayer-ui>`} will set this to `none` to hide all buttons until playback begins,
|
|
60
|
+
* after which this becomes `unset` and the button reverts back to its initial CSS `display`.
|
|
40
61
|
*/
|
|
41
62
|
declare class Button extends LitElement {
|
|
42
63
|
static styles: lit.CSSResult[];
|
|
@@ -83,8 +104,6 @@ declare global {
|
|
|
83
104
|
declare function linkButtonTemplate(button: string, extraCss?: string): string;
|
|
84
105
|
/**
|
|
85
106
|
* A {@link Button | button} that opens a hyperlink.
|
|
86
|
-
*
|
|
87
|
-
* @attribute `disabled` - Whether the button is disabled. When disabled, the button cannot be clicked.
|
|
88
107
|
*/
|
|
89
108
|
declare class LinkButton extends LitElement {
|
|
90
109
|
static styles: lit.CSSResult[];
|
|
@@ -119,14 +138,24 @@ declare global {
|
|
|
119
138
|
/**
|
|
120
139
|
* A button that toggles whether the player is playing or paused.
|
|
121
140
|
*
|
|
122
|
-
* @
|
|
123
|
-
*
|
|
141
|
+
* @cssproperty `--theoplayer-play-button-icon-color` - The icon color of the play button.
|
|
142
|
+
* Overrides `--theoplayer-icon-color` for this button. Defaults to `unset`.
|
|
124
143
|
*/
|
|
125
144
|
declare class PlayButton extends Button {
|
|
126
145
|
static styles: lit.CSSResult[];
|
|
127
146
|
private _player;
|
|
128
147
|
connectedCallback(): void;
|
|
148
|
+
/**
|
|
149
|
+
* Whether the player is paused.
|
|
150
|
+
*
|
|
151
|
+
* This reflects `player.paused`.
|
|
152
|
+
*/
|
|
129
153
|
accessor paused: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Whether the player is ended.
|
|
156
|
+
*
|
|
157
|
+
* This reflects `player.ended`.
|
|
158
|
+
*/
|
|
130
159
|
accessor ended: boolean;
|
|
131
160
|
get player(): ChromelessPlayer | undefined;
|
|
132
161
|
set player(player: ChromelessPlayer | undefined);
|
|
@@ -149,9 +178,6 @@ declare global {
|
|
|
149
178
|
type VolumeLevel = 'off' | 'low' | 'high';
|
|
150
179
|
/**
|
|
151
180
|
* A button that toggles whether audio is muted or not.
|
|
152
|
-
*
|
|
153
|
-
* @attribute `volume-level` (readonly) - The volume level of the player.
|
|
154
|
-
* Can be "off" (muted), "low" (volume < 50%) or "high" (volume >= 50%).
|
|
155
181
|
*/
|
|
156
182
|
declare class MuteButton extends Button {
|
|
157
183
|
static styles: lit.CSSResult[];
|
|
@@ -159,6 +185,8 @@ declare class MuteButton extends Button {
|
|
|
159
185
|
connectedCallback(): void;
|
|
160
186
|
/**
|
|
161
187
|
* The volume level of the player.
|
|
188
|
+
*
|
|
189
|
+
* Can be "off" (muted), "low" (volume < 50%) or "high" (volume >= 50%).
|
|
162
190
|
*/
|
|
163
191
|
accessor volumeLevel: VolumeLevel;
|
|
164
192
|
get player(): ChromelessPlayer | undefined;
|
|
@@ -178,7 +206,7 @@ declare global {
|
|
|
178
206
|
/**
|
|
179
207
|
* A button that seeks forward or backward by a fixed offset.
|
|
180
208
|
*
|
|
181
|
-
* @
|
|
209
|
+
* @cssproperty `--theoplayer-seek-button-font-size` - The font size of the offset number rendered inside the seek icon. Defaults to `calc(0.3 * --theoplayer-button-icon-height)`.
|
|
182
210
|
*/
|
|
183
211
|
declare class SeekButton extends Button {
|
|
184
212
|
static styles: lit.CSSResult[];
|
|
@@ -205,11 +233,6 @@ type StreamType = 'vod' | 'live' | 'dvr';
|
|
|
205
233
|
|
|
206
234
|
/**
|
|
207
235
|
* A control that displays the current time of the stream.
|
|
208
|
-
*
|
|
209
|
-
* @attribute `show-duration` - If set, also shows the duration of the stream.
|
|
210
|
-
* @attribute `remaining` - If set, shows the remaining time of the stream. Not compatible with `show-duration`.
|
|
211
|
-
* @attribute `remaining-when-live` - If set, and the stream is a livestream, shows the remaining time
|
|
212
|
-
* (until the live point) of the stream.
|
|
213
236
|
*/
|
|
214
237
|
declare class TimeDisplay extends LitElement {
|
|
215
238
|
static styles: lit.CSSResult[];
|
|
@@ -217,9 +240,21 @@ declare class TimeDisplay extends LitElement {
|
|
|
217
240
|
connectedCallback(): void;
|
|
218
241
|
get player(): ChromelessPlayer | undefined;
|
|
219
242
|
set player(player: ChromelessPlayer | undefined);
|
|
243
|
+
/**
|
|
244
|
+
* If set, shows the remaining time of the stream. Not compatible with {@link showDuration}.
|
|
245
|
+
*/
|
|
220
246
|
accessor remaining: boolean;
|
|
247
|
+
/**
|
|
248
|
+
* If set, and the stream is a livestream, shows the remaining time (until the live point) of the stream.
|
|
249
|
+
*/
|
|
221
250
|
accessor remainingWhenLive: boolean;
|
|
251
|
+
/**
|
|
252
|
+
* If set, also shows the duration of the stream.
|
|
253
|
+
*/
|
|
222
254
|
accessor showDuration: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* The stream type, either "vod", "live" or "dvr".
|
|
257
|
+
*/
|
|
223
258
|
accessor streamType: StreamType;
|
|
224
259
|
private accessor _currentTime;
|
|
225
260
|
private accessor _duration;
|
|
@@ -303,6 +338,9 @@ declare class RadioGroup extends LitElement {
|
|
|
303
338
|
disconnectedCallback(): void;
|
|
304
339
|
protected firstUpdated(): void;
|
|
305
340
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
341
|
+
/**
|
|
342
|
+
* The device type, either "desktop", "mobile" or "tv".
|
|
343
|
+
*/
|
|
306
344
|
accessor deviceType: DeviceType;
|
|
307
345
|
/**
|
|
308
346
|
* The selected value.
|
|
@@ -349,11 +387,13 @@ declare function menuTemplate(heading: string, content: string, extraCss?: strin
|
|
|
349
387
|
*
|
|
350
388
|
* The menu has a heading at the top, with a {@link CloseMenuButton | close button} and a heading text.
|
|
351
389
|
*
|
|
352
|
-
* @attribute `menu-close-on-input` - Whether to automatically close the menu whenever one of its controls
|
|
353
|
-
* receives an input (e.g. when a radio button is clicked).
|
|
354
|
-
* @attribute `menu-opened` (readonly) - Whether the menu is currently open.
|
|
355
|
-
*
|
|
356
390
|
* @slot `heading` - A slot for the menu's heading.
|
|
391
|
+
*
|
|
392
|
+
* @cssproperty `--theoplayer-menu-color` - The text color of menu items. Defaults to `#fff`.
|
|
393
|
+
* @cssproperty `--theoplayer-menu-control-hover-background` - The background of a menu item when hovered. Defaults to `rgba(255, 255, 255, 0.3)`.
|
|
394
|
+
* @cssproperty `--theoplayer-menu-margin` - The margin around the menu. Defaults to `10px`.
|
|
395
|
+
* @cssproperty `--theoplayer-menu-min-width` - The minimum width of the menu. Defaults to `80%`.
|
|
396
|
+
* @cssproperty `--theoplayer-menu-max-width` - The maximum width of the menu. Defaults to `100%`.
|
|
357
397
|
*/
|
|
358
398
|
declare class Menu extends LitElement {
|
|
359
399
|
static styles: lit.CSSResult[];
|
|
@@ -373,6 +413,9 @@ declare class Menu extends LitElement {
|
|
|
373
413
|
* receives an input (e.g. when a radio button is clicked).
|
|
374
414
|
*/
|
|
375
415
|
accessor closeOnInput: boolean;
|
|
416
|
+
/**
|
|
417
|
+
* Whether the menu is currently open.
|
|
418
|
+
*/
|
|
376
419
|
private get menuOpened_();
|
|
377
420
|
private set menuOpened_(value);
|
|
378
421
|
/**
|
|
@@ -411,8 +454,6 @@ declare function menuGroupTemplate(content: string, extraCss?: string): string;
|
|
|
411
454
|
* This can contain multiple other menus, which can be opened with {@link openMenu}.
|
|
412
455
|
* When a {@link MenuButton} in one menu opens another menu in this group, it is opened as a "submenu".
|
|
413
456
|
* When a submenu is closed, the menu that originally opened it is shown again.
|
|
414
|
-
*
|
|
415
|
-
* @attribute `menu-opened` (readonly) - Whether any menu in the group is currently open.
|
|
416
457
|
*/
|
|
417
458
|
declare class MenuGroup extends LitElement {
|
|
418
459
|
static styles: lit.CSSResult[];
|
|
@@ -420,6 +461,9 @@ declare class MenuGroup extends LitElement {
|
|
|
420
461
|
private readonly _template;
|
|
421
462
|
constructor(options?: MenuGroupOptions);
|
|
422
463
|
private _menuOpened;
|
|
464
|
+
/**
|
|
465
|
+
* Whether any menu in the group is currently open.
|
|
466
|
+
*/
|
|
423
467
|
private get menuOpened_();
|
|
424
468
|
private set menuOpened_(value);
|
|
425
469
|
private accessor _menuSlot;
|
|
@@ -495,8 +539,6 @@ declare global {
|
|
|
495
539
|
|
|
496
540
|
/**
|
|
497
541
|
* A menu button that opens a {@link Menu}.
|
|
498
|
-
*
|
|
499
|
-
* @attribute `menu` - The ID of the menu to open.
|
|
500
542
|
*/
|
|
501
543
|
declare class MenuButton extends Button {
|
|
502
544
|
private _menuId;
|
|
@@ -559,10 +601,6 @@ type TrackType = 'audio' | 'video' | 'subtitles';
|
|
|
559
601
|
/**
|
|
560
602
|
* A radio group that shows a list of media or text tracks,
|
|
561
603
|
* from which the user can choose an active track.
|
|
562
|
-
*
|
|
563
|
-
* @attribute `track-type` - The track type of the available tracks. Can be "audio", "video" or "subtitles".
|
|
564
|
-
* @attribute `show-off` - If set, shows an "off" button to disable all tracks.
|
|
565
|
-
* Can only be used with the "subtitles" track type.
|
|
566
604
|
*/
|
|
567
605
|
declare class TrackRadioGroup extends LitElement {
|
|
568
606
|
static styles: lit.CSSResult[];
|
|
@@ -571,6 +609,8 @@ declare class TrackRadioGroup extends LitElement {
|
|
|
571
609
|
private accessor _tracksList;
|
|
572
610
|
/**
|
|
573
611
|
* The track type of the available tracks.
|
|
612
|
+
*
|
|
613
|
+
* Can be "audio", "video" or "subtitles".
|
|
574
614
|
*/
|
|
575
615
|
get trackType(): TrackType;
|
|
576
616
|
set trackType(trackType: TrackType);
|
|
@@ -653,7 +693,6 @@ type TextTrackStyleOption = keyof TextTrackStyleMap;
|
|
|
653
693
|
* A radio group that shows a list of values for a text track style option,
|
|
654
694
|
* from which the user can choose a desired value.
|
|
655
695
|
*
|
|
656
|
-
* @attribute `property` - The property name of the text track style option. One of {@link TextTrackStyleOption}.
|
|
657
696
|
* @slot {@link RadioButton} - The possible options for the text track style option.
|
|
658
697
|
* For example: `<theoplayer-radio-button value="#ff0000">Red</theoplayer-radio-button>`
|
|
659
698
|
*/
|
|
@@ -667,6 +706,8 @@ declare class TextTrackStyleRadioGroup extends LitElement {
|
|
|
667
706
|
protected firstUpdated(): void;
|
|
668
707
|
/**
|
|
669
708
|
* The property name of the text track style option.
|
|
709
|
+
*
|
|
710
|
+
* One of {@link TextTrackStyleOption}.
|
|
670
711
|
*/
|
|
671
712
|
get property(): TextTrackStyleOption;
|
|
672
713
|
set property(property: TextTrackStyleOption);
|
|
@@ -691,8 +732,6 @@ declare global {
|
|
|
691
732
|
/**
|
|
692
733
|
* A control that displays the value of a single text track style option
|
|
693
734
|
* in a human-readable format.
|
|
694
|
-
*
|
|
695
|
-
* @attribute `property` - The property name of the text track style option. One of {@link TextTrackStyleOption}.
|
|
696
735
|
*/
|
|
697
736
|
declare class TextTrackStyleDisplay extends LitElement {
|
|
698
737
|
private _player;
|
|
@@ -700,6 +739,8 @@ declare class TextTrackStyleDisplay extends LitElement {
|
|
|
700
739
|
private _textTrackStyle;
|
|
701
740
|
/**
|
|
702
741
|
* The property name of the text track style option.
|
|
742
|
+
*
|
|
743
|
+
* One of {@link TextTrackStyleOption}.
|
|
703
744
|
*/
|
|
704
745
|
get property(): TextTrackStyleOption;
|
|
705
746
|
set property(property: TextTrackStyleOption);
|
|
@@ -758,8 +799,6 @@ declare global {
|
|
|
758
799
|
* A menu button that opens a {@link LanguageMenu}.
|
|
759
800
|
*
|
|
760
801
|
* When there are no alternative audio languages or subtitles, this button automatically hides itself.
|
|
761
|
-
*
|
|
762
|
-
* @attribute `menu` - The ID of the language menu.
|
|
763
802
|
*/
|
|
764
803
|
declare class LanguageMenuButton extends MenuButton {
|
|
765
804
|
private _player;
|
|
@@ -858,7 +897,13 @@ declare global {
|
|
|
858
897
|
* A control that displays the name of the active video quality.
|
|
859
898
|
*/
|
|
860
899
|
declare class ActiveQualityDisplay extends LitElement {
|
|
900
|
+
/**
|
|
901
|
+
* The currently active video quality.
|
|
902
|
+
*/
|
|
861
903
|
accessor activeVideoQuality: VideoQuality | undefined;
|
|
904
|
+
/**
|
|
905
|
+
* The list of target video qualities.
|
|
906
|
+
*/
|
|
862
907
|
accessor targetVideoQualities: VideoQuality[] | undefined;
|
|
863
908
|
protected render(): HTMLTemplateResult;
|
|
864
909
|
}
|
|
@@ -974,6 +1019,9 @@ declare global {
|
|
|
974
1019
|
declare class FullscreenButton extends Button {
|
|
975
1020
|
static styles: lit.CSSResult[];
|
|
976
1021
|
connectedCallback(): void;
|
|
1022
|
+
/**
|
|
1023
|
+
* Whether the player is in fullscreen mode.
|
|
1024
|
+
*/
|
|
977
1025
|
accessor fullscreen: boolean;
|
|
978
1026
|
protected handleClick(): void;
|
|
979
1027
|
attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
|
|
@@ -996,10 +1044,32 @@ declare class ColorStops {
|
|
|
996
1044
|
/**
|
|
997
1045
|
* A slider to select a value from a range.
|
|
998
1046
|
*
|
|
999
|
-
* @
|
|
1000
|
-
*
|
|
1001
|
-
* @
|
|
1002
|
-
*
|
|
1047
|
+
* @cssproperty `--theoplayer-range-bar-color` - The color of the filled portion of the range track. Defaults to `#fff`.
|
|
1048
|
+
* @cssproperty `--theoplayer-range-track-height` - The height of the range track. Defaults to `4px`.
|
|
1049
|
+
* @cssproperty `--theoplayer-range-track-width` - The width of the range track. Defaults to `100%`.
|
|
1050
|
+
* @cssproperty `--theoplayer-range-track-background` - The background of the unfilled portion of the track. Defaults to `rgba(255, 255, 255, 0.2)`.
|
|
1051
|
+
* @cssproperty `--theoplayer-range-track-border` - The border of the track. Defaults to `none`.
|
|
1052
|
+
* @cssproperty `--theoplayer-range-track-border-radius` - The border radius of the track. Defaults to `0`.
|
|
1053
|
+
* @cssproperty `--theoplayer-range-track-box-shadow` - The box-shadow of the track. Defaults to `none`.
|
|
1054
|
+
* @cssproperty `--theoplayer-range-track-transition` - The CSS transition applied to the track. Defaults to `none`.
|
|
1055
|
+
* @cssproperty `--theoplayer-range-track-translate-x` - Horizontal translation of the track. Defaults to `0`.
|
|
1056
|
+
* @cssproperty `--theoplayer-range-track-translate-y` - Vertical translation of the track. Defaults to `0`.
|
|
1057
|
+
* @cssproperty `--theoplayer-range-track-outline` - The outline of the track.
|
|
1058
|
+
* @cssproperty `--theoplayer-range-track-outline-offset` - The outline offset of the track.
|
|
1059
|
+
* @cssproperty `--theoplayer-range-track-pointer-background` - The background of the hover/preview pointer indicator on the track. Defaults to `transparent`.
|
|
1060
|
+
* @cssproperty `--theoplayer-range-track-pointer-border-right` - The right border of the pointer indicator. Defaults to `none`.
|
|
1061
|
+
* @cssproperty `--theoplayer-range-thumb-width` - The width of the slider thumb. Defaults to `10px`.
|
|
1062
|
+
* @cssproperty `--theoplayer-range-thumb-height` - The height of the slider thumb. Defaults to `10px`.
|
|
1063
|
+
* @cssproperty `--theoplayer-range-thumb-background` - The background of the slider thumb. Defaults to `#fff`.
|
|
1064
|
+
* @cssproperty `--theoplayer-range-thumb-border` - The border of the slider thumb. Defaults to `none`.
|
|
1065
|
+
* @cssproperty `--theoplayer-range-thumb-border-radius` - The border radius of the slider thumb. Defaults to `10px`.
|
|
1066
|
+
* @cssproperty `--theoplayer-range-thumb-box-shadow` - The box-shadow of the slider thumb. Defaults to `1px 1px 1px transparent`.
|
|
1067
|
+
* @cssproperty `--theoplayer-range-thumb-transition` - The CSS transition applied to the slider thumb. Defaults to `none`.
|
|
1068
|
+
* @cssproperty `--theoplayer-range-thumb-transform` - The CSS transform applied to the slider thumb. Defaults to `none`.
|
|
1069
|
+
* @cssproperty `--theoplayer-range-thumb-opacity` - The opacity of the slider thumb. Defaults to `1`.
|
|
1070
|
+
* @cssproperty `--theoplayer-range-padding` - The padding around the range. Defaults to `--theoplayer-control-padding`.
|
|
1071
|
+
* @cssproperty `--theoplayer-range-padding-left` - The left padding around the range. Defaults to `--theoplayer-range-padding`.
|
|
1072
|
+
* @cssproperty `--theoplayer-range-padding-right` - The right padding around the range. Defaults to `--theoplayer-range-padding`.
|
|
1003
1073
|
*
|
|
1004
1074
|
* @group Components
|
|
1005
1075
|
*/
|
|
@@ -1041,6 +1111,15 @@ declare abstract class Range extends LitElement {
|
|
|
1041
1111
|
*/
|
|
1042
1112
|
get value(): number;
|
|
1043
1113
|
set value(value: number);
|
|
1114
|
+
/**
|
|
1115
|
+
* The current value.
|
|
1116
|
+
*
|
|
1117
|
+
* Setting this property does *not* trigger {@link handleInput}.
|
|
1118
|
+
* This should be used when synchronizing the range with external state,
|
|
1119
|
+
* e.g. when updating the value of a time range with the player's current time.
|
|
1120
|
+
*/
|
|
1121
|
+
protected get rawValue(): number;
|
|
1122
|
+
protected set rawValue(value: number);
|
|
1044
1123
|
/**
|
|
1045
1124
|
* The minimum allowed value.
|
|
1046
1125
|
*/
|
|
@@ -1057,6 +1136,9 @@ declare abstract class Range extends LitElement {
|
|
|
1057
1136
|
* If set to `"any"`, the value can change with arbitrary precision.
|
|
1058
1137
|
*/
|
|
1059
1138
|
accessor step: number | 'any';
|
|
1139
|
+
/**
|
|
1140
|
+
* The device type, either "desktop", "mobile" or "tv".
|
|
1141
|
+
*/
|
|
1060
1142
|
accessor deviceType: DeviceType;
|
|
1061
1143
|
accessor ariaLive: string | null;
|
|
1062
1144
|
private readonly _onInput;
|
|
@@ -1102,6 +1184,9 @@ declare abstract class Range extends LitElement {
|
|
|
1102
1184
|
* (e.g. `#xywh=180,80,60,40`), then the thumbnail is clipped to the rectangle defined by that fragment.
|
|
1103
1185
|
*
|
|
1104
1186
|
* If the stream does not contain thumbnails, then this display shows nothing.
|
|
1187
|
+
*
|
|
1188
|
+
* @cssproperty `--theoplayer-preview-thumbnail-background` - The background of the preview thumbnail container. Defaults to `#fff`.
|
|
1189
|
+
* @cssproperty `--theoplayer-preview-thumbnail-padding` - The padding around the preview thumbnail. Defaults to `2px`.
|
|
1105
1190
|
*/
|
|
1106
1191
|
declare class PreviewThumbnail extends LitElement {
|
|
1107
1192
|
static styles: lit.CSSResult[];
|
|
@@ -1134,18 +1219,23 @@ declare global {
|
|
|
1134
1219
|
|
|
1135
1220
|
/**
|
|
1136
1221
|
* A display that shows the current preview time of a {@link TimeRange | `<theoplayer-time-range>`}.
|
|
1137
|
-
*
|
|
1138
|
-
* @attribute `remaining` - If set, shows the remaining time of the stream.
|
|
1139
|
-
* @attribute `remaining-when-live` - If set, and the stream is a livestream, shows the remaining time
|
|
1140
|
-
* (until the live point) of the stream.
|
|
1141
1222
|
*/
|
|
1142
1223
|
declare class PreviewTimeDisplay extends LitElement {
|
|
1143
1224
|
static styles: lit.CSSResult[];
|
|
1144
1225
|
private _player;
|
|
1145
1226
|
connectedCallback(): void;
|
|
1146
1227
|
accessor previewTime: number;
|
|
1228
|
+
/**
|
|
1229
|
+
* If set, shows the remaining time of the stream.
|
|
1230
|
+
*/
|
|
1147
1231
|
accessor remaining: boolean;
|
|
1232
|
+
/**
|
|
1233
|
+
* If set, and the stream is a livestream, shows the remaining time (until the live point) of the stream.
|
|
1234
|
+
*/
|
|
1148
1235
|
accessor remainingWhenLive: boolean;
|
|
1236
|
+
/**
|
|
1237
|
+
* The stream type, either "vod", "live" or "dvr".
|
|
1238
|
+
*/
|
|
1149
1239
|
accessor streamType: StreamType;
|
|
1150
1240
|
get player(): ChromelessPlayer | undefined;
|
|
1151
1241
|
set player(player: ChromelessPlayer | undefined);
|
|
@@ -1166,6 +1256,9 @@ declare global {
|
|
|
1166
1256
|
* @slot `preview` - A slot holding a preview of the seek time, shown while hovering the seek bar.
|
|
1167
1257
|
* By default, this shows the {@link PreviewTimeDisplay | preview time} and
|
|
1168
1258
|
* the {@link PreviewThumbnail | preview thumbnail}.
|
|
1259
|
+
*
|
|
1260
|
+
* @cssproperty `--theoplayer-preview-text-shadow` - The text shadow applied to the preview box shown while hovering the seek bar.
|
|
1261
|
+
* Defaults to `0 0 4px rgba(0, 0, 0, 0.75)`.
|
|
1169
1262
|
*/
|
|
1170
1263
|
declare class TimeRange extends Range {
|
|
1171
1264
|
static styles: lit.CSSResult[];
|
|
@@ -1185,8 +1278,14 @@ declare class TimeRange extends Range {
|
|
|
1185
1278
|
disconnectedCallback(): void;
|
|
1186
1279
|
get player(): ChromelessPlayer | undefined;
|
|
1187
1280
|
set player(player: ChromelessPlayer | undefined);
|
|
1281
|
+
/**
|
|
1282
|
+
* The stream type, either "vod", "live" or "dvr".
|
|
1283
|
+
*/
|
|
1188
1284
|
get streamType(): StreamType;
|
|
1189
1285
|
set streamType(streamType: StreamType);
|
|
1286
|
+
/**
|
|
1287
|
+
* Whether to show markers for advertisements on the seek bar.
|
|
1288
|
+
*/
|
|
1190
1289
|
get showAdMarkers(): boolean;
|
|
1191
1290
|
set showAdMarkers(showAdMarkers: boolean);
|
|
1192
1291
|
private readonly _updateFromPlayer;
|
|
@@ -1236,6 +1335,17 @@ declare global {
|
|
|
1236
1335
|
|
|
1237
1336
|
/**
|
|
1238
1337
|
* A screen that shows the details of a fatal player error.
|
|
1338
|
+
*
|
|
1339
|
+
* @cssproperty `--theoplayer-error-icon-color` - The color of the error icon. Defaults to `--theoplayer-icon-color`.
|
|
1340
|
+
* @cssproperty `--theoplayer-error-icon-width` - The width of the error icon. Defaults to `48px`.
|
|
1341
|
+
* @cssproperty `--theoplayer-error-icon-height` - The height of the error icon. Defaults to `48px`.
|
|
1342
|
+
* @cssproperty `--theoplayer-error-icon-gap` - The gap between the error icon and the text. Defaults to `10px`.
|
|
1343
|
+
* @cssproperty `--theoplayer-error-heading-color` - The text color of the error heading. Defaults to `#fff`.
|
|
1344
|
+
* @cssproperty `--theoplayer-error-heading-margin` - The margin around the error heading. Defaults to `0 0 10px`.
|
|
1345
|
+
* @cssproperty `--theoplayer-error-message-color` - The text color of the error message. Defaults to `#fff`.
|
|
1346
|
+
* @cssproperty `--theoplayer-error-message-margin` - The margin around the error message. Defaults to `0`.
|
|
1347
|
+
* @cssproperty `--theoplayer-error-min-width` - The minimum width of the error display. Defaults to `0`.
|
|
1348
|
+
* @cssproperty `--theoplayer-error-max-width` - The maximum width of the error display. Defaults to `80%`.
|
|
1239
1349
|
*/
|
|
1240
1350
|
declare class ErrorDisplay extends LitElement {
|
|
1241
1351
|
static styles: lit.CSSResult[];
|
|
@@ -1244,6 +1354,9 @@ declare class ErrorDisplay extends LitElement {
|
|
|
1244
1354
|
* The error.
|
|
1245
1355
|
*/
|
|
1246
1356
|
accessor error: THEOplayerError | undefined;
|
|
1357
|
+
/**
|
|
1358
|
+
* Whether the player is in fullscreen mode.
|
|
1359
|
+
*/
|
|
1247
1360
|
accessor fullscreen: boolean;
|
|
1248
1361
|
protected render(): lit_html.TemplateResult<1>;
|
|
1249
1362
|
}
|
|
@@ -1301,6 +1414,17 @@ declare global {
|
|
|
1301
1414
|
|
|
1302
1415
|
/**
|
|
1303
1416
|
* A control that displays the casting status while using Chromecast.
|
|
1417
|
+
*
|
|
1418
|
+
* @cssproperty `--theoplayer-chromecast-display-icon-color` - The color of the Chromecast icon. Defaults to `--theoplayer-icon-color`.
|
|
1419
|
+
* @cssproperty `--theoplayer-chromecast-display-icon-width` - The width of the Chromecast icon. Defaults to `48px`.
|
|
1420
|
+
* @cssproperty `--theoplayer-chromecast-display-icon-height` - The height of the Chromecast icon. Defaults to `48px`.
|
|
1421
|
+
* @cssproperty `--theoplayer-chromecast-display-icon-gap` - The gap between the icon and the heading. Defaults to `10px`.
|
|
1422
|
+
* @cssproperty `--theoplayer-chromecast-display-heading-color` - The color of the heading text. Defaults to `#fff`.
|
|
1423
|
+
* @cssproperty `--theoplayer-chromecast-display-heading-font-size` - The font size of the heading text. Defaults to `--theoplayer-text-font-size`.
|
|
1424
|
+
* @cssproperty `--theoplayer-chromecast-display-heading-margin` - The margin around the heading text. Defaults to `0`.
|
|
1425
|
+
* @cssproperty `--theoplayer-chromecast-display-receiver-color` - The color of the receiver name text. Defaults to `#fff`.
|
|
1426
|
+
* @cssproperty `--theoplayer-chromecast-display-receiver-font-size` - The font size of the receiver name text. Defaults to `calc(1.25 * var(--theoplayer-text-font-size, 14px))`.
|
|
1427
|
+
* @cssproperty `--theoplayer-chromecast-display-receiver-margin` - The margin around the receiver name text. Defaults to `0`.
|
|
1304
1428
|
*/
|
|
1305
1429
|
declare class ChromecastDisplay extends LitElement {
|
|
1306
1430
|
static styles: lit.CSSResult[];
|
|
@@ -1341,13 +1465,19 @@ declare global {
|
|
|
1341
1465
|
/**
|
|
1342
1466
|
* An indicator that shows whether the player is currently waiting for more data to resume playback.
|
|
1343
1467
|
*
|
|
1344
|
-
* @
|
|
1468
|
+
* @cssproperty `--theoplayer-loading-delay` - The delay before the loading spinner is shown. Defaults to `0.5s`.
|
|
1469
|
+
* @cssproperty `--theoplayer-loading-icon-color` - The color of the loading spinner. Defaults to `--theoplayer-icon-color`.
|
|
1470
|
+
* @cssproperty `--theoplayer-loading-icon-width` - The width of the loading spinner. Defaults to `48px`.
|
|
1471
|
+
* @cssproperty `--theoplayer-loading-icon-height` - The height of the loading spinner. Defaults to `--theoplayer-loading-icon-width`.
|
|
1345
1472
|
*/
|
|
1346
1473
|
declare class LoadingIndicator extends LitElement {
|
|
1347
1474
|
static styles: lit.CSSResult[];
|
|
1348
1475
|
private _player;
|
|
1349
1476
|
get player(): ChromelessPlayer | undefined;
|
|
1350
1477
|
set player(player: ChromelessPlayer | undefined);
|
|
1478
|
+
/**
|
|
1479
|
+
* Whether the player is waiting for more data. If set, the indicator is shown.
|
|
1480
|
+
*/
|
|
1351
1481
|
accessor loading: boolean;
|
|
1352
1482
|
private readonly _updateFromPlayer;
|
|
1353
1483
|
protected render(): HTMLTemplateResult;
|
|
@@ -1372,6 +1502,9 @@ declare class GestureReceiver extends LitElement {
|
|
|
1372
1502
|
connectedCallback(): void;
|
|
1373
1503
|
get player(): ChromelessPlayer | undefined;
|
|
1374
1504
|
set player(player: ChromelessPlayer | undefined);
|
|
1505
|
+
/**
|
|
1506
|
+
* The device type, either "desktop", "mobile" or "tv".
|
|
1507
|
+
*/
|
|
1375
1508
|
accessor deviceType: DeviceType;
|
|
1376
1509
|
private readonly _onPointerDown;
|
|
1377
1510
|
private readonly _onClick;
|
|
@@ -1389,19 +1522,33 @@ declare global {
|
|
|
1389
1522
|
* A button that shows whether the player is currently playing at the live point,
|
|
1390
1523
|
* and seeks to the live point when clicked.
|
|
1391
1524
|
*
|
|
1392
|
-
* @
|
|
1393
|
-
*
|
|
1394
|
-
* @attribute `live` (readonly) - Whether the player is considered to be playing at the live point.
|
|
1525
|
+
* @cssproperty `--theoplayer-live-button-color` - The color of the live indicator when not at the live point. Defaults to `rgb(140, 140, 140)`.
|
|
1526
|
+
* @cssproperty `--theoplayer-live-button-active-color` - The color of the live indicator when playing at the live point. Defaults to `red`.
|
|
1395
1527
|
*/
|
|
1396
1528
|
declare class LiveButton extends Button {
|
|
1397
1529
|
static styles: lit.CSSResult[];
|
|
1398
1530
|
private _player;
|
|
1399
1531
|
private _liveThreshold;
|
|
1400
1532
|
connectedCallback(): void;
|
|
1533
|
+
/**
|
|
1534
|
+
* Whether the player is paused.
|
|
1535
|
+
*/
|
|
1401
1536
|
accessor paused: boolean;
|
|
1537
|
+
/**
|
|
1538
|
+
* The stream type, either "vod", "live" or "dvr".
|
|
1539
|
+
*/
|
|
1402
1540
|
accessor streamType: StreamType;
|
|
1541
|
+
/**
|
|
1542
|
+
* The maximum distance (in seconds) from the live point that the player's current time
|
|
1543
|
+
* can be for it to still be considered "at the live point".
|
|
1544
|
+
*
|
|
1545
|
+
* If unset, defaults to 10 seconds.
|
|
1546
|
+
*/
|
|
1403
1547
|
get liveThreshold(): number;
|
|
1404
1548
|
set liveThreshold(value: number);
|
|
1549
|
+
/**
|
|
1550
|
+
* Whether the player is considered to be playing at the live point.
|
|
1551
|
+
*/
|
|
1405
1552
|
accessor live: boolean;
|
|
1406
1553
|
get player(): ChromelessPlayer | undefined;
|
|
1407
1554
|
set player(player: ChromelessPlayer | undefined);
|
|
@@ -1442,6 +1589,11 @@ declare global {
|
|
|
1442
1589
|
/**
|
|
1443
1590
|
* A control that shows when an advertisement is playing,
|
|
1444
1591
|
* and the number of the current ad in the ad break (if the break has multiple ads).
|
|
1592
|
+
*
|
|
1593
|
+
* @cssproperty `--theoplayer-ad-display-background` - The background of the ad display. Defaults to `#ffc50f`.
|
|
1594
|
+
* @cssproperty `--theoplayer-ad-display-border-radius` - The border radius of the ad display. Defaults to `2px`.
|
|
1595
|
+
* @cssproperty `--theoplayer-ad-display-padding` - The padding of the ad display. Defaults to `--theoplayer-control-padding`.
|
|
1596
|
+
* @cssproperty `--theoplayer-ad-display-text-color` - The text color of the ad display. Defaults to `#000`.
|
|
1445
1597
|
*/
|
|
1446
1598
|
declare class AdDisplay extends LitElement {
|
|
1447
1599
|
static styles: lit.CSSResult[];
|
|
@@ -1489,6 +1641,9 @@ declare class AdClickThroughButton extends LinkButton {
|
|
|
1489
1641
|
private _clickThrough;
|
|
1490
1642
|
constructor();
|
|
1491
1643
|
connectedCallback(): void;
|
|
1644
|
+
/**
|
|
1645
|
+
* The click-through URL of the advertisement.
|
|
1646
|
+
*/
|
|
1492
1647
|
get clickThrough(): string | null;
|
|
1493
1648
|
set clickThrough(clickThrough: string | null);
|
|
1494
1649
|
get player(): ChromelessPlayer | undefined;
|
|
@@ -1506,6 +1661,20 @@ declare global {
|
|
|
1506
1661
|
/**
|
|
1507
1662
|
* A button that skips the current advertisement (if skippable).
|
|
1508
1663
|
* If the ad cannot be skipped yet, it shows the remaining time until it can be skipped.
|
|
1664
|
+
*
|
|
1665
|
+
* @cssproperty `--theoplayer-ad-skip-background` - The background of the skip button. Defaults to `rgba(0, 0, 0, 0.7)`.
|
|
1666
|
+
* @cssproperty `--theoplayer-ad-skip-color` - The text color of the skip button. Defaults to `#fff`.
|
|
1667
|
+
* @cssproperty `--theoplayer-ad-skip-border` - The border of the skip button. Defaults to `1px solid rgba(255, 255, 255, 0.5)`.
|
|
1668
|
+
* @cssproperty `--theoplayer-ad-skip-hover-background` - The background of the skip button when hovered. Defaults to `rgba(0, 0, 0, 0.9)`.
|
|
1669
|
+
* @cssproperty `--theoplayer-ad-skip-hover-color` - The text color of the skip button when hovered. Defaults to `--theoplayer-ad-skip-color`.
|
|
1670
|
+
* @cssproperty `--theoplayer-ad-skip-hover-border` - The border of the skip button when hovered. Defaults to `1px solid #fff`.
|
|
1671
|
+
* @cssproperty `--theoplayer-ad-skip-countdown-background` - The background of the countdown shown before the ad is skippable. Defaults to `transparent`.
|
|
1672
|
+
* @cssproperty `--theoplayer-ad-skip-countdown-color` - The text color of the countdown. Defaults to `--theoplayer-ad-skip-color`.
|
|
1673
|
+
* @cssproperty `--theoplayer-ad-skip-countdown-border` - The border of the countdown. Defaults to `1px solid transparent`.
|
|
1674
|
+
* @cssproperty `--theoplayer-ad-skip-font-size` - The font size of the skip button text. Defaults to `--theoplayer-text-font-size`.
|
|
1675
|
+
* @cssproperty `--theoplayer-ad-skip-line-height` - The line height of the skip button text. Defaults to `--theoplayer-text-content-height`.
|
|
1676
|
+
* @cssproperty `--theoplayer-ad-skip-icon-width` - The width of the skip button icon. Defaults to `--theoplayer-control-height`.
|
|
1677
|
+
* @cssproperty `--theoplayer-ad-skip-icon-height` - The height of the skip button icon. Defaults to `--theoplayer-control-height`.
|
|
1509
1678
|
*/
|
|
1510
1679
|
declare class AdSkipButton extends Button {
|
|
1511
1680
|
static styles: lit.CSSResult[];
|
|
@@ -1616,35 +1785,6 @@ declare const READY_EVENT: "theoplayerready";
|
|
|
1616
1785
|
*
|
|
1617
1786
|
* The styling can be controlled using CSS custom properties (see below).
|
|
1618
1787
|
*
|
|
1619
|
-
* @attribute `configuration` - The THEOplayer {@link theoplayer!UIPlayerConfiguration | UIPlayerConfiguration}, as a JSON string.
|
|
1620
|
-
* @attribute `source` - The THEOplayer {@link theoplayer!SourceDescription | SourceDescription}, as a JSON string.
|
|
1621
|
-
* @attribute `fluid` - If set, the player automatically adjusts its height to fit the video's aspect ratio.
|
|
1622
|
-
* @attribute `muted` - If set, the player starts out as muted. Reflects `ui.player.muted`.
|
|
1623
|
-
* @attribute `autoplay` - If set, the player attempts to automatically start playing (if allowed).
|
|
1624
|
-
* @attribute `device-type` - The device type, either "desktop", "mobile" or "tv".
|
|
1625
|
-
* Can be used in CSS to show/hide certain device-specific UI controls.
|
|
1626
|
-
* @attribute `mobile` - Whether the user is on a mobile device. Equivalent to `device-type == "mobile"`.
|
|
1627
|
-
* @attribute `tv` - Whether the user is on a TV device. Equivalent to `device-type == "tv"`.
|
|
1628
|
-
* @attribute `stream-type` - The stream type, either "vod", "live" or "dvr".
|
|
1629
|
-
* Can be used to show/hide certain UI controls specific for livestreams, such as
|
|
1630
|
-
* a {@link LiveButton | `<theoplayer-live-button>`}.
|
|
1631
|
-
* If you know in advance that the source will be a livestream, you can set this attribute to avoid a screen flicker
|
|
1632
|
-
* when the player switches between its VOD-specific and live-only controls.
|
|
1633
|
-
* @attribute `user-idle` (readonly) - Whether the user is considered to be "idle".
|
|
1634
|
-
* When the user is idle and the video is playing, all slotted UI elements will be hidden
|
|
1635
|
-
* (unless they have the `no-auto-hide` attribute).
|
|
1636
|
-
* @attribute `user-idle-timeout` - The timeout (in seconds) between when the user stops interacting with the UI,
|
|
1637
|
-
* and when the user is considered to be "idle".
|
|
1638
|
-
* @attribute `dvr-threshold` - The minimum length (in seconds) of a livestream's sliding window for the stream to be DVR
|
|
1639
|
-
* and its stream type to be set to "dvr".
|
|
1640
|
-
* @attribute `paused` (readonly) - Whether the player is paused. Reflects `ui.player.paused`.
|
|
1641
|
-
* @attribute `ended` (readonly) - Whether the player is ended. Reflects `ui.player.ended`.
|
|
1642
|
-
* @attribute `casting` (readonly) - Whether the player is casting. Reflects `ui.player.cast.casting`.
|
|
1643
|
-
* @attribute `playing-ad` (readonly) - Whether the player is playing a linear ad. Reflects `ui.player.ads.playing`.
|
|
1644
|
-
* @attribute `has-error` (readonly) - Whether the player has encountered a fatal error.
|
|
1645
|
-
* @attribute `has-first-play` (readonly) - Whether the player has (previously) started playback for this stream.
|
|
1646
|
-
* Can be used in CSS to show/hide certain initial controls, such as a poster image or a centered play button.
|
|
1647
|
-
*
|
|
1648
1788
|
* @slot `(no` name, default slot) - A slot for controls at the bottom of the player.
|
|
1649
1789
|
* Can be used for controls such as a play button ({@link PlayButton | `<theoplayer-play-button>`}) or a seek bar
|
|
1650
1790
|
* ({@link TimeRange | `<theoplayer-time-range>`}).
|
|
@@ -1657,6 +1797,25 @@ declare const READY_EVENT: "theoplayerready";
|
|
|
1657
1797
|
* @slot `menu` - A slot for extra menus (see {@link Menu | `<theoplayer-menu>`}).
|
|
1658
1798
|
* @slot `error` - A slot for an error display, to show when the player encounters a fatal error
|
|
1659
1799
|
* (see {@link ErrorDisplay | `<theoplayer-error-display>`}).
|
|
1800
|
+
*
|
|
1801
|
+
* @cssproperty `--theoplayer-min-width` - The minimum width of the player. Defaults to `300px`.
|
|
1802
|
+
* @cssproperty `--theoplayer-height` - The height of the player. Defaults to `unset`.
|
|
1803
|
+
* Ignored when `--theoplayer-aspect-ratio` is set.
|
|
1804
|
+
* @cssproperty `--theoplayer-aspect-ratio` - The aspect ratio of the player. Defaults to `16 / 9`.
|
|
1805
|
+
* When {@link fluid} is set, this is automatically set to the video's natural aspect ratio.
|
|
1806
|
+
* Set this to `none` (or any invalid `<length>`) to disable, for example when you want to use `--theoplayer-height` instead.
|
|
1807
|
+
* @cssproperty `--theoplayer-background` - The background color of the player. Defaults to `#000`.
|
|
1808
|
+
* @cssproperty `--theoplayer-text-color` - The text color of a control. Defaults to `#fff`.
|
|
1809
|
+
* @cssproperty `--theoplayer-text-font-size` - The font size of any text inside a control. Defaults to `14px`.
|
|
1810
|
+
* @cssproperty `--theoplayer-control-height` - The height of a control. Defaults to `24px`.
|
|
1811
|
+
* @cssproperty `--theoplayer-control-padding` - The padding around a control. Defaults to `10px`.
|
|
1812
|
+
* @cssproperty `--theoplayer-video-border-radius` - The border radius of the `<video>` element. Defaults to `0`.
|
|
1813
|
+
* @cssproperty `--theoplayer-video-object-fit` - The `object-fit` of the `<video>` element. Defaults to `contain`.
|
|
1814
|
+
* @cssproperty `--theoplayer-control-backdrop-background` - The background shown behind all controls. Defaults to `transparent`.
|
|
1815
|
+
* @cssproperty `--theoplayer-menu-backdrop-background` - The background of the menu layer. Defaults to `rgba(0, 0, 0, 0.5)`.
|
|
1816
|
+
* @cssproperty `--theoplayer-menu-layer-padding` - Padding of the menu layer. Defaults to `10px`.
|
|
1817
|
+
* @cssproperty `--theoplayer-menu-min-width` - Minimum width of the menu (desktop). Defaults to `200px`.
|
|
1818
|
+
* @cssproperty `--theoplayer-error-background` - The background of the error layer shown when the player has a fatal error. Defaults to `rgba(0, 0, 0, 0.5)`.
|
|
1660
1819
|
*/
|
|
1661
1820
|
declare class UIContainer extends LitElement {
|
|
1662
1821
|
static styles: lit.CSSResult[];
|
|
@@ -1751,16 +1910,22 @@ declare class UIContainer extends LitElement {
|
|
|
1751
1910
|
private set fullscreen(value);
|
|
1752
1911
|
/**
|
|
1753
1912
|
* Whether the player is paused.
|
|
1913
|
+
*
|
|
1914
|
+
* This reflects `player.paused`
|
|
1754
1915
|
*/
|
|
1755
1916
|
get paused(): boolean;
|
|
1756
1917
|
private set paused(value);
|
|
1757
1918
|
/**
|
|
1758
1919
|
* Whether the player is ended.
|
|
1920
|
+
*
|
|
1921
|
+
* This reflects `player.ended`
|
|
1759
1922
|
*/
|
|
1760
1923
|
get ended(): boolean;
|
|
1761
1924
|
private set ended(value);
|
|
1762
1925
|
/**
|
|
1763
1926
|
* Whether the player is casting to a remote receiver.
|
|
1927
|
+
*
|
|
1928
|
+
* This reflects `player.cast.casting`
|
|
1764
1929
|
*/
|
|
1765
1930
|
get casting(): boolean;
|
|
1766
1931
|
private set casting(value);
|
|
@@ -1780,6 +1945,18 @@ declare class UIContainer extends LitElement {
|
|
|
1780
1945
|
*/
|
|
1781
1946
|
get deviceType(): DeviceType;
|
|
1782
1947
|
set deviceType(value: DeviceType);
|
|
1948
|
+
/**
|
|
1949
|
+
* Whether the user is on a mobile device.
|
|
1950
|
+
*
|
|
1951
|
+
* Equivalent to `deviceType == "mobile"`.
|
|
1952
|
+
*/
|
|
1953
|
+
private accessor mobile;
|
|
1954
|
+
/**
|
|
1955
|
+
* Whether the user is on a TV device.
|
|
1956
|
+
*
|
|
1957
|
+
* Equivalent to `deviceType == "tv"`.
|
|
1958
|
+
*/
|
|
1959
|
+
private accessor tv;
|
|
1783
1960
|
/**
|
|
1784
1961
|
* The stream type, either "vod", "live" or "dvr".
|
|
1785
1962
|
*
|
|
@@ -1797,9 +1974,26 @@ declare class UIContainer extends LitElement {
|
|
|
1797
1974
|
*/
|
|
1798
1975
|
get dvrThreshold(): number;
|
|
1799
1976
|
set dvrThreshold(value: number);
|
|
1977
|
+
/**
|
|
1978
|
+
* Whether the player has (previously) started playback for this stream.
|
|
1979
|
+
*
|
|
1980
|
+
* Can be used in CSS to show/hide certain initial controls, such as a poster image or a centered play button.
|
|
1981
|
+
*/
|
|
1800
1982
|
private accessor _hasFirstPlay;
|
|
1983
|
+
/**
|
|
1984
|
+
* Whether the player is playing a linear ad.
|
|
1985
|
+
*
|
|
1986
|
+
* This reflects `player.ads.playing`.
|
|
1987
|
+
*/
|
|
1801
1988
|
private accessor _isPlayingAd;
|
|
1989
|
+
/**
|
|
1990
|
+
* Whether the player has encountered a fatal error.
|
|
1991
|
+
*/
|
|
1802
1992
|
private accessor _hasError;
|
|
1993
|
+
/**
|
|
1994
|
+
* Whether the player is in "full window" mode,
|
|
1995
|
+
* as a fallback when the player cannot use the "native" fullscreen mode.
|
|
1996
|
+
*/
|
|
1803
1997
|
private accessor _isFullWindow;
|
|
1804
1998
|
connectedCallback(): void;
|
|
1805
1999
|
private tryInitializePlayer_;
|
|
@@ -1813,6 +2007,9 @@ declare class UIContainer extends LitElement {
|
|
|
1813
2007
|
private propagateStateToReceiver_;
|
|
1814
2008
|
private propagatePlayerToAllReceivers_;
|
|
1815
2009
|
private removeStateFromReceiver_;
|
|
2010
|
+
/**
|
|
2011
|
+
* Whether any {@link Menu | menu} is currently open.
|
|
2012
|
+
*/
|
|
1816
2013
|
private get menuOpened_();
|
|
1817
2014
|
private set menuOpened_(value);
|
|
1818
2015
|
private openMenu_;
|
|
@@ -1889,25 +2086,6 @@ declare global {
|
|
|
1889
2086
|
* For more extensive customizations, we recommend defining your own custom UI using
|
|
1890
2087
|
* a {@link UIContainer | `<theoplayer-ui>`}.
|
|
1891
2088
|
*
|
|
1892
|
-
* @attribute `configuration` - The THEOplayer {@link theoplayer!UIPlayerConfiguration | UIPlayerConfiguration}, as a JSON string.
|
|
1893
|
-
* @attribute `source` - The THEOplayer {@link theoplayer!SourceDescription | SourceDescription}, as a JSON string.
|
|
1894
|
-
* @attribute `fluid` - If set, the player automatically adjusts its height to fit the video's aspect ratio.
|
|
1895
|
-
* @attribute `muted` - If set, the player starts out as muted. Reflects `ui.player.muted`.
|
|
1896
|
-
* @attribute `autoplay` - If set, the player attempts to automatically start playing (if allowed).
|
|
1897
|
-
* @attribute `device-type` - The device type, either "desktop", "mobile" or "tv".
|
|
1898
|
-
* Can be used in CSS to show/hide certain device-specific UI controls.
|
|
1899
|
-
* @attribute `mobile` - Whether the user is on a mobile device. Equivalent to `device-type == "mobile"`.
|
|
1900
|
-
* @attribute `tv` - Whether the user is on a TV device. Equivalent to `device-type == "tv"`.
|
|
1901
|
-
* @attribute `stream-type` - The stream type, either "vod", "live" or "dvr".
|
|
1902
|
-
* Can be used to show/hide certain UI controls specific for livestreams, such as
|
|
1903
|
-
* a {@link LiveButton | `<theoplayer-live-button>`}.
|
|
1904
|
-
* If you know in advance that the source will be a livestream, you can set this attribute to avoid a screen flicker
|
|
1905
|
-
* when the player switches between its VOD-specific and live-only controls.
|
|
1906
|
-
* @attribute `user-idle-timeout` - The timeout (in seconds) between when the user stops interacting with the UI,
|
|
1907
|
-
* and when the user is considered to be "idle".
|
|
1908
|
-
* @attribute `dvr-threshold` - The minimum length (in seconds) of a livestream's sliding window for the stream to be DVR
|
|
1909
|
-
* and its stream type to be set to "dvr".
|
|
1910
|
-
*
|
|
1911
2089
|
* @slot `title` - A slot for the stream's title in the top control bar.
|
|
1912
2090
|
* @slot `top-control-bar` - A slot for extra UI controls in the top control bar.
|
|
1913
2091
|
* @slot `centered-chrome` - A slot to replace the controls in the center of the player,
|
|
@@ -1916,6 +2094,32 @@ declare global {
|
|
|
1916
2094
|
* @slot `menu` - A slot for extra menus (see {@link Menu | `<theoplayer-menu>`}).
|
|
1917
2095
|
* @slot `error` - A slot for an error display, to show when the player encounters a fatal error.
|
|
1918
2096
|
* By default, this shows an {@link ErrorDisplay | `<theoplayer-error-display>`}.
|
|
2097
|
+
*
|
|
2098
|
+
* @cssproperty `--theoplayer-text-color` - The text color of a control. Defaults to `#fff`.
|
|
2099
|
+
* @cssproperty `--theoplayer-text-font-size` - The font size of any text inside a control. Defaults to `14px`.
|
|
2100
|
+
* @cssproperty `--theoplayer-control-height` - The height of a control. Defaults to `24px`.
|
|
2101
|
+
* @cssproperty `--theoplayer-control-padding` - The padding around a control. Defaults to `10px`.
|
|
2102
|
+
* @cssproperty `--theoplayer-control-background-gradient-stops` - The gradient stops used for the subtle
|
|
2103
|
+
* backdrop gradient behind the top and bottom control bars on desktop. Defaults to a smooth
|
|
2104
|
+
* transparent-to-black gradient.
|
|
2105
|
+
* @cssproperty `--theoplayer-mobile-control-backdrop-background` - The background applied to the entire player
|
|
2106
|
+
* on mobile when the controls are shown. Defaults to `rgba(0, 0, 0, 0.5)`.
|
|
2107
|
+
* @cssproperty `--theoplayer-centered-chrome-button-icon-width` - The icon width of buttons in the centered
|
|
2108
|
+
* chrome slot. Defaults to `48px`.
|
|
2109
|
+
* @cssproperty `--theoplayer-centered-chrome-control-height` - The control height of elements in the centered
|
|
2110
|
+
* chrome slot. Defaults to `48px`.
|
|
2111
|
+
* @cssproperty `--theoplayer-center-play-button-icon-color` - The icon color of the centered play button.
|
|
2112
|
+
* Overrides `--theoplayer-play-button-icon-color` for this button. Defaults to `unset`.
|
|
2113
|
+
* @cssproperty `--theoplayer-time-range-control-height` - The control height of the time range (seek bar).
|
|
2114
|
+
* Defaults to `12px`.
|
|
2115
|
+
* @cssproperty `--theoplayer-time-range-track-pointer-background` - The background of the hover/preview pointer
|
|
2116
|
+
* on the time range. Defaults to `rgba(255, 255, 255, 0.5)`.
|
|
2117
|
+
* @cssproperty `--theoplayer-volume-range-track-width` - The width of the volume range track when expanded on hover.
|
|
2118
|
+
* Defaults to `70px`.
|
|
2119
|
+
* @cssproperty `--theoplayer-ad-chrome-control-height` - The control height for elements inside the ad chrome.
|
|
2120
|
+
* Defaults to `12px`.
|
|
2121
|
+
* @cssproperty `--theoplayer-ad-control-height` - The control height of playback controls while an ad is playing.
|
|
2122
|
+
* Defaults to `16px`.
|
|
1919
2123
|
*/
|
|
1920
2124
|
declare class DefaultUI extends LitElement {
|
|
1921
2125
|
static styles: lit.CSSResult[];
|
|
@@ -1952,14 +2156,17 @@ declare class DefaultUI extends LitElement {
|
|
|
1952
2156
|
*/
|
|
1953
2157
|
get player(): ChromelessPlayer | undefined;
|
|
1954
2158
|
/**
|
|
1955
|
-
* The player configuration.
|
|
2159
|
+
* The player's {@link theoplayer!UIPlayerConfiguration | configuration}.
|
|
1956
2160
|
*
|
|
1957
2161
|
* Used to create the underlying THEOplayer instance.
|
|
2162
|
+
* When set as an attribute, this must be a JSON string.
|
|
1958
2163
|
*/
|
|
1959
2164
|
get configuration(): UIPlayerConfiguration;
|
|
1960
2165
|
set configuration(configuration: UIPlayerConfiguration);
|
|
1961
2166
|
/**
|
|
1962
|
-
* The player's current source.
|
|
2167
|
+
* The player's {@link theoplayer!SourceDescription | current source}.
|
|
2168
|
+
*
|
|
2169
|
+
* When set as an attribute, this must be a JSON string.
|
|
1963
2170
|
*/
|
|
1964
2171
|
get source(): SourceDescription | undefined;
|
|
1965
2172
|
set source(source: SourceDescription | undefined);
|
|
@@ -1969,6 +2176,8 @@ declare class DefaultUI extends LitElement {
|
|
|
1969
2176
|
accessor fluid: boolean;
|
|
1970
2177
|
/**
|
|
1971
2178
|
* Whether the player's audio is muted.
|
|
2179
|
+
*
|
|
2180
|
+
* This reflects `player.muted`.
|
|
1972
2181
|
*/
|
|
1973
2182
|
accessor muted: boolean;
|
|
1974
2183
|
/**
|
|
@@ -1980,6 +2189,9 @@ declare class DefaultUI extends LitElement {
|
|
|
1980
2189
|
*
|
|
1981
2190
|
* If you know in advance that the source will be a livestream, you can set this property to avoid a screen flicker
|
|
1982
2191
|
* when the player switches between its VOD-specific and live-only controls.
|
|
2192
|
+
*
|
|
2193
|
+
* Can be used to show/hide certain UI controls specific for livestreams, such as
|
|
2194
|
+
* a {@link LiveButton | `<theoplayer-live-button>`}.
|
|
1983
2195
|
*/
|
|
1984
2196
|
accessor streamType: StreamType;
|
|
1985
2197
|
/**
|
|
@@ -1994,9 +2206,23 @@ declare class DefaultUI extends LitElement {
|
|
|
1994
2206
|
set userIdleTimeout(value: number | undefined);
|
|
1995
2207
|
/**
|
|
1996
2208
|
* The device type, either "desktop", "mobile" or "tv".
|
|
2209
|
+
*
|
|
2210
|
+
* This attribute can be used in CSS to show/hide certain device-specific UI controls.
|
|
1997
2211
|
*/
|
|
1998
2212
|
get deviceType(): DeviceType;
|
|
1999
2213
|
set deviceType(value: DeviceType);
|
|
2214
|
+
/**
|
|
2215
|
+
* Whether the user is on a mobile device.
|
|
2216
|
+
*
|
|
2217
|
+
* Equivalent to `deviceType == "mobile"`.
|
|
2218
|
+
*/
|
|
2219
|
+
private accessor mobile;
|
|
2220
|
+
/**
|
|
2221
|
+
* Whether the user is on a TV device.
|
|
2222
|
+
*
|
|
2223
|
+
* Equivalent to `deviceType == "tv"`.
|
|
2224
|
+
*/
|
|
2225
|
+
private accessor tv;
|
|
2000
2226
|
/**
|
|
2001
2227
|
* The minimum length (in seconds) of a livestream's sliding window for the stream to be DVR
|
|
2002
2228
|
* and its stream type to be set to "dvr".
|