@theoplayer/web-ui 1.3.0 → 1.5.0
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/README.md +37 -14
- package/dist/THEOplayerUI.d.ts +106 -57
- package/dist/THEOplayerUI.es5.js +2 -2
- package/dist/THEOplayerUI.es5.mjs +1 -1
- package/dist/THEOplayerUI.js +21 -21
- package/dist/THEOplayerUI.js.map +1 -1
- package/dist/THEOplayerUI.mjs +25 -8
- package/dist/THEOplayerUI.mjs.map +1 -1
- package/package.json +21 -19
package/dist/THEOplayerUI.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* THEOplayer
|
|
2
|
+
* THEOplayer Open Video UI for Web (v1.5.0)
|
|
3
3
|
* License: MIT
|
|
4
4
|
*/
|
|
5
|
-
import { ChromelessPlayer, VideoQuality, THEOplayerError, MediaTrack, TextTrack, TextTracksList, EdgeStyle, VendorCast, CastState, PlayerConfiguration, SourceDescription } from 'theoplayer/
|
|
5
|
+
import { ChromelessPlayer, VideoQuality, THEOplayerError, MediaTrack, TextTrack, TextTracksList, EdgeStyle, VendorCast, CastState, PlayerConfiguration, SourceDescription } from 'theoplayer/chromeless';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* A horizontal control bar that can contain other controls.
|
|
8
|
+
* `<theoplayer-control-bar>` - A horizontal control bar that can contain other controls.
|
|
9
9
|
*
|
|
10
10
|
* @group Components
|
|
11
11
|
*/
|
|
@@ -21,9 +21,14 @@ declare enum Attribute {
|
|
|
21
21
|
MUTED = "muted",
|
|
22
22
|
FULLSCREEN = "fullscreen",
|
|
23
23
|
FLUID = "fluid",
|
|
24
|
+
DEVICE_TYPE = "device-type",
|
|
24
25
|
MOBILE = "mobile",
|
|
26
|
+
TV = "tv",
|
|
27
|
+
TV_FOCUS = "tv-focus",
|
|
25
28
|
MOBILE_ONLY = "mobile-only",
|
|
26
29
|
MOBILE_HIDDEN = "mobile-hidden",
|
|
30
|
+
TV_ONLY = "tv-only",
|
|
31
|
+
TV_HIDDEN = "tv-hidden",
|
|
27
32
|
USER_IDLE = "user-idle",
|
|
28
33
|
USER_IDLE_TIMEOUT = "user-idle-timeout",
|
|
29
34
|
NO_AUTO_HIDE = "no-auto-hide",
|
|
@@ -70,7 +75,7 @@ interface ButtonOptions {
|
|
|
70
75
|
}
|
|
71
76
|
declare function buttonTemplate(button: string, extraCss?: string): string;
|
|
72
77
|
/**
|
|
73
|
-
* A basic button.
|
|
78
|
+
* `<theoplayer-button>` - A basic button.
|
|
74
79
|
*
|
|
75
80
|
* @attribute `disabled` - Whether the button is disabled. When disabled, the button cannot be clicked.
|
|
76
81
|
* @group Components
|
|
@@ -98,7 +103,6 @@ declare class Button extends HTMLElement {
|
|
|
98
103
|
get disabled(): boolean;
|
|
99
104
|
set disabled(disabled: boolean);
|
|
100
105
|
attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
|
|
101
|
-
private readonly _onKeyDown;
|
|
102
106
|
private readonly _onClick;
|
|
103
107
|
/**
|
|
104
108
|
* Handle a button click.
|
|
@@ -110,7 +114,7 @@ declare class Button extends HTMLElement {
|
|
|
110
114
|
|
|
111
115
|
declare function linkButtonTemplate(button: string, extraCss?: string): string;
|
|
112
116
|
/**
|
|
113
|
-
* A {@link Button | button} that opens a hyperlink.
|
|
117
|
+
* `<theoplayer-link-button>` - A {@link Button | button} that opens a hyperlink.
|
|
114
118
|
*
|
|
115
119
|
* @attribute `disabled` - Whether the button is disabled. When disabled, the button cannot be clicked.
|
|
116
120
|
* @group Components
|
|
@@ -138,6 +142,8 @@ declare class LinkButton extends HTMLElement {
|
|
|
138
142
|
|
|
139
143
|
type Constructor<T> = abstract new (...args: any[]) => T;
|
|
140
144
|
|
|
145
|
+
type DeviceType = 'desktop' | 'mobile' | 'tv';
|
|
146
|
+
|
|
141
147
|
type StreamType = 'vod' | 'live' | 'dvr';
|
|
142
148
|
|
|
143
149
|
/** @internal */
|
|
@@ -145,6 +151,7 @@ declare const StateReceiverProps: "theoplayerUiObservedProperties";
|
|
|
145
151
|
interface StateReceiverPropertyMap {
|
|
146
152
|
player: ChromelessPlayer | undefined;
|
|
147
153
|
fullscreen: boolean;
|
|
154
|
+
deviceType: DeviceType;
|
|
148
155
|
streamType: StreamType;
|
|
149
156
|
playbackRate: number;
|
|
150
157
|
activeVideoQuality: VideoQuality | undefined;
|
|
@@ -183,7 +190,7 @@ declare function StateReceiverMixin<T extends Constructor<Element>>(base: T, pro
|
|
|
183
190
|
|
|
184
191
|
declare const PlayButton_base: typeof Button & Constructor<StateReceiverElement>;
|
|
185
192
|
/**
|
|
186
|
-
* A button that toggles whether the player is playing or paused.
|
|
193
|
+
* `<theoplayer-play-button>` - A button that toggles whether the player is playing or paused.
|
|
187
194
|
*
|
|
188
195
|
* @attribute `paused` (readonly) - Whether the player is paused. Reflects `ui.player.paused`.
|
|
189
196
|
* @attribute `ended` (readonly) - Whether the player is ended. Reflects `ui.player.ended`.
|
|
@@ -204,6 +211,7 @@ declare class PlayButton extends PlayButton_base {
|
|
|
204
211
|
private readonly _onPause;
|
|
205
212
|
private readonly _updateFromPlayer;
|
|
206
213
|
private _updateEnded;
|
|
214
|
+
private readonly _updateDisabled;
|
|
207
215
|
protected handleClick(): void;
|
|
208
216
|
attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
|
|
209
217
|
private _updateAriaLabel;
|
|
@@ -212,7 +220,7 @@ declare class PlayButton extends PlayButton_base {
|
|
|
212
220
|
type VolumeLevel = 'off' | 'low' | 'high';
|
|
213
221
|
declare const MuteButton_base: typeof Button & Constructor<StateReceiverElement>;
|
|
214
222
|
/**
|
|
215
|
-
* A button that toggles whether audio is muted or not.
|
|
223
|
+
* `<theoplayer-mute-button>` - A button that toggles whether audio is muted or not.
|
|
216
224
|
*
|
|
217
225
|
* @attribute `volume-level` (readonly) - The volume level of the player.
|
|
218
226
|
* Can be "off" (muted), "low" (volume < 50%) or "high" (volume >= 50%).
|
|
@@ -237,7 +245,7 @@ declare class MuteButton extends MuteButton_base {
|
|
|
237
245
|
|
|
238
246
|
declare const SeekButton_base: typeof Button & Constructor<StateReceiverElement>;
|
|
239
247
|
/**
|
|
240
|
-
* A button that seeks forward or backward by a fixed offset.
|
|
248
|
+
* `<theoplayer-seek-button>` - A button that seeks forward or backward by a fixed offset.
|
|
241
249
|
*
|
|
242
250
|
* @attribute `seek-offset` - The offset (in seconds) by which to seek forward (if positive) or backward (if negative).
|
|
243
251
|
* @group Components
|
|
@@ -265,7 +273,7 @@ declare const TimeDisplay_base: {
|
|
|
265
273
|
prototype: HTMLElement;
|
|
266
274
|
} & Constructor<StateReceiverElement>;
|
|
267
275
|
/**
|
|
268
|
-
* A control that displays the current time of the stream.
|
|
276
|
+
* `<theoplayer-time-display>` - A control that displays the current time of the stream.
|
|
269
277
|
*
|
|
270
278
|
* @attribute `show-duration` - If set, also shows the duration of the stream.
|
|
271
279
|
* @attribute `remaining` - If set, shows the remaining time of the stream. Not compatible with `show-duration`.
|
|
@@ -293,7 +301,7 @@ declare const DurationDisplay_base: {
|
|
|
293
301
|
prototype: HTMLElement;
|
|
294
302
|
} & Constructor<StateReceiverElement>;
|
|
295
303
|
/**
|
|
296
|
-
* A control that displays the duration of the stream.
|
|
304
|
+
* `<theoplayer-duration-display>` - A control that displays the duration of the stream.
|
|
297
305
|
*
|
|
298
306
|
* @group Components
|
|
299
307
|
*/
|
|
@@ -309,7 +317,7 @@ declare class DurationDisplay extends DurationDisplay_base {
|
|
|
309
317
|
}
|
|
310
318
|
|
|
311
319
|
/**
|
|
312
|
-
* A button that can be checked.
|
|
320
|
+
* `<theoplayer-radio-button>` - A button that can be checked.
|
|
313
321
|
*
|
|
314
322
|
* When part of a {@link RadioGroup}, at most one button in the group can be checked.
|
|
315
323
|
*
|
|
@@ -334,8 +342,12 @@ declare class RadioButton extends Button {
|
|
|
334
342
|
attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
|
|
335
343
|
}
|
|
336
344
|
|
|
345
|
+
declare const RadioGroup_base: {
|
|
346
|
+
new (): HTMLElement;
|
|
347
|
+
prototype: HTMLElement;
|
|
348
|
+
} & Constructor<StateReceiverElement>;
|
|
337
349
|
/**
|
|
338
|
-
* A group of {@link RadioButton}s. At most one button in the group can be checked.
|
|
350
|
+
* `<theoplayer-radio-group>` - A group of {@link RadioButton}s. At most one button in the group can be checked.
|
|
339
351
|
*
|
|
340
352
|
* ## Behavior
|
|
341
353
|
* This radio group implements the [roving tabindex](https://www.w3.org/WAI/ARIA/apg/example-index/radio/radio.html) pattern.
|
|
@@ -347,12 +359,15 @@ declare class RadioButton extends Button {
|
|
|
347
359
|
*
|
|
348
360
|
* @group Components
|
|
349
361
|
*/
|
|
350
|
-
declare class RadioGroup extends
|
|
362
|
+
declare class RadioGroup extends RadioGroup_base {
|
|
351
363
|
private _slot;
|
|
352
364
|
private _radioButtons;
|
|
353
365
|
constructor();
|
|
366
|
+
protected _upgradeProperty(prop: keyof this): void;
|
|
354
367
|
connectedCallback(): void;
|
|
355
368
|
disconnectedCallback(): void;
|
|
369
|
+
get deviceType(): DeviceType;
|
|
370
|
+
set deviceType(deviceType: DeviceType);
|
|
356
371
|
private readonly _onSlotChange;
|
|
357
372
|
private readonly _onKeyDown;
|
|
358
373
|
get focusedRadioButton(): RadioButton | null;
|
|
@@ -375,7 +390,7 @@ interface MenuOptions {
|
|
|
375
390
|
}
|
|
376
391
|
declare function menuTemplate(heading: string, content: string, extraCss?: string): string;
|
|
377
392
|
/**
|
|
378
|
-
* A menu that can be opened on top of the player.
|
|
393
|
+
* `<theoplayer-menu>` - A menu that can be opened on top of the player.
|
|
379
394
|
*
|
|
380
395
|
* The menu has a heading at the top, with a {@link CloseMenuButton | close button} and a heading text.
|
|
381
396
|
*
|
|
@@ -417,7 +432,7 @@ interface MenuGroupOptions {
|
|
|
417
432
|
}
|
|
418
433
|
declare function menuGroupTemplate(content: string, extraCss?: string): string;
|
|
419
434
|
/**
|
|
420
|
-
* A group of {@link Menu}s.
|
|
435
|
+
* `<theoplayer-menu-group>` - A group of {@link Menu}s.
|
|
421
436
|
*
|
|
422
437
|
* This can contain multiple other menus, which can be opened with {@link MenuGroup.openMenu}.
|
|
423
438
|
* When a {@link MenuButton} in one menu opens another menu in this group, it is opened as a "submenu".
|
|
@@ -496,7 +511,7 @@ declare class MenuGroup extends HTMLElement {
|
|
|
496
511
|
}
|
|
497
512
|
|
|
498
513
|
/**
|
|
499
|
-
* A menu button that opens a {@link Menu}.
|
|
514
|
+
* `<theoplayer-menu-button>` - A menu button that opens a {@link Menu}.
|
|
500
515
|
*
|
|
501
516
|
* @attribute `menu` - The ID of the menu to open.
|
|
502
517
|
* @group Components
|
|
@@ -515,7 +530,7 @@ declare class MenuButton extends Button {
|
|
|
515
530
|
}
|
|
516
531
|
|
|
517
532
|
/**
|
|
518
|
-
* A button that closes its parent menu.
|
|
533
|
+
* `<theoplayer-menu-close-button>` - A button that closes its parent menu.
|
|
519
534
|
*
|
|
520
535
|
* This button must be placed inside a {@link Menu | `<theoplayer-menu>`}.
|
|
521
536
|
*
|
|
@@ -529,7 +544,9 @@ declare class CloseMenuButton extends Button {
|
|
|
529
544
|
}
|
|
530
545
|
|
|
531
546
|
/**
|
|
532
|
-
* A radio button that shows the label of a given media track,
|
|
547
|
+
* `<theoplayer-media-track-radio-button>` - A radio button that shows the label of a given media track,
|
|
548
|
+
* and switches to that track when clicked.
|
|
549
|
+
*
|
|
533
550
|
* @group Components
|
|
534
551
|
*/
|
|
535
552
|
declare class MediaTrackRadioButton extends RadioButton {
|
|
@@ -553,7 +570,8 @@ declare const TrackRadioGroup_base: {
|
|
|
553
570
|
prototype: HTMLElement;
|
|
554
571
|
} & Constructor<StateReceiverElement>;
|
|
555
572
|
/**
|
|
556
|
-
* A radio group that shows a list of media or text tracks,
|
|
573
|
+
* `<theoplayer-track-radio-group>` - A radio group that shows a list of media or text tracks,
|
|
574
|
+
* from which the user can choose an active track.
|
|
557
575
|
*
|
|
558
576
|
* @attribute `track-type` - The track type of the available tracks. Can be "audio", "video" or "subtitles".
|
|
559
577
|
* @attribute `show-off` - If set, shows an "off" button to disable all tracks.
|
|
@@ -595,7 +613,7 @@ declare class TrackRadioGroup extends TrackRadioGroup_base {
|
|
|
595
613
|
}
|
|
596
614
|
|
|
597
615
|
/**
|
|
598
|
-
* A radio button that shows the label of a given text track, and switches to that track when clicked.
|
|
616
|
+
* `<theoplayer-text-track-radio-button>` -A radio button that shows the label of a given text track, and switches to that track when clicked.
|
|
599
617
|
*
|
|
600
618
|
* @group Components
|
|
601
619
|
*/
|
|
@@ -615,7 +633,7 @@ declare class TextTrackRadioButton extends RadioButton {
|
|
|
615
633
|
}
|
|
616
634
|
|
|
617
635
|
/**
|
|
618
|
-
* A radio button that disables the active subtitle track when clicked.
|
|
636
|
+
* `<theoplayer-text-track-off-radio-button>` - A radio button that disables the active subtitle track when clicked.
|
|
619
637
|
*
|
|
620
638
|
* @group Components
|
|
621
639
|
*/
|
|
@@ -647,7 +665,8 @@ declare const TextTrackStyleRadioGroup_base: {
|
|
|
647
665
|
prototype: HTMLElement;
|
|
648
666
|
} & Constructor<StateReceiverElement>;
|
|
649
667
|
/**
|
|
650
|
-
* A radio group that shows a list of values for a text track style option,
|
|
668
|
+
* `<theoplayer-text-track-style-radio-group>` - A radio group that shows a list of values for a text track style option,
|
|
669
|
+
* from which the user can choose a desired value.
|
|
651
670
|
*
|
|
652
671
|
* @attribute `property` - The property name of the text track style option. One of {@link TextTrackStyleOption}.
|
|
653
672
|
* @slot {@link RadioButton} - The possible options for the text track style option.
|
|
@@ -688,7 +707,8 @@ declare const TextTrackStyleDisplay_base: {
|
|
|
688
707
|
prototype: HTMLElement;
|
|
689
708
|
} & Constructor<StateReceiverElement>;
|
|
690
709
|
/**
|
|
691
|
-
*
|
|
710
|
+
* `<theoplayer-text-track-style-display>` - A control that displays the value of a single text track style option
|
|
711
|
+
* in a human-readable format.
|
|
692
712
|
*
|
|
693
713
|
* @attribute `property` - The property name of the text track style option. One of {@link TextTrackStyleOption}.
|
|
694
714
|
* @group Components
|
|
@@ -712,7 +732,7 @@ declare class TextTrackStyleDisplay extends TextTrackStyleDisplay_base {
|
|
|
712
732
|
}
|
|
713
733
|
|
|
714
734
|
/**
|
|
715
|
-
* A menu to change the {@link theoplayer!TextTrackStyle | text track style} of the player.
|
|
735
|
+
* `<theoplayer-text-track-style-menu>` - A menu to change the {@link theoplayer!TextTrackStyle | text track style} of the player.
|
|
716
736
|
*
|
|
717
737
|
* @group Components
|
|
718
738
|
*/
|
|
@@ -722,7 +742,7 @@ declare class TextTrackStyleMenu extends MenuGroup {
|
|
|
722
742
|
|
|
723
743
|
declare const LanguageMenu_base: typeof MenuGroup & Constructor<StateReceiverElement>;
|
|
724
744
|
/**
|
|
725
|
-
* A menu to change the spoken language and subtitles of the stream.
|
|
745
|
+
* `<theoplayer-language-menu>` - A menu to change the spoken language and subtitles of the stream.
|
|
726
746
|
*
|
|
727
747
|
* @group Components
|
|
728
748
|
*/
|
|
@@ -739,7 +759,7 @@ declare class LanguageMenu extends LanguageMenu_base {
|
|
|
739
759
|
|
|
740
760
|
declare const LanguageMenuButton_base: typeof MenuButton & Constructor<StateReceiverElement>;
|
|
741
761
|
/**
|
|
742
|
-
* A menu button that opens a {@link LanguageMenu}.
|
|
762
|
+
* `<theoplayer-language-menu-button>` - A menu button that opens a {@link LanguageMenu}.
|
|
743
763
|
*
|
|
744
764
|
* When there are no alternative audio languages or subtitles, this button automatically hides itself.
|
|
745
765
|
*
|
|
@@ -760,7 +780,8 @@ declare const PlaybackRateRadioGroup_base: {
|
|
|
760
780
|
prototype: HTMLElement;
|
|
761
781
|
} & Constructor<StateReceiverElement>;
|
|
762
782
|
/**
|
|
763
|
-
* A radio group that shows a list of playback rates,
|
|
783
|
+
* `<theoplayer-playback-rate-radio-group>` - A radio group that shows a list of playback rates,
|
|
784
|
+
* from which the user can choose a desired playback rate.
|
|
764
785
|
*
|
|
765
786
|
* @slot {@link RadioButton} - The possible options for the playback rate.
|
|
766
787
|
* The value of each radio button must be a valid number.
|
|
@@ -789,7 +810,7 @@ declare class PlaybackRateRadioGroup extends PlaybackRateRadioGroup_base {
|
|
|
789
810
|
}
|
|
790
811
|
|
|
791
812
|
/**
|
|
792
|
-
* A menu button that opens a [playback rate menu]{@link PlaybackRateMenu}.
|
|
813
|
+
* `<theoplayer-playback-rate-menu-button>` - A menu button that opens a [playback rate menu]{@link PlaybackRateMenu}.
|
|
793
814
|
*
|
|
794
815
|
* @attribute menu - The ID of the playback rate menu.
|
|
795
816
|
* @group Components
|
|
@@ -800,7 +821,7 @@ declare class PlaybackRateMenuButton extends MenuButton {
|
|
|
800
821
|
}
|
|
801
822
|
|
|
802
823
|
/**
|
|
803
|
-
* A menu to change the playback rate of the player.
|
|
824
|
+
* `<theoplayer-playback-rate-menu>` - A menu to change the playback rate of the player.
|
|
804
825
|
*
|
|
805
826
|
* @group Components
|
|
806
827
|
*/
|
|
@@ -813,6 +834,8 @@ declare const PlaybackRateDisplay_base: {
|
|
|
813
834
|
prototype: HTMLElement;
|
|
814
835
|
} & Constructor<StateReceiverElement>;
|
|
815
836
|
/**
|
|
837
|
+
* `<theoplayer-playback-rate-display>` - A control that displays the current playback rate of the player.
|
|
838
|
+
*
|
|
816
839
|
* @group Components
|
|
817
840
|
*/
|
|
818
841
|
declare class PlaybackRateDisplay extends PlaybackRateDisplay_base {
|
|
@@ -830,6 +853,8 @@ declare const ActiveQualityDisplay_base: {
|
|
|
830
853
|
prototype: HTMLElement;
|
|
831
854
|
} & Constructor<StateReceiverElement>;
|
|
832
855
|
/**
|
|
856
|
+
* `<theoplayer-active-quality-display>` - A control that displays the name of the active video quality.
|
|
857
|
+
*
|
|
833
858
|
* @group Components
|
|
834
859
|
*/
|
|
835
860
|
declare class ActiveQualityDisplay extends ActiveQualityDisplay_base {
|
|
@@ -847,8 +872,8 @@ declare class ActiveQualityDisplay extends ActiveQualityDisplay_base {
|
|
|
847
872
|
}
|
|
848
873
|
|
|
849
874
|
/**
|
|
850
|
-
* A radio button that shows the label of a given video quality,
|
|
851
|
-
* {@link theoplayer!MediaTrack.targetQuality | target quality} to that quality when clicked.
|
|
875
|
+
* `<theoplayer-quality-radio-button>` - A radio button that shows the label of a given video quality,
|
|
876
|
+
* and switches the video track's {@link theoplayer!MediaTrack.targetQuality | target quality} to that quality when clicked.
|
|
852
877
|
*
|
|
853
878
|
* @group Components
|
|
854
879
|
*/
|
|
@@ -878,7 +903,8 @@ declare const QualityRadioGroup_base: {
|
|
|
878
903
|
prototype: HTMLElement;
|
|
879
904
|
} & Constructor<StateReceiverElement>;
|
|
880
905
|
/**
|
|
881
|
-
* A radio group that shows a list of available video qualities,
|
|
906
|
+
* `<theoplayer-quality-radio-group>` - A radio group that shows a list of available video qualities,
|
|
907
|
+
* from which the user can choose a desired target quality.
|
|
882
908
|
*
|
|
883
909
|
* @group Components
|
|
884
910
|
*/
|
|
@@ -899,7 +925,7 @@ declare class QualityRadioGroup extends QualityRadioGroup_base {
|
|
|
899
925
|
|
|
900
926
|
declare const TextTrackStyleResetButton_base: typeof Button & Constructor<StateReceiverElement>;
|
|
901
927
|
/**
|
|
902
|
-
* A button that resets the text track style.
|
|
928
|
+
* `<theoplayer-text-track-style-reset-button>` - A button that resets the text track style.
|
|
903
929
|
*
|
|
904
930
|
* @group Components
|
|
905
931
|
*/
|
|
@@ -913,7 +939,8 @@ declare class TextTrackStyleResetButton extends TextTrackStyleResetButton_base {
|
|
|
913
939
|
}
|
|
914
940
|
|
|
915
941
|
/**
|
|
916
|
-
* A menu to change the settings of the player,
|
|
942
|
+
* `<theoplayer-settings-menu>` - A menu to change the settings of the player,
|
|
943
|
+
* such as the active video quality and the playback speed.
|
|
917
944
|
*
|
|
918
945
|
* @group Components
|
|
919
946
|
*/
|
|
@@ -922,7 +949,7 @@ declare class SettingsMenu extends MenuGroup {
|
|
|
922
949
|
}
|
|
923
950
|
|
|
924
951
|
/**
|
|
925
|
-
* A menu button that opens a {@link SettingsMenu}.
|
|
952
|
+
* `<theoplayer-settings-menu-button>` - A menu button that opens a {@link SettingsMenu}.
|
|
926
953
|
*
|
|
927
954
|
* @attribute `menu` - The ID of the settings menu.
|
|
928
955
|
* @group Components
|
|
@@ -934,7 +961,7 @@ declare class SettingsMenuButton extends MenuButton {
|
|
|
934
961
|
|
|
935
962
|
declare const FullscreenButton_base: typeof Button & Constructor<StateReceiverElement>;
|
|
936
963
|
/**
|
|
937
|
-
* A button that toggles fullscreen.
|
|
964
|
+
* `<theoplayer-fullscreen-button>` - A button that toggles fullscreen.
|
|
938
965
|
*
|
|
939
966
|
* @group Components
|
|
940
967
|
*/
|
|
@@ -960,6 +987,10 @@ interface RangeOptions {
|
|
|
960
987
|
template: HTMLTemplateElement;
|
|
961
988
|
}
|
|
962
989
|
declare function rangeTemplate(range: string, extraCss?: string): string;
|
|
990
|
+
declare const Range_base: {
|
|
991
|
+
new (): HTMLElement;
|
|
992
|
+
prototype: HTMLElement;
|
|
993
|
+
} & Constructor<StateReceiverElement>;
|
|
963
994
|
/**
|
|
964
995
|
* A slider to select a value from a range.
|
|
965
996
|
*
|
|
@@ -968,7 +999,7 @@ declare function rangeTemplate(range: string, extraCss?: string): string;
|
|
|
968
999
|
*
|
|
969
1000
|
* @group Components
|
|
970
1001
|
*/
|
|
971
|
-
declare abstract class Range extends
|
|
1002
|
+
declare abstract class Range extends Range_base {
|
|
972
1003
|
static get observedAttributes(): Attribute[];
|
|
973
1004
|
protected readonly _rangeEl: HTMLInputElement;
|
|
974
1005
|
protected readonly _pointerEl: HTMLElement;
|
|
@@ -1006,6 +1037,8 @@ declare abstract class Range extends HTMLElement {
|
|
|
1006
1037
|
*/
|
|
1007
1038
|
get step(): number | 'any';
|
|
1008
1039
|
set step(step: number | 'any');
|
|
1040
|
+
get deviceType(): DeviceType;
|
|
1041
|
+
set deviceType(deviceType: DeviceType);
|
|
1009
1042
|
attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
|
|
1010
1043
|
private readonly _onInput;
|
|
1011
1044
|
protected handleInput(): void;
|
|
@@ -1032,6 +1065,8 @@ declare abstract class Range extends HTMLElement {
|
|
|
1032
1065
|
protected getBarColors(): ColorStops;
|
|
1033
1066
|
private readonly _updatePointerBar;
|
|
1034
1067
|
protected updatePointer_(mousePercent: number, rangeRect: DOMRectReadOnly): void;
|
|
1068
|
+
private readonly _onKeyDown;
|
|
1069
|
+
protected handleKeyDown_(e: KeyboardEvent): void;
|
|
1035
1070
|
}
|
|
1036
1071
|
|
|
1037
1072
|
declare const PreviewThumbnail_base: {
|
|
@@ -1039,7 +1074,8 @@ declare const PreviewThumbnail_base: {
|
|
|
1039
1074
|
prototype: HTMLElement;
|
|
1040
1075
|
} & Constructor<StateReceiverElement>;
|
|
1041
1076
|
/**
|
|
1042
|
-
* A display that shows the thumbnail image at the current preview time
|
|
1077
|
+
* `<theoplayer-preview-thumbnail>` - A display that shows the thumbnail image at the current preview time
|
|
1078
|
+
* of a {@link TimeRange | `<theoplayer-time-range>`}.
|
|
1043
1079
|
*
|
|
1044
1080
|
* The first `metadata` text track whose label equals `"thumbnails"` is used as source for the thumbnails.
|
|
1045
1081
|
* This track is expected to contain cues whose content is the URL for the thumbnail image.
|
|
@@ -1076,7 +1112,7 @@ declare const PreviewTimeDisplay_base: {
|
|
|
1076
1112
|
prototype: HTMLElement;
|
|
1077
1113
|
} & Constructor<StateReceiverElement>;
|
|
1078
1114
|
/**
|
|
1079
|
-
* A display that shows the current preview time of a {@link TimeRange | `<theoplayer-time-range>`}.
|
|
1115
|
+
* `<theoplayer-preview-time-display>` - A display that shows the current preview time of a {@link TimeRange | `<theoplayer-time-range>`}.
|
|
1080
1116
|
*
|
|
1081
1117
|
* @attribute `remaining` - If set, shows the remaining time of the stream.
|
|
1082
1118
|
* @attribute `remaining-when-live` - If set, and the stream is a livestream, shows the remaining time
|
|
@@ -1103,7 +1139,8 @@ declare class PreviewTimeDisplay extends PreviewTimeDisplay_base {
|
|
|
1103
1139
|
|
|
1104
1140
|
declare const TimeRange_base: typeof Range & Constructor<StateReceiverElement>;
|
|
1105
1141
|
/**
|
|
1106
|
-
* A seek bar, showing the current time of the player,
|
|
1142
|
+
* `<theoplayer-time-range>` - A seek bar, showing the current time of the player,
|
|
1143
|
+
* and which seeks the player when clicked or dragged.
|
|
1107
1144
|
*
|
|
1108
1145
|
* @slot `preview` - A slot holding a preview of the seek time, shown while hovering the seek bar.
|
|
1109
1146
|
* By default, this shows the {@link PreviewTimeDisplay | preview time} and
|
|
@@ -1141,11 +1178,13 @@ declare class TimeRange extends TimeRange_base {
|
|
|
1141
1178
|
protected updatePointer_(mousePercent: number, rangeRect: DOMRectReadOnly): void;
|
|
1142
1179
|
protected getBarColors(): ColorStops;
|
|
1143
1180
|
private readonly _onAdChange;
|
|
1181
|
+
protected handleKeyDown_(e: KeyboardEvent): void;
|
|
1144
1182
|
}
|
|
1145
1183
|
|
|
1146
1184
|
declare const VolumeRange_base: typeof Range & Constructor<StateReceiverElement>;
|
|
1147
1185
|
/**
|
|
1148
|
-
* A volume slider, showing the current audio volume of the player,
|
|
1186
|
+
* `<theoplayer-volume-range>` - A volume slider, showing the current audio volume of the player,
|
|
1187
|
+
* and which changes the volume when clicked or dragged.
|
|
1149
1188
|
*
|
|
1150
1189
|
* @group Components
|
|
1151
1190
|
*/
|
|
@@ -1165,7 +1204,7 @@ declare const ErrorDisplay_base: {
|
|
|
1165
1204
|
prototype: HTMLElement;
|
|
1166
1205
|
} & Constructor<StateReceiverElement>;
|
|
1167
1206
|
/**
|
|
1168
|
-
* A screen that shows the details of a fatal player error.
|
|
1207
|
+
* `<theoplayer-error-display>` - A screen that shows the details of a fatal player error.
|
|
1169
1208
|
*
|
|
1170
1209
|
* @group Components
|
|
1171
1210
|
*/
|
|
@@ -1189,7 +1228,7 @@ declare class ErrorDisplay extends ErrorDisplay_base {
|
|
|
1189
1228
|
/**
|
|
1190
1229
|
* A generic button to start and stop casting.
|
|
1191
1230
|
*
|
|
1192
|
-
* For a concrete implementation, see {@link ChromecastButton}.
|
|
1231
|
+
* For a concrete implementation, see {@link ChromecastButton} and {@link AirPlayButton}.
|
|
1193
1232
|
* @group Components
|
|
1194
1233
|
*/
|
|
1195
1234
|
declare class CastButton extends Button {
|
|
@@ -1213,7 +1252,7 @@ declare class CastButton extends Button {
|
|
|
1213
1252
|
|
|
1214
1253
|
declare const ChromecastButton_base: typeof CastButton & Constructor<StateReceiverElement>;
|
|
1215
1254
|
/**
|
|
1216
|
-
* A button to start and stop casting using Chromecast.
|
|
1255
|
+
* `<theoplayer-chromecast-button>` - A button to start and stop casting using Chromecast.
|
|
1217
1256
|
*
|
|
1218
1257
|
* @group Components
|
|
1219
1258
|
*/
|
|
@@ -1232,7 +1271,7 @@ declare const ChromecastDisplay_base: {
|
|
|
1232
1271
|
prototype: HTMLElement;
|
|
1233
1272
|
} & Constructor<StateReceiverElement>;
|
|
1234
1273
|
/**
|
|
1235
|
-
* A control that displays the casting status while using Chromecast.
|
|
1274
|
+
* `<theoplayer-chromecast-display>` - A control that displays the casting status while using Chromecast.
|
|
1236
1275
|
*
|
|
1237
1276
|
* @group Components
|
|
1238
1277
|
*/
|
|
@@ -1249,7 +1288,7 @@ declare class ChromecastDisplay extends ChromecastDisplay_base {
|
|
|
1249
1288
|
|
|
1250
1289
|
declare const AirPlayButton_base: typeof CastButton & Constructor<StateReceiverElement>;
|
|
1251
1290
|
/**
|
|
1252
|
-
* A button to start and stop casting using AirPlay.
|
|
1291
|
+
* `<theoplayer-airplay-button>` - A button to start and stop casting using AirPlay.
|
|
1253
1292
|
*
|
|
1254
1293
|
* @group Components
|
|
1255
1294
|
*/
|
|
@@ -1268,7 +1307,7 @@ declare const LoadingIndicator_base: {
|
|
|
1268
1307
|
prototype: HTMLElement;
|
|
1269
1308
|
} & Constructor<StateReceiverElement>;
|
|
1270
1309
|
/**
|
|
1271
|
-
* An indicator that shows whether the player is currently waiting for more data to resume playback.
|
|
1310
|
+
* `<theoplayer-loading-indicator>` - An indicator that shows whether the player is currently waiting for more data to resume playback.
|
|
1272
1311
|
*
|
|
1273
1312
|
* @attribute `loading` (readonly) - Whether the player is waiting for more data. If set, the indicator is shown.
|
|
1274
1313
|
* @group Components
|
|
@@ -1290,7 +1329,7 @@ declare const GestureReceiver_base: {
|
|
|
1290
1329
|
prototype: HTMLElement;
|
|
1291
1330
|
} & Constructor<StateReceiverElement>;
|
|
1292
1331
|
/**
|
|
1293
|
-
* An overlay that receives and handles gestures on the player.
|
|
1332
|
+
* `<theoplayer-gesture-receiver>` - An overlay that receives and handles gestures on the player.
|
|
1294
1333
|
*
|
|
1295
1334
|
* On desktop devices, this plays or pauses the player whenever it is clicked.
|
|
1296
1335
|
* On mobile devices, this currently does nothing.
|
|
@@ -1313,7 +1352,8 @@ declare class GestureReceiver extends GestureReceiver_base {
|
|
|
1313
1352
|
|
|
1314
1353
|
declare const LiveButton_base: typeof Button & Constructor<StateReceiverElement>;
|
|
1315
1354
|
/**
|
|
1316
|
-
* A button that shows whether the player is currently playing at the live point,
|
|
1355
|
+
* `<theoplayer-live-button>` - A button that shows whether the player is currently playing at the live point,
|
|
1356
|
+
* and seeks to the live point when clicked.
|
|
1317
1357
|
*
|
|
1318
1358
|
* @attribute `live-threshold` - The maximum distance (in seconds) from the live point that the player's current time
|
|
1319
1359
|
* can be for it to still be considered "at the live point". If unset, defaults to 10 seconds.
|
|
@@ -1422,7 +1462,7 @@ declare enum ExtensionSlot {
|
|
|
1422
1462
|
}
|
|
1423
1463
|
|
|
1424
1464
|
/**
|
|
1425
|
-
* A default UI for THEOplayer.
|
|
1465
|
+
* `<theoplayer-default-ui>` - A default UI for THEOplayer.
|
|
1426
1466
|
*
|
|
1427
1467
|
* This default UI provides a great player experience out-of-the-box, that works well on all types of devices
|
|
1428
1468
|
* and for all types of streams. It provides all the common playback controls for playing, seeking,
|
|
@@ -1447,8 +1487,10 @@ declare enum ExtensionSlot {
|
|
|
1447
1487
|
* @attribute `fluid` - If set, the player automatically adjusts its height to fit the video's aspect ratio.
|
|
1448
1488
|
* @attribute `muted` - If set, the player starts out as muted. Reflects `ui.player.muted`.
|
|
1449
1489
|
* @attribute `autoplay` - If set, the player attempts to automatically start playing (if allowed).
|
|
1450
|
-
* @attribute `
|
|
1451
|
-
* Can be used in CSS to show/hide certain
|
|
1490
|
+
* @attribute `device-type` - The device type, either "desktop", "mobile" or "tv".
|
|
1491
|
+
* Can be used in CSS to show/hide certain device-specific UI controls.
|
|
1492
|
+
* @attribute `mobile` - Whether the user is on a mobile device. Equivalent to `device-type == "mobile"`.
|
|
1493
|
+
* @attribute `tv` - Whether the user is on a TV device. Equivalent to `device-type == "tv"`.
|
|
1452
1494
|
* @attribute `stream-type` - The stream type, either "vod", "live" or "dvr".
|
|
1453
1495
|
* Can be used to show/hide certain UI controls specific for livestreams, such as
|
|
1454
1496
|
* a {@link LiveButton | `<theoplayer-live-button>`}.
|
|
@@ -1569,7 +1611,7 @@ type Extension = (ui: DefaultUI) => void;
|
|
|
1569
1611
|
declare function registerExtension(extension: Extension): void;
|
|
1570
1612
|
|
|
1571
1613
|
/**
|
|
1572
|
-
* The container element for a THEOplayer UI.
|
|
1614
|
+
* `<theoplayer-ui>` - The container element for a THEOplayer UI.
|
|
1573
1615
|
*
|
|
1574
1616
|
* This element provides a basic layout structure for a general player UI, and handles the creation and management
|
|
1575
1617
|
* of a {@link theoplayer!ChromelessPlayer | THEOplayer player instance} for this UI.
|
|
@@ -1595,8 +1637,10 @@ declare function registerExtension(extension: Extension): void;
|
|
|
1595
1637
|
* @attribute `fluid` - If set, the player automatically adjusts its height to fit the video's aspect ratio.
|
|
1596
1638
|
* @attribute `muted` - If set, the player starts out as muted. Reflects `ui.player.muted`.
|
|
1597
1639
|
* @attribute `autoplay` - If set, the player attempts to automatically start playing (if allowed).
|
|
1598
|
-
* @attribute `
|
|
1599
|
-
* Can be used in CSS to show/hide certain
|
|
1640
|
+
* @attribute `device-type` - The device type, either "desktop", "mobile" or "tv".
|
|
1641
|
+
* Can be used in CSS to show/hide certain device-specific UI controls.
|
|
1642
|
+
* @attribute `mobile` - Whether the user is on a mobile device. Equivalent to `device-type == "mobile"`.
|
|
1643
|
+
* @attribute `tv` - Whether the user is on a TV device. Equivalent to `device-type == "tv"`.
|
|
1600
1644
|
* @attribute `stream-type` - The stream type, either "vod", "live" or "dvr".
|
|
1601
1645
|
* Can be used to show/hide certain UI controls specific for livestreams, such as
|
|
1602
1646
|
* a {@link LiveButton | `<theoplayer-live-button>`}.
|
|
@@ -1714,6 +1758,10 @@ declare class UIContainer extends HTMLElement {
|
|
|
1714
1758
|
*/
|
|
1715
1759
|
get userIdleTimeout(): number;
|
|
1716
1760
|
set userIdleTimeout(value: number);
|
|
1761
|
+
/**
|
|
1762
|
+
* The device type, either "desktop", "mobile" or "tv".
|
|
1763
|
+
*/
|
|
1764
|
+
get deviceType(): DeviceType;
|
|
1717
1765
|
/**
|
|
1718
1766
|
* The stream type, either "vod", "live" or "dvr".
|
|
1719
1767
|
*
|
|
@@ -1768,6 +1816,7 @@ declare class UIContainer extends HTMLElement {
|
|
|
1768
1816
|
private readonly setUserIdle_;
|
|
1769
1817
|
private readonly scheduleUserIdle_;
|
|
1770
1818
|
private isPlayerOrMedia_;
|
|
1819
|
+
private readonly _onTvKeyDown;
|
|
1771
1820
|
private readonly _onKeyUp;
|
|
1772
1821
|
private readonly _onPointerUp;
|
|
1773
1822
|
private readonly _onClickAfterPointerUp;
|
|
@@ -1778,5 +1827,5 @@ declare class UIContainer extends HTMLElement {
|
|
|
1778
1827
|
private readonly _onPreviewTimeChange;
|
|
1779
1828
|
}
|
|
1780
1829
|
|
|
1781
|
-
export { ActiveQualityDisplay, AdClickThroughButton, AdCountdown, AdDisplay, AdSkipButton, AirPlayButton, Attribute, Button, ButtonOptions, CastButton, ChromecastButton, ChromecastDisplay, CloseMenuButton, ColorStops, Constructor, ControlBar, DefaultUI, DurationDisplay, ErrorDisplay, Extension, ExtensionSlot, FullscreenButton, GestureReceiver, LanguageMenu, LanguageMenuButton, LinkButton, LiveButton, LoadingIndicator, MediaTrackRadioButton, Menu, MenuButton, MenuGroup, MenuGroupOptions, MenuOptions, MuteButton, PlayButton, PlaybackRateDisplay, PlaybackRateMenu, PlaybackRateMenuButton, PlaybackRateRadioGroup, PreviewThumbnail, PreviewTimeDisplay, QualityRadioButton, QualityRadioGroup, RadioButton, RadioGroup, Range, RangeOptions, SeekButton, SettingsMenu, SettingsMenuButton, StateReceiverElement, StateReceiverMixin, StateReceiverPropertyMap, StreamType, TextTrackOffRadioButton, TextTrackRadioButton, TextTrackStyleDisplay, TextTrackStyleMap, TextTrackStyleMenu, TextTrackStyleOption, TextTrackStyleRadioGroup, TextTrackStyleResetButton, TimeDisplay, TimeRange, TrackRadioGroup, TrackType, UIContainer, VolumeLevel, VolumeRange, buttonTemplate, linkButtonTemplate, menuGroupTemplate, menuTemplate, rangeTemplate, registerExtension };
|
|
1830
|
+
export { ActiveQualityDisplay, AdClickThroughButton, AdCountdown, AdDisplay, AdSkipButton, AirPlayButton, Attribute, Button, ButtonOptions, CastButton, ChromecastButton, ChromecastDisplay, CloseMenuButton, ColorStops, Constructor, ControlBar, DefaultUI, DeviceType, DurationDisplay, ErrorDisplay, Extension, ExtensionSlot, FullscreenButton, GestureReceiver, LanguageMenu, LanguageMenuButton, LinkButton, LiveButton, LoadingIndicator, MediaTrackRadioButton, Menu, MenuButton, MenuGroup, MenuGroupOptions, MenuOptions, MuteButton, PlayButton, PlaybackRateDisplay, PlaybackRateMenu, PlaybackRateMenuButton, PlaybackRateRadioGroup, PreviewThumbnail, PreviewTimeDisplay, QualityRadioButton, QualityRadioGroup, RadioButton, RadioGroup, Range, RangeOptions, SeekButton, SettingsMenu, SettingsMenuButton, StateReceiverElement, StateReceiverMixin, StateReceiverPropertyMap, StreamType, TextTrackOffRadioButton, TextTrackRadioButton, TextTrackStyleDisplay, TextTrackStyleMap, TextTrackStyleMenu, TextTrackStyleOption, TextTrackStyleRadioGroup, TextTrackStyleResetButton, TimeDisplay, TimeRange, TrackRadioGroup, TrackType, UIContainer, VolumeLevel, VolumeRange, buttonTemplate, linkButtonTemplate, menuGroupTemplate, menuTemplate, rangeTemplate, registerExtension };
|
|
1782
1831
|
export as namespace THEOplayerUI;
|