@theoplayer/web-ui 1.15.0 → 2.0.0-beta.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.
@@ -1,17 +1,20 @@
1
1
  /*!
2
- * THEOplayer Open Video UI for Web (v1.15.0)
2
+ * THEOplayer Open Video UI for Web (v2.0.0-beta.0)
3
3
  * License: MIT
4
4
  */
5
- import { ChromelessPlayer, VideoQuality, THEOplayerError, MediaTrack, TextTrack, TextTracksList, EdgeStyle, VendorCast, CastState, UIPlayerConfiguration, SourceDescription } from 'theoplayer/chromeless';
5
+ import * as lit from 'lit';
6
+ import { LitElement, HTMLTemplateResult, TemplateResult, PropertyValues } from 'lit';
7
+ import { ChromelessPlayer, MediaTrack, TextTrack, TextTracksList, EdgeStyle, VideoQuality, THEOplayerError, VendorCast, CastState, UIPlayerConfiguration, SourceDescription } from 'theoplayer/chromeless';
8
+ import * as lit_html from 'lit-html';
9
+ import { Ref } from 'lit/directives/ref.js';
6
10
 
7
11
  /**
8
- * `<theoplayer-control-bar>` - A horizontal control bar that can contain other controls.
9
- *
10
- * @group Components
12
+ * A horizontal control bar that can contain other controls.
11
13
  */
