@theoplayer/web-ui 1.16.3 → 2.0.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.16.3)
2
+ * THEOplayer Open Video UI for Web (v2.0.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 {
@@ -716,13 +602,10 @@ declare module 'theoplayer/chromeless' {
716
602
  }
717
603
  /**
718
604
  * `<theoplayer-text-track-radio-button>` -A radio button that shows the label of a given text track, and switches to that track when clicked.
719
- *
720
- * @group Components
721
605
  */
722
606
  declare class TextTrackRadioButton extends RadioButton {
723
- private _slotEl;
724
607
  private _track;
725
- constructor();
608
+ private accessor _trackLabel;
726
609
  /**
727
610
  * The text track that is controlled by this radio button.
728
611
  */
@@ -731,7 +614,8 @@ declare class TextTrackRadioButton extends RadioButton {
731
614
  private _updateFromTrack;
732
615
  private _updateTrack;
733
616
  private readonly _onTrackChange;
734
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
617
+ protected handleChange(): void;
618
+ protected render(): HTMLTemplateResult;
735
619
  }
736
620
  declare global {
737
621
  interface HTMLElementTagNameMap {
@@ -740,19 +624,17 @@ declare global {
740
624
  }
741
625
 
742
626
  /**
743
- * `<theoplayer-text-track-off-radio-button>` - A radio button that disables the active subtitle track when clicked.
744
- *
745
- * @group Components
627
+ * A radio button that disables the active subtitle track when clicked.
746
628
  */
747
629
  declare class TextTrackOffRadioButton extends RadioButton {
748
630
  private _trackList;
749
- constructor();
750
631
  get trackList(): TextTracksList | undefined;
751
632
  set trackList(trackList: TextTracksList | undefined);
752
633
  private _updateFromTrackList;
753
634
  private _updateTrackList;
754
635
  private readonly _onTrackChange;
755
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
636
+ protected handleChange(): void;
637
+ protected render(): HTMLTemplateResult;
756
638
  }
757
639
  declare global {
758
640
  interface HTMLElementTagNameMap {
@@ -772,35 +654,27 @@ interface TextTrackStyleMap {
772
654
  edgeStyle: EdgeStyle | undefined;
773
655
  }
774
656
  type TextTrackStyleOption = keyof TextTrackStyleMap;
775
- declare const TextTrackStyleRadioGroup_base: {
776
- new (): HTMLElement;
777
- prototype: HTMLElement;
778
- } & Constructor<StateReceiverElement>;
779
657
  /**
780
- * `<theoplayer-text-track-style-radio-group>` - A radio group that shows a list of values for a text track style option,
658
+ * A radio group that shows a list of values for a text track style option,
781
659
  * from which the user can choose a desired value.
782
660
  *
783
661
  * @attribute `property` - The property name of the text track style option. One of {@link TextTrackStyleOption}.
784
662
  * @slot {@link RadioButton} - The possible options for the text track style option.
785
663
  * For example: `<theoplayer-radio-button value="#ff0000">Red</theoplayer-radio-button>`
786
- * @group Components
787
664
  */
788
- declare class TextTrackStyleRadioGroup extends TextTrackStyleRadioGroup_base {
789
- static get observedAttributes(): Attribute[];
790
- private readonly _radioGroup;
791
- private readonly _optionsSlot;
665
+ declare class TextTrackStyleRadioGroup extends LitElement {
666
+ static styles: lit.CSSResult[];
667
+ private readonly _radioGroupRef;
792
668
  private _player;
793
669
  private _textTrackStyle;
670
+ private _property;
794
671
  private _value;
795
- constructor();
796
- connectedCallback(): void;
797
- disconnectedCallback(): void;
798
- protected _upgradeProperty(prop: keyof this): void;
672
+ protected firstUpdated(): void;
799
673
  /**
800
674
  * The property name of the text track style option.
801
675
  */
802
676
  get property(): TextTrackStyleOption;
803
- set property(value: TextTrackStyleOption);
677
+ set property(property: TextTrackStyleOption);
804
678
  /**
805
679
  * The currently chosen value for the text track style option.
806
680
  */
@@ -808,11 +682,10 @@ declare class TextTrackStyleRadioGroup extends TextTrackStyleRadioGroup_base {
808
682
  set value(value: string);
809
683
  get player(): ChromelessPlayer | undefined;
810
684
  set player(player: ChromelessPlayer | undefined);
811
- private readonly _updateChecked;
812
685
  private readonly _onChange;
813
686
  private readonly _updateFromPlayer;
814
687
  private _updateToPlayer;
815
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
688
+ protected render(): HTMLTemplateResult;
816
689
  }
817
690
  declare global {
818
691
  interface HTMLElementTagNameMap {
@@ -820,34 +693,26 @@ declare global {
820
693
  }
821
694
  }
822
695
 
823
- declare const TextTrackStyleDisplay_base: {
824
- new (): HTMLElement;
825
- prototype: HTMLElement;
826
- } & Constructor<StateReceiverElement>;
827
696
  /**
828
- * `<theoplayer-text-track-style-display>` - A control that displays the value of a single text track style option
697
+ * A control that displays the value of a single text track style option
829
698
  * in a human-readable format.
830
699
  *
831
700
  * @attribute `property` - The property name of the text track style option. One of {@link TextTrackStyleOption}.
832
- * @group Components
833
701
  */
834
- declare class TextTrackStyleDisplay extends TextTrackStyleDisplay_base {
835
- static get observedAttributes(): Attribute[];
836
- private readonly _spanEl;
702
+ declare class TextTrackStyleDisplay extends LitElement {
837
703
  private _player;
704
+ private _property;
838
705
  private _textTrackStyle;
839
- constructor();
840
- connectedCallback(): void;
841
- protected _upgradeProperty(prop: keyof this): void;
842
706
  /**
843
707
  * The property name of the text track style option.
844
708
  */
845
709
  get property(): TextTrackStyleOption;
846
- set property(value: TextTrackStyleOption);
710
+ set property(property: TextTrackStyleOption);
847
711
  get player(): ChromelessPlayer | undefined;
848
712
  set player(player: ChromelessPlayer | undefined);
849
713
  private readonly _updateFromPlayer;
850
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
714
+ protected render(): HTMLTemplateResult;
715
+ private renderValue;
851
716
  }
852
717
  declare global {
853
718
  interface HTMLElementTagNameMap {
@@ -856,14 +721,13 @@ declare global {
856
721
  }
857
722
 
858
723
  /**
859
- * `<theoplayer-text-track-style-menu>` - A menu to change the {@link theoplayer!TextTrackStyle | text track style} of the player.
724
+ * A menu to change the {@link theoplayer!TextTrackStyle | text track style} of the player.
860
725
  *
861
726
  * @slot `heading` - A slot for the menu's heading.
862
- *
863
- * @group Components
864
727
  */
865
728
  declare class TextTrackStyleMenu extends MenuGroup {
866
- constructor();
729
+ static styles: lit.CSSResult[];
730
+ protected render(): TemplateResult;
867
731
  }
868
732
  declare global {
869
733
  interface HTMLElementTagNameMap {
@@ -871,25 +735,23 @@ declare global {
871
735
  }
872
736
  }
873
737
 
874
- declare const LanguageMenu_base: typeof MenuGroup & Constructor<StateReceiverElement>;
875
738
  /**
876
- * `<theoplayer-language-menu>` - A menu to change the spoken language and subtitles of the stream.
739
+ * A menu to change the spoken language and subtitles of the stream.
877
740
  *
878
741
  * @slot `heading` - A slot for the menu's heading.
879
- *
880
- * @group Components
881
742
  */
882
- declare class LanguageMenu extends LanguageMenu_base {
743
+ declare class LanguageMenu extends MenuGroup {
744
+ static styles: lit.CSSResult[];
883
745
  private _player;
884
746
  private _audioTrackList;
885
747
  private _textTrackList;
886
- static get observedAttributes(): Attribute[];
887
- constructor();
888
748
  get player(): ChromelessPlayer | undefined;
889
749
  set player(player: ChromelessPlayer | undefined);
750
+ private accessor _hasAudioTracks;
751
+ private accessor _hasSubtitles;
890
752
  private readonly _updateAudioTracks;
891
753
  private readonly _updateTextTracks;
892
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
754
+ protected render(): TemplateResult;
893
755
  }
894
756
  declare global {
895
757
  interface HTMLElementTagNameMap {
@@ -897,24 +759,22 @@ declare global {
897
759
  }
898
760
  }
899
761
 
900
- declare const LanguageMenuButton_base: typeof MenuButton & Constructor<StateReceiverElement>;
901
762
  /**
902
- * `<theoplayer-language-menu-button>` - A menu button that opens a {@link LanguageMenu}.
763
+ * A menu button that opens a {@link LanguageMenu}.
903
764
  *
904
765
  * When there are no alternative audio languages or subtitles, this button automatically hides itself.
905
766
  *
906
767
  * @attribute `menu` - The ID of the language menu.
907
- * @group Components
908
768
  */
909
- declare class LanguageMenuButton extends LanguageMenuButton_base {
769
+ declare class LanguageMenuButton extends MenuButton {
910
770
  private _player;
911
771
  private _audioTrackList;
912
772
  private _textTrackList;
913
- constructor();
914
773
  connectedCallback(): void;
915
774
  get player(): ChromelessPlayer | undefined;
916
775
  set player(player: ChromelessPlayer | undefined);
917
776
  private readonly _updateTracks;
777
+ protected render(): HTMLTemplateResult;
918
778
  }
919
779
  declare global {
920
780
  interface HTMLElementTagNameMap {
@@ -922,28 +782,20 @@ declare global {
922
782
  }
923
783
  }
924
784
 
925
- declare const PlaybackRateRadioGroup_base: {
926
- new (): HTMLElement;
927
- prototype: HTMLElement;
928
- } & Constructor<StateReceiverElement>;
929
785
  /**
930
- * `<theoplayer-playback-rate-radio-group>` - A radio group that shows a list of playback rates,
786
+ * A radio group that shows a list of playback rates,
931
787
  * from which the user can choose a desired playback rate.
932
788
  *
933
789
  * @slot {@link RadioButton} - The possible options for the playback rate.
934
790
  * The value of each radio button must be a valid number.
935
791
  * For example: `<theoplayer-radio-button value="2">2x</theoplayer-radio-button>`
936
- * @group Components
937
792
  */
938
- declare class PlaybackRateRadioGroup extends PlaybackRateRadioGroup_base {
939
- private readonly _radioGroup;
940
- private readonly _optionsSlot;
793
+ declare class PlaybackRateRadioGroup extends LitElement {
794
+ static styles: lit.CSSResult[];
795
+ private readonly _radioGroupRef;
941
796
  private _player;
942
797
  private _value;
943
- constructor();
944
- protected _upgradeProperty(prop: keyof this): void;
945
- connectedCallback(): void;
946
- disconnectedCallback(): void;
798
+ protected firstUpdated(): void;
947
799
  /**
948
800
  * The currently chosen playback rate.
949
801
  */
@@ -951,9 +803,9 @@ declare class PlaybackRateRadioGroup extends PlaybackRateRadioGroup_base {
951
803
  set value(value: number);
952
804
  get player(): ChromelessPlayer | undefined;
953
805
  set player(player: ChromelessPlayer | undefined);
954
- private readonly _updateChecked;
955
806
  private readonly _onChange;
956
807
  private readonly _updateFromPlayer;
808
+ protected render(): HTMLTemplateResult;
957
809
  }
958
810
  declare global {
959
811
  interface HTMLElementTagNameMap {
@@ -962,14 +814,13 @@ declare global {
962
814
  }
963
815
 
964
816
  /**
965
- * `<theoplayer-playback-rate-menu-button>` - A menu button that opens a [playback rate menu]{@link PlaybackRateMenu}.
817
+ * A menu button that opens a [playback rate menu]{@link PlaybackRateMenu}.
966
818
  *
967
819
  * @attribute menu - The ID of the playback rate menu.
968
- * @group Components
969
820
  */
970
821
  declare class PlaybackRateMenuButton extends MenuButton {
971
- constructor();
972
822
  connectedCallback(): void;
823
+ protected render(): HTMLTemplateResult;
973
824
  }
974
825
  declare global {
975
826
  interface HTMLElementTagNameMap {
@@ -978,14 +829,13 @@ declare global {
978
829
  }
979
830
 
980
831
  /**
981
- * `<theoplayer-playback-rate-menu>` - A menu to change the playback rate of the player.
832
+ * A menu to change the playback rate of the player.
982
833
  *
983
834
  * @slot `heading` - A slot for the menu's heading.
984
- *
985
- * @group Components
986
835
  */
987
836
  declare class PlaybackRateMenu extends Menu {
988
- constructor();
837
+ protected renderMenuHeading(): HTMLTemplateResult;
838
+ protected renderMenuContent(): HTMLTemplateResult;
989
839
  }
990
840
  declare global {
991
841
  interface HTMLElementTagNameMap {
@@ -993,23 +843,15 @@ declare global {
993
843
  }
994
844
  }
995
845
 
996
- declare const PlaybackRateDisplay_base: {
997
- new (): HTMLElement;
998
- prototype: HTMLElement;
999
- } & Constructor<StateReceiverElement>;
1000
846
  /**
1001
- * `<theoplayer-playback-rate-display>` - A control that displays the current playback rate of the player.
1002
- *
1003
- * @group Components
847
+ * A control that displays the current playback rate of the player.
1004
848
  */
1005
- declare class PlaybackRateDisplay extends PlaybackRateDisplay_base {
1006
- private readonly _spanEl;
1007
- private _playbackRate;
1008
- constructor();
1009
- connectedCallback(): void;
1010
- protected _upgradeProperty(prop: keyof this): void;
1011
- get playbackRate(): number;
1012
- set playbackRate(value: number);
849
+ declare class PlaybackRateDisplay extends LitElement {
850
+ /**
851
+ * The current playback rate.
852
+ */
853
+ accessor playbackRate: number;
854
+ protected render(): HTMLTemplateResult;
1013
855
  }
1014
856
  declare global {
1015
857
  interface HTMLElementTagNameMap {
@@ -1017,27 +859,13 @@ declare global {
1017
859
  }
1018
860
  }
1019
861
 
1020
- declare const ActiveQualityDisplay_base: {
1021
- new (): HTMLElement;
1022
- prototype: HTMLElement;
1023
- } & Constructor<StateReceiverElement>;
1024
862
  /**
1025
- * `<theoplayer-active-quality-display>` - A control that displays the name of the active video quality.
1026
- *
1027
- * @group Components
863
+ * A control that displays the name of the active video quality.
1028
864
  */
1029
- declare class ActiveQualityDisplay extends ActiveQualityDisplay_base {
1030
- private readonly _spanEl;
1031
- private _activeVideoQuality;
1032
- private _targetVideoQualities;
1033
- constructor();
1034
- connectedCallback(): void;
1035
- protected _upgradeProperty(prop: keyof this): void;
1036
- get activeVideoQuality(): VideoQuality | undefined;
1037
- set activeVideoQuality(quality: VideoQuality | undefined);
1038
- get targetVideoQualities(): VideoQuality[] | undefined;
1039
- set targetVideoQualities(qualities: VideoQuality[] | undefined);
1040
- private update_;
865
+ declare class ActiveQualityDisplay extends LitElement {
866
+ accessor activeVideoQuality: VideoQuality | undefined;
867
+ accessor targetVideoQualities: VideoQuality[] | undefined;
868
+ protected render(): HTMLTemplateResult;
1041
869
  }
1042
870
  declare global {
1043
871
  interface HTMLElementTagNameMap {
@@ -1046,16 +874,13 @@ declare global {
1046
874
  }
1047
875
 
1048
876
  /**
1049
- * `<theoplayer-quality-radio-button>` - A radio button that shows the label of a given video quality,
877
+ * A radio button that shows the label of a given video quality,
1050
878
  * and switches the video track's {@link theoplayer!MediaTrack.targetQuality | target quality} to that quality when clicked.
1051
- *
1052
- * @group Components
1053
879
  */
1054
880
  declare class QualityRadioButton extends RadioButton {
1055
- private _slotEl;
1056
881
  private _track;
1057
882
  private _quality;
1058
- constructor();
883
+ private accessor _qualityLabel;
1059
884
  /**
1060
885
  * The video track containing the quality being controlled.
1061
886
  */
@@ -1068,8 +893,9 @@ declare class QualityRadioButton extends RadioButton {
1068
893
  set quality(quality: VideoQuality | undefined);
1069
894
  private readonly _updateFromTrack;
1070
895
  private readonly _updateFromQuality;
896
+ protected handleChange(): void;
1071
897
  private _updateTargetQuality;
1072
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
898
+ protected render(): HTMLTemplateResult;
1073
899
  }
1074
900
  declare global {
1075
901
  interface HTMLElementTagNameMap {
@@ -1077,30 +903,22 @@ declare global {
1077
903
  }
1078
904
  }
1079
905
 
1080
- declare const QualityRadioGroup_base: {
1081
- new (): HTMLElement;
1082
- prototype: HTMLElement;
1083
- } & Constructor<StateReceiverElement>;
1084
906
  /**
1085
- * `<theoplayer-quality-radio-group>` - A radio group that shows a list of available video qualities,
907
+ * A radio group that shows a list of available video qualities,
1086
908
  * from which the user can choose a desired target quality.
1087
- *
1088
- * @group Components
1089
909
  */
1090
- declare class QualityRadioGroup extends QualityRadioGroup_base {
1091
- private readonly _radioGroup;
910
+ declare class QualityRadioGroup extends LitElement {
911
+ static styles: lit.CSSResult[];
1092
912
  private _player;
1093
913
  private _videoTracks;
1094
- private _track;
1095
- constructor();
1096
- protected _upgradeProperty(prop: keyof this): void;
1097
- connectedCallback(): void;
1098
- disconnectedCallback(): void;
914
+ private accessor _track;
915
+ protected firstUpdated(): void;
1099
916
  get player(): ChromelessPlayer | undefined;
1100
917
  set player(player: ChromelessPlayer | undefined);
1101
918
  private readonly _onChange;
1102
919
  private readonly _updateTrack;
1103
- private readonly _update;
920
+ private _update;
921
+ protected render(): HTMLTemplateResult;
1104
922
  }
1105
923
  declare global {
1106
924
  interface HTMLElementTagNameMap {
@@ -1108,19 +926,15 @@ declare global {
1108
926
  }
1109
927
  }
1110
928
 
1111
- declare const TextTrackStyleResetButton_base: typeof Button & Constructor<StateReceiverElement>;
1112
929
  /**
1113
- * `<theoplayer-text-track-style-reset-button>` - A button that resets the text track style.
1114
- *
1115
- * @group Components
930
+ * A button that resets the text track style.
1116
931
  */
1117
- declare class TextTrackStyleResetButton extends TextTrackStyleResetButton_base {
1118
- static get observedAttributes(): Attribute[];
932
+ declare class TextTrackStyleResetButton extends Button {
1119
933
  private _player;
1120
- constructor();
1121
934
  get player(): ChromelessPlayer | undefined;
1122
935
  set player(player: ChromelessPlayer | undefined);
1123
936
  protected handleClick(): void;
937
+ protected render(): HTMLTemplateResult;
1124
938
  }
1125
939
  declare global {
1126
940
  interface HTMLElementTagNameMap {
@@ -1129,15 +943,14 @@ declare global {
1129
943
  }
1130
944
 
1131
945
  /**
1132
- * `<theoplayer-settings-menu>` - A menu to change the settings of the player,
946
+ * A menu to change the settings of the player,
1133
947
  * such as the active video quality and the playback speed.
1134
948
  *
1135
949
  * @slot `heading` - A slot for the menu's heading.
1136
- *
1137
- * @group Components
1138
950
  */
1139
951
  declare class SettingsMenu extends MenuGroup {
1140
- constructor();
952
+ static styles: lit.CSSResult[];
953
+ protected render(): TemplateResult;
1141
954
  }
1142
955
  declare global {
1143
956
  interface HTMLElementTagNameMap {
@@ -1146,14 +959,13 @@ declare global {
1146
959
  }
1147
960
 
1148
961
  /**
1149
- * `<theoplayer-settings-menu-button>` - A menu button that opens a {@link SettingsMenu}.
962
+ * A menu button that opens a {@link SettingsMenu}.
1150
963
  *
1151
964
  * @attribute `menu` - The ID of the settings menu.
1152
- * @group Components
1153
965
  */
1154
966
  declare class SettingsMenuButton extends MenuButton {
1155
- constructor();
1156
967
  connectedCallback(): void;
968
+ protected render(): HTMLTemplateResult;
1157
969
  }
1158
970
  declare global {
1159
971
  interface HTMLElementTagNameMap {
@@ -1161,21 +973,17 @@ declare global {
1161
973
  }
1162
974
  }
1163
975
 
1164
- declare const FullscreenButton_base: typeof Button & Constructor<StateReceiverElement>;
1165
976
  /**
1166
- * `<theoplayer-fullscreen-button>` - A button that toggles fullscreen.
1167
- *
1168
- * @group Components
977
+ * A button that toggles fullscreen.
1169
978
  */
1170
- declare class FullscreenButton extends FullscreenButton_base {
1171
- static get observedAttributes(): Attribute[];
1172
- constructor();
979
+ declare class FullscreenButton extends Button {
980
+ static styles: lit.CSSResult[];
1173
981
  connectedCallback(): void;
1174
- get fullscreen(): boolean;
1175
- set fullscreen(fullscreen: boolean);
982
+ accessor fullscreen: boolean;
1176
983
  protected handleClick(): void;
1177
984
  attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1178
985
  private _updateAriaLabel;
986
+ protected render(): HTMLTemplateResult;
1179
987
  }
1180
988
  declare global {
1181
989
  interface HTMLElementTagNameMap {
@@ -1190,14 +998,6 @@ declare class ColorStops {
1190
998
  toGradientStops(): string;
1191
999
  }
1192
1000
 
1193
- interface RangeOptions {
1194
- template: HTMLTemplateElement;
1195
- }
1196
- declare function rangeTemplate(range: string, extraCss?: string): string;
1197
- declare const Range_base: {
1198
- new (): HTMLElement;
1199
- prototype: HTMLElement;
1200
- } & Constructor<StateReceiverElement>;
1201
1001
  /**
1202
1002
  * A slider to select a value from a range.
1203
1003
  *
@@ -1208,14 +1008,18 @@ declare const Range_base: {
1208
1008
  *
1209
1009
  * @group Components
1210
1010
  */
1211
- declare abstract class Range extends Range_base {
1212
- static get observedAttributes(): Attribute[];
1213
- protected readonly _rangeEl: HTMLInputElement;
1214
- protected readonly _pointerEl: HTMLElement;
1011
+ declare abstract class Range extends LitElement {
1012
+ static styles: lit.CSSResult[];
1013
+ protected readonly _rangeRef: Ref<HTMLInputElement>;
1014
+ private _min;
1015
+ private _max;
1016
+ private _value;
1017
+ private _disabled;
1018
+ private _hidden;
1019
+ private _inert;
1215
1020
  private _rangeWidth;
1216
1021
  private _thumbWidth;
1217
- constructor(options: RangeOptions);
1218
- protected _upgradeProperty(prop: keyof this): void;
1022
+ private accessor _pointerWidth;
1219
1023
  connectedCallback(): void;
1220
1024
  disconnectedCallback(): void;
1221
1025
  /**
@@ -1225,6 +1029,11 @@ declare abstract class Range extends Range_base {
1225
1029
  */
1226
1030
  get disabled(): boolean;
1227
1031
  set disabled(disabled: boolean);
1032
+ /**
1033
+ * Whether the range is hidden.
1034
+ */
1035
+ get hidden(): boolean;
1036
+ set hidden(hidden: boolean);
1228
1037
  /**
1229
1038
  * Whether the range is inert.
1230
1039
  *
@@ -1252,14 +1061,12 @@ declare abstract class Range extends Range_base {
1252
1061
  *
1253
1062
  * If set to `"any"`, the value can change with arbitrary precision.
1254
1063
  */
1255
- get step(): number | 'any';
1256
- set step(step: number | 'any');
1257
- get deviceType(): DeviceType;
1258
- set deviceType(deviceType: DeviceType);
1259
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1064
+ accessor step: number | 'any';
1065
+ accessor deviceType: DeviceType;
1066
+ accessor ariaLive: string | null;
1260
1067
  private readonly _onInput;
1261
1068
  protected handleInput(): void;
1262
- protected update(useCachedWidth?: boolean): void;
1069
+ protected _updateRange(useCachedWidth?: boolean): void;
1263
1070
  /**
1264
1071
  * The value for the `aria-label` attribute of the `<input type="range">` element.
1265
1072
  */
@@ -1286,14 +1093,12 @@ declare abstract class Range extends Range_base {
1286
1093
  protected updatePointer_(mousePercent: number, rangeRect: DOMRectReadOnly): void;
1287
1094
  private readonly _onKeyDown;
1288
1095
  protected handleKeyDown_(e: KeyboardEvent): void;
1096
+ protected render(): HTMLTemplateResult;
1097
+ protected renderRangeExtras(): HTMLTemplateResult;
1289
1098
  }
1290
1099
 
1291
- declare const PreviewThumbnail_base: {
1292
- new (): HTMLElement;
1293
- prototype: HTMLElement;
1294
- } & Constructor<StateReceiverElement>;
1295
1100
  /**
1296
- * `<theoplayer-preview-thumbnail>` - A display that shows the thumbnail image at the current preview time
1101
+ * A display that shows the thumbnail image at the current preview time
1297
1102
  * of a {@link TimeRange | `<theoplayer-time-range>`}.
1298
1103
  *
1299
1104
  * The first `metadata` text track whose label equals `"thumbnails"` is used as source for the thumbnails.
@@ -1302,20 +1107,19 @@ declare const PreviewThumbnail_base: {
1302
1107
  * (e.g. `#xywh=180,80,60,40`), then the thumbnail is clipped to the rectangle defined by that fragment.
1303
1108
  *
1304
1109
  * If the stream does not contain thumbnails, then this display shows nothing.
1305
- * @group Components
1306
1110
  */
1307
- declare class PreviewThumbnail extends PreviewThumbnail_base {
1308
- private readonly _canvasEl;
1309
- private readonly _canvasContext;
1111
+ declare class PreviewThumbnail extends LitElement {
1112
+ static styles: lit.CSSResult[];
1113
+ private readonly _canvasRef;
1114
+ private _canvasContext;
1310
1115
  private readonly _thumbnailImageSource;
1311
1116
  private _player;
1312
1117
  private _textTrackList;
1313
1118
  private _previewTime;
1314
1119
  private _thumbnailTextTrack;
1315
1120
  private _lastLoadedThumbnailUrl;
1121
+ private accessor _thumbnailVisible;
1316
1122
  constructor();
1317
- protected _upgradeProperty(prop: keyof this): void;
1318
- connectedCallback(): void;
1319
1123
  get player(): ChromelessPlayer | undefined;
1320
1124
  set player(player: ChromelessPlayer | undefined);
1321
1125
  get previewTime(): number;
@@ -1325,6 +1129,7 @@ declare class PreviewThumbnail extends PreviewThumbnail_base {
1325
1129
  private loadThumbnailImage_;
1326
1130
  private showThumbnail_;
1327
1131
  private hideThumbnail_;
1132
+ protected render(): HTMLTemplateResult;
1328
1133
  }
1329
1134
  declare global {
1330
1135
  interface HTMLElementTagNameMap {
@@ -1332,34 +1137,26 @@ declare global {
1332
1137
  }
1333
1138
  }
1334
1139
 
1335
- declare const PreviewTimeDisplay_base: {
1336
- new (): HTMLElement;
1337
- prototype: HTMLElement;
1338
- } & Constructor<StateReceiverElement>;
1339
1140
  /**
1340
- * `<theoplayer-preview-time-display>` - A display that shows the current preview time of a {@link TimeRange | `<theoplayer-time-range>`}.
1141
+ * A display that shows the current preview time of a {@link TimeRange | `<theoplayer-time-range>`}.
1341
1142
  *
1342
1143
  * @attribute `remaining` - If set, shows the remaining time of the stream.
1343
1144
  * @attribute `remaining-when-live` - If set, and the stream is a livestream, shows the remaining time
1344
1145
  * (until the live point) of the stream.
1345
- * @group Components
1346
1146
  */
1347
- declare class PreviewTimeDisplay extends PreviewTimeDisplay_base {
1348
- private readonly _spanEl;
1349
- private _previewTime;
1147
+ declare class PreviewTimeDisplay extends LitElement {
1148
+ static styles: lit.CSSResult[];
1350
1149
  private _player;
1351
- static get observedAttributes(): Attribute[];
1352
- constructor();
1353
- protected _upgradeProperty(prop: keyof this): void;
1354
1150
  connectedCallback(): void;
1355
- get previewTime(): number;
1356
- set previewTime(previewTime: number);
1357
- get streamType(): StreamType;
1358
- set streamType(streamType: StreamType);
1151
+ accessor previewTime: number;
1152
+ accessor remaining: boolean;
1153
+ accessor remainingWhenLive: boolean;
1154
+ accessor streamType: StreamType;
1359
1155
  get player(): ChromelessPlayer | undefined;
1360
1156
  set player(player: ChromelessPlayer | undefined);
1361
- private readonly _update;
1362
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1157
+ private accessor _endTime;
1158
+ private readonly _updateFromPlayer;
1159
+ protected render(): HTMLTemplateResult;
1363
1160
  }
1364
1161
  declare global {
1365
1162
  interface HTMLElementTagNameMap {
@@ -1367,21 +1164,20 @@ declare global {
1367
1164
  }
1368
1165
  }
1369
1166
 
1370
- declare const TimeRange_base: typeof Range & Constructor<StateReceiverElement>;
1371
1167
  /**
1372
- * `<theoplayer-time-range>` - A seek bar, showing the current time of the player,
1168
+ * A seek bar, showing the current time of the player,
1373
1169
  * and which seeks the player when clicked or dragged.
1374
1170
  *
1375
1171
  * @slot `preview` - A slot holding a preview of the seek time, shown while hovering the seek bar.
1376
1172
  * By default, this shows the {@link PreviewTimeDisplay | preview time} and
1377
1173
  * the {@link PreviewThumbnail | preview thumbnail}.
1378
- * @group Components
1379
1174
  */
1380
- declare class TimeRange extends TimeRange_base {
1381
- static get observedAttributes(): Attribute[];
1382
- private readonly _previewRailEl;
1175
+ declare class TimeRange extends Range {
1176
+ static styles: lit.CSSResult[];
1383
1177
  private readonly _previewBoxEl;
1384
1178
  private _player;
1179
+ private _streamType;
1180
+ private _showAdMarkers;
1385
1181
  private _ads;
1386
1182
  private _pausedWhileScrubbing;
1387
1183
  private _autoAdvanceId;
@@ -1390,16 +1186,18 @@ declare class TimeRange extends TimeRange_base {
1390
1186
  private _lastPlaybackRate;
1391
1187
  constructor();
1392
1188
  connectedCallback(): void;
1189
+ protected firstUpdated(_changedProperties: PropertyValues): void;
1393
1190
  disconnectedCallback(): void;
1394
1191
  get player(): ChromelessPlayer | undefined;
1395
1192
  set player(player: ChromelessPlayer | undefined);
1396
1193
  get streamType(): StreamType;
1397
1194
  set streamType(streamType: StreamType);
1195
+ get showAdMarkers(): boolean;
1196
+ set showAdMarkers(showAdMarkers: boolean);
1398
1197
  private readonly _updateFromPlayer;
1399
1198
  private updateDisabled_;
1400
1199
  protected getAriaLabel(): string;
1401
1200
  protected getAriaValueText(): string;
1402
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1403
1201
  protected handleInput(): void;
1404
1202
  private readonly _pauseOnScrubStart;
1405
1203
  private readonly _playOnScrubEnd;
@@ -1407,10 +1205,12 @@ declare class TimeRange extends TimeRange_base {
1407
1205
  private needToUpdateEveryFrame_;
1408
1206
  private readonly _toggleAutoAdvance;
1409
1207
  private readonly _autoAdvanceWhilePlaying;
1208
+ private accessor _previewRailTransform;
1410
1209
  protected updatePointer_(mousePercent: number, rangeRect: DOMRectReadOnly): void;
1411
1210
  protected getBarColors(): ColorStops;
1412
1211
  private readonly _onAdChange;
1413
1212
  protected handleKeyDown_(e: KeyboardEvent): void;
1213
+ protected renderRangeExtras(): HTMLTemplateResult;
1414
1214
  }
1415
1215
  declare global {
1416
1216
  interface HTMLElementTagNameMap {
@@ -1418,16 +1218,14 @@ declare global {
1418
1218
  }
1419
1219
  }
1420
1220
 
1421
- declare const VolumeRange_base: typeof Range & Constructor<StateReceiverElement>;
1422
1221
  /**
1423
- * `<theoplayer-volume-range>` - A volume slider, showing the current audio volume of the player,
1222
+ * A volume slider, showing the current audio volume of the player,
1424
1223
  * and which changes the volume when clicked or dragged.
1425
- *
1426
- * @group Components
1427
1224
  */
1428
- declare class VolumeRange extends VolumeRange_base {
1225
+ declare class VolumeRange extends Range {
1429
1226
  private _player;
1430
1227
  constructor();
1228
+ connectedCallback(): void;
1431
1229
  get player(): ChromelessPlayer | undefined;
1432
1230
  set player(player: ChromelessPlayer | undefined);
1433
1231
  private readonly _updateFromPlayer;
@@ -1441,30 +1239,18 @@ declare global {
1441
1239
  }
1442
1240
  }
1443
1241
 
1444
- declare const ErrorDisplay_base: {
1445
- new (): HTMLElement;
1446
- prototype: HTMLElement;
1447
- } & Constructor<StateReceiverElement>;
1448
1242
  /**
1449
- * `<theoplayer-error-display>` - A screen that shows the details of a fatal player error.
1450
- *
1451
- * @group Components
1243
+ * A screen that shows the details of a fatal player error.
1452
1244
  */
1453
- declare class ErrorDisplay extends ErrorDisplay_base {
1454
- private readonly _messageSlot;
1455
- private _error;
1456
- static get observedAttributes(): Attribute[];
1457
- constructor();
1458
- protected _upgradeProperty(prop: keyof this): void;
1459
- connectedCallback(): void;
1245
+ declare class ErrorDisplay extends LitElement {
1246
+ static styles: lit.CSSResult[];
1247
+ static shadowRootOptions: ShadowRootInit;
1460
1248
  /**
1461
1249
  * The error.
1462
1250
  */
1463
- get error(): THEOplayerError | undefined;
1464
- set error(error: THEOplayerError | undefined);
1465
- get fullscreen(): boolean;
1466
- set fullscreen(fullscreen: boolean);
1467
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1251
+ accessor error: THEOplayerError | undefined;
1252
+ accessor fullscreen: boolean;
1253
+ protected render(): lit_html.TemplateResult<1>;
1468
1254
  }
1469
1255
  declare global {
1470
1256
  interface HTMLElementTagNameMap {
@@ -1480,7 +1266,7 @@ declare global {
1480
1266
  */
1481
1267
  declare class CastButton extends Button {
1482
1268
  private _castApi;
1483
- static get observedAttributes(): Attribute[];
1269
+ private _castState;
1484
1270
  constructor(options?: ButtonOptions);
1485
1271
  connectedCallback(): void;
1486
1272
  /**
@@ -1492,25 +1278,25 @@ declare class CastButton extends Button {
1492
1278
  * The current cast state.
1493
1279
  */
1494
1280
  get castState(): CastState;
1281
+ private set castState(value);
1495
1282
  protected handleClick(): void;
1496
1283
  private readonly _updateCastState;
1497
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1498
1284
  }
1499
1285
 
1500
- declare const ChromecastButton_base: typeof CastButton & Constructor<StateReceiverElement>;
1501
1286
  /**
1502
- * `<theoplayer-chromecast-button>` - A button to start and stop casting using Chromecast.
1503
- *
1504
- * @group Components
1287
+ * A button to start and stop casting using Chromecast.
1505
1288
  */
1506
- declare class ChromecastButton extends ChromecastButton_base {
1289
+ declare class ChromecastButton extends CastButton {
1290
+ static styles: lit.CSSResult[];
1507
1291
  private _player;
1292
+ private readonly _buttonId;
1508
1293
  constructor();
1509
1294
  connectedCallback(): void;
1510
1295
  get player(): ChromelessPlayer | undefined;
1511
1296
  set player(player: ChromelessPlayer | undefined);
1512
1297
  attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1513
1298
  private _updateAriaLabel;
1299
+ protected render(): lit_html.TemplateResult<1>;
1514
1300
  }
1515
1301
  declare global {
1516
1302
  interface HTMLElementTagNameMap {
@@ -1518,25 +1304,19 @@ declare global {
1518
1304
  }
1519
1305
  }
1520
1306
 
1521
- declare const ChromecastDisplay_base: {
1522
- new (): HTMLElement;
1523
- prototype: HTMLElement;
1524
- } & Constructor<StateReceiverElement>;
1525
1307
  /**
1526
- * `<theoplayer-chromecast-display>` - A control that displays the casting status while using Chromecast.
1527
- *
1528
- * @group Components
1308
+ * A control that displays the casting status while using Chromecast.
1529
1309
  */
1530
- declare class ChromecastDisplay extends ChromecastDisplay_base {
1531
- private readonly _receiverNameEl;
1310
+ declare class ChromecastDisplay extends LitElement {
1311
+ static styles: lit.CSSResult[];
1532
1312
  private _player;
1533
1313
  private _castApi;
1534
- constructor();
1535
- protected _upgradeProperty(prop: keyof this): void;
1314
+ private accessor _receiverName;
1536
1315
  connectedCallback(): void;
1537
1316
  get player(): ChromelessPlayer | undefined;
1538
1317
  set player(player: ChromelessPlayer | undefined);
1539
1318
  private readonly _updateFromPlayer;
1319
+ protected render(): HTMLTemplateResult;
1540
1320
  }
1541
1321
  declare global {
1542
1322
  interface HTMLElementTagNameMap {
@@ -1544,20 +1324,18 @@ declare global {
1544
1324
  }
1545
1325
  }
1546
1326
 
1547
- declare const AirPlayButton_base: typeof CastButton & Constructor<StateReceiverElement>;
1548
1327
  /**
1549
- * `<theoplayer-airplay-button>` - A button to start and stop casting using AirPlay.
1550
- *
1551
- * @group Components
1328
+ * A button to start and stop casting using AirPlay.
1552
1329
  */
1553
- declare class AirPlayButton extends AirPlayButton_base {
1330
+ declare class AirPlayButton extends CastButton {
1331
+ static styles: lit.CSSResult[];
1554
1332
  private _player;
1555
- constructor();
1556
1333
  connectedCallback(): void;
1557
1334
  get player(): ChromelessPlayer | undefined;
1558
1335
  set player(player: ChromelessPlayer | undefined);
1559
1336
  attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1560
1337
  private _updateAriaLabel;
1338
+ protected render(): lit_html.TemplateResult<1>;
1561
1339
  }
1562
1340
  declare global {
1563
1341
  interface HTMLElementTagNameMap {
@@ -1565,26 +1343,19 @@ declare global {
1565
1343
  }
1566
1344
  }
1567
1345
 
1568
- declare const LoadingIndicator_base: {
1569
- new (): HTMLElement;
1570
- prototype: HTMLElement;
1571
- } & Constructor<StateReceiverElement>;
1572
1346
  /**
1573
- * `<theoplayer-loading-indicator>` - An indicator that shows whether the player is currently waiting for more data to resume playback.
1347
+ * An indicator that shows whether the player is currently waiting for more data to resume playback.
1574
1348
  *
1575
1349
  * @attribute `loading` (readonly) - Whether the player is waiting for more data. If set, the indicator is shown.
1576
- * @group Components
1577
1350
  */
1578
- declare class LoadingIndicator extends LoadingIndicator_base {
1351
+ declare class LoadingIndicator extends LitElement {
1352
+ static styles: lit.CSSResult[];
1579
1353
  private _player;
1580
- static get observedAttributes(): Attribute[];
1581
- constructor();
1582
- protected _upgradeProperty(prop: keyof this): void;
1583
- connectedCallback(): void;
1584
1354
  get player(): ChromelessPlayer | undefined;
1585
1355
  set player(player: ChromelessPlayer | undefined);
1356
+ accessor loading: boolean;
1586
1357
  private readonly _updateFromPlayer;
1587
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1358
+ protected render(): HTMLTemplateResult;
1588
1359
  }
1589
1360
  declare global {
1590
1361
  interface HTMLElementTagNameMap {
@@ -1592,31 +1363,26 @@ declare global {
1592
1363
  }
1593
1364
  }
1594
1365
 
1595
- declare const GestureReceiver_base: {
1596
- new (): HTMLElement;
1597
- prototype: HTMLElement;
1598
- } & Constructor<StateReceiverElement>;
1599
1366
  /**
1600
- * `<theoplayer-gesture-receiver>` - An overlay that receives and handles gestures on the player.
1367
+ * An overlay that receives and handles gestures on the player.
1601
1368
  *
1602
1369
  * On desktop devices, this plays or pauses the player whenever it is clicked.
1603
1370
  * On mobile devices, this currently does nothing.
1604
- *
1605
- * @group Components
1606
1371
  */
1607
- declare class GestureReceiver extends GestureReceiver_base {
1372
+ declare class GestureReceiver extends LitElement {
1373
+ static styles: lit.CSSResult[];
1608
1374
  private _player;
1609
1375
  private _playerElement;
1610
1376
  private _pointerType;
1611
- constructor();
1612
- protected _upgradeProperty(prop: keyof this): void;
1613
1377
  connectedCallback(): void;
1614
1378
  get player(): ChromelessPlayer | undefined;
1615
1379
  set player(player: ChromelessPlayer | undefined);
1380
+ accessor deviceType: DeviceType;
1616
1381
  private readonly _onPointerDown;
1617
1382
  private readonly _onClick;
1618
1383
  handleTap(_event: MouseEvent): void;
1619
1384
  handleMouseClick(_event: MouseEvent): void;
1385
+ protected render(): HTMLTemplateResult;
1620
1386
  }
1621
1387
  declare global {
1622
1388
  interface HTMLElementTagNameMap {
@@ -1624,35 +1390,30 @@ declare global {
1624
1390
  }
1625
1391
  }
1626
1392
 
1627
- declare const LiveButton_base: typeof Button & Constructor<StateReceiverElement>;
1628
1393
  /**
1629
- * `<theoplayer-live-button>` - A button that shows whether the player is currently playing at the live point,
1394
+ * A button that shows whether the player is currently playing at the live point,
1630
1395
  * and seeks to the live point when clicked.
1631
1396
  *
1632
1397
  * @attribute `live-threshold` - The maximum distance (in seconds) from the live point that the player's current time
1633
1398
  * can be for it to still be considered "at the live point". If unset, defaults to 10 seconds.
1634
1399
  * @attribute `live` (readonly) - Whether the player is considered to be playing at the live point.
1635
- * @group Components
1636
1400
  */
1637
- declare class LiveButton extends LiveButton_base {
1638
- static get observedAttributes(): Attribute[];
1401
+ declare class LiveButton extends Button {
1402
+ static styles: lit.CSSResult[];
1639
1403
  private _player;
1640
- constructor();
1404
+ private _liveThreshold;
1641
1405
  connectedCallback(): void;
1642
- get paused(): boolean;
1643
- set paused(paused: boolean);
1644
- get streamType(): StreamType;
1645
- set streamType(streamType: StreamType);
1406
+ accessor paused: boolean;
1407
+ accessor streamType: StreamType;
1646
1408
  get liveThreshold(): number;
1647
1409
  set liveThreshold(value: number);
1648
- get live(): boolean;
1649
- set live(live: boolean);
1410
+ accessor live: boolean;
1650
1411
  get player(): ChromelessPlayer | undefined;
1651
1412
  set player(player: ChromelessPlayer | undefined);
1652
1413
  private readonly _updatePaused;
1653
1414
  private readonly _updateLive;
1654
1415
  protected handleClick(): void;
1655
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1416
+ protected render(): HTMLTemplateResult;
1656
1417
  }
1657
1418
  declare global {
1658
1419
  interface HTMLElementTagNameMap {
@@ -1661,7 +1422,7 @@ declare global {
1661
1422
  }
1662
1423
 
1663
1424
  /**
1664
- * `<theoplayer-slot-container>` - A container that can be assigned to a slot,
1425
+ * A container that can be assigned to a slot,
1665
1426
  * and behaves as if all its children are directly assigned to that slot.
1666
1427
  *
1667
1428
  * This behaves approximately like a regular `<div>` with style `display: contents`,
@@ -1671,12 +1432,11 @@ declare global {
1671
1432
  *
1672
1433
  * This is an internal component, used mainly by Open Video UI for React.
1673
1434
  * You shouldn't need this under normal circumstances.
1674
- *
1675
- * @group Components
1676
1435
  * @internal
1677
1436
  */
1678
- declare class SlotContainer extends HTMLElement {
1679
- constructor();
1437
+ declare class SlotContainer extends LitElement {
1438
+ static styles: lit.CSSResult[];
1439
+ protected render(): HTMLTemplateResult;
1680
1440
  }
1681
1441
  declare global {
1682
1442
  interface HTMLElementTagNameMap {
@@ -1684,26 +1444,20 @@ declare global {
1684
1444
  }
1685
1445
  }
1686
1446
 
1687
- declare const AdDisplay_base: {
1688
- new (): HTMLElement;
1689
- prototype: HTMLElement;
1690
- } & Constructor<StateReceiverElement>;
1691
1447
  /**
1692
- * `<theoplayer-ad-countdown>` - A control that shows when an advertisement is playing,
1448
+ * A control that shows when an advertisement is playing,
1693
1449
  * and the number of the current ad in the ad break (if the break has multiple ads).
1694
- *
1695
- * @group Components
1696
1450
  */
1697
- declare class AdDisplay extends AdDisplay_base {
1698
- private readonly _spanEl;
1451
+ declare class AdDisplay extends LitElement {
1452
+ static styles: lit.CSSResult[];
1699
1453
  private _player;
1700
1454
  private _ads;
1701
- constructor();
1702
- protected _upgradeProperty(prop: keyof this): void;
1455
+ private accessor _text;
1703
1456
  connectedCallback(): void;
1704
1457
  get player(): ChromelessPlayer | undefined;
1705
1458
  set player(player: ChromelessPlayer | undefined);
1706
1459
  private readonly _updateFromPlayer;
1460
+ protected render(): HTMLTemplateResult;
1707
1461
  }
1708
1462
  declare global {
1709
1463
  interface HTMLElementTagNameMap {
@@ -1711,26 +1465,19 @@ declare global {
1711
1465
  }
1712
1466
  }
1713
1467
 
1714
- declare const AdCountdown_base: {
1715
- new (): HTMLElement;
1716
- prototype: HTMLElement;
1717
- } & Constructor<StateReceiverElement>;
1718
1468
  /**
1719
- * `<theoplayer-ad-countdown>` - A control that displays the remaining time of the current ad break.
1720
- *
1721
- * @group Components
1469
+ * A control that displays the remaining time of the current ad break.
1722
1470
  */
1723
- declare class AdCountdown extends AdCountdown_base {
1724
- private readonly _spanEl;
1471
+ declare class AdCountdown extends LitElement {
1472
+ static styles: lit.CSSResult[];
1725
1473
  private _player;
1726
1474
  private _ads;
1727
- constructor();
1728
- protected _upgradeProperty(prop: keyof this): void;
1729
- connectedCallback(): void;
1475
+ private accessor _maxRemainingDuration;
1730
1476
  get player(): ChromelessPlayer | undefined;
1731
1477
  set player(player: ChromelessPlayer | undefined);
1732
1478
  private readonly _onAdChange;
1733
1479
  private readonly _update;
1480
+ protected render(): HTMLTemplateResult;
1734
1481
  }
1735
1482
  declare global {
1736
1483
  interface HTMLElementTagNameMap {
@@ -1738,25 +1485,22 @@ declare global {
1738
1485
  }
1739
1486
  }
1740
1487
 
1741
- declare const AdClickThroughButton_base: typeof LinkButton & Constructor<StateReceiverElement>;
1742
1488
  /**
1743
- * `<theoplayer-ad-clickthrough-button>` - A button to open the advertisement's click-through webpage.
1744
- *
1745
- * @group Components
1489
+ * A button to open the advertisement's click-through webpage.
1746
1490
  */
1747
- declare class AdClickThroughButton extends AdClickThroughButton_base {
1491
+ declare class AdClickThroughButton extends LinkButton {
1748
1492
  private _player;
1749
1493
  private _ads;
1750
- static get observedAttributes(): Attribute[];
1494
+ private _clickThrough;
1751
1495
  constructor();
1752
1496
  connectedCallback(): void;
1753
1497
  get clickThrough(): string | null;
1754
1498
  set clickThrough(clickThrough: string | null);
1755
1499
  get player(): ChromelessPlayer | undefined;
1756
1500
  set player(player: ChromelessPlayer | undefined);
1757
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1758
1501
  private readonly _updateFromPlayer;
1759
1502
  protected handleClick(): void;
1503
+ protected renderLinkContent(): HTMLTemplateResult;
1760
1504
  }
1761
1505
  declare global {
1762
1506
  interface HTMLElementTagNameMap {
@@ -1764,27 +1508,23 @@ declare global {
1764
1508
  }
1765
1509
  }
1766
1510
 
1767
- declare const AdSkipButton_base: typeof Button & Constructor<StateReceiverElement>;
1768
1511
  /**
1769
- * `<theoplayer-ad-skip-button>` - A button that skips the current advertisement (if skippable).
1512
+ * A button that skips the current advertisement (if skippable).
1770
1513
  * If the ad cannot be skipped yet, it shows the remaining time until it can be skipped.
1771
- *
1772
- * @group Components
1773
1514
  */
1774
- declare class AdSkipButton extends AdSkipButton_base {
1775
- private readonly _countdownEl;
1776
- private readonly _skipEl;
1515
+ declare class AdSkipButton extends Button {
1516
+ static styles: lit.CSSResult[];
1777
1517
  private _player;
1778
1518
  private _ads;
1779
- static get observedAttributes(): Attribute[];
1780
- constructor();
1519
+ private accessor _showCountdown;
1520
+ private accessor _timeToSkip;
1781
1521
  connectedCallback(): void;
1782
1522
  get player(): ChromelessPlayer | undefined;
1783
1523
  set player(player: ChromelessPlayer | undefined);
1784
1524
  protected handleClick(): void;
1785
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1786
1525
  private readonly _onAdChange;
1787
1526
  private readonly _update;
1527
+ protected render(): HTMLTemplateResult;
1788
1528
  }
1789
1529
  declare global {
1790
1530
  interface HTMLElementTagNameMap {
@@ -1792,6 +1532,65 @@ declare global {
1792
1532
  }
1793
1533
  }
1794
1534
 
1535
+ type Constructor<T> = abstract new (...args: any[]) => T;
1536
+
1537
+ /** @internal */
1538
+ declare const StateReceiverProps: "theoplayerUiObservedProperties";
1539
+ interface StateReceiverPropertyMap {
1540
+ player: ChromelessPlayer | undefined;
1541
+ fullscreen: boolean;
1542
+ deviceType: DeviceType;
1543
+ streamType: StreamType;
1544
+ playbackRate: number;
1545
+ activeVideoQuality: VideoQuality | undefined;
1546
+ targetVideoQualities: VideoQuality[] | undefined;
1547
+ error: THEOplayerError | undefined;
1548
+ previewTime: number;
1549
+ }
1550
+ /**
1551
+ * A custom element that automatically receives selected state updates
1552
+ * from an ancestor {@link UIContainer | `<theoplayer-ui>`} element.
1553
+ *
1554
+ * Do not implement this interface directly, instead use {@link stateReceiver} or {@link StateReceiverMixin}.
1555
+ *
1556
+ * @see {@link stateReceiver}
1557
+ * @see {@link StateReceiverMixin}
1558
+ */
1559
+ interface StateReceiverElement extends Partial<StateReceiverPropertyMap>, Element {
1560
+ /**
1561
+ * The names of the properties this element will receive.
1562
+ */
1563
+ readonly [StateReceiverProps]: Array<keyof StateReceiverPropertyMap>;
1564
+ }
1565
+ /**
1566
+ * Decorates a custom element class, such that it will automatically receive selected state updates
1567
+ * from an ancestor {@link UIContainer | `<theoplayer-ui>`} element.
1568
+ *
1569
+ * For each property name in `props`, the custom element *MUST* implement a corresponding property with a setter.
1570
+ * For example, if `props` equals `["player", "fullscreen"]`, then the element must have writable `player` and `fullscreen`
1571
+ * properties.
1572
+ *
1573
+ * @param props - The names of the properties this element will receive.
1574
+ * @returns A class decorator.
1575
+ * @see {@link StateReceiverElement}
1576
+ */
1577
+ declare const stateReceiver: (props: Array<keyof StateReceiverPropertyMap>) => (target: Constructor<Element>, _context: ClassDecoratorContext<Constructor<Element>>) => void;
1578
+ /**
1579
+ * A [mixin class](https://www.typescriptlang.org/docs/handbook/mixins.html) to apply on the superclass of a custom element,
1580
+ * such that it will automatically receive selected state updates from an ancestor {@link UIContainer | `<theoplayer-ui>`} element.
1581
+ *
1582
+ * For each property name in `props`, the custom element *MUST* implement a corresponding property with a setter.
1583
+ * For example, if `props` equals `["player", "fullscreen"]`, then the element must have writable `player` and `fullscreen`
1584
+ * properties.
1585
+ *
1586
+ * @param base - The superclass for the new element class.
1587
+ * @param props - The names of the properties this element will receive.
1588
+ * @returns A class constructor that extends `base` and implements {@link StateReceiverElement}.
1589
+ * @see {@link StateReceiverElement}
1590
+ * @deprecated Use {@link stateReceiver} decorator instead.
1591
+ */
1592
+ declare function StateReceiverMixin<T extends Constructor<Element>>(base: T, props: Array<keyof StateReceiverPropertyMap>): T & Constructor<StateReceiverElement>;
1593
+
1795
1594
  declare enum ExtensionSlot {
1796
1595
  TopControlBar = "top-control-bar",
1797
1596
  BottomControlBar = "bottom-control-bar",
@@ -1801,7 +1600,7 @@ declare enum ExtensionSlot {
1801
1600
  declare const READY_EVENT: "theoplayerready";
1802
1601
 
1803
1602
  /**
1804
- * `<theoplayer-ui>` - The container element for a THEOplayer UI.
1603
+ * The container element for a THEOplayer UI.
1805
1604
  *
1806
1605
  * This element provides a basic layout structure for a general player UI, and handles the creation and management
1807
1606
  * of a {@link theoplayer!ChromelessPlayer | THEOplayer player instance} for this UI.
@@ -1863,25 +1662,26 @@ declare const READY_EVENT: "theoplayerready";
1863
1662
  * @slot `menu` - A slot for extra menus (see {@link Menu | `<theoplayer-menu>`}).
1864
1663
  * @slot `error` - A slot for an error display, to show when the player encounters a fatal error
1865
1664
  * (see {@link ErrorDisplay | `<theoplayer-error-display>`}).
1866
- * @group Components
1867
1665
  */
1868
- declare class UIContainer extends HTMLElement {
1666
+ declare class UIContainer extends LitElement {
1667
+ static styles: lit.CSSResult[];
1668
+ static shadowRootOptions: ShadowRootInit;
1869
1669
  /**
1870
1670
  * Fired when the backing player is created, and the {@link UIContainer.player} property is set.
1871
1671
  *
1872
1672
  * @group Events
1873
1673
  */
1874
1674
  static READY_EVENT: typeof READY_EVENT;
1875
- static get observedAttributes(): Attribute[];
1876
1675
  private _configuration;
1877
- private readonly _playerEl;
1878
- private readonly _menuEl;
1879
- private readonly _menuGroup;
1676
+ private readonly _playerRef;
1677
+ private readonly _menuRef;
1678
+ private readonly _menuGroupRef;
1679
+ private _menuOpened;
1880
1680
  private _menuOpener;
1881
- private readonly _topChromeEl;
1882
- private readonly _topChromeSlot;
1883
- private readonly _bottomChromeEl;
1884
- private readonly _bottomChromeSlot;
1681
+ private readonly _topChromeRef;
1682
+ private readonly _topChromeSlotRef;
1683
+ private readonly _bottomChromeRef;
1684
+ private readonly _bottomChromeSlotRef;
1885
1685
  private _pointerType;
1886
1686
  private _lastPointerUpTime;
1887
1687
  private readonly _mutationObserver;
@@ -1889,8 +1689,20 @@ declare class UIContainer extends HTMLElement {
1889
1689
  private readonly _stateReceivers;
1890
1690
  private _player;
1891
1691
  private _source;
1692
+ private _muted;
1693
+ private _autoplay;
1694
+ private _fullscreen;
1695
+ private _deviceType;
1696
+ private _streamType;
1697
+ private _fluid;
1698
+ private _userIdle;
1699
+ private _userIdleTimeout;
1892
1700
  private _isUserActive;
1893
1701
  private _userIdleTimer;
1702
+ private _paused;
1703
+ private _ended;
1704
+ private _casting;
1705
+ private _dvrThreshold;
1894
1706
  private _previewTime;
1895
1707
  private _activeVideoTrack;
1896
1708
  /**
@@ -1902,7 +1714,6 @@ declare class UIContainer extends HTMLElement {
1902
1714
  * Can also be set later on through the {@link UIContainer.configuration} property.
1903
1715
  */
1904
1716
  constructor(configuration?: UIPlayerConfiguration);
1905
- private _upgradeProperty;
1906
1717
  /**
1907
1718
  * The underlying THEOplayer player instance.
1908
1719
  *
@@ -1942,18 +1753,22 @@ declare class UIContainer extends HTMLElement {
1942
1753
  * Whether the UI is in fullscreen mode.
1943
1754
  */
1944
1755
  get fullscreen(): boolean;
1756
+ private set fullscreen(value);
1945
1757
  /**
1946
1758
  * Whether the player is paused.
1947
1759
  */
1948
1760
  get paused(): boolean;
1761
+ private set paused(value);
1949
1762
  /**
1950
1763
  * Whether the player is ended.
1951
1764
  */
1952
1765
  get ended(): boolean;
1766
+ private set ended(value);
1953
1767
  /**
1954
1768
  * Whether the player is casting to a remote receiver.
1955
1769
  */
1956
1770
  get casting(): boolean;
1771
+ private set casting(value);
1957
1772
  /**
1958
1773
  * Whether the user has stopped interacting with the UI and is considered to be "idle".
1959
1774
  */
@@ -1964,11 +1779,12 @@ declare class UIContainer extends HTMLElement {
1964
1779
  * and when the user is considered to be "idle".
1965
1780
  */
1966
1781
  get userIdleTimeout(): number;
1967
- set userIdleTimeout(value: number);
1782
+ set userIdleTimeout(value: number | undefined);
1968
1783
  /**
1969
1784
  * The device type, either "desktop", "mobile" or "tv".
1970
1785
  */
1971
1786
  get deviceType(): DeviceType;
1787
+ set deviceType(value: DeviceType);
1972
1788
  /**
1973
1789
  * The stream type, either "vod", "live" or "dvr".
1974
1790
  *
@@ -1986,10 +1802,15 @@ declare class UIContainer extends HTMLElement {
1986
1802
  */
1987
1803
  get dvrThreshold(): number;
1988
1804
  set dvrThreshold(value: number);
1805
+ private accessor _hasFirstPlay;
1806
+ private accessor _isPlayingAd;
1807
+ private accessor _hasError;
1808
+ private accessor _isFullWindow;
1989
1809
  connectedCallback(): void;
1990
1810
  private tryInitializePlayer_;
1811
+ protected createRenderRoot(): HTMLElement | DocumentFragment;
1812
+ protected firstUpdated(): void;
1991
1813
  disconnectedCallback(): void;
1992
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
1993
1814
  private readonly _onMutation;
1994
1815
  private readonly _onSlotChange;
1995
1816
  private readonly registerStateReceiver_;
@@ -1997,6 +1818,8 @@ declare class UIContainer extends HTMLElement {
1997
1818
  private propagateStateToReceiver_;
1998
1819
  private propagatePlayerToAllReceivers_;
1999
1820
  private removeStateFromReceiver_;
1821
+ private get menuOpened_();
1822
+ private set menuOpened_(value);
2000
1823
  private openMenu_;
2001
1824
  private closeMenu_;
2002
1825
  private readonly _onToggleMenu;
@@ -2042,6 +1865,7 @@ declare class UIContainer extends HTMLElement {
2042
1865
  private addPlayerListeners_;
2043
1866
  private removePlayerListeners_;
2044
1867
  private readonly _onDestroy;
1868
+ protected render(): HTMLTemplateResult;
2045
1869
  }
2046
1870
  declare global {
2047
1871
  interface HTMLElementTagNameMap {
@@ -2050,7 +1874,7 @@ declare global {
2050
1874
  }
2051
1875
 
2052
1876
  /**
2053
- * `<theoplayer-default-ui>` - A default UI for THEOplayer.
1877
+ * A default UI for THEOplayer.
2054
1878
  *
2055
1879
  * This default UI provides a great player experience out-of-the-box, that works well on all types of devices
2056
1880
  * and for all types of streams. It provides all the common playback controls for playing, seeking,
@@ -2097,22 +1921,26 @@ declare global {
2097
1921
  * @slot `menu` - A slot for extra menus (see {@link Menu | `<theoplayer-menu>`}).
2098
1922
  * @slot `error` - A slot for an error display, to show when the player encounters a fatal error.
2099
1923
  * By default, this shows an {@link ErrorDisplay | `<theoplayer-error-display>`}.
2100
- * @group Components
2101
1924
  */
2102
- declare class DefaultUI extends HTMLElement {
1925
+ declare class DefaultUI extends LitElement {
1926
+ static styles: lit.CSSResult[];
1927
+ static shadowRootOptions: ShadowRootInit;
2103
1928
  /**
2104
1929
  * Fired when the backing player is created, and the {@link DefaultUI.player} property is set.
2105
1930
  *
2106
1931
  * @group Events
2107
1932
  */
2108
1933
  static READY_EVENT: typeof READY_EVENT;
2109
- static get observedAttributes(): Attribute[];
2110
- protected readonly _shadowRoot: ShadowRoot;
2111
- protected readonly _ui: UIContainer;
2112
- private readonly _titleSlot;
2113
- private readonly _timeRange;
1934
+ protected readonly _uiRef: Ref<UIContainer>;
1935
+ private accessor _timeRangeInert;
2114
1936
  private _timeRangeInertTimeout;
2115
1937
  private _appliedExtensions;
1938
+ private _configuration;
1939
+ private _source;
1940
+ private _userIdleTimeout;
1941
+ private _deviceType;
1942
+ private _dvrThreshold;
1943
+ private accessor titleSlotNodes;
2116
1944
  /**
2117
1945
  * Creates a new THEOplayer default UI.
2118
1946
  *
@@ -2122,8 +1950,6 @@ declare class DefaultUI extends HTMLElement {
2122
1950
  * Can also be set later on through the {@link DefaultUI.configuration} property.
2123
1951
  */
2124
1952
  constructor(configuration?: UIPlayerConfiguration);
2125
- protected initShadowRoot(): ShadowRoot;
2126
- private _upgradeProperty;
2127
1953
  /**
2128
1954
  * The underlying THEOplayer player instance.
2129
1955
  *
@@ -2137,35 +1963,30 @@ declare class DefaultUI extends HTMLElement {
2137
1963
  */
2138
1964
  get configuration(): UIPlayerConfiguration;
2139
1965
  set configuration(configuration: UIPlayerConfiguration);
2140
- private setConfiguration_;
2141
1966
  /**
2142
1967
  * The player's current source.
2143
1968
  */
2144
1969
  get source(): SourceDescription | undefined;
2145
- set source(value: SourceDescription | undefined);
1970
+ set source(source: SourceDescription | undefined);
2146
1971
  /**
2147
- * Whether to automatically adjusts the player's height to fit the video's aspect ratio.
1972
+ * Whether to automatically adjust the player's height to fit the video's aspect ratio.
2148
1973
  */
2149
- get fluid(): boolean;
2150
- set fluid(value: boolean);
1974
+ accessor fluid: boolean;
2151
1975
  /**
2152
1976
  * Whether the player's audio is muted.
2153
1977
  */
2154
- get muted(): boolean;
2155
- set muted(value: boolean);
1978
+ accessor muted: boolean;
2156
1979
  /**
2157
1980
  * Whether the player should attempt to automatically start playback.
2158
1981
  */
2159
- get autoplay(): boolean;
2160
- set autoplay(value: boolean);
1982
+ accessor autoplay: boolean;
2161
1983
  /**
2162
1984
  * The stream type, either "vod", "live" or "dvr".
2163
1985
  *
2164
1986
  * If you know in advance that the source will be a livestream, you can set this property to avoid a screen flicker
2165
1987
  * when the player switches between its VOD-specific and live-only controls.
2166
1988
  */
2167
- get streamType(): StreamType;
2168
- set streamType(value: StreamType);
1989
+ accessor streamType: StreamType;
2169
1990
  /**
2170
1991
  * Whether the user has stopped interacting with the UI and is considered to be "idle".
2171
1992
  */
@@ -2175,20 +1996,28 @@ declare class DefaultUI extends HTMLElement {
2175
1996
  * and when the user is considered to be "idle".
2176
1997
  */
2177
1998
  get userIdleTimeout(): number;
2178
- set userIdleTimeout(value: number);
1999
+ set userIdleTimeout(value: number | undefined);
2000
+ /**
2001
+ * The device type, either "desktop", "mobile" or "tv".
2002
+ */
2003
+ get deviceType(): DeviceType;
2004
+ set deviceType(value: DeviceType);
2179
2005
  /**
2180
2006
  * The minimum length (in seconds) of a livestream's sliding window for the stream to be DVR
2181
2007
  * and its stream type to be set to "dvr".
2182
2008
  */
2183
2009
  get dvrThreshold(): number;
2184
2010
  set dvrThreshold(value: number);
2011
+ private accessor _hasTitle;
2185
2012
  connectedCallback(): void;
2186
2013
  disconnectedCallback(): void;
2187
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
2014
+ protected firstUpdated(): void;
2015
+ protected _onUiReady(): void;
2188
2016
  private readonly _updateStreamType;
2189
- private readonly _dispatchReadyEvent;
2190
2017
  private readonly _updateUserIdle;
2191
2018
  private readonly _onTitleSlotChange;
2019
+ protected render(): HTMLTemplateResult;
2020
+ protected renderUiContent(): HTMLTemplateResult;
2192
2021
  }
2193
2022
  declare global {
2194
2023
  interface HTMLElementTagNameMap {
@@ -2228,13 +2057,12 @@ type Extension = (ui: DefaultUI) => void;
2228
2057
  */
2229
2058
  declare function registerExtension(extension: Extension): void;
2230
2059
 
2231
- declare class BadNetworkModeMenu extends HTMLElement {
2232
- private readonly _radioGroup;
2233
- constructor();
2234
- protected _upgradeProperty(prop: keyof this): void;
2235
- connectedCallback(): void;
2236
- disconnectedCallback(): void;
2060
+ declare class BadNetworkModeMenu extends LitElement {
2061
+ static styles: lit.CSSResult[];
2062
+ private readonly _radioGroupRef;
2063
+ protected firstUpdated(): void;
2237
2064
  private readonly _onChange;
2065
+ protected render(): HTMLTemplateResult;
2238
2066
  }
2239
2067
  declare global {
2240
2068
  interface HTMLElementTagNameMap {
@@ -2244,29 +2072,24 @@ declare global {
2244
2072
 
2245
2073
  /**
2246
2074
  * `<theolive-default-ui>` - A default UI for THEOlive.
2247
- *
2248
- * @group Components
2249
2075
  */
2250
2076
  declare class THEOliveDefaultUI extends DefaultUI {
2251
- private readonly _loading;
2252
- private readonly _offline;
2253
- private readonly _announcement;
2254
- private readonly _errorDisplay;
2255
- private readonly _playButton;
2256
- private readonly _root;
2077
+ static styles: lit.CSSResult[];
2078
+ private accessor _announcementType;
2079
+ private accessor _announcementMessage;
2080
+ private accessor _hidePlayButton;
2081
+ private accessor _hideErrorDisplay;
2257
2082
  constructor(configuration?: UIPlayerConfiguration);
2258
- protected initShadowRoot(): ShadowRoot;
2259
- private readonly onReady;
2083
+ protected _onUiReady(): void;
2260
2084
  private onLoadChannelStart;
2261
2085
  private onChannelOffline;
2262
2086
  private onChannelLoaded;
2263
2087
  private onError;
2264
2088
  private hidePlayerError;
2265
2089
  private stopHidingPlayerError;
2266
- private hidePlayerPlayButton_;
2267
- private stopHidingPlayerPlayButton;
2268
2090
  private showMessage_;
2269
2091
  private hideMessage_;
2092
+ protected renderUiContent(): HTMLTemplateResult;
2270
2093
  }
2271
2094
  declare global {
2272
2095
  interface HTMLElementTagNameMap {
@@ -2274,10 +2097,67 @@ declare global {
2274
2097
  }
2275
2098
  }
2276
2099
 
2100
+ declare enum Attribute {
2101
+ CONFIGURATION = "configuration",
2102
+ SOURCE = "source",
2103
+ AUTOPLAY = "autoplay",
2104
+ MUTED = "muted",
2105
+ FULLSCREEN = "fullscreen",
2106
+ FULLWINDOW = "fullwindow",
2107
+ FLUID = "fluid",
2108
+ DEVICE_TYPE = "device-type",
2109
+ MOBILE = "mobile",
2110
+ TV = "tv",
2111
+ TV_FOCUS = "tv-focus",
2112
+ MOBILE_ONLY = "mobile-only",
2113
+ MOBILE_HIDDEN = "mobile-hidden",
2114
+ TV_ONLY = "tv-only",
2115
+ TV_HIDDEN = "tv-hidden",
2116
+ USER_IDLE = "user-idle",
2117
+ USER_IDLE_TIMEOUT = "user-idle-timeout",
2118
+ NO_AUTO_HIDE = "no-auto-hide",
2119
+ DISABLED = "disabled",
2120
+ INERT = "inert",
2121
+ HIDDEN = "hidden",
2122
+ PAUSED = "paused",
2123
+ ENDED = "ended",
2124
+ VOLUME_LEVEL = "volume-level",
2125
+ CASTING = "casting",
2126
+ LOADING = "loading",
2127
+ STREAM_TYPE = "stream-type",
2128
+ LIVE = "live",
2129
+ LIVE_ONLY = "live-only",
2130
+ LIVE_HIDDEN = "live-hidden",
2131
+ LIVE_THRESHOLD = "live-threshold",
2132
+ DVR_THRESHOLD = "dvr-threshold",
2133
+ REMAINING = "remaining",
2134
+ REMAINING_WHEN_LIVE = "remaining-when-live",
2135
+ SHOW_DURATION = "show-duration",
2136
+ SEEK_OFFSET = "seek-offset",
2137
+ MENU = "menu",
2138
+ MENU_OPENED = "menu-opened",
2139
+ MENU_CLOSE_ON_INPUT = "menu-close-on-input",
2140
+ ARIA_LABEL = "aria-label",
2141
+ ARIA_LIVE = "aria-live",
2142
+ ARIA_CHECKED = "aria-checked",
2143
+ HAS_AUDIO = "has-audio",
2144
+ HAS_SUBTITLES = "has-subtitles",
2145
+ HAS_ERROR = "has-error",
2146
+ HAS_FIRST_PLAY = "has-first-play",
2147
+ CAST_STATE = "cast-state",
2148
+ TRACK_TYPE = "track-type",
2149
+ SHOW_OFF = "show-off",
2150
+ PLAYING_AD = "playing-ad",
2151
+ SHOW_AD_MARKERS = "show-ad-markers",
2152
+ CLICKTHROUGH = "clickthrough",
2153
+ PROPERTY = "property",
2154
+ VALUE = "value"
2155
+ }
2156
+
2277
2157
  /**
2278
2158
  * The version of Open Video UI for Web.
2279
2159
  */
2280
2160
  declare const version: string;
2281
2161
 
2282
- 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 };
2162
+ 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 };
2283
2163
  export as namespace THEOplayerUI;