@theoplayer/web-ui 1.4.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 CHANGED
@@ -1,4 +1,4 @@
1
- # THEOplayer Web UI
1
+ # THEOplayer Open Video UI for Web
2
2
 
3
3
  A component library for building a world-class video player experience powered by
4
4
  the [THEOplayer Web SDK](https://www.theoplayer.com/product/theoplayer).
@@ -20,10 +20,10 @@ The current THEOplayer Web SDK comes with a built-in UI based on [video.js](http
20
20
 
21
21
  - Designed with customization in mind. With the old UI, customizing anything beyond changing some text and icon colors was difficult, and could break in unpredictable ways when updating to a new THEOplayer version. With the new UI, all components can be customized in a variety of ways with well-documented attributes and CSS custom properties.
22
22
  - Built for the modern web. The old UI was built at a time when Internet Explorer was still a major browser, so it couldn't use newer web technologies. The new UI breaks with the past and takes full advantage of Web Components, so it works well in modern web apps.
23
- - Developed in the open. Although the old UI is based on the open-source video.js library, any custom components bundled with THEOplayer remained closed-source. With the new UI, the source code of all components is publicly available. Advanced users can learn about the inner workings of each component, modify them, and even contribute their changes back to THEOplayer Web UI.
23
+ - Developed in the open. Although the old UI is based on the open-source video.js library, any custom components bundled with THEOplayer remained closed-source. With the new UI, the source code of all components is publicly available. Advanced users can learn about the inner workings of each component, modify them, and even contribute their changes back to Open Video UI.
24
24
 
25
25
  > **Note**
26
- > THEOplayer Web UI currently exists separately from the old THEOplayer UI. In the future, we hope to deprecate and remove the old UI, and ship this new UI as default UI for the THEOplayer Web SDK.
26
+ > THEOplayer Open Video UI for Web currently exists separately from the old THEOplayer UI. In the future, we hope to deprecate and remove the old UI, and ship this new UI as default UI for the THEOplayer Web SDK.
27
27
 
28
28
  ## Installation
29
29
 
@@ -35,7 +35,7 @@ The current THEOplayer Web SDK comes with a built-in UI based on [video.js](http
35
35
  ```sh
36
36
  npm install theoplayer@npm:@theoplayer/basic-hls
37
37
  ```
38
- 2. Install the THEOplayer Web UI.
38
+ 2. Install the Open Video UI for Web.
39
39
  ```sh
40
40
  npm install @theoplayer/web-ui
41
41
  ```
@@ -49,7 +49,7 @@ The current THEOplayer Web SDK comes with a built-in UI based on [video.js](http
49
49
  ```js
50
50
  import { DefaultUI } from '@theoplayer/web-ui';
51
51
  ```
52
- The Web UI will import THEOplayer from `theoplayer/chromeless`.
52
+ Open Video UI will import THEOplayer from `theoplayer/chromeless`.
53
53
  If you're using a bundler such as Webpack or Rollup, this dependency should automatically get bundled with your web app.
54
54
  Alternatively, you can use an [import map](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap) to let the browser resolve it:
55
55
  ```html
@@ -127,9 +127,9 @@ See [docs/examples/custom-ui.html](https://github.com/THEOplayer/web-ui/blob/mai
127
127
 
128
128
  # Legacy browser support
129
129
 
130
- By default, THEOplayer Web UI targets modern browsers that support modern JavaScript syntax (such as [async/await](https://caniuse.com/async-functions)) and native [Custom Elements](https://caniuse.com/custom-elementsv1). This keeps the download size small, so your viewers can spend less time waiting for your page to load and start watching their video faster.
130
+ By default, Open Video UI for Web targets modern browsers that support modern JavaScript syntax (such as [async/await](https://caniuse.com/async-functions)) and native [Custom Elements](https://caniuse.com/custom-elementsv1). This keeps the download size small, so your viewers can spend less time waiting for your page to load and start watching their video faster.
131
131
 
132
- On older browsers (such as Internet Explorer 11 and older smart TVs), you need to load a different version of the THEOplayer Web UI that uses older JavaScript syntax. You also need to load additional polyfills for missing features such as Promises or Custom Elements. We recommend [Polyfill.io](https://polyfill.io/) and [Web Components Polyfills](https://github.com/webcomponents/polyfills) for these.
132
+ On older browsers (such as Internet Explorer 11 and older smart TVs), you need to load a different version of the Open Video UI that uses older JavaScript syntax. You also need to load additional polyfills for missing features such as Promises or Custom Elements. We recommend [Polyfill.io](https://polyfill.io/) and [Web Components Polyfills](https://github.com/webcomponents/polyfills) for these.
133
133
 
134
134
  - Option 1: in your HTML. This uses [differential serving](https://css-tricks.com/differential-serving/) so modern browsers will load the modern build (with `type="module"`), while legacy browsers will load the legacy build (with `nomodule`).
135
135
 
@@ -153,7 +153,7 @@ On older browsers (such as Internet Explorer 11 and older smart TVs), you need t
153
153
  <script nomodule src="/path/to/node_modules/@theoplayer/web-ui/dist/THEOplayerUI.es5.js"></script>
154
154
  ```
155
155
 
156
- - Option 2: in your JavaScript. This will load the legacy build on both modern and legacy browsers, which is suboptimal. Instead, we recommend configuring your bundler to produce a modern and legacy build of your entire web app, and to import the appropriate version of THEOplayer Web UI for each build flavor.
156
+ - Option 2: in your JavaScript. This will load the legacy build on both modern and legacy browsers, which is suboptimal. Instead, we recommend configuring your bundler to produce a modern and legacy build of your entire web app, and to import the appropriate version of Open Video UI for each build flavor.
157
157
 
158
158
  ```js
159
159
  import '@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js';
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * THEOplayer Web UI v1.4.0
2
+ * THEOplayer Open Video UI for Web (v1.5.0)
3
3
  * License: MIT
4
4
  */
5
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`.
@@ -213,7 +220,7 @@ declare class PlayButton extends PlayButton_base {
213
220
  type VolumeLevel = 'off' | 'low' | 'high';
214
221
  declare const MuteButton_base: typeof Button & Constructor<StateReceiverElement>;
215
222
  /**
216
- * A button that toggles whether audio is muted or not.
223
+ * `<theoplayer-mute-button>` - A button that toggles whether audio is muted or not.
217
224
  *
218
225
  * @attribute `volume-level` (readonly) - The volume level of the player.
219
226
  * Can be "off" (muted), "low" (volume < 50%) or "high" (volume >= 50%).
@@ -238,7 +245,7 @@ declare class MuteButton extends MuteButton_base {
238
245
 
239
246
  declare const SeekButton_base: typeof Button & Constructor<StateReceiverElement>;
240
247
  /**
241
- * 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.
242
249
  *
243
250
  * @attribute `seek-offset` - The offset (in seconds) by which to seek forward (if positive) or backward (if negative).
244
251
  * @group Components
@@ -266,7 +273,7 @@ declare const TimeDisplay_base: {
266
273
  prototype: HTMLElement;
267
274
  } & Constructor<StateReceiverElement>;
268
275
  /**
269
- * A control that displays the current time of the stream.
276
+ * `<theoplayer-time-display>` - A control that displays the current time of the stream.
270
277
  *
271
278
  * @attribute `show-duration` - If set, also shows the duration of the stream.
272
279
  * @attribute `remaining` - If set, shows the remaining time of the stream. Not compatible with `show-duration`.
@@ -294,7 +301,7 @@ declare const DurationDisplay_base: {
294
301
  prototype: HTMLElement;
295
302
  } & Constructor<StateReceiverElement>;
296
303
  /**
297
- * A control that displays the duration of the stream.
304
+ * `<theoplayer-duration-display>` - A control that displays the duration of the stream.
298
305
  *
299
306
  * @group Components
300
307
  */
@@ -310,7 +317,7 @@ declare class DurationDisplay extends DurationDisplay_base {
310
317
  }
311
318
 
312
319
  /**
313
- * A button that can be checked.
320
+ * `<theoplayer-radio-button>` - A button that can be checked.
314
321
  *
315
322
  * When part of a {@link RadioGroup}, at most one button in the group can be checked.
316
323
  *
@@ -335,8 +342,12 @@ declare class RadioButton extends Button {
335
342
  attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
336
343
  }
337
344
 
345
+ declare const RadioGroup_base: {
346
+ new (): HTMLElement;
347
+ prototype: HTMLElement;
348
+ } & Constructor<StateReceiverElement>;
338
349
  /**
339
- * 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.
340
351
  *
341
352
  * ## Behavior
342
353
  * This radio group implements the [roving tabindex](https://www.w3.org/WAI/ARIA/apg/example-index/radio/radio.html) pattern.
@@ -348,12 +359,15 @@ declare class RadioButton extends Button {
348
359
  *
349
360
  * @group Components
350
361
  */
351
- declare class RadioGroup extends HTMLElement {
362
+ declare class RadioGroup extends RadioGroup_base {
352
363
  private _slot;
353
364
  private _radioButtons;
354
365
  constructor();
366
+ protected _upgradeProperty(prop: keyof this): void;
355
367
  connectedCallback(): void;
356
368
  disconnectedCallback(): void;
369
+ get deviceType(): DeviceType;
370
+ set deviceType(deviceType: DeviceType);
357
371
  private readonly _onSlotChange;
358
372
  private readonly _onKeyDown;
359
373
  get focusedRadioButton(): RadioButton | null;
@@ -376,7 +390,7 @@ interface MenuOptions {
376
390
  }
377
391
  declare function menuTemplate(heading: string, content: string, extraCss?: string): string;
378
392
  /**
379
- * 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.
380
394
  *
381
395
  * The menu has a heading at the top, with a {@link CloseMenuButton | close button} and a heading text.
382
396
  *
@@ -418,7 +432,7 @@ interface MenuGroupOptions {
418
432
  }
419
433
  declare function menuGroupTemplate(content: string, extraCss?: string): string;
420
434
  /**
421
- * A group of {@link Menu}s.
435
+ * `<theoplayer-menu-group>` - A group of {@link Menu}s.
422
436
  *
423
437
  * This can contain multiple other menus, which can be opened with {@link MenuGroup.openMenu}.
424
438
  * When a {@link MenuButton} in one menu opens another menu in this group, it is opened as a "submenu".
@@ -497,7 +511,7 @@ declare class MenuGroup extends HTMLElement {
497
511
  }
498
512
 
499
513
  /**
500
- * A menu button that opens a {@link Menu}.
514
+ * `<theoplayer-menu-button>` - A menu button that opens a {@link Menu}.
501
515
  *
502
516
  * @attribute `menu` - The ID of the menu to open.
503
517
  * @group Components
@@ -516,7 +530,7 @@ declare class MenuButton extends Button {
516
530
  }
517
531
 
518
532
  /**
519
- * A button that closes its parent menu.
533
+ * `<theoplayer-menu-close-button>` - A button that closes its parent menu.
520
534
  *
521
535
  * This button must be placed inside a {@link Menu | `<theoplayer-menu>`}.
522
536
  *
@@ -530,7 +544,9 @@ declare class CloseMenuButton extends Button {
530
544
  }
531
545
 
532
546
  /**
533
- * A radio button that shows the label of a given media track, and switches to that track when clicked.
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
+ *
534
550
  * @group Components
535
551
  */
536
552
  declare class MediaTrackRadioButton extends RadioButton {
@@ -554,7 +570,8 @@ declare const TrackRadioGroup_base: {
554
570
  prototype: HTMLElement;
555
571
  } & Constructor<StateReceiverElement>;
556
572
  /**
557
- * A radio group that shows a list of media or text tracks, from which the user can choose an active track.
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.
558
575
  *
559
576
  * @attribute `track-type` - The track type of the available tracks. Can be "audio", "video" or "subtitles".
560
577
  * @attribute `show-off` - If set, shows an "off" button to disable all tracks.
@@ -596,7 +613,7 @@ declare class TrackRadioGroup extends TrackRadioGroup_base {
596
613
  }
597
614
 
598
615
  /**
599
- * 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.
600
617
  *
601
618
  * @group Components
602
619
  */
@@ -616,7 +633,7 @@ declare class TextTrackRadioButton extends RadioButton {
616
633
  }
617
634
 
618
635
  /**
619
- * 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.
620
637
  *
621
638
  * @group Components
622
639
  */
@@ -648,7 +665,8 @@ declare const TextTrackStyleRadioGroup_base: {
648
665
  prototype: HTMLElement;
649
666
  } & Constructor<StateReceiverElement>;
650
667
  /**
651
- * A radio group that shows a list of values for a text track style option, from which the user can choose a desired value.
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.
652
670
  *
653
671
  * @attribute `property` - The property name of the text track style option. One of {@link TextTrackStyleOption}.
654
672
  * @slot {@link RadioButton} - The possible options for the text track style option.
@@ -689,7 +707,8 @@ declare const TextTrackStyleDisplay_base: {
689
707
  prototype: HTMLElement;
690
708
  } & Constructor<StateReceiverElement>;
691
709
  /**
692
- * Displays the value of a single text track style option in a human-readable format.
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.
693
712
  *
694
713
  * @attribute `property` - The property name of the text track style option. One of {@link TextTrackStyleOption}.
695
714
  * @group Components
@@ -713,7 +732,7 @@ declare class TextTrackStyleDisplay extends TextTrackStyleDisplay_base {
713
732
  }
714
733
 
715
734
  /**
716
- * 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.
717
736
  *
718
737
  * @group Components
719
738
  */
@@ -723,7 +742,7 @@ declare class TextTrackStyleMenu extends MenuGroup {
723
742
 
724
743
  declare const LanguageMenu_base: typeof MenuGroup & Constructor<StateReceiverElement>;
725
744
  /**
726
- * 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.
727
746
  *
728
747
  * @group Components
729
748
  */
@@ -740,7 +759,7 @@ declare class LanguageMenu extends LanguageMenu_base {
740
759
 
741
760
  declare const LanguageMenuButton_base: typeof MenuButton & Constructor<StateReceiverElement>;
742
761
  /**
743
- * A menu button that opens a {@link LanguageMenu}.
762
+ * `<theoplayer-language-menu-button>` - A menu button that opens a {@link LanguageMenu}.
744
763
  *
745
764
  * When there are no alternative audio languages or subtitles, this button automatically hides itself.
746
765
  *
@@ -761,7 +780,8 @@ declare const PlaybackRateRadioGroup_base: {
761
780
  prototype: HTMLElement;
762
781
  } & Constructor<StateReceiverElement>;
763
782
  /**
764
- * A radio group that shows a list of playback rates, from which the user can choose a desired playback rate.
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.
765
785
  *
766
786
  * @slot {@link RadioButton} - The possible options for the playback rate.
767
787
  * The value of each radio button must be a valid number.
@@ -790,7 +810,7 @@ declare class PlaybackRateRadioGroup extends PlaybackRateRadioGroup_base {
790
810
  }
791
811
 
792
812
  /**
793
- * 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}.
794
814
  *
795
815
  * @attribute menu - The ID of the playback rate menu.
796
816
  * @group Components
@@ -801,7 +821,7 @@ declare class PlaybackRateMenuButton extends MenuButton {
801
821
  }
802
822
 
803
823
  /**
804
- * 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.
805
825
  *
806
826
  * @group Components
807
827
  */
@@ -814,6 +834,8 @@ declare const PlaybackRateDisplay_base: {
814
834
  prototype: HTMLElement;
815
835
  } & Constructor<StateReceiverElement>;
816
836
  /**
837
+ * `<theoplayer-playback-rate-display>` - A control that displays the current playback rate of the player.
838
+ *
817
839
  * @group Components
818
840
  */
819
841
  declare class PlaybackRateDisplay extends PlaybackRateDisplay_base {
@@ -831,6 +853,8 @@ declare const ActiveQualityDisplay_base: {
831
853
  prototype: HTMLElement;
832
854
  } & Constructor<StateReceiverElement>;
833
855
  /**
856
+ * `<theoplayer-active-quality-display>` - A control that displays the name of the active video quality.
857
+ *
834
858
  * @group Components
835
859
  */
836
860
  declare class ActiveQualityDisplay extends ActiveQualityDisplay_base {
@@ -848,8 +872,8 @@ declare class ActiveQualityDisplay extends ActiveQualityDisplay_base {
848
872
  }
849
873
 
850
874
  /**
851
- * A radio button that shows the label of a given video quality, and switches the video track's
852
- * {@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.
853
877
  *
854
878
  * @group Components
855
879
  */
@@ -879,7 +903,8 @@ declare const QualityRadioGroup_base: {
879
903
  prototype: HTMLElement;
880
904
  } & Constructor<StateReceiverElement>;
881
905
  /**
882
- * A radio group that shows a list of available video qualities, from which the user can choose a desired target quality.
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.
883
908
  *
884
909
  * @group Components
885
910
  */
@@ -900,7 +925,7 @@ declare class QualityRadioGroup extends QualityRadioGroup_base {
900
925
 
901
926
  declare const TextTrackStyleResetButton_base: typeof Button & Constructor<StateReceiverElement>;
902
927
  /**
903
- * A button that resets the text track style.
928
+ * `<theoplayer-text-track-style-reset-button>` - A button that resets the text track style.
904
929
  *
905
930
  * @group Components
906
931
  */
@@ -914,7 +939,8 @@ declare class TextTrackStyleResetButton extends TextTrackStyleResetButton_base {
914
939
  }
915
940
 
916
941
  /**
917
- * A menu to change the settings of the player, such as the active video quality and the playback speed.
942
+ * `<theoplayer-settings-menu>` - A menu to change the settings of the player,
943
+ * such as the active video quality and the playback speed.
918
944
  *
919
945
  * @group Components
920
946
  */
@@ -923,7 +949,7 @@ declare class SettingsMenu extends MenuGroup {
923
949
  }
924
950
 
925
951
  /**
926
- * A menu button that opens a {@link SettingsMenu}.
952
+ * `<theoplayer-settings-menu-button>` - A menu button that opens a {@link SettingsMenu}.
927
953
  *
928
954
  * @attribute `menu` - The ID of the settings menu.
929
955
  * @group Components
@@ -935,7 +961,7 @@ declare class SettingsMenuButton extends MenuButton {
935
961
 
936
962
  declare const FullscreenButton_base: typeof Button & Constructor<StateReceiverElement>;
937
963
  /**
938
- * A button that toggles fullscreen.
964
+ * `<theoplayer-fullscreen-button>` - A button that toggles fullscreen.
939
965
  *
940
966
  * @group Components
941
967
  */
@@ -961,6 +987,10 @@ interface RangeOptions {
961
987
  template: HTMLTemplateElement;
962
988
  }
963
989
  declare function rangeTemplate(range: string, extraCss?: string): string;
990
+ declare const Range_base: {
991
+ new (): HTMLElement;
992
+ prototype: HTMLElement;
993
+ } & Constructor<StateReceiverElement>;
964
994
  /**
965
995
  * A slider to select a value from a range.
966
996
  *
@@ -969,7 +999,7 @@ declare function rangeTemplate(range: string, extraCss?: string): string;
969
999
  *
970
1000
  * @group Components
971
1001
  */
972
- declare abstract class Range extends HTMLElement {
1002
+ declare abstract class Range extends Range_base {
973
1003
  static get observedAttributes(): Attribute[];
974
1004
  protected readonly _rangeEl: HTMLInputElement;
975
1005
  protected readonly _pointerEl: HTMLElement;
@@ -1007,6 +1037,8 @@ declare abstract class Range extends HTMLElement {
1007
1037
  */
1008
1038
  get step(): number | 'any';
1009
1039
  set step(step: number | 'any');
1040
+ get deviceType(): DeviceType;
1041
+ set deviceType(deviceType: DeviceType);
1010
1042
  attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1011
1043
  private readonly _onInput;
1012
1044
  protected handleInput(): void;
@@ -1033,6 +1065,8 @@ declare abstract class Range extends HTMLElement {
1033
1065
  protected getBarColors(): ColorStops;
1034
1066
  private readonly _updatePointerBar;
1035
1067
  protected updatePointer_(mousePercent: number, rangeRect: DOMRectReadOnly): void;
1068
+ private readonly _onKeyDown;
1069
+ protected handleKeyDown_(e: KeyboardEvent): void;
1036
1070
  }
1037
1071
 
1038
1072
  declare const PreviewThumbnail_base: {
@@ -1040,7 +1074,8 @@ declare const PreviewThumbnail_base: {
1040
1074
  prototype: HTMLElement;
1041
1075
  } & Constructor<StateReceiverElement>;
1042
1076
  /**
1043
- * A display that shows the thumbnail image at the current preview time of a {@link TimeRange | `<theoplayer-time-range>`}.
1077
+ * `<theoplayer-preview-thumbnail>` - A display that shows the thumbnail image at the current preview time
1078
+ * of a {@link TimeRange | `<theoplayer-time-range>`}.
1044
1079
  *
1045
1080
  * The first `metadata` text track whose label equals `"thumbnails"` is used as source for the thumbnails.
1046
1081
  * This track is expected to contain cues whose content is the URL for the thumbnail image.
@@ -1077,7 +1112,7 @@ declare const PreviewTimeDisplay_base: {
1077
1112
  prototype: HTMLElement;
1078
1113
  } & Constructor<StateReceiverElement>;
1079
1114
  /**
1080
- * 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>`}.
1081
1116
  *
1082
1117
  * @attribute `remaining` - If set, shows the remaining time of the stream.
1083
1118
  * @attribute `remaining-when-live` - If set, and the stream is a livestream, shows the remaining time
@@ -1104,7 +1139,8 @@ declare class PreviewTimeDisplay extends PreviewTimeDisplay_base {
1104
1139
 
1105
1140
  declare const TimeRange_base: typeof Range & Constructor<StateReceiverElement>;
1106
1141
  /**
1107
- * A seek bar, showing the current time of the player, and which seeks the player when clicked or dragged.
1142
+ * `<theoplayer-time-range>` - A seek bar, showing the current time of the player,
1143
+ * and which seeks the player when clicked or dragged.
1108
1144
  *
1109
1145
  * @slot `preview` - A slot holding a preview of the seek time, shown while hovering the seek bar.
1110
1146
  * By default, this shows the {@link PreviewTimeDisplay | preview time} and
@@ -1142,11 +1178,13 @@ declare class TimeRange extends TimeRange_base {
1142
1178
  protected updatePointer_(mousePercent: number, rangeRect: DOMRectReadOnly): void;
1143
1179
  protected getBarColors(): ColorStops;
1144
1180
  private readonly _onAdChange;
1181
+ protected handleKeyDown_(e: KeyboardEvent): void;
1145
1182
  }
1146
1183
 
1147
1184
  declare const VolumeRange_base: typeof Range & Constructor<StateReceiverElement>;
1148
1185
  /**
1149
- * A volume slider, showing the current audio volume of the player, and which changes the volume when clicked or dragged.
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.
1150
1188
  *
1151
1189
  * @group Components
1152
1190
  */
@@ -1166,7 +1204,7 @@ declare const ErrorDisplay_base: {
1166
1204
  prototype: HTMLElement;
1167
1205
  } & Constructor<StateReceiverElement>;
1168
1206
  /**
1169
- * 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.
1170
1208
  *
1171
1209
  * @group Components
1172
1210
  */
@@ -1190,7 +1228,7 @@ declare class ErrorDisplay extends ErrorDisplay_base {
1190
1228
  /**
1191
1229
  * A generic button to start and stop casting.
1192
1230
  *
1193
- * For a concrete implementation, see {@link ChromecastButton}.
1231
+ * For a concrete implementation, see {@link ChromecastButton} and {@link AirPlayButton}.
1194
1232
  * @group Components
1195
1233
  */
1196
1234
  declare class CastButton extends Button {
@@ -1214,7 +1252,7 @@ declare class CastButton extends Button {
1214
1252
 
1215
1253
  declare const ChromecastButton_base: typeof CastButton & Constructor<StateReceiverElement>;
1216
1254
  /**
1217
- * A button to start and stop casting using Chromecast.
1255
+ * `<theoplayer-chromecast-button>` - A button to start and stop casting using Chromecast.
1218
1256
  *
1219
1257
  * @group Components
1220
1258
  */
@@ -1233,7 +1271,7 @@ declare const ChromecastDisplay_base: {
1233
1271
  prototype: HTMLElement;
1234
1272
  } & Constructor<StateReceiverElement>;
1235
1273
  /**
1236
- * A control that displays the casting status while using Chromecast.
1274
+ * `<theoplayer-chromecast-display>` - A control that displays the casting status while using Chromecast.
1237
1275
  *
1238
1276
  * @group Components
1239
1277
  */
@@ -1250,7 +1288,7 @@ declare class ChromecastDisplay extends ChromecastDisplay_base {
1250
1288
 
1251
1289
  declare const AirPlayButton_base: typeof CastButton & Constructor<StateReceiverElement>;
1252
1290
  /**
1253
- * A button to start and stop casting using AirPlay.
1291
+ * `<theoplayer-airplay-button>` - A button to start and stop casting using AirPlay.
1254
1292
  *
1255
1293
  * @group Components
1256
1294
  */
@@ -1269,7 +1307,7 @@ declare const LoadingIndicator_base: {
1269
1307
  prototype: HTMLElement;
1270
1308
  } & Constructor<StateReceiverElement>;
1271
1309
  /**
1272
- * 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.
1273
1311
  *
1274
1312
  * @attribute `loading` (readonly) - Whether the player is waiting for more data. If set, the indicator is shown.
1275
1313
  * @group Components
@@ -1291,7 +1329,7 @@ declare const GestureReceiver_base: {
1291
1329
  prototype: HTMLElement;
1292
1330
  } & Constructor<StateReceiverElement>;
1293
1331
  /**
1294
- * An overlay that receives and handles gestures on the player.
1332
+ * `<theoplayer-gesture-receiver>` - An overlay that receives and handles gestures on the player.
1295
1333
  *
1296
1334
  * On desktop devices, this plays or pauses the player whenever it is clicked.
1297
1335
  * On mobile devices, this currently does nothing.
@@ -1314,7 +1352,8 @@ declare class GestureReceiver extends GestureReceiver_base {
1314
1352
 
1315
1353
  declare const LiveButton_base: typeof Button & Constructor<StateReceiverElement>;
1316
1354
  /**
1317
- * A button that shows whether the player is currently playing at the live point, and seeks to the live point when clicked.
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.
1318
1357
  *
1319
1358
  * @attribute `live-threshold` - The maximum distance (in seconds) from the live point that the player's current time
1320
1359
  * can be for it to still be considered "at the live point". If unset, defaults to 10 seconds.
@@ -1423,7 +1462,7 @@ declare enum ExtensionSlot {
1423
1462
  }
1424
1463
 
1425
1464
  /**
1426
- * A default UI for THEOplayer.
1465
+ * `<theoplayer-default-ui>` - A default UI for THEOplayer.
1427
1466
  *
1428
1467
  * This default UI provides a great player experience out-of-the-box, that works well on all types of devices
1429
1468
  * and for all types of streams. It provides all the common playback controls for playing, seeking,
@@ -1448,8 +1487,10 @@ declare enum ExtensionSlot {
1448
1487
  * @attribute `fluid` - If set, the player automatically adjusts its height to fit the video's aspect ratio.
1449
1488
  * @attribute `muted` - If set, the player starts out as muted. Reflects `ui.player.muted`.
1450
1489
  * @attribute `autoplay` - If set, the player attempts to automatically start playing (if allowed).
1451
- * @attribute `mobile` - Whether to use a mobile-optimized UI layout instead.
1452
- * Can be used in CSS to show/hide certain desktop-specific or mobile-specific UI controls.
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"`.
1453
1494
  * @attribute `stream-type` - The stream type, either "vod", "live" or "dvr".
1454
1495
  * Can be used to show/hide certain UI controls specific for livestreams, such as
1455
1496
  * a {@link LiveButton | `<theoplayer-live-button>`}.
@@ -1570,7 +1611,7 @@ type Extension = (ui: DefaultUI) => void;
1570
1611
  declare function registerExtension(extension: Extension): void;
1571
1612
 
1572
1613
  /**
1573
- * The container element for a THEOplayer UI.
1614
+ * `<theoplayer-ui>` - The container element for a THEOplayer UI.
1574
1615
  *
1575
1616
  * This element provides a basic layout structure for a general player UI, and handles the creation and management
1576
1617
  * of a {@link theoplayer!ChromelessPlayer | THEOplayer player instance} for this UI.
@@ -1596,8 +1637,10 @@ declare function registerExtension(extension: Extension): void;
1596
1637
  * @attribute `fluid` - If set, the player automatically adjusts its height to fit the video's aspect ratio.
1597
1638
  * @attribute `muted` - If set, the player starts out as muted. Reflects `ui.player.muted`.
1598
1639
  * @attribute `autoplay` - If set, the player attempts to automatically start playing (if allowed).
1599
- * @attribute `mobile` - Whether to use a mobile-optimized UI layout instead.
1600
- * Can be used in CSS to show/hide certain desktop-specific or mobile-specific UI controls.
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"`.
1601
1644
  * @attribute `stream-type` - The stream type, either "vod", "live" or "dvr".
1602
1645
  * Can be used to show/hide certain UI controls specific for livestreams, such as
1603
1646
  * a {@link LiveButton | `<theoplayer-live-button>`}.
@@ -1715,6 +1758,10 @@ declare class UIContainer extends HTMLElement {
1715
1758
  */
1716
1759
  get userIdleTimeout(): number;
1717
1760
  set userIdleTimeout(value: number);
1761
+ /**
1762
+ * The device type, either "desktop", "mobile" or "tv".
1763
+ */
1764
+ get deviceType(): DeviceType;
1718
1765
  /**
1719
1766
  * The stream type, either "vod", "live" or "dvr".
1720
1767
  *
@@ -1769,6 +1816,7 @@ declare class UIContainer extends HTMLElement {
1769
1816
  private readonly setUserIdle_;
1770
1817
  private readonly scheduleUserIdle_;
1771
1818
  private isPlayerOrMedia_;
1819
+ private readonly _onTvKeyDown;
1772
1820
  private readonly _onKeyUp;
1773
1821
  private readonly _onPointerUp;
1774
1822
  private readonly _onClickAfterPointerUp;
@@ -1779,5 +1827,5 @@ declare class UIContainer extends HTMLElement {
1779
1827
  private readonly _onPreviewTimeChange;
1780
1828
  }
1781
1829
 
1782
- 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 };
1783
1831
  export as namespace THEOplayerUI;