12
- declare class ControlBar extends HTMLElement {
13
- constructor();
14
- connectedCallback(): void;
14
+ declare class ControlBar extends LitElement {
15
+ static styles: lit.CSSResult[];
16
+ static shadowRootOptions: ShadowRootInit;
17
+ protected render(): HTMLTemplateResult;
15
18
  }
16
19
  declare global {
17
20
  interface HTMLElementTagNameMap {
@@ -19,87 +22,33 @@ declare global {
19
22
  }
20
23
  }
21
24
 
22
- declare enum Attribute {
23
- CONFIGURATION = "configuration",
24
- SOURCE = "source",
25
- AUTOPLAY = "autoplay",
26
- MUTED = "muted",
27
- FULLSCREEN = "fullscreen",
28
- FULLWINDOW = "fullwindow",
29
- FLUID = "fluid",
30
- DEVICE_TYPE = "device-type",
31
- MOBILE = "mobile",
32
- TV = "tv",
33
- TV_FOCUS = "tv-focus",
34
- MOBILE_ONLY = "mobile-only",
35
- MOBILE_HIDDEN = "mobile-hidden",
36
- TV_ONLY = "tv-only",
37
- TV_HIDDEN = "tv-hidden",
38
- USER_IDLE = "user-idle",
39
- USER_IDLE_TIMEOUT = "user-idle-timeout",
40
- NO_AUTO_HIDE = "no-auto-hide",
41
- DISABLED = "disabled",
42
- INERT = "inert",
43
- HIDDEN = "hidden",
44
- PAUSED = "paused",
45
- ENDED = "ended",
46
- VOLUME_LEVEL = "volume-level",
47
- CASTING = "casting",
48
- LOADING = "loading",
49
- STREAM_TYPE = "stream-type",
50
- LIVE = "live",
51
- LIVE_ONLY = "live-only",
52
- LIVE_HIDDEN = "live-hidden",
53
- LIVE_THRESHOLD = "live-threshold",
54
- DVR_THRESHOLD = "dvr-threshold",
55
- REMAINING = "remaining",
56
- REMAINING_WHEN_LIVE = "remaining-when-live",
57
- SHOW_DURATION = "show-duration",
58
- SEEK_OFFSET = "seek-offset",
59
- MENU = "menu",
60
- MENU_OPENED = "menu-opened",
61
- MENU_CLOSE_ON_INPUT = "menu-close-on-input",
62
- ARIA_LABEL = "aria-label",
63
- ARIA_LIVE = "aria-live",
64
- ARIA_CHECKED = "aria-checked",
65
- HAS_AUDIO = "has-audio",
66
- HAS_SUBTITLES = "has-subtitles",
67
- HAS_ERROR = "has-error",
68
- HAS_FIRST_PLAY = "has-first-play",
69
- HAS_TITLE = "has-title",
70
- CAST_STATE = "cast-state",
71
- TRACK_TYPE = "track-type",
72
- SHOW_OFF = "show-off",
73
- PLAYING_AD = "playing-ad",
74
- SHOW_AD_MARKERS = "show-ad-markers",
75
- CLICKTHROUGH = "clickthrough",
76
- PROPERTY = "property",
77
- VALUE = "value"
78
- }
79
-
25
+ /** @deprecated */
80
26
  interface ButtonOptions {
81
- template: HTMLTemplateElement;
27
+ /**
28
+ * @deprecated Override {@link Button.render} instead.
29
+ */
30
+ template?: HTMLTemplateElement;
82
31
  }
32
+ /**
33
+ * @deprecated Override {@link Button.render} instead.
34
+ */
83
35
  declare function buttonTemplate(button: string, extraCss?: string): string;
84
36
  /**
85
- * `<theoplayer-button>` - A basic button.
37
+ * A basic button.
86
38
  *
87
39
  * @attribute `disabled` - Whether the button is disabled. When disabled, the button cannot be clicked.
88
- * @group Components
89
40
  */
90
- declare class Button extends HTMLElement {
91
- static get observedAttributes(): Attribute[];
41
+ declare class Button extends LitElement {
42
+ static styles: lit.CSSResult[];
43
+ private readonly _template;
44
+ private _disabled;
92
45
  /**
93
46
  * Creates a basic button.
94
47
  *
95
48
  * By default, the button renders the contents of its direct children (i.e. it has a single unnamed `<slot>`).
96
- * Subclasses can override this by passing a different {@link ButtonOptions.template} in the options,
97
- * using {@link buttonTemplate} to correctly style the custom template.
98
- *
99
- * @param options - The options for this button.
49
+ * Subclasses can override this by overriding {@link render}.
100
50
  */
101
51
  constructor(options?: ButtonOptions);
102
- protected _upgradeProperty(prop: keyof this): void;
103
52
  connectedCallback(): void;
104
53
  disconnectedCallback(): void;
105
54
  /**
@@ -108,13 +57,13 @@ declare class Button extends HTMLElement {
108
57
  * When disabled, the button cannot be clicked.
109
58
  */
110
59
  get disabled(): boolean;
111
- set disabled(disabled: boolean);
112
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
60
+ set disabled(value: boolean);
113
61
  private _enable;
114
62
  private _disable;
115
63
  private readonly _onClick;
116
64
  protected readonly _onKeyDown: (e: KeyboardEvent) => void;
117
65
  protected readonly _onKeyUp: (e: KeyboardEvent) => void;
66
+ protected render(): HTMLTemplateResult;
118
67
  /**
119
68
  * Handle a button click.
120
69
  *
@@ -128,33 +77,37 @@ declare global {
128
77
  }
129
78
  }
130
79
 
80
+ /**
81
+ * @deprecated Override {@link LinkButton.render} instead.
82
+ */
131
83
  declare function linkButtonTemplate(button: string, extraCss?: string): string;
132
84
  /**
133
- * `<theoplayer-link-button>` - A {@link Button | button} that opens a hyperlink.
85
+ * A {@link Button | button} that opens a hyperlink.
134
86
  *
135
87
  * @attribute `disabled` - Whether the button is disabled. When disabled, the button cannot be clicked.
136
- * @group Components
137
88
  */
138
- declare class LinkButton extends HTMLElement {
139
- private readonly _linkEl;
140
- static get observedAttributes(): Attribute[];
89
+ declare class LinkButton extends LitElement {
90
+ static styles: lit.CSSResult[];
91
+ private readonly _template;
92
+ private _disabled;
93
+ private readonly _linkRef;
141
94
  constructor(options?: ButtonOptions);
142
- protected _upgradeProperty(prop: keyof this): void;
143
95
  connectedCallback(): void;
144
- disconnectedCallback(): void;
145
96
  /**
146
97
  * Whether the button is disabled.
147
98
  *
148
99
  * When disabled, the button cannot be clicked.
149
100
  */
150
101
  get disabled(): boolean;
151
- set disabled(disabled: boolean);
152
- protected setLink(href: string, target: string): void;
153
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
102
+ set disabled(value: boolean);
103
+ protected accessor href: string;
104
+ protected accessor target: string;
154
105
  private _enable;
155
106
  private _disable;
156
107
  private readonly _onKeyDown;
157
108
  private readonly _onClick;
109
+ protected render(): HTMLTemplateResult;
110
+ protected renderLinkContent(): HTMLTemplateResult;
158
111
  protected handleClick(): void;
159
112
  }
160
113
  declare global {
@@ -163,71 +116,18 @@ declare global {
163
116
  }
164
117
  }
165
118
 
166
- type Constructor<T> = abstract new (...args: any[]) => T;
167
-
168
- type DeviceType = 'desktop' | 'mobile' | 'tv';
169
-
170
- type StreamType = 'vod' | 'live' | 'dvr';
171
-
172
- /** @internal */
173
- declare const StateReceiverProps: "theoplayerUiObservedProperties";
174
- interface StateReceiverPropertyMap {
175
- player: ChromelessPlayer | undefined;
176
- fullscreen: boolean;
177
- deviceType: DeviceType;
178
- streamType: StreamType;
179
- playbackRate: number;
180
- activeVideoQuality: VideoQuality | undefined;
181
- targetVideoQualities: VideoQuality[] | undefined;
182
- error: THEOplayerError | undefined;
183
- previewTime: number;
184
- }
185
119
  /**
186
- * A custom element that automatically receives selected state updates
187
- * from an ancestor {@link UIContainer | `<theoplayer-ui>`} element.
188
- *
189
- * Do not implement this interface directly, instead use {@link StateReceiverMixin}.
190
- *
191
- * @see {@link StateReceiverMixin}
192
- */
193
- interface StateReceiverElement extends Partial<StateReceiverPropertyMap>, Element {
194
- /**
195
- * The names of the properties this element will receive.
196
- */
197
- readonly [StateReceiverProps]: Array<keyof StateReceiverPropertyMap>;
198
- }
199
- /**
200
- * A [mixin class](https://www.typescriptlang.org/docs/handbook/mixins.html) to apply on the superclass of a custom element,
201
- * such that it will automatically receive selected state updates from an ancestor {@link UIContainer | `<theoplayer-ui>`} element.
202
- *
203
- * For each property name in `props`, the custom element *MUST* implement a corresponding property with a setter.
204
- * For example, if `props` equals `["player", "fullscreen"]`, then the element must have writable `player` and `fullscreen`
205
- * properties.
206
- *
207
- * @param base - The superclass for the new element class.
208
- * @param props - The names of the properties this element will receive.
209
- * @returns A class constructor that extends `base` and implements {@link StateReceiverElement}.
210
- * @see {@link StateReceiverElement}
211
- */
212
- declare function StateReceiverMixin<T extends Constructor<Element>>(base: T, props: Array<keyof StateReceiverPropertyMap>): T & Constructor<StateReceiverElement>;
213
-
214
- declare const PlayButton_base: typeof Button & Constructor<StateReceiverElement>;
215
- /**
216
- * `<theoplayer-play-button>` - A button that toggles whether the player is playing or paused.
120
+ * A button that toggles whether the player is playing or paused.
217
121
  *
218
122
  * @attribute `paused` (readonly) - Whether the player is paused. Reflects `ui.player.paused`.
219
123
  * @attribute `ended` (readonly) - Whether the player is ended. Reflects `ui.player.ended`.
220
- * @group Components
221
124
  */
222
- declare class PlayButton extends PlayButton_base {
223
- static get observedAttributes(): Attribute[];
125
+ declare class PlayButton extends Button {
126
+ static styles: lit.CSSResult[];
224
127
  private _player;
225
- constructor();
226
128
  connectedCallback(): void;
227
- get paused(): boolean;
228
- set paused(paused: boolean);
229
- get ended(): boolean;
230
- set ended(ended: boolean);
129
+ accessor paused: boolean;
130
+ accessor ended: boolean;
231
131
  get player(): ChromelessPlayer | undefined;
232
132
  set player(player: ChromelessPlayer | undefined);
233
133
  private readonly _onPlay;
@@ -238,6 +138,7 @@ declare class PlayButton extends PlayButton_base {
238
138
  protected handleClick(): void;
239
139
  attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
240
140
  private _updateAriaLabel;
141
+ protected render(): HTMLTemplateResult;
241
142
  }
242
143
  declare global {
243
144
  interface HTMLElementTagNameMap {
@@ -246,29 +147,27 @@ declare global {
246
147
  }
247
148
 
248
149
  type VolumeLevel = 'off' | 'low' | 'high';
249
- declare const MuteButton_base: typeof Button & Constructor<StateReceiverElement>;
250
150
  /**
251
- * `<theoplayer-mute-button>` - A button that toggles whether audio is muted or not.
151
+ * A button that toggles whether audio is muted or not.
252
152
  *
253
153
  * @attribute `volume-level` (readonly) - The volume level of the player.
254
154
  * Can be "off" (muted), "low" (volume < 50%) or "high" (volume >= 50%).
255
- * @group Components
256
155
  */
257
- declare class MuteButton extends MuteButton_base {
258
- static get observedAttributes(): Attribute[];
156
+ declare class MuteButton extends Button {
157
+ static styles: lit.CSSResult[];
259
158
  private _player;
260
- constructor();
261
159
  connectedCallback(): void;
262
160
  /**
263
161
  * The volume level of the player.
264
162
  */
265
- get volumeLevel(): VolumeLevel;
163
+ accessor volumeLevel: VolumeLevel;
266
164
  get player(): ChromelessPlayer | undefined;
267
165
  set player(player: ChromelessPlayer | undefined);
268
166
  private readonly _updateFromPlayer;
269
167
  protected handleClick(): void;
270
168
  attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
271
169
  private _updateAriaLabel;
170
+ protected render(): HTMLTemplateResult;
272
171
  }
273
172
  declare global {
274
173
  interface HTMLElementTagNameMap {
@@ -276,29 +175,25 @@ declare global {
276
175
  }
277
176
  }
278
177
 
279
- declare const SeekButton_base: typeof Button & Constructor<StateReceiverElement>;
280
178
  /**
281
- * `<theoplayer-seek-button>` - A button that seeks forward or backward by a fixed offset.
179
+ * A button that seeks forward or backward by a fixed offset.
282
180
  *
283
181
  * @attribute `seek-offset` - The offset (in seconds) by which to seek forward (if positive) or backward (if negative).
284
- * @group Components
285
182
  */
286
- declare class SeekButton extends SeekButton_base {
287
- static get observedAttributes(): Attribute[];
183
+ declare class SeekButton extends Button {
184
+ static styles: lit.CSSResult[];
288
185
  private _player;
289
- private _offsetEl;
290
- constructor();
291
186
  connectedCallback(): void;
292
187
  /**
293
188
  * The offset (in seconds) by which to seek forward (if positive) or backward (if negative).
294
189
  */
295
- get seekOffset(): number;
296
- set seekOffset(value: number);
190
+ accessor seekOffset: number;
297
191
  get player(): ChromelessPlayer | undefined;
298
192
  set player(player: ChromelessPlayer | undefined);
299
193
  protected handleClick(): void;
300
194
  attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
301
195
  private _updateAriaLabel;
196
+ protected render(): lit_html.TemplateResult<1>;
302
197
  }
303
198
  declare global {
304
199
  interface HTMLElementTagNameMap {
@@ -306,32 +201,31 @@ declare global {
306
201
  }
307
202
  }
308
203
 
309
- declare const TimeDisplay_base: {
310
- new (): HTMLElement;
311
- prototype: HTMLElement;
312
- } & Constructor<StateReceiverElement>;
204
+ type StreamType = 'vod' | 'live' | 'dvr';
205
+
313
206
  /**
314
- * `<theoplayer-time-display>` - A control that displays the current time of the stream.
207
+ * A control that displays the current time of the stream.
315
208
  *
316
209
  * @attribute `show-duration` - If set, also shows the duration of the stream.
317
210
  * @attribute `remaining` - If set, shows the remaining time of the stream. Not compatible with `show-duration`.
318
211
  * @attribute `remaining-when-live` - If set, and the stream is a livestream, shows the remaining time
319
212
  * (until the live point) of the stream.
320
- * @group Components
321
213
  */
322
- declare class TimeDisplay extends TimeDisplay_base {
323
- private readonly _spanEl;
214
+ declare class TimeDisplay extends LitElement {
215
+ static styles: lit.CSSResult[];
324
216
  private _player;
325
- static get observedAttributes(): Attribute[];
326
- constructor();
327
- protected _upgradeProperty(prop: keyof this): void;
328
217
  connectedCallback(): void;
329
218
  get player(): ChromelessPlayer | undefined;
330
219
  set player(player: ChromelessPlayer | undefined);
331
- get streamType(): StreamType;
332
- set streamType(streamType: StreamType);
220
+ accessor remaining: boolean;
221
+ accessor remainingWhenLive: boolean;
222
+ accessor showDuration: boolean;
223
+ accessor streamType: StreamType;
224
+ private accessor _currentTime;
225
+ private accessor _duration;
226
+ private accessor _endTime;
333
227
  private readonly _updateFromPlayer;
334
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
228
+ protected render(): HTMLTemplateResult;
335
229
  }
336
230
  declare global {
337
231
  interface HTMLElementTagNameMap {
@@ -339,24 +233,21 @@ declare global {
339
233
  }
340
234
  }
341
235
 
342
- declare const DurationDisplay_base: {
343
- new (): HTMLElement;
344
- prototype: HTMLElement;
345
- } & Constructor<StateReceiverElement>;
346
236
  /**
347
- * `<theoplayer-duration-display>` - A control that displays the duration of the stream.
348
- *
349
- * @group Components
237
+ * A control that displays the duration of the stream.
350
238
  */
351
- declare class DurationDisplay extends DurationDisplay_base {
352
- private readonly _spanEl;
239
+ declare class DurationDisplay extends LitElement {
240
+ static styles: lit.CSSResult[];
353
241
  private _player;
354
- constructor();
355
- protected _upgradeProperty(prop: keyof this): void;
356
242
  connectedCallback(): void;
357
243
  get player(): ChromelessPlayer | undefined;
358
244
  set player(player: ChromelessPlayer | undefined);
245
+ /**
246
+ * The current duration.
247
+ */
248
+ accessor duration: number;
359
249
  private readonly _updateFromPlayer;
250
+ protected render(): lit_html.TemplateResult<1>;
360
251
  }
361
252
  declare global {
362
253
  interface HTMLElementTagNameMap {
@@ -365,16 +256,12 @@ declare global {
365
256
  }
366
257
 
367
258
  /**
368
- * `<theoplayer-radio-button>` - A button that can be checked.
259
+ * A button that can be checked.
369
260
  *
370
261
  * When part of a {@link RadioGroup}, at most one button in the group can be checked.
371
- *
372
- * @group Components
373
262
  */
374
263
  declare class RadioButton extends Button {
375
- static get observedAttributes(): Attribute[];
376
- private _value;
377
- constructor(options?: ButtonOptions);
264
+ private _checked;
378
265
  connectedCallback(): void;
379
266
  /**
380
267
  * Whether this radio button is checked.
@@ -384,10 +271,9 @@ declare class RadioButton extends Button {
384
271
  /**
385
272
  * The value associated with this radio button.
386
273
  */
387
- get value(): any;
388
- set value(value: any);
274
+ accessor value: any;
389
275
  protected handleClick(): void;
390
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
276
+ protected handleChange(): void;
391
277
  }
392
278
  declare global {
393
279
  interface HTMLElementTagNameMap {
@@ -395,12 +281,10 @@ declare global {
395
281
  }
396
282
  }
397
283
 
398
- declare const RadioGroup_base: {
399
- new (): HTMLElement;
400
- prototype: HTMLElement;
401
- } & Constructor<StateReceiverElement>;
284
+ type DeviceType = 'desktop' | 'mobile' | 'tv';
285
+
402
286
  /**
403
- * `<theoplayer-radio-group>` - A group of {@link RadioButton}s. At most one button in the group can be checked.
287
+ * A group of {@link RadioButton}s. At most one button in the group can be checked.
404
288
  *
405
289
  * ## Behavior
406
290
  * This radio group implements the [roving tabindex](https://www.w3.org/WAI/ARIA/apg/example-index/radio/radio.html) pattern.
@@ -409,18 +293,22 @@ declare const RadioGroup_base: {
409
293
  * - `Down`/`Right` arrow moves focus to the next radio button.
410
294
  * - `Home` moves focus to the first radio button.
411
295
  * - `End` moves focus to the last radio button.
412
- *
413
- * @group Components
414
296
  */
415
- declare class RadioGroup extends RadioGroup_base {
416
- private _slot;
297
+ declare class RadioGroup extends LitElement {
298
+ private readonly _slotRef;
417
299
  private _radioButtons;
300
+ private _value;
418
301
  constructor();
419
- protected _upgradeProperty(prop: keyof this): void;
420
302
  connectedCallback(): void;
421
303
  disconnectedCallback(): void;
422
- get deviceType(): DeviceType;
423
- set deviceType(deviceType: DeviceType);
304
+ protected firstUpdated(): void;
305
+ protected createRenderRoot(): HTMLElement | DocumentFragment;
306
+ accessor deviceType: DeviceType;
307
+ /**
308
+ * The selected value.
309
+ */
310
+ get value(): any;
311
+ set value(value: any);
424
312
  private readonly _onSlotChange;
425
313
  private readonly _onKeyDown;
426
314
  get focusedRadioButton(): RadioButton | null;
@@ -432,10 +320,12 @@ declare class RadioGroup extends RadioGroup_base {
432
320
  private _nextRadioButton;
433
321
  private _focusPrevButton;
434
322
  private _focusNextButton;
435
- setFocusedRadioButton(button: RadioButton | null): void;
323
+ private setFocusedRadioButton;
436
324
  private _unfocusAll;
437
- setCheckedRadioButton(checkedButton: RadioButton | null): void;
325
+ private setCheckedRadioButton;
326
+ private updateCheckedButton;
438
327
  private readonly _onButtonChange;
328
+ protected render(): HTMLTemplateResult;
439
329
  }
440
330
  declare global {
441
331
  interface HTMLElementTagNameMap {
@@ -443,12 +333,19 @@ declare global {
443
333
  }
444
334
  }
445
335
 
336
+ /** @deprecated */
446
337
  interface MenuOptions {
338
+ /**
339
+ * @deprecated Override {@link Menu.render} instead.
340
+ */
447
341
  template?: HTMLTemplateElement;
448
342
  }
343
+ /**
344
+ * @deprecated Override {@link Menu.render} instead.
345
+ */
449
346
  declare function menuTemplate(heading: string, content: string, extraCss?: string): string;
450
347
  /**
451
- * `<theoplayer-menu>` - A menu that can be opened on top of the player.
348
+ * A menu that can be opened on top of the player.
452
349
  *
453
350
  * The menu has a heading at the top, with a {@link CloseMenuButton | close button} and a heading text.
454
351
  *
@@ -457,31 +354,27 @@ declare function menuTemplate(heading: string, content: string, extraCss?: strin
457
354
  * @attribute `menu-opened` (readonly) - Whether the menu is currently open.
458
355
  *
459
356
  * @slot `heading` - A slot for the menu's heading.
460
- *
461
- * @group Components
462
357
  */
463
- declare class Menu extends HTMLElement {
464
- static get observedAttributes(): Attribute[];
465
- private readonly _contentEl;
358
+ declare class Menu extends LitElement {
359
+ static styles: lit.CSSResult[];
360
+ static shadowRootOptions: ShadowRootInit;
361
+ private readonly _template;
362
+ private _menuOpened;
466
363
  /**
467
364
  * Creates a menu.
468
365
  *
469
366
  * By default, the button has an unnamed `<slot>` for its contents, and a named `"heading"` `<slot>` for its heading text.
470
- * Subclasses can override this by passing a different {@link MenuOptions.template} in the options,
471
- * using {@link menuTemplate} to correctly style the custom template.
472
- *
473
- * @param options - The options for this menu.
367
+ * Subclasses can override this by overriding {@link renderMenuHeading} and/or {@link renderMenuContent}.
474
368
  */
475
369
  constructor(options?: MenuOptions);
476
- protected _upgradeProperty(prop: keyof this): void;
477
370
  connectedCallback(): void;
478
- disconnectedCallback(): void;
479
371
  /**
480
372
  * Whether to automatically close the menu whenever one of its controls
481
373
  * receives an input (e.g. when a radio button is clicked).
482
374
  */
483
- get closeOnInput(): boolean;
484
- set closeOnInput(value: boolean);
375
+ accessor closeOnInput: boolean;
376
+ private get menuOpened_();
377
+ private set menuOpened_(value);
485
378
  /**
486
379
  * Open the menu.
487
380
  */
@@ -490,8 +383,10 @@ declare class Menu extends HTMLElement {
490
383
  * Close the menu.
491
384
  */
492
385
  closeMenu(): void;
493
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
494
386
  private readonly _onContentInput;
387
+ protected render(): HTMLTemplateResult;
388
+ protected renderMenuHeading(): HTMLTemplateResult;
389
+ protected renderMenuContent(): HTMLTemplateResult;
495
390
  }
496
391
  declare global {
497
392
  interface HTMLElementTagNameMap {
@@ -499,30 +394,41 @@ declare global {
499
394
  }
500
395
  }
501
396
 
397
+ /** @deprecated */
502
398
  interface MenuGroupOptions {
399
+ /**
400
+ * @deprecated Override {@link MenuGroup.render} instead.
401
+ */
503
402
  template?: HTMLTemplateElement;
504
403
  }
404
+ /**
405
+ * @deprecated Override {@link MenuGroup.render} instead.
406
+ */
505
407
  declare function menuGroupTemplate(content: string, extraCss?: string): string;
506
408
  /**
507
- * `<theoplayer-menu-group>` - A group of {@link Menu}s.
409
+ * A group of {@link Menu}s.
508
410
  *
509
- * This can contain multiple other menus, which can be opened with {@link MenuGroup.openMenu}.
411
+ * This can contain multiple other menus, which can be opened with {@link openMenu}.
510
412
  * When a {@link MenuButton} in one menu opens another menu in this group, it is opened as a "submenu".
511
413
  * When a submenu is closed, the menu that originally opened it is shown again.
512
414
  *
513
415
  * @attribute `menu-opened` (readonly) - Whether any menu in the group is currently open.
514
- * @group Components
515
416
  */
516
- declare class MenuGroup extends HTMLElement {
517
- static get observedAttributes(): Attribute[];
518
- private readonly _menuSlot;
417
+ declare class MenuGroup extends LitElement {
418
+ static styles: lit.CSSResult[];
419
+ static shadowRootOptions: ShadowRootInit;
420
+ private readonly _template;
421
+ constructor(options?: MenuGroupOptions);
422
+ private _menuOpened;
423
+ private get menuOpened_();
424
+ private set menuOpened_(value);
425
+ private accessor _menuSlot;
519
426
  private _menus;
520
427
  private readonly _openMenuStack;
521
- constructor(options?: MenuGroupOptions);
522
- protected _upgradeProperty(prop: keyof this): void;
523
428
  connectedCallback(): void;
524
- disconnectedCallback(): void;
525
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
429
+ protected createRenderRoot(): HTMLElement | DocumentFragment;
430
+ protected render(): TemplateResult;
431
+ protected firstUpdated(): void;
526
432
  /**
527
433
  * Get the menu with the given ID.
528
434
  *
@@ -588,21 +494,19 @@ declare global {
588
494
  }
589
495
 
590
496
  /**
591
- * `<theoplayer-menu-button>` - A menu button that opens a {@link Menu}.
497
+ * A menu button that opens a {@link Menu}.
592
498
  *
593
499
  * @attribute `menu` - The ID of the menu to open.
594
- * @group Components
595
500
  */
596
501
  declare class MenuButton extends Button {
597
- static get observedAttributes(): Attribute[];
598
- constructor(options?: Partial<ButtonOptions>);
502
+ private _menuId;
599
503
  connectedCallback(): void;
600
504
  /**
601
505
  * The ID of the menu to open.
602
506
  */
603
507
  get menu(): string | null;
604
508
  set menu(menuId: string | null);
605
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
509
+ private accessor _ariaControls;
606
510
  protected handleClick(): void;
607
511
  }
608
512
  declare global {
@@ -612,17 +516,14 @@ declare global {
612
516
  }
613
517
 
614
518
  /**
615
- * `<theoplayer-menu-close-button>` - A button that closes its parent menu.
519
+ * A button that closes its parent menu.
616
520
  *
617
521
  * This button must be placed inside a {@link Menu | `<theoplayer-menu>`}.
618
- *
619
- * @group Components
620
522
  */
621
523
  declare class CloseMenuButton extends Button {
622
- static get observedAttributes(): Attribute[];
623
- constructor();
624
524
  connectedCallback(): void;
625
525
  protected handleClick(): void;
526
+ protected render(): HTMLTemplateResult;
626
527
  }
627
528
  declare global {
628
529
  interface HTMLElementTagNameMap {
@@ -631,15 +532,12 @@ declare global {
631
532
  }
632
533
 
633
534
  /**
634
- * `<theoplayer-media-track-radio-button>` - A radio button that shows the label of a given media track,
535
+ * A radio button that shows the label of a given media track,
635
536
  * and switches to that track when clicked.
636
- *
637
- * @group Components
638
537
  */
639
538
  declare class MediaTrackRadioButton extends RadioButton {
640
- private _slotEl;
641
539
  private _track;
642
- constructor();
540
+ private accessor _trackLabel;
643
541
  /**
644
542
  * The media track that is controlled by this radio button.
645
543
  */
@@ -648,7 +546,8 @@ declare class MediaTrackRadioButton extends RadioButton {
648
546
  private _updateFromTrack;
649
547
  private _updateTrack;
650
548
  private readonly _onTrackChange;
651
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
549
+ protected handleChange(): void;
550
+ protected render(): HTMLTemplateResult;
652
551
  }
653
552
  declare global {
654
553
  interface HTMLElementTagNameMap {
@@ -657,51 +556,38 @@ declare global {
657
556
  }
658
557
 
659
558
  type TrackType = 'audio' | 'video' | 'subtitles';
660
- declare const TrackRadioGroup_base: {
661
- new (): HTMLElement;
662
- prototype: HTMLElement;
663
- } & Constructor<StateReceiverElement>;
664
559
  /**
665
- * `<theoplayer-track-radio-group>` - A radio group that shows a list of media or text tracks,
560
+ * A radio group that shows a list of media or text tracks,
666
561
  * from which the user can choose an active track.
667
562
  *
668
563
  * @attribute `track-type` - The track type of the available tracks. Can be "audio", "video" or "subtitles".
669
564
  * @attribute `show-off` - If set, shows an "off" button to disable all tracks.
670
565
  * Can only be used with the "subtitles" track type.
671
- * @group Components
672
566
  */
673
- declare class TrackRadioGroup extends TrackRadioGroup_base {
674
- static get observedAttributes(): Attribute[];
675
- private readonly _radioGroup;
676
- private _offButton;
567
+ declare class TrackRadioGroup extends LitElement {
568
+ static styles: lit.CSSResult[];
677
569
  private _player;
678
- private _tracksList;
679
- constructor();
680
- protected _upgradeProperty(prop: keyof this): void;
681
- connectedCallback(): void;
682
- disconnectedCallback(): void;
570
+ private _trackType;
571
+ private accessor _tracksList;
683
572
  /**
684
573
  * The track type of the available tracks.
685
574
  */
686
575
  get trackType(): TrackType;
687
- set trackType(value: TrackType);
576
+ set trackType(trackType: TrackType);
688
577
  /**
689
578
  * If set, shows an "off" button to disable all tracks.
690
579
  *
691
580
  * Can only be used with the `"subtitles"` track type.
692
581
  */
693
- get showOffButton(): boolean;
694
- set showOffButton(value: boolean);
582
+ accessor showOffButton: boolean;
695
583
  get player(): ChromelessPlayer | undefined;
696
584
  set player(player: ChromelessPlayer | undefined);
697
585
  private _getTracksList;
698
586
  private _updateTracksList;
699
587
  private _getTracks;
700
588
  private readonly _updateTracks;
701
- private _createTrackButton;
702
- private _updateOffButton;
703
589
  private readonly _onChange;
704
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
590
+ protected render(): HTMLTemplateResult;
705
591
  }
706
592
  declare global {
707
593
  interface HTMLElementTagNameMap {
@@ -711,13 +597,10 @@ declare global {
711
597
 
712
598
  /**
713
599
  * `<theoplayer-text-track-radio-button>` -A radio button that shows the label of a given text track, and switches to that track when clicked.
714
- *
715
- * @group Components
716
600
  */
717
601
  declare class TextTrackRadioButton extends RadioButton {
718
- private _slotEl;
719
602
  private _track;
720
- constructor();
603
+ private accessor _trackLabel;
721
604
  /**
722
605
  * The text track that is controlled by this radio button.
723
606
  */
@@ -726,7 +609,8 @@ declare class TextTrackRadioButton extends RadioButton {
726
609
  private _updateFromTrack;
727
610
  private _updateTrack;
728
611
  private readonly _onTrackChange;
729
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
612
+ protected handleChange(): void;
613
+ protected render(): HTMLTemplateResult;
730
614
  }
731
615
  declare global {
732
616
  interface HTMLElementTagNameMap {
@@ -735,19 +619,17 @@ declare global {
735
619
  }
736
620
 
737
621
  /**
738
- * `<theoplayer-text-track-off-radio-button>` - A radio button that disables the active subtitle track when clicked.
739
- *
740
- * @group Components
622
+ * A radio button that disables the active subtitle track when clicked.
741
623
  */
742
624
  declare class TextTrackOffRadioButton extends RadioButton {
743
625
  private _trackList;
744
- constructor();
745
626
  get trackList(): TextTracksList | undefined;
746
627
  set trackList(trackList: TextTracksList | undefined);
747
628
  private _updateFromTrackList;
748
629
  private _updateTrackList;
749
630
  private readonly _onTrackChange;
750
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
631
+ protected handleChange(): void;
632
+ protected render(): HTMLTemplateResult;
751
633
  }
752
634
  declare global {
753
635
  interface HTMLElementTagNameMap {
@@ -767,35 +649,27 @@ interface TextTrackStyleMap {
767
649
  edgeStyle: EdgeStyle | undefined;
768
650
  }
769
651
  type TextTrackStyleOption = keyof TextTrackStyleMap;
770
- declare const TextTrackStyleRadioGroup_base: {
771
- new (): HTMLElement;
772
- prototype: HTMLElement;
773
- } & Constructor<StateReceiverElement>;
774
652
  /**
775
- * `<theoplayer-text-track-style-radio-group>` - A radio group that shows a list of values for a text track style option,
653
+ * A radio group that shows a list of values for a text track style option,
776
654
  * from which the user can choose a desired value.
777
655
  *
778
656
  * @attribute `property` - The property name of the text track style option. One of {@link TextTrackStyleOption}.
779
657
  * @slot {@link RadioButton} - The possible options for the text track style option.
780
658
  * For example: `<theoplayer-radio-button value="#ff0000">Red</theoplayer-radio-button>`
781
- * @group Components
782
659
  */
783
- declare class TextTrackStyleRadioGroup extends TextTrackStyleRadioGroup_base {
784
- static get observedAttributes(): Attribute[];
785
- private readonly _radioGroup;
786
- private readonly _optionsSlot;
660
+ declare class TextTrackStyleRadioGroup extends LitElement {
661
+ static styles: lit.CSSResult[];
662
+ private readonly _radioGroupRef;
787
663
  private _player;
788
664
  private _textTrackStyle;
665
+ private _property;
789
666
  private _value;
790
- constructor();
791
- connectedCallback(): void;
792
- disconnectedCallback(): void;
793
- protected _upgradeProperty(prop: keyof this): void;
667
+ protected firstUpdated(): void;
794
668
  /**
795
669
  * The property name of the text track style option.
796
670
  */
797
671
  get property(): TextTrackStyleOption;
798
- set property(value: TextTrackStyleOption);
672
+ set property(property: TextTrackStyleOption);
799
673
  /**
800
674
  * The currently chosen value for the text track style option.
801
675
  */
@@ -803,11 +677,10 @@ declare class TextTrackStyleRadioGroup extends TextTrackStyleRadioGroup_base {
803
677
  set value(value: string);
804
678
  get player(): ChromelessPlayer | undefined;
805
679
  set player(player: ChromelessPlayer | undefined);
806
- private readonly _updateChecked;
807
680
  private readonly _onChange;
808
681
  private readonly _updateFromPlayer;
809
682
  private _updateToPlayer;
810
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
683
+ protected render(): HTMLTemplateResult;
811
684
  }
812
685
  declare global {
813
686
  interface HTMLElementTagNameMap {
@@ -815,34 +688,26 @@ declare global {
815
688
  }
816
689
  }
817
690
 
818
- declare const TextTrackStyleDisplay_base: {
819
- new (): HTMLElement;
820
- prototype: HTMLElement;
821
- } & Constructor<StateReceiverElement>;
822
691
  /**
823
- * `<theoplayer-text-track-style-display>` - A control that displays the value of a single text track style option
692
+ * A control that displays the value of a single text track style option
824
693
  * in a human-readable format.
825
694
  *
826
695
  * @attribute `property` - The property name of the text track style option. One of {@link TextTrackStyleOption}.
827
- * @group Components
828
696
  */
829
- declare class TextTrackStyleDisplay extends TextTrackStyleDisplay_base {
830
- static get observedAttributes(): Attribute[];
831
- private readonly _spanEl;
697
+ declare class TextTrackStyleDisplay extends LitElement {
832
698
  private _player;
699
+ private _property;
833
700
  private _textTrackStyle;
834
- constructor();
835
- connectedCallback(): void;
836
- protected _upgradeProperty(prop: keyof this): void;
837
701
  /**
838
702
  * The property name of the text track style option.
839
703
  */
840
704
  get property(): TextTrackStyleOption;
841
- set property(value: TextTrackStyleOption);
705
+ set property(property: TextTrackStyleOption);
842
706
  get player(): ChromelessPlayer | undefined;
843
707
  set player(player: ChromelessPlayer | undefined);
844
708
  private readonly _updateFromPlayer;
845
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
709
+ protected render(): HTMLTemplateResult;
710
+ private renderValue;
846
711
  }
847
712
  declare global {
848
713
  interface HTMLElementTagNameMap {
@@ -851,14 +716,13 @@ declare global {
851
716
  }
852
717
 
853
718
  /**
854
- * `<theoplayer-text-track-style-menu>` - A menu to change the {@link theoplayer!TextTrackStyle | text track style} of the player.
719
+ * A menu to change the {@link theoplayer!TextTrackStyle | text track style} of the player.
855
720
  *
856
721
  * @slot `heading` - A slot for the menu's heading.
857
- *
858
- * @group Components
859
722
  */
860
723
  declare class TextTrackStyleMenu extends MenuGroup {
861
- constructor();
724
+ static styles: lit.CSSResult[];
725
+ protected render(): TemplateResult;
862
726
  }
863
727
  declare global {
864
728
  interface HTMLElementTagNameMap {
@@ -866,25 +730,23 @@ declare global {
866
730
  }
867
731
  }
868
732
 
869
- declare const LanguageMenu_base: typeof MenuGroup & Constructor<StateReceiverElement>;
870
733
  /**
871
- * `<theoplayer-language-menu>` - A menu to change the spoken language and subtitles of the stream.
734
+ * A menu to change the spoken language and subtitles of the stream.
872
735
  *
873
736
  * @slot `heading` - A slot for the menu's heading.
874
- *
875
- * @group Components
876
737
  */
877
- declare class LanguageMenu extends LanguageMenu_base {
738
+ declare class LanguageMenu extends MenuGroup {
739
+ static styles: lit.CSSResult[];
878
740
  private _player;
879
741
  private _audioTrackList;
880
742
  private _textTrackList;
881
- static get observedAttributes(): Attribute[];
882
- constructor();
883
743
  get player(): ChromelessPlayer | undefined;
884
744
  set player(player: ChromelessPlayer | undefined);
745
+ private accessor _hasAudioTracks;
746
+ private accessor _hasSubtitles;
885
747
  private readonly _updateAudioTracks;
886
748
  private readonly _updateTextTracks;
887
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
749
+ protected render(): TemplateResult;
888
750
  }
889
751
  declare global {
890
752
  interface HTMLElementTagNameMap {
@@ -892,24 +754,22 @@ declare global {
892
754
  }
893
755
  }
894
756
 
895
- declare const LanguageMenuButton_base: typeof MenuButton & Constructor<StateReceiverElement>;
896
757
  /**
897
- * `<theoplayer-language-menu-button>` - A menu button that opens a {@link LanguageMenu}.
758
+ * A menu button that opens a {@link LanguageMenu}.
898
759
  *
899
760
  * When there are no alternative audio languages or subtitles, this button automatically hides itself.
900
761
  *
901
762
  * @attribute `menu` - The ID of the language menu.
902
- * @group Components
903
763
  */
904
- declare class LanguageMenuButton extends LanguageMenuButton_base {
764
+ declare class LanguageMenuButton extends MenuButton {
905
765
  private _player;
906
766
  private _audioTrackList;
907
767
  private _textTrackList;
908
- constructor();
909
768
  connectedCallback(): void;
910
769
  get player(): ChromelessPlayer | undefined;
911
770
  set player(player: ChromelessPlayer | undefined);
912
771
  private readonly _updateTracks;
772
+ protected render(): HTMLTemplateResult;
913
773
  }
914
774
  declare global {
915
775
  interface HTMLElementTagNameMap {
@@ -917,28 +777,20 @@ declare global {
917
777
  }
918
778
  }
919
779
 
920
- declare const PlaybackRateRadioGroup_base: {
921
- new (): HTMLElement;
922
- prototype: HTMLElement;
923
- } & Constructor<StateReceiverElement>;
924
780
  /**
925
- * `<theoplayer-playback-rate-radio-group>` - A radio group that shows a list of playback rates,
781
+ * A radio group that shows a list of playback rates,
926
782
  * from which the user can choose a desired playback rate.
927
783
  *
928
784
  * @slot {@link RadioButton} - The possible options for the playback rate.
929
785
  * The value of each radio button must be a valid number.
930
786
  * For example: `<theoplayer-radio-button value="2">2x</theoplayer-radio-button>`
931
- * @group Components
932
787
  */
933
- declare class PlaybackRateRadioGroup extends PlaybackRateRadioGroup_base {
934
- private readonly _radioGroup;
935
- private readonly _optionsSlot;
788
+ declare class PlaybackRateRadioGroup extends LitElement {
789
+ static styles: lit.CSSResult[];
790
+ private readonly _radioGroupRef;
936
791
  private _player;
937
792
  private _value;
938
- constructor();
939
- protected _upgradeProperty(prop: keyof this): void;
940
- connectedCallback(): void;
941
- disconnectedCallback(): void;
793
+ protected firstUpdated(): void;
942
794
  /**
943
795
  * The currently chosen playback rate.
944
796
  */
@@ -946,9 +798,9 @@ declare class PlaybackRateRadioGroup extends PlaybackRateRadioGroup_base {
946
798
  set value(value: number);
947
799
  get player(): ChromelessPlayer | undefined;
948
800
  set player(player: ChromelessPlayer | undefined);
949
- private readonly _updateChecked;
950
801
  private readonly _onChange;
951
802
  private readonly _updateFromPlayer;
803
+ protected render(): HTMLTemplateResult;
952
804
  }
953
805
  declare global {
954
806
  interface HTMLElementTagNameMap {
@@ -957,14 +809,13 @@ declare global {
957
809
  }
958
810
 
959
811
  /**
960
- * `<theoplayer-playback-rate-menu-button>` - A menu button that opens a [playback rate menu]{@link PlaybackRateMenu}.
812
+ * A menu button that opens a [playback rate menu]{@link PlaybackRateMenu}.
961
813
  *
962
814
  * @attribute menu - The ID of the playback rate menu.
963
- * @group Components
964
815
  */
965
816
  declare class PlaybackRateMenuButton extends MenuButton {
966
- constructor();
967
817
  connectedCallback(): void;
818
+ protected render(): HTMLTemplateResult;
968
819
  }
969
820
  declare global {
970
821
  interface HTMLElementTagNameMap {
@@ -973,14 +824,13 @@ declare global {
973
824
  }
974
825
 
975
826
  /**
976
- * `<theoplayer-playback-rate-menu>` - A menu to change the playback rate of the player.
827
+ * A menu to change the playback rate of the player.
977
828
  *
978
829
  * @slot `heading` - A slot for the menu's heading.
979
- *
980
- * @group Components
981
830
  */
982
831
  declare class PlaybackRateMenu extends Menu {
983
- constructor();
832
+ protected renderMenuHeading(): HTMLTemplateResult;
833
+ protected renderMenuContent(): HTMLTemplateResult;
984
834
  }
985
835
  declare global {
986
836
  interface HTMLElementTagNameMap {
@@ -988,23 +838,15 @@ declare global {
988
838
  }
989
839
  }
990
840
 
991
- declare const PlaybackRateDisplay_base: {
992
- new (): HTMLElement;
993
- prototype: HTMLElement;
994
- } & Constructor<StateReceiverElement>;
995
841
  /**
996
- * `<theoplayer-playback-rate-display>` - A control that displays the current playback rate of the player.
997
- *
998
- * @group Components
842
+ * A control that displays the current playback rate of the player.
999
843
  */
1000
- declare class PlaybackRateDisplay extends PlaybackRateDisplay_base {
1001
- private readonly _spanEl;
1002
- private _playbackRate;
1003
- constructor();
1004
- connectedCallback(): void;
1005
- protected _upgradeProperty(prop: keyof this): void;
1006
- get playbackRate(): number;
1007
- set playbackRate(value: number);
844
+ declare class PlaybackRateDisplay extends LitElement {
845
+ /**
846
+ * The current playback rate.
847
+ */
848
+ accessor playbackRate: number;
849
+ protected render(): HTMLTemplateResult;
1008
850
  }
1009
851
  declare global {
1010
852
  interface HTMLElementTagNameMap {
@@ -1012,27 +854,13 @@ declare global {
1012
854
  }
1013
855
  }
1014
856
 
1015
- declare const ActiveQualityDisplay_base: {
1016
- new (): HTMLElement;
1017
- prototype: HTMLElement;
1018
- } & Constructor<StateReceiverElement>;
1019
857
  /**
1020
- * `<theoplayer-active-quality-display>` - A control that displays the name of the active video quality.
1021
- *
1022
- * @group Components
858
+ * A control that displays the name of the active video quality.
1023
859
  */
1024
- declare class ActiveQualityDisplay extends ActiveQualityDisplay_base {
1025
- private readonly _spanEl;
1026
- private _activeVideoQuality;
1027
- private _targetVideoQualities;
1028
- constructor();
1029
- connectedCallback(): void;
1030
- protected _upgradeProperty(prop: keyof this): void;
1031
- get activeVideoQuality(): VideoQuality | undefined;
1032
- set activeVideoQuality(quality: VideoQuality | undefined);
1033
- get targetVideoQualities(): VideoQuality[] | undefined;
1034
- set targetVideoQualities(qualities: VideoQuality[] | undefined);
1035
- private update_;
860
+ declare class ActiveQualityDisplay extends LitElement {
861
+ accessor activeVideoQuality: VideoQuality | undefined;
862
+ accessor targetVideoQualities: VideoQuality[] | undefined;
863
+ protected render(): HTMLTemplateResult;
1036
864
  }
1037
865
  declare global {
1038
866
  interface HTMLElementTagNameMap {
@@ -1041,16 +869,13 @@ declare global {
1041
869
  }
1042
870
 
1043
871
  /**
1044
- * `<theoplayer-quality-radio-button>` - A radio button that shows the label of a given video quality,
872
+ * A radio button that shows the label of a given video quality,
1045
873
  * and switches the video track's {@link theoplayer!MediaTrack.targetQuality | target quality} to that quality when clicked.
1046
- *
1047
- * @group Components
1048
874
  */
1049
875
  declare class QualityRadioButton extends RadioButton {
1050
- private _slotEl;
1051
876
  private _track;
1052
877
  private _quality;
1053
- constructor();
878
+ private accessor _qualityLabel;
1054
879
  /**
1055
880
  * The video track containing the quality being controlled.
1056
881
  */
@@ -1063,8 +888,9 @@ declare class QualityRadioButton extends RadioButton {
1063
888
  set quality(quality: VideoQuality | undefined);
1064
889
  private readonly _updateFromTrack;
1065
890
  private readonly _updateFromQuality;
891
+ protected handleChange(): void;
1066
892
  private _updateTargetQuality;
1067
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
893
+ protected render(): HTMLTemplateResult;
1068
894
  }
1069
895
  declare global {
1070
896
  interface HTMLElementTagNameMap {
@@ -1072,30 +898,22 @@ declare global {
1072
898
  }
1073
899
  }
1074
900
 
1075
- declare const QualityRadioGroup_base: {
1076
- new (): HTMLElement;
1077
- prototype: HTMLElement;
1078
- } & Constructor<StateReceiverElement>;
1079
901
  /**
1080
- * `<theoplayer-quality-radio-group>` - A radio group that shows a list of available video qualities,
902
+ * A radio group that shows a list of available video qualities,
1081
903
  * from which the user can choose a desired target quality.
1082
- *
1083
- * @group Components
1084
904
  */
1085
- declare class QualityRadioGroup extends QualityRadioGroup_base {
1086
- private readonly _radioGroup;
905
+ declare class QualityRadioGroup extends LitElement {
906
+ static styles: lit.CSSResult[];
1087
907
  private _player;
1088
908
  private _videoTracks;
1089
- private _track;
1090
- constructor();
1091
- protected _upgradeProperty(prop: keyof this): void;
1092
- connectedCallback(): void;
1093
- disconnectedCallback(): void;
909
+ private accessor _track;
910
+ protected firstUpdated(): void;
1094
911
  get player(): ChromelessPlayer | undefined;
1095
912
  set player(player: ChromelessPlayer | undefined);
1096
913
  private readonly _onChange;
1097
914
  private readonly _updateTrack;
1098
- private readonly _update;
915
+ private _update;
916
+ protected render(): HTMLTemplateResult;
1099
917
  }
1100
918
  declare global {
1101
919
  interface HTMLElementTagNameMap {
@@ -1103,19 +921,15 @@ declare global {
1103
921
  }
1104
922
  }
1105
923
 
1106
- declare const TextTrackStyleResetButton_base: typeof Button & Constructor<StateReceiverElement>;
1107
924
  /**
1108
- * `<theoplayer-text-track-style-reset-button>` - A button that resets the text track style.
1109
- *
1110
- * @group Components
925
+ * A button that resets the text track style.
1111
926
  */
1112
- declare class TextTrackStyleResetButton extends TextTrackStyleResetButton_base {
1113
- static get observedAttributes(): Attribute[];
927
+ declare class TextTrackStyleResetButton extends Button {
1114
928
  private _player;
1115
- constructor();
1116
929
  get player(): ChromelessPlayer | undefined;
1117
930
  set player(player: ChromelessPlayer | undefined);
1118
931
  protected handleClick(): void;
932
+ protected render(): HTMLTemplateResult;
1119
933
  }
1120
934
  declare global {
1121
935
  interface HTMLElementTagNameMap {
@@ -1124,15 +938,14 @@ declare global {
1124
938
  }
1125
939
 
1126
940
  /**
1127
- * `<theoplayer-settings-menu>` - A menu to change the settings of the player,
941
+ * A menu to change the settings of the player,
1128
942
  * such as the active video quality and the playback speed.
1129
943
  *
1130
944
  * @slot `heading` - A slot for the menu's heading.
1131
- *
1132
- * @group Components
1133
945
  */
1134
946
  declare class SettingsMenu extends MenuGroup {
1135
- constructor();
947
+ static styles: lit.CSSResult[];
948
+ protected render(): TemplateResult;
1136
949
  }
1137
950
  declare global {
1138
951
  interface HTMLElementTagNameMap {
@@ -1141,14 +954,13 @@ declare global {
1141
954
  }
1142
955
 
1143
956
  /**
1144
- * `<theoplayer-settings-menu-button>` - A menu button that opens a {@link SettingsMenu}.
957
+ * A menu button that opens a {@link SettingsMenu}.
1145
958
  *
1146
959
  * @attribute `menu` - The ID of the settings menu.
1147
- * @group Components
1148
960
  */
1149
961
  declare class SettingsMenuButton extends MenuButton {
1150
- constructor();
1151
962
  connectedCallback(): void;
963
+ protected render(): HTMLTemplateResult;
1152
964
  }
1153
965
  declare global {
1154
966
  interface HTMLElementTagNameMap {
@@ -1156,21 +968,17 @@ declare global {
1156
968
  }
1157
969
  }
1158
970
 
1159
- declare const FullscreenButton_base: typeof Button & Constructor<StateReceiverElement>;
1160
971
  /**
1161
- * `<theoplayer-fullscreen-button>` - A button that toggles fullscreen.
1162
- *
1163
- * @group Components
972
+ * A button that toggles fullscreen.
1164
973
  */
1165
- declare class FullscreenButton extends FullscreenButton_base {
1166
- static get observedAttributes(): Attribute[];
1167
- constructor();
974
+ declare class FullscreenButton extends Button {
975
+ static styles: lit.CSSResult[];
1168
976
  connectedCallback(): void;
1169
- get fullscreen(): boolean;
1170
- set fullscreen(fullscreen: boolean);
977
+ accessor fullscreen: boolean;
1171
978
  protected handleClick(): void;
1172
979
  attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1173
980
  private _updateAriaLabel;
981
+ protected render(): HTMLTemplateResult;
1174
982
  }
1175
983
  declare global {
1176
984
  interface HTMLElementTagNameMap {
@@ -1185,14 +993,6 @@ declare class ColorStops {
1185
993
  toGradientStops(): string;
1186
994
  }
1187
995
 
1188
- interface RangeOptions {
1189
- template: HTMLTemplateElement;
1190
- }
1191
- declare function rangeTemplate(range: string, extraCss?: string): string;
1192
- declare const Range_base: {
1193
- new (): HTMLElement;
1194
- prototype: HTMLElement;
1195
- } & Constructor<StateReceiverElement>;
1196
996
  /**
1197
997
  * A slider to select a value from a range.
1198
998
  *
@@ -1203,14 +1003,18 @@ declare const Range_base: {
1203
1003
  *
1204
1004
  * @group Components
1205
1005
  */
1206
- declare abstract class Range extends Range_base {
1207
- static get observedAttributes(): Attribute[];
1208
- protected readonly _rangeEl: HTMLInputElement;
1209
- protected readonly _pointerEl: HTMLElement;
1006
+ declare abstract class Range extends LitElement {
1007
+ static styles: lit.CSSResult[];
1008
+ protected readonly _rangeRef: Ref<HTMLInputElement>;
1009
+ private _min;
1010
+ private _max;
1011
+ private _value;
1012
+ private _disabled;
1013
+ private _hidden;
1014
+ private _inert;
1210
1015
  private _rangeWidth;
1211
1016
  private _thumbWidth;
1212
- constructor(options: RangeOptions);
1213
- protected _upgradeProperty(prop: keyof this): void;
1017
+ private accessor _pointerWidth;
1214
1018
  connectedCallback(): void;
1215
1019
  disconnectedCallback(): void;
1216
1020
  /**
@@ -1220,6 +1024,11 @@ declare abstract class Range extends Range_base {
1220
1024
  */
1221
1025
  get disabled(): boolean;
1222
1026
  set disabled(disabled: boolean);
1027
+ /**
1028
+ * Whether the range is hidden.
1029
+ */
1030
+ get hidden(): boolean;
1031
+ set hidden(hidden: boolean);
1223
1032
  /**
1224
1033
  * Whether the range is inert.
1225
1034
  *
@@ -1247,14 +1056,12 @@ declare abstract class Range extends Range_base {
1247
1056
  *
1248
1057
  * If set to `"any"`, the value can change with arbitrary precision.
1249
1058
  */
1250
- get step(): number | 'any';
1251
- set step(step: number | 'any');
1252
- get deviceType(): DeviceType;
1253
- set deviceType(deviceType: DeviceType);
1254
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1059
+ accessor step: number | 'any';
1060
+ accessor deviceType: DeviceType;
1061
+ accessor ariaLive: string | null;
1255
1062
  private readonly _onInput;
1256
1063
  protected handleInput(): void;
1257
- protected update(useCachedWidth?: boolean): void;
1064
+ protected _updateRange(useCachedWidth?: boolean): void;
1258
1065
  /**
1259
1066
  * The value for the `aria-label` attribute of the `<input type="range">` element.
1260
1067
  */
@@ -1281,14 +1088,12 @@ declare abstract class Range extends Range_base {
1281
1088
  protected updatePointer_(mousePercent: number, rangeRect: DOMRectReadOnly): void;
1282
1089
  private readonly _onKeyDown;
1283
1090
  protected handleKeyDown_(e: KeyboardEvent): void;
1091
+ protected render(): HTMLTemplateResult;
1092
+ protected renderRangeExtras(): HTMLTemplateResult;
1284
1093
  }
1285
1094
 
1286
- declare const PreviewThumbnail_base: {
1287
- new (): HTMLElement;
1288
- prototype: HTMLElement;
1289
- } & Constructor<StateReceiverElement>;
1290
1095
  /**
1291
- * `<theoplayer-preview-thumbnail>` - A display that shows the thumbnail image at the current preview time
1096
+ * A display that shows the thumbnail image at the current preview time
1292
1097
  * of a {@link TimeRange | `<theoplayer-time-range>`}.
1293
1098
  *
1294
1099
  * The first `metadata` text track whose label equals `"thumbnails"` is used as source for the thumbnails.
@@ -1297,20 +1102,19 @@ declare const PreviewThumbnail_base: {
1297
1102
  * (e.g. `#xywh=180,80,60,40`), then the thumbnail is clipped to the rectangle defined by that fragment.
1298
1103
  *
1299
1104
  * If the stream does not contain thumbnails, then this display shows nothing.
1300
- * @group Components
1301
1105
  */
1302
- declare class PreviewThumbnail extends PreviewThumbnail_base {
1303
- private readonly _canvasEl;
1304
- private readonly _canvasContext;
1106
+ declare class PreviewThumbnail extends LitElement {
1107
+ static styles: lit.CSSResult[];
1108
+ private readonly _canvasRef;
1109
+ private _canvasContext;
1305
1110
  private readonly _thumbnailImageSource;
1306
1111
  private _player;
1307
1112
  private _textTrackList;
1308
1113
  private _previewTime;
1309
1114
  private _thumbnailTextTrack;
1310
1115
  private _lastLoadedThumbnailUrl;
1116
+ private accessor _thumbnailVisible;
1311
1117
  constructor();
1312
- protected _upgradeProperty(prop: keyof this): void;
1313
- connectedCallback(): void;
1314
1118
  get player(): ChromelessPlayer | undefined;
1315
1119
  set player(player: ChromelessPlayer | undefined);
1316
1120
  get previewTime(): number;
@@ -1320,6 +1124,7 @@ declare class PreviewThumbnail extends PreviewThumbnail_base {
1320
1124
  private loadThumbnailImage_;
1321
1125
  private showThumbnail_;
1322
1126
  private hideThumbnail_;
1127
+ protected render(): HTMLTemplateResult;
1323
1128
  }
1324
1129
  declare global {
1325
1130
  interface HTMLElementTagNameMap {
@@ -1327,34 +1132,26 @@ declare global {
1327
1132
  }
1328
1133
  }
1329
1134
 
1330
- declare const PreviewTimeDisplay_base: {
1331
- new (): HTMLElement;
1332
- prototype: HTMLElement;
1333
- } & Constructor<StateReceiverElement>;
1334
1135
  /**
1335
- * `<theoplayer-preview-time-display>` - A display that shows the current preview time of a {@link TimeRange | `<theoplayer-time-range>`}.
1136
+ * A display that shows the current preview time of a {@link TimeRange | `<theoplayer-time-range>`}.
1336
1137
  *
1337
1138
  * @attribute `remaining` - If set, shows the remaining time of the stream.
1338
1139
  * @attribute `remaining-when-live` - If set, and the stream is a livestream, shows the remaining time
1339
1140
  * (until the live point) of the stream.
1340
- * @group Components
1341
1141
  */
1342
- declare class PreviewTimeDisplay extends PreviewTimeDisplay_base {
1343
- private readonly _spanEl;
1344
- private _previewTime;
1142
+ declare class PreviewTimeDisplay extends LitElement {
1143
+ static styles: lit.CSSResult[];
1345
1144
  private _player;
1346
- static get observedAttributes(): Attribute[];
1347
- constructor();
1348
- protected _upgradeProperty(prop: keyof this): void;
1349
1145
  connectedCallback(): void;
1350
- get previewTime(): number;
1351
- set previewTime(previewTime: number);
1352
- get streamType(): StreamType;
1353
- set streamType(streamType: StreamType);
1146
+ accessor previewTime: number;
1147
+ accessor remaining: boolean;
1148
+ accessor remainingWhenLive: boolean;
1149
+ accessor streamType: StreamType;
1354
1150
  get player(): ChromelessPlayer | undefined;
1355
1151
  set player(player: ChromelessPlayer | undefined);
1356
- private readonly _update;
1357
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1152
+ private accessor _endTime;
1153
+ private readonly _updateFromPlayer;
1154
+ protected render(): HTMLTemplateResult;
1358
1155
  }
1359
1156
  declare global {
1360
1157
  interface HTMLElementTagNameMap {
@@ -1362,21 +1159,20 @@ declare global {
1362
1159
  }
1363
1160
  }
1364
1161
 
1365
- declare const TimeRange_base: typeof Range & Constructor<StateReceiverElement>;
1366
1162
  /**
1367
- * `<theoplayer-time-range>` - A seek bar, showing the current time of the player,
1163
+ * A seek bar, showing the current time of the player,
1368
1164
  * and which seeks the player when clicked or dragged.
1369
1165
  *
1370
1166
  * @slot `preview` - A slot holding a preview of the seek time, shown while hovering the seek bar.
1371
1167
  * By default, this shows the {@link PreviewTimeDisplay | preview time} and
1372
1168
  * the {@link PreviewThumbnail | preview thumbnail}.
1373
- * @group Components
1374
1169
  */
1375
- declare class TimeRange extends TimeRange_base {
1376
- static get observedAttributes(): Attribute[];
1377
- private readonly _previewRailEl;
1170
+ declare class TimeRange extends Range {
1171
+ static styles: lit.CSSResult[];
1378
1172
  private readonly _previewBoxEl;
1379
1173
  private _player;
1174
+ private _streamType;
1175
+ private _showAdMarkers;
1380
1176
  private _ads;
1381
1177
  private _pausedWhileScrubbing;
1382
1178
  private _autoAdvanceId;
@@ -1385,16 +1181,18 @@ declare class TimeRange extends TimeRange_base {
1385
1181
  private _lastPlaybackRate;
1386
1182
  constructor();
1387
1183
  connectedCallback(): void;
1184
+ protected firstUpdated(_changedProperties: PropertyValues): void;
1388
1185
  disconnectedCallback(): void;
1389
1186
  get player(): ChromelessPlayer | undefined;
1390
1187
  set player(player: ChromelessPlayer | undefined);
1391
1188
  get streamType(): StreamType;
1392
1189
  set streamType(streamType: StreamType);
1190
+ get showAdMarkers(): boolean;
1191
+ set showAdMarkers(showAdMarkers: boolean);
1393
1192
  private readonly _updateFromPlayer;
1394
1193
  private updateDisabled_;
1395
1194
  protected getAriaLabel(): string;
1396
1195
  protected getAriaValueText(): string;
1397
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1398
1196
  protected handleInput(): void;
1399
1197
  private readonly _pauseOnScrubStart;
1400
1198
  private readonly _playOnScrubEnd;
@@ -1402,10 +1200,12 @@ declare class TimeRange extends TimeRange_base {
1402
1200
  private needToUpdateEveryFrame_;
1403
1201
  private readonly _toggleAutoAdvance;
1404
1202
  private readonly _autoAdvanceWhilePlaying;
1203
+ private accessor _previewRailTransform;
1405
1204
  protected updatePointer_(mousePercent: number, rangeRect: DOMRectReadOnly): void;
1406
1205
  protected getBarColors(): ColorStops;
1407
1206
  private readonly _onAdChange;
1408
1207
  protected handleKeyDown_(e: KeyboardEvent): void;
1208
+ protected renderRangeExtras(): HTMLTemplateResult;
1409
1209
  }
1410
1210
  declare global {
1411
1211
  interface HTMLElementTagNameMap {
@@ -1413,14 +1213,11 @@ declare global {
1413
1213
  }
1414
1214
  }
1415
1215
 
1416
- declare const VolumeRange_base: typeof Range & Constructor<StateReceiverElement>;
1417
1216
  /**
1418
- * `<theoplayer-volume-range>` - A volume slider, showing the current audio volume of the player,
1217
+ * A volume slider, showing the current audio volume of the player,
1419
1218
  * and which changes the volume when clicked or dragged.
1420
- *
1421
- * @group Components
1422
1219
  */
1423
- declare class VolumeRange extends VolumeRange_base {
1220
+ declare class VolumeRange extends Range {
1424
1221
  private _player;
1425
1222
  constructor();
1426
1223
  get player(): ChromelessPlayer | undefined;
@@ -1436,30 +1233,18 @@ declare global {
1436
1233
  }
1437
1234
  }
1438
1235
 
1439
- declare const ErrorDisplay_base: {
1440
- new (): HTMLElement;
1441
- prototype: HTMLElement;
1442
- } & Constructor<StateReceiverElement>;
1443
1236
  /**
1444
- * `<theoplayer-error-display>` - A screen that shows the details of a fatal player error.
1445
- *
1446
- * @group Components
1237
+ * A screen that shows the details of a fatal player error.
1447
1238
  */
1448
- declare class ErrorDisplay extends ErrorDisplay_base {
1449
- private readonly _messageSlot;
1450
- private _error;
1451
- static get observedAttributes(): Attribute[];
1452
- constructor();
1453
- protected _upgradeProperty(prop: keyof this): void;
1454
- connectedCallback(): void;
1239
+ declare class ErrorDisplay extends LitElement {
1240
+ static styles: lit.CSSResult[];
1241
+ static shadowRootOptions: ShadowRootInit;
1455
1242
  /**
1456
1243
  * The error.
1457
1244
  */
1458
- get error(): THEOplayerError | undefined;
1459
- set error(error: THEOplayerError | undefined);
1460
- get fullscreen(): boolean;
1461
- set fullscreen(fullscreen: boolean);
1462
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1245
+ accessor error: THEOplayerError | undefined;
1246
+ accessor fullscreen: boolean;
1247
+ protected render(): lit_html.TemplateResult<1>;
1463
1248
  }
1464
1249
  declare global {
1465
1250
  interface HTMLElementTagNameMap {
@@ -1475,7 +1260,7 @@ declare global {
1475
1260
  */
1476
1261
  declare class CastButton extends Button {
1477
1262
  private _castApi;
1478
- static get observedAttributes(): Attribute[];
1263
+ private _castState;
1479
1264
  constructor(options?: ButtonOptions);
1480
1265
  connectedCallback(): void;
1481
1266
  /**
@@ -1487,25 +1272,25 @@ declare class CastButton extends Button {
1487
1272
  * The current cast state.
1488
1273
  */
1489
1274
  get castState(): CastState;
1275
+ private set castState(value);
1490
1276
  protected handleClick(): void;
1491
1277
  private readonly _updateCastState;
1492
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1493
1278
  }
1494
1279
 
1495
- declare const ChromecastButton_base: typeof CastButton & Constructor<StateReceiverElement>;
1496
1280
  /**
1497
- * `<theoplayer-chromecast-button>` - A button to start and stop casting using Chromecast.
1498
- *
1499
- * @group Components
1281
+ * A button to start and stop casting using Chromecast.
1500
1282
  */
1501
- declare class ChromecastButton extends ChromecastButton_base {
1283
+ declare class ChromecastButton extends CastButton {
1284
+ static styles: lit.CSSResult[];
1502
1285
  private _player;
1286
+ private readonly _buttonId;
1503
1287
  constructor();
1504
1288
  connectedCallback(): void;
1505
1289
  get player(): ChromelessPlayer | undefined;
1506
1290
  set player(player: ChromelessPlayer | undefined);
1507
1291
  attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1508
1292
  private _updateAriaLabel;
1293
+ protected render(): lit_html.TemplateResult<1>;
1509
1294
  }
1510
1295
  declare global {
1511
1296
  interface HTMLElementTagNameMap {
@@ -1513,25 +1298,19 @@ declare global {
1513
1298
  }
1514
1299
  }
1515
1300
 
1516
- declare const ChromecastDisplay_base: {
1517
- new (): HTMLElement;
1518
- prototype: HTMLElement;
1519
- } & Constructor<StateReceiverElement>;
1520
1301
  /**
1521
- * `<theoplayer-chromecast-display>` - A control that displays the casting status while using Chromecast.
1522
- *
1523
- * @group Components
1302
+ * A control that displays the casting status while using Chromecast.
1524
1303
  */
1525
- declare class ChromecastDisplay extends ChromecastDisplay_base {
1526
- private readonly _receiverNameEl;
1304
+ declare class ChromecastDisplay extends LitElement {
1305
+ static styles: lit.CSSResult[];
1527
1306
  private _player;
1528
1307
  private _castApi;
1529
- constructor();
1530
- protected _upgradeProperty(prop: keyof this): void;
1308
+ private accessor _receiverName;
1531
1309
  connectedCallback(): void;
1532
1310
  get player(): ChromelessPlayer | undefined;
1533
1311
  set player(player: ChromelessPlayer | undefined);
1534
1312
  private readonly _updateFromPlayer;
1313
+ protected render(): HTMLTemplateResult;
1535
1314
  }
1536
1315
  declare global {
1537
1316
  interface HTMLElementTagNameMap {
@@ -1539,20 +1318,18 @@ declare global {
1539
1318
  }
1540
1319
  }
1541
1320
 
1542
- declare const AirPlayButton_base: typeof CastButton & Constructor<StateReceiverElement>;
1543
1321
  /**
1544
- * `<theoplayer-airplay-button>` - A button to start and stop casting using AirPlay.
1545
- *
1546
- * @group Components
1322
+ * A button to start and stop casting using AirPlay.
1547
1323
  */
1548
- declare class AirPlayButton extends AirPlayButton_base {
1324
+ declare class AirPlayButton extends CastButton {
1325
+ static styles: lit.CSSResult[];
1549
1326
  private _player;
1550
- constructor();
1551
1327
  connectedCallback(): void;
1552
1328
  get player(): ChromelessPlayer | undefined;
1553
1329
  set player(player: ChromelessPlayer | undefined);
1554
1330
  attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1555
1331
  private _updateAriaLabel;
1332
+ protected render(): lit_html.TemplateResult<1>;
1556
1333
  }
1557
1334
  declare global {
1558
1335
  interface HTMLElementTagNameMap {
@@ -1560,26 +1337,19 @@ declare global {
1560
1337
  }
1561
1338
  }
1562
1339
 
1563
- declare const LoadingIndicator_base: {
1564
- new (): HTMLElement;
1565
- prototype: HTMLElement;
1566
- } & Constructor<StateReceiverElement>;
1567
1340
  /**
1568
- * `<theoplayer-loading-indicator>` - An indicator that shows whether the player is currently waiting for more data to resume playback.
1341
+ * An indicator that shows whether the player is currently waiting for more data to resume playback.
1569
1342
  *
1570
1343
  * @attribute `loading` (readonly) - Whether the player is waiting for more data. If set, the indicator is shown.
1571
- * @group Components
1572
1344
  */
1573
- declare class LoadingIndicator extends LoadingIndicator_base {
1345
+ declare class LoadingIndicator extends LitElement {
1346
+ static styles: lit.CSSResult[];
1574
1347
  private _player;
1575
- static get observedAttributes(): Attribute[];
1576
- constructor();
1577
- protected _upgradeProperty(prop: keyof this): void;
1578
- connectedCallback(): void;
1579
1348
  get player(): ChromelessPlayer | undefined;
1580
1349
  set player(player: ChromelessPlayer | undefined);
1350
+ accessor loading: boolean;
1581
1351
  private readonly _updateFromPlayer;
1582
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1352
+ protected render(): HTMLTemplateResult;
1583
1353
  }
1584
1354
  declare global {
1585
1355
  interface HTMLElementTagNameMap {
@@ -1587,31 +1357,26 @@ declare global {
1587
1357
  }
1588
1358
  }
1589
1359
 
1590
- declare const GestureReceiver_base: {
1591
- new (): HTMLElement;
1592
- prototype: HTMLElement;
1593
- } & Constructor<StateReceiverElement>;
1594
1360
  /**
1595
- * `<theoplayer-gesture-receiver>` - An overlay that receives and handles gestures on the player.
1361
+ * An overlay that receives and handles gestures on the player.
1596
1362
  *
1597
1363
  * On desktop devices, this plays or pauses the player whenever it is clicked.
1598
1364
  * On mobile devices, this currently does nothing.
1599
- *
1600
- * @group Components
1601
1365
  */
1602
- declare class GestureReceiver extends GestureReceiver_base {
1366
+ declare class GestureReceiver extends LitElement {
1367
+ static styles: lit.CSSResult[];
1603
1368
  private _player;
1604
1369
  private _playerElement;
1605
1370
  private _pointerType;
1606
- constructor();
1607
- protected _upgradeProperty(prop: keyof this): void;
1608
1371
  connectedCallback(): void;
1609
1372
  get player(): ChromelessPlayer | undefined;
1610
1373
  set player(player: ChromelessPlayer | undefined);
1374
+ accessor deviceType: DeviceType;
1611
1375
  private readonly _onPointerDown;
1612
1376
  private readonly _onClick;
1613
1377
  handleTap(_event: MouseEvent): void;
1614
1378
  handleMouseClick(_event: MouseEvent): void;
1379
+ protected render(): HTMLTemplateResult;
1615
1380
  }
1616
1381
  declare global {
1617
1382
  interface HTMLElementTagNameMap {
@@ -1619,35 +1384,30 @@ declare global {
1619
1384
  }
1620
1385
  }
1621
1386
 
1622
- declare const LiveButton_base: typeof Button & Constructor<StateReceiverElement>;
1623
1387
  /**
1624
- * `<theoplayer-live-button>` - A button that shows whether the player is currently playing at the live point,
1388
+ * A button that shows whether the player is currently playing at the live point,
1625
1389
  * and seeks to the live point when clicked.
1626
1390
  *
1627
1391
  * @attribute `live-threshold` - The maximum distance (in seconds) from the live point that the player's current time
1628
1392
  * can be for it to still be considered "at the live point". If unset, defaults to 10 seconds.
1629
1393
  * @attribute `live` (readonly) - Whether the player is considered to be playing at the live point.
1630
- * @group Components
1631
1394
  */
1632
- declare class LiveButton extends LiveButton_base {
1633
- static get observedAttributes(): Attribute[];
1395
+ declare class LiveButton extends Button {
1396
+ static styles: lit.CSSResult[];
1634
1397
  private _player;
1635
- constructor();
1398
+ private _liveThreshold;
1636
1399
  connectedCallback(): void;
1637
- get paused(): boolean;
1638
- set paused(paused: boolean);
1639
- get streamType(): StreamType;
1640
- set streamType(streamType: StreamType);
1400
+ accessor paused: boolean;
1401
+ accessor streamType: StreamType;
1641
1402
  get liveThreshold(): number;
1642
1403
  set liveThreshold(value: number);
1643
- get live(): boolean;
1644
- set live(live: boolean);
1404
+ accessor live: boolean;
1645
1405
  get player(): ChromelessPlayer | undefined;
1646
1406
  set player(player: ChromelessPlayer | undefined);
1647
1407
  private readonly _updatePaused;
1648
1408
  private readonly _updateLive;
1649
1409
  protected handleClick(): void;
1650
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1410
+ protected render(): HTMLTemplateResult;
1651
1411
  }
1652
1412
  declare global {
1653
1413
  interface HTMLElementTagNameMap {
@@ -1656,7 +1416,7 @@ declare global {
1656
1416
  }
1657
1417
 
1658
1418
  /**
1659
- * `<theoplayer-slot-container>` - A container that can be assigned to a slot,
1419
+ * A container that can be assigned to a slot,
1660
1420
  * and behaves as if all its children are directly assigned to that slot.
1661
1421
  *
1662
1422
  * This behaves approximately like a regular `<div>` with style `display: contents`,
@@ -1666,12 +1426,11 @@ declare global {
1666
1426
  *
1667
1427
  * This is an internal component, used mainly by Open Video UI for React.
1668
1428
  * You shouldn't need this under normal circumstances.
1669
- *
1670
- * @group Components
1671
1429
  * @internal
1672
1430
  */
1673
- declare class SlotContainer extends HTMLElement {
1674
- constructor();
1431
+ declare class SlotContainer extends LitElement {
1432
+ static styles: lit.CSSResult[];
1433
+ protected render(): HTMLTemplateResult;
1675
1434
  }
1676
1435
  declare global {
1677
1436
  interface HTMLElementTagNameMap {
@@ -1679,26 +1438,20 @@ declare global {
1679
1438
  }
1680
1439
  }
1681
1440
 
1682
- declare const AdDisplay_base: {
1683
- new (): HTMLElement;
1684
- prototype: HTMLElement;
1685
- } & Constructor<StateReceiverElement>;
1686
1441
  /**
1687
- * `<theoplayer-ad-countdown>` - A control that shows when an advertisement is playing,
1442
+ * A control that shows when an advertisement is playing,
1688
1443
  * and the number of the current ad in the ad break (if the break has multiple ads).
1689
- *
1690
- * @group Components
1691
1444
  */
1692
- declare class AdDisplay extends AdDisplay_base {
1693
- private readonly _spanEl;
1445
+ declare class AdDisplay extends LitElement {
1446
+ static styles: lit.CSSResult[];
1694
1447
  private _player;
1695
1448
  private _ads;
1696
- constructor();
1697
- protected _upgradeProperty(prop: keyof this): void;
1449
+ private accessor _text;
1698
1450
  connectedCallback(): void;
1699
1451
  get player(): ChromelessPlayer | undefined;
1700
1452
  set player(player: ChromelessPlayer | undefined);
1701
1453
  private readonly _updateFromPlayer;
1454
+ protected render(): HTMLTemplateResult;
1702
1455
  }
1703
1456
  declare global {
1704
1457
  interface HTMLElementTagNameMap {
@@ -1706,26 +1459,19 @@ declare global {
1706
1459
  }
1707
1460
  }
1708
1461
 
1709
- declare const AdCountdown_base: {
1710
- new (): HTMLElement;
1711
- prototype: HTMLElement;
1712
- } & Constructor<StateReceiverElement>;
1713
1462
  /**
1714
- * `<theoplayer-ad-countdown>` - A control that displays the remaining time of the current ad break.
1715
- *
1716
- * @group Components
1463
+ * A control that displays the remaining time of the current ad break.
1717
1464
  */
1718
- declare class AdCountdown extends AdCountdown_base {
1719
- private readonly _spanEl;
1465
+ declare class AdCountdown extends LitElement {
1466
+ static styles: lit.CSSResult[];
1720
1467
  private _player;
1721
1468
  private _ads;
1722
- constructor();
1723
- protected _upgradeProperty(prop: keyof this): void;
1724
- connectedCallback(): void;
1469
+ private accessor _maxRemainingDuration;
1725
1470
  get player(): ChromelessPlayer | undefined;
1726
1471
  set player(player: ChromelessPlayer | undefined);
1727
1472
  private readonly _onAdChange;
1728
1473
  private readonly _update;
1474
+ protected render(): HTMLTemplateResult;
1729
1475
  }
1730
1476
  declare global {
1731
1477
  interface HTMLElementTagNameMap {
@@ -1733,25 +1479,22 @@ declare global {
1733
1479
  }
1734
1480
  }
1735
1481
 
1736
- declare const AdClickThroughButton_base: typeof LinkButton & Constructor<StateReceiverElement>;
1737
1482
  /**
1738
- * `<theoplayer-ad-clickthrough-button>` - A button to open the advertisement's click-through webpage.
1739
- *
1740
- * @group Components
1483
+ * A button to open the advertisement's click-through webpage.
1741
1484
  */
1742
- declare class AdClickThroughButton extends AdClickThroughButton_base {
1485
+ declare class AdClickThroughButton extends LinkButton {
1743
1486
  private _player;
1744
1487
  private _ads;
1745
- static get observedAttributes(): Attribute[];
1488
+ private _clickThrough;
1746
1489
  constructor();
1747
1490
  connectedCallback(): void;
1748
1491
  get clickThrough(): string | null;
1749
1492
  set clickThrough(clickThrough: string | null);
1750
1493
  get player(): ChromelessPlayer | undefined;
1751
1494
  set player(player: ChromelessPlayer | undefined);
1752
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1753
1495
  private readonly _updateFromPlayer;
1754
1496
  protected handleClick(): void;
1497
+ protected renderLinkContent(): HTMLTemplateResult;
1755
1498
  }
1756
1499
  declare global {
1757
1500
  interface HTMLElementTagNameMap {
@@ -1759,27 +1502,23 @@ declare global {
1759
1502
  }
1760
1503
  }
1761
1504
 
1762
- declare const AdSkipButton_base: typeof Button & Constructor<StateReceiverElement>;
1763
1505
  /**
1764
- * `<theoplayer-ad-skip-button>` - A button that skips the current advertisement (if skippable).
1506
+ * A button that skips the current advertisement (if skippable).
1765
1507
  * If the ad cannot be skipped yet, it shows the remaining time until it can be skipped.
1766
- *
1767
- * @group Components
1768
1508
  */
1769
- declare class AdSkipButton extends AdSkipButton_base {
1770
- private readonly _countdownEl;
1771
- private readonly _skipEl;
1509
+ declare class AdSkipButton extends Button {
1510
+ static styles: lit.CSSResult[];
1772
1511
  private _player;
1773
1512
  private _ads;
1774
- static get observedAttributes(): Attribute[];
1775
- constructor();
1513
+ private accessor _showCountdown;
1514
+ private accessor _timeToSkip;
1776
1515
  connectedCallback(): void;
1777
1516
  get player(): ChromelessPlayer | undefined;
1778
1517
  set player(player: ChromelessPlayer | undefined);
1779
1518
  protected handleClick(): void;
1780
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1781
1519
  private readonly _onAdChange;
1782
1520
  private readonly _update;
1521
+ protected render(): HTMLTemplateResult;
1783
1522
  }
1784
1523
  declare global {
1785
1524
  interface HTMLElementTagNameMap {
@@ -1787,6 +1526,65 @@ declare global {
1787
1526
  }
1788
1527
  }
1789
1528
 
1529
+ type Constructor<T> = abstract new (...args: any[]) => T;
1530
+
1531
+ /** @internal */
1532
+ declare const StateReceiverProps: "theoplayerUiObservedProperties";
1533
+ interface StateReceiverPropertyMap {
1534
+ player: ChromelessPlayer | undefined;
1535
+ fullscreen: boolean;
1536
+ deviceType: DeviceType;
1537
+ streamType: StreamType;
1538
+ playbackRate: number;
1539
+ activeVideoQuality: VideoQuality | undefined;
1540
+ targetVideoQualities: VideoQuality[] | undefined;
1541
+ error: THEOplayerError | undefined;
1542
+ previewTime: number;
1543
+ }
1544
+ /**
1545
+ * A custom element that automatically receives selected state updates
1546
+ * from an ancestor {@link UIContainer | `<theoplayer-ui>`} element.
1547
+ *
1548
+ * Do not implement this interface directly, instead use {@link stateReceiver} or {@link StateReceiverMixin}.
1549
+ *
1550
+ * @see {@link stateReceiver}
1551
+ * @see {@link StateReceiverMixin}
1552
+ */
1553
+ interface StateReceiverElement extends Partial<StateReceiverPropertyMap>, Element {
1554
+ /**
1555
+ * The names of the properties this element will receive.
1556
+ */
1557
+ readonly [StateReceiverProps]: Array<keyof StateReceiverPropertyMap>;
1558
+ }
1559
+ /**
1560
+ * Decorates a custom element class, such that it will automatically receive selected state updates
1561
+ * from an ancestor {@link UIContainer | `<theoplayer-ui>`} element.
1562
+ *
1563
+ * For each property name in `props`, the custom element *MUST* implement a corresponding property with a setter.
1564
+ * For example, if `props` equals `["player", "fullscreen"]`, then the element must have writable `player` and `fullscreen`
1565
+ * properties.
1566
+ *
1567
+ * @param props - The names of the properties this element will receive.
1568
+ * @returns A class decorator.
1569
+ * @see {@link StateReceiverElement}
1570
+ */
1571
+ declare const stateReceiver: (props: Array<keyof StateReceiverPropertyMap>) => (target: Constructor<Element>, _context: ClassDecoratorContext<Constructor<Element>>) => void;
1572
+ /**
1573
+ * A [mixin class](https://www.typescriptlang.org/docs/handbook/mixins.html) to apply on the superclass of a custom element,
1574
+ * such that it will automatically receive selected state updates from an ancestor {@link UIContainer | `<theoplayer-ui>`} element.
1575
+ *
1576
+ * For each property name in `props`, the custom element *MUST* implement a corresponding property with a setter.
1577
+ * For example, if `props` equals `["player", "fullscreen"]`, then the element must have writable `player` and `fullscreen`
1578
+ * properties.
1579
+ *
1580
+ * @param base - The superclass for the new element class.
1581
+ * @param props - The names of the properties this element will receive.
1582
+ * @returns A class constructor that extends `base` and implements {@link StateReceiverElement}.
1583
+ * @see {@link StateReceiverElement}
1584
+ * @deprecated Use {@link stateReceiver} decorator instead.
1585
+ */
1586
+ declare function StateReceiverMixin<T extends Constructor<Element>>(base: T, props: Array<keyof StateReceiverPropertyMap>): T & Constructor<StateReceiverElement>;
1587
+
1790
1588
  declare enum ExtensionSlot {
1791
1589
  TopControlBar = "top-control-bar",
1792
1590
  BottomControlBar = "bottom-control-bar",
@@ -1796,7 +1594,7 @@ declare enum ExtensionSlot {
1796
1594
  declare const READY_EVENT: "theoplayerready";
1797
1595
 
1798
1596
  /**
1799
- * `<theoplayer-ui>` - The container element for a THEOplayer UI.
1597
+ * The container element for a THEOplayer UI.
1800
1598
  *
1801
1599
  * This element provides a basic layout structure for a general player UI, and handles the creation and management
1802
1600
  * of a {@link theoplayer!ChromelessPlayer | THEOplayer player instance} for this UI.
@@ -1852,31 +1650,32 @@ declare const READY_EVENT: "theoplayerready";
1852
1650
  * @slot `top-chrome` - A slot for controls at the top of the player.
1853
1651
  * Can be used to display the stream's title, or for a cast button ({@link ChromecastButton | `<theoplayer-chromecast-button>`}).
1854
1652
  * @slot `middle-chrome` - A slot for controls in the middle of the player (between the top and bottom chrome).
1855
- * @slot `centered-chrome` - A slot for controls centered on the player, on top of other controls.
1856
- * @slot `centered-loading` - A slot for a loading indicator centered on the player, on top of other controls
1653
+ * @slot `centered-chrome` - A slot for controls in the center of the player, layered on top of other controls.
1654
+ * @slot `centered-loading` - A slot for a loading indicator in the center of the player, layered on top of other controls
1857
1655
  * but behind the centered chrome.
1858
1656
  * @slot `menu` - A slot for extra menus (see {@link Menu | `<theoplayer-menu>`}).
1859
1657
  * @slot `error` - A slot for an error display, to show when the player encounters a fatal error
1860
1658
  * (see {@link ErrorDisplay | `<theoplayer-error-display>`}).
1861
- * @group Components
1862
1659
  */
1863
- declare class UIContainer extends HTMLElement {
1660
+ declare class UIContainer extends LitElement {
1661
+ static styles: lit.CSSResult[];
1662
+ static shadowRootOptions: ShadowRootInit;
1864
1663
  /**
1865
1664
  * Fired when the backing player is created, and the {@link UIContainer.player} property is set.
1866
1665
  *
1867
1666
  * @group Events
1868
1667
  */
1869
1668
  static READY_EVENT: typeof READY_EVENT;
1870
- static get observedAttributes(): Attribute[];
1871
1669
  private _configuration;
1872
- private readonly _playerEl;
1873
- private readonly _menuEl;
1874
- private readonly _menuGroup;
1670
+ private readonly _playerRef;
1671
+ private readonly _menuRef;
1672
+ private readonly _menuGroupRef;
1673
+ private _menuOpened;
1875
1674
  private _menuOpener;
1876
- private readonly _topChromeEl;
1877
- private readonly _topChromeSlot;
1878
- private readonly _bottomChromeEl;
1879
- private readonly _bottomChromeSlot;
1675
+ private readonly _topChromeRef;
1676
+ private readonly _topChromeSlotRef;
1677
+ private readonly _bottomChromeRef;
1678
+ private readonly _bottomChromeSlotRef;
1880
1679
  private _pointerType;
1881
1680
  private _lastPointerUpTime;
1882
1681
  private readonly _mutationObserver;
@@ -1884,8 +1683,20 @@ declare class UIContainer extends HTMLElement {
1884
1683
  private readonly _stateReceivers;
1885
1684
  private _player;
1886
1685
  private _source;
1686
+ private _muted;
1687
+ private _autoplay;
1688
+ private _fullscreen;
1689
+ private _deviceType;
1690
+ private _streamType;
1691
+ private _fluid;
1692
+ private _userIdle;
1693
+ private _userIdleTimeout;
1887
1694
  private _isUserActive;
1888
1695
  private _userIdleTimer;
1696
+ private _paused;
1697
+ private _ended;
1698
+ private _casting;
1699
+ private _dvrThreshold;
1889
1700
  private _previewTime;
1890
1701
  private _activeVideoTrack;
1891
1702
  /**
@@ -1897,7 +1708,6 @@ declare class UIContainer extends HTMLElement {
1897
1708
  * Can also be set later on through the {@link UIContainer.configuration} property.
1898
1709
  */
1899
1710
  constructor(configuration?: UIPlayerConfiguration);
1900
- private _upgradeProperty;
1901
1711
  /**
1902
1712
  * The underlying THEOplayer player instance.
1903
1713
  *
@@ -1937,18 +1747,22 @@ declare class UIContainer extends HTMLElement {
1937
1747
  * Whether the UI is in fullscreen mode.
1938
1748
  */
1939
1749
  get fullscreen(): boolean;
1750
+ private set fullscreen(value);
1940
1751
  /**
1941
1752
  * Whether the player is paused.
1942
1753
  */
1943
1754
  get paused(): boolean;
1755
+ private set paused(value);
1944
1756
  /**
1945
1757
  * Whether the player is ended.
1946
1758
  */
1947
1759
  get ended(): boolean;
1760
+ private set ended(value);
1948
1761
  /**
1949
1762
  * Whether the player is casting to a remote receiver.
1950
1763
  */
1951
1764
  get casting(): boolean;
1765
+ private set casting(value);
1952
1766
  /**
1953
1767
  * Whether the user has stopped interacting with the UI and is considered to be "idle".
1954
1768
  */
@@ -1959,11 +1773,12 @@ declare class UIContainer extends HTMLElement {
1959
1773
  * and when the user is considered to be "idle".
1960
1774
  */
1961
1775
  get userIdleTimeout(): number;
1962
- set userIdleTimeout(value: number);
1776
+ set userIdleTimeout(value: number | undefined);
1963
1777
  /**
1964
1778
  * The device type, either "desktop", "mobile" or "tv".
1965
1779
  */
1966
1780
  get deviceType(): DeviceType;
1781
+ set deviceType(value: DeviceType);
1967
1782
  /**
1968
1783
  * The stream type, either "vod", "live" or "dvr".
1969
1784
  *
@@ -1981,10 +1796,15 @@ declare class UIContainer extends HTMLElement {
1981
1796
  */
1982
1797
  get dvrThreshold(): number;
1983
1798
  set dvrThreshold(value: number);
1799
+ private accessor _hasFirstPlay;
1800
+ private accessor _isPlayingAd;
1801
+ private accessor _hasError;
1802
+ private accessor _isFullWindow;
1984
1803
  connectedCallback(): void;
1985
1804
  private tryInitializePlayer_;
1805
+ protected createRenderRoot(): HTMLElement | DocumentFragment;
1806
+ protected firstUpdated(): void;
1986
1807
  disconnectedCallback(): void;
1987
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1988
1808
  private readonly _onMutation;
1989
1809
  private readonly _onSlotChange;
1990
1810
  private readonly registerStateReceiver_;
@@ -1992,6 +1812,8 @@ declare class UIContainer extends HTMLElement {
1992
1812
  private propagateStateToReceiver_;
1993
1813
  private propagatePlayerToAllReceivers_;
1994
1814
  private removeStateFromReceiver_;
1815
+ private get menuOpened_();
1816
+ private set menuOpened_(value);
1995
1817
  private openMenu_;
1996
1818
  private closeMenu_;
1997
1819
  private readonly _onToggleMenu;
@@ -2037,6 +1859,7 @@ declare class UIContainer extends HTMLElement {
2037
1859
  private addPlayerListeners_;
2038
1860
  private removePlayerListeners_;
2039
1861
  private readonly _onDestroy;
1862
+ protected render(): HTMLTemplateResult;
2040
1863
  }
2041
1864
  declare global {
2042
1865
  interface HTMLElementTagNameMap {
@@ -2045,7 +1868,7 @@ declare global {
2045
1868
  }
2046
1869
 
2047
1870
  /**
2048
- * `<theoplayer-default-ui>` - A default UI for THEOplayer.
1871
+ * A default UI for THEOplayer.
2049
1872
  *
2050
1873
  * This default UI provides a great player experience out-of-the-box, that works well on all types of devices
2051
1874
  * and for all types of streams. It provides all the common playback controls for playing, seeking,
@@ -2086,26 +1909,32 @@ declare global {
2086
1909
  *
2087
1910
  * @slot `title` - A slot for the stream's title in the top control bar.
2088
1911
  * @slot `top-control-bar` - A slot for extra UI controls in the top control bar.
1912
+ * @slot `centered-chrome` - A slot to replace the controls in the center of the player,
1913
+ * layered on top of other controls.
2089
1914
  * @slot `bottom-control-bar` - A slot for extra UI controls in the bottom control bar.
2090
1915
  * @slot `menu` - A slot for extra menus (see {@link Menu | `<theoplayer-menu>`}).
2091
1916
  * @slot `error` - A slot for an error display, to show when the player encounters a fatal error.
2092
1917
  * By default, this shows an {@link ErrorDisplay | `<theoplayer-error-display>`}.
2093
- * @group Components
2094
1918
  */
2095
- declare class DefaultUI extends HTMLElement {
1919
+ declare class DefaultUI extends LitElement {
1920
+ static styles: lit.CSSResult[];
1921
+ static shadowRootOptions: ShadowRootInit;
2096
1922
  /**
2097
1923
  * Fired when the backing player is created, and the {@link DefaultUI.player} property is set.
2098
1924
  *
2099
1925
  * @group Events
2100
1926
  */
2101
1927
  static READY_EVENT: typeof READY_EVENT;
2102
- static get observedAttributes(): Attribute[];
2103
- protected readonly _shadowRoot: ShadowRoot;
2104
- protected readonly _ui: UIContainer;
2105
- private readonly _titleSlot;
2106
- private readonly _timeRange;
1928
+ protected readonly _uiRef: Ref<UIContainer>;
1929
+ private accessor _timeRangeInert;
2107
1930
  private _timeRangeInertTimeout;
2108
1931
  private _appliedExtensions;
1932
+ private _configuration;
1933
+ private _source;
1934
+ private _userIdleTimeout;
1935
+ private _deviceType;
1936
+ private _dvrThreshold;
1937
+ private accessor titleSlotNodes;
2109
1938
  /**
2110
1939
  * Creates a new THEOplayer default UI.
2111
1940
  *
@@ -2115,8 +1944,6 @@ declare class DefaultUI extends HTMLElement {
2115
1944
  * Can also be set later on through the {@link DefaultUI.configuration} property.
2116
1945
  */
2117
1946
  constructor(configuration?: UIPlayerConfiguration);
2118
- protected initShadowRoot(): ShadowRoot;
2119
- private _upgradeProperty;
2120
1947
  /**
2121
1948
  * The underlying THEOplayer player instance.
2122
1949
  *
@@ -2130,35 +1957,30 @@ declare class DefaultUI extends HTMLElement {
2130
1957
  */
2131
1958
  get configuration(): UIPlayerConfiguration;
2132
1959
  set configuration(configuration: UIPlayerConfiguration);
2133
- private setConfiguration_;
2134
1960
  /**
2135
1961
  * The player's current source.
2136
1962
  */
2137
1963
  get source(): SourceDescription | undefined;
2138
- set source(value: SourceDescription | undefined);
1964
+ set source(source: SourceDescription | undefined);
2139
1965
  /**
2140
- * Whether to automatically adjusts the player's height to fit the video's aspect ratio.
1966
+ * Whether to automatically adjust the player's height to fit the video's aspect ratio.
2141
1967
  */
2142
- get fluid(): boolean;
2143
- set fluid(value: boolean);
1968
+ accessor fluid: boolean;
2144
1969
  /**
2145
1970
  * Whether the player's audio is muted.
2146
1971
  */
2147
- get muted(): boolean;
2148
- set muted(value: boolean);
1972
+ accessor muted: boolean;
2149
1973
  /**
2150
1974
  * Whether the player should attempt to automatically start playback.
2151
1975
  */
2152
- get autoplay(): boolean;
2153
- set autoplay(value: boolean);
1976
+ accessor autoplay: boolean;
2154
1977
  /**
2155
1978
  * The stream type, either "vod", "live" or "dvr".
2156
1979
  *
2157
1980
  * If you know in advance that the source will be a livestream, you can set this property to avoid a screen flicker
2158
1981
  * when the player switches between its VOD-specific and live-only controls.
2159
1982
  */
2160
- get streamType(): StreamType;
2161
- set streamType(value: StreamType);
1983
+ accessor streamType: StreamType;
2162
1984
  /**
2163
1985
  * Whether the user has stopped interacting with the UI and is considered to be "idle".
2164
1986
  */
@@ -2168,20 +1990,28 @@ declare class DefaultUI extends HTMLElement {
2168
1990
  * and when the user is considered to be "idle".
2169
1991
  */
2170
1992
  get userIdleTimeout(): number;
2171
- set userIdleTimeout(value: number);
1993
+ set userIdleTimeout(value: number | undefined);
1994
+ /**
1995
+ * The device type, either "desktop", "mobile" or "tv".
1996
+ */
1997
+ get deviceType(): DeviceType;
1998
+ set deviceType(value: DeviceType);
2172
1999
  /**
2173
2000
  * The minimum length (in seconds) of a livestream's sliding window for the stream to be DVR
2174
2001
  * and its stream type to be set to "dvr".
2175
2002
  */
2176
2003
  get dvrThreshold(): number;
2177
2004
  set dvrThreshold(value: number);
2005
+ private accessor _hasTitle;
2178
2006
  connectedCallback(): void;
2179
2007
  disconnectedCallback(): void;
2180
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
2008
+ protected firstUpdated(): void;
2009
+ protected _onUiReady(): void;
2181
2010
  private readonly _updateStreamType;
2182
- private readonly _dispatchReadyEvent;
2183
2011
  private readonly _updateUserIdle;
2184
2012
  private readonly _onTitleSlotChange;
2013
+ protected render(): HTMLTemplateResult;
2014
+ protected renderUiContent(): HTMLTemplateResult;
2185
2015
  }
2186
2016
  declare global {
2187
2017
  interface HTMLElementTagNameMap {
@@ -2221,13 +2051,12 @@ type Extension = (ui: DefaultUI) => void;
2221
2051
  */
2222
2052
  declare function registerExtension(extension: Extension): void;
2223
2053
 
2224
- declare class BadNetworkModeMenu extends HTMLElement {
2225
- private readonly _radioGroup;
2226
- constructor();
2227
- protected _upgradeProperty(prop: keyof this): void;
2228
- connectedCallback(): void;
2229
- disconnectedCallback(): void;
2054
+ declare class BadNetworkModeMenu extends LitElement {
2055
+ static styles: lit.CSSResult[];
2056
+ private readonly _radioGroupRef;
2057
+ protected firstUpdated(): void;
2230
2058
  private readonly _onChange;
2059
+ protected render(): HTMLTemplateResult;
2231
2060
  }
2232
2061
  declare global {
2233
2062
  interface HTMLElementTagNameMap {
@@ -2237,29 +2066,24 @@ declare global {
2237
2066
 
2238
2067
  /**
2239
2068
  * `<theolive-default-ui>` - A default UI for THEOlive.
2240
- *
2241
- * @group Components
2242
2069
  */
2243
2070
  declare class THEOliveDefaultUI extends DefaultUI {
2244
- private readonly _loading;
2245
- private readonly _offline;
2246
- private readonly _announcement;
2247
- private readonly _errorDisplay;
2248
- private readonly _playButton;
2249
- private readonly _root;
2071
+ static styles: lit.CSSResult[];
2072
+ private accessor _announcementType;
2073
+ private accessor _announcementMessage;
2074
+ private accessor _hidePlayButton;
2075
+ private accessor _hideErrorDisplay;
2250
2076
  constructor(configuration?: UIPlayerConfiguration);
2251
- protected initShadowRoot(): ShadowRoot;
2252
- private readonly onReady;
2077
+ protected _onUiReady(): void;
2253
2078
  private onLoadChannelStart;
2254
2079
  private onChannelOffline;
2255
2080
  private onChannelLoaded;
2256
2081
  private onError;
2257
2082
  private hidePlayerError;
2258
2083
  private stopHidingPlayerError;
2259
- private hidePlayerPlayButton_;
2260
- private stopHidingPlayerPlayButton;
2261
2084
  private showMessage_;
2262
2085
  private hideMessage_;
2086
+ protected renderUiContent(): HTMLTemplateResult;
2263
2087
  }
2264
2088
  declare global {
2265
2089
  interface HTMLElementTagNameMap {
@@ -2267,10 +2091,67 @@ declare global {
2267
2091
  }
2268
2092
  }
2269
2093
 
2094
+ declare enum Attribute {
2095
+ CONFIGURATION = "configuration",
2096
+ SOURCE = "source",
2097
+ AUTOPLAY = "autoplay",
2098
+ MUTED = "muted",
2099
+ FULLSCREEN = "fullscreen",
2100
+ FULLWINDOW = "fullwindow",
2101
+ FLUID = "fluid",
2102
+ DEVICE_TYPE = "device-type",
2103
+ MOBILE = "mobile",
2104
+ TV = "tv",
2105
+ TV_FOCUS = "tv-focus",
2106
+ MOBILE_ONLY = "mobile-only",
2107
+ MOBILE_HIDDEN = "mobile-hidden",
2108
+ TV_ONLY = "tv-only",
2109
+ TV_HIDDEN = "tv-hidden",
2110
+ USER_IDLE = "user-idle",
2111
+ USER_IDLE_TIMEOUT = "user-idle-timeout",
2112
+ NO_AUTO_HIDE = "no-auto-hide",
2113
+ DISABLED = "disabled",
2114
+ INERT = "inert",
2115
+ HIDDEN = "hidden",
2116
+ PAUSED = "paused",
2117
+ ENDED = "ended",
2118
+ VOLUME_LEVEL = "volume-level",
2119
+ CASTING = "casting",
2120
+ LOADING = "loading",
2121
+ STREAM_TYPE = "stream-type",
2122
+ LIVE = "live",
2123
+ LIVE_ONLY = "live-only",
2124
+ LIVE_HIDDEN = "live-hidden",
2125
+ LIVE_THRESHOLD = "live-threshold",
2126
+ DVR_THRESHOLD = "dvr-threshold",
2127
+ REMAINING = "remaining",
2128
+ REMAINING_WHEN_LIVE = "remaining-when-live",
2129
+ SHOW_DURATION = "show-duration",
2130
+ SEEK_OFFSET = "seek-offset",
2131
+ MENU = "menu",
2132
+ MENU_OPENED = "menu-opened",
2133
+ MENU_CLOSE_ON_INPUT = "menu-close-on-input",
2134
+ ARIA_LABEL = "aria-label",
2135
+ ARIA_LIVE = "aria-live",
2136
+ ARIA_CHECKED = "aria-checked",
2137
+ HAS_AUDIO = "has-audio",
2138
+ HAS_SUBTITLES = "has-subtitles",
2139
+ HAS_ERROR = "has-error",
2140
+ HAS_FIRST_PLAY = "has-first-play",
2141
+ CAST_STATE = "cast-state",
2142
+ TRACK_TYPE = "track-type",
2143
+ SHOW_OFF = "show-off",
2144
+ PLAYING_AD = "playing-ad",
2145
+ SHOW_AD_MARKERS = "show-ad-markers",
2146
+ CLICKTHROUGH = "clickthrough",
2147
+ PROPERTY = "property",
2148
+ VALUE = "value"
2149
+ }
2150
+
2270
2151
  /**
2271
2152
  * The version of Open Video UI for Web.
2272
2153
  */
2273
2154
  declare const version: string;
2274
2155
 
2275
- export { ActiveQualityDisplay, AdClickThroughButton, AdCountdown, AdDisplay, AdSkipButton, AirPlayButton, Attribute, Button, type ButtonOptions, CastButton, ChromecastButton, ChromecastDisplay, CloseMenuButton, ColorStops, type Constructor, ControlBar, DefaultUI, type DeviceType, DurationDisplay, ErrorDisplay, type Extension, ExtensionSlot, FullscreenButton, GestureReceiver, LanguageMenu, LanguageMenuButton, LinkButton, LiveButton, LoadingIndicator, MediaTrackRadioButton, Menu, MenuButton, MenuGroup, type MenuGroupOptions, type MenuOptions, MuteButton, PlayButton, PlaybackRateDisplay, PlaybackRateMenu, PlaybackRateMenuButton, PlaybackRateRadioGroup, PreviewThumbnail, PreviewTimeDisplay, QualityRadioButton, QualityRadioGroup, RadioButton, RadioGroup, Range, type RangeOptions, SeekButton, SettingsMenu, SettingsMenuButton, SlotContainer, type StateReceiverElement, StateReceiverMixin, type StateReceiverPropertyMap, type StreamType, THEOliveDefaultUI, TextTrackOffRadioButton, TextTrackRadioButton, TextTrackStyleDisplay, type TextTrackStyleMap, TextTrackStyleMenu, type TextTrackStyleOption, TextTrackStyleRadioGroup, TextTrackStyleResetButton, TimeDisplay, TimeRange, TrackRadioGroup, type TrackType, UIContainer, type VolumeLevel, VolumeRange, buttonTemplate, linkButtonTemplate, menuGroupTemplate, menuTemplate, rangeTemplate, registerExtension, version };
2156
+ export { ActiveQualityDisplay, AdClickThroughButton, AdCountdown, AdDisplay, AdSkipButton, AirPlayButton, Attribute, Button, type ButtonOptions, CastButton, ChromecastButton, ChromecastDisplay, CloseMenuButton, ColorStops, type Constructor, ControlBar, DefaultUI, type DeviceType, DurationDisplay, ErrorDisplay, type Extension, ExtensionSlot, FullscreenButton, GestureReceiver, LanguageMenu, LanguageMenuButton, LinkButton, LiveButton, LoadingIndicator, MediaTrackRadioButton, Menu, MenuButton, MenuGroup, type MenuGroupOptions, type MenuOptions, MuteButton, PlayButton, PlaybackRateDisplay, PlaybackRateMenu, PlaybackRateMenuButton, PlaybackRateRadioGroup, PreviewThumbnail, PreviewTimeDisplay, QualityRadioButton, QualityRadioGroup, RadioButton, RadioGroup, Range, SeekButton, SettingsMenu, SettingsMenuButton, SlotContainer, type StateReceiverElement, StateReceiverMixin, type StateReceiverPropertyMap, type StreamType, THEOliveDefaultUI, TextTrackOffRadioButton, TextTrackRadioButton, TextTrackStyleDisplay, type TextTrackStyleMap, TextTrackStyleMenu, type TextTrackStyleOption, TextTrackStyleRadioGroup, TextTrackStyleResetButton, TimeDisplay, TimeRange, TrackRadioGroup, type TrackType, UIContainer, type VolumeLevel, VolumeRange, buttonTemplate, linkButtonTemplate, menuGroupTemplate, menuTemplate, registerExtension, stateReceiver, version };
2276
2157
  export as namespace THEOplayerUI;