@theoplayer/web-ui 2.1.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/THEOplayerUI.d.ts +560 -37
- package/dist/THEOplayerUI.es5.js +1 -1
- package/dist/THEOplayerUI.es5.mjs +1 -1
- package/dist/THEOplayerUI.js +2 -2
- package/dist/THEOplayerUI.js.map +1 -1
- package/dist/THEOplayerUI.mjs +1 -1
- package/dist/THEOplayerUI.mjs.map +1 -1
- package/dist/THEOplayerUI.node.mjs +1 -1
- package/dist/THEOplayerUI.node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/THEOplayerUI.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* THEOplayer Open Video UI for Web (v2.
|
|
2
|
+
* THEOplayer Open Video UI for Web (v2.2.0)
|
|
3
3
|
* License: MIT
|
|
4
4
|
*/
|
|
5
5
|
import * as lit from 'lit';
|
|
6
|
-
import { LitElement, HTMLTemplateResult,
|
|
6
|
+
import { LitElement, HTMLTemplateResult, PropertyValues, TemplateResult } from 'lit';
|
|
7
7
|
import { ChromelessPlayer, MediaTrack, TextTrack, TextTracksList, EdgeStyle, VideoQuality, THEOplayerError, VendorCast, CastState, UIPlayerConfiguration, SourceDescription } from 'theoplayer/chromeless';
|
|
8
8
|
import * as lit_html from 'lit-html';
|
|
9
9
|
import { Ref } from 'lit/directives/ref.js';
|
|
@@ -79,6 +79,7 @@ declare class Button extends LitElement {
|
|
|
79
79
|
*/
|
|
80
80
|
get disabled(): boolean;
|
|
81
81
|
set disabled(value: boolean);
|
|
82
|
+
accessor ariaLabel: string | null;
|
|
82
83
|
private _enable;
|
|
83
84
|
private _disable;
|
|
84
85
|
private readonly _onClick;
|
|
@@ -157,6 +158,7 @@ declare class PlayButton extends Button {
|
|
|
157
158
|
* This reflects `player.ended`.
|
|
158
159
|
*/
|
|
159
160
|
accessor ended: boolean;
|
|
161
|
+
accessor lang: string;
|
|
160
162
|
get player(): ChromelessPlayer | undefined;
|
|
161
163
|
set player(player: ChromelessPlayer | undefined);
|
|
162
164
|
private readonly _onPlay;
|
|
@@ -165,7 +167,7 @@ declare class PlayButton extends Button {
|
|
|
165
167
|
private _updateEnded;
|
|
166
168
|
private readonly _updateDisabled;
|
|
167
169
|
protected handleClick(): void;
|
|
168
|
-
|
|
170
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
169
171
|
private _updateAriaLabel;
|
|
170
172
|
protected render(): HTMLTemplateResult;
|
|
171
173
|
}
|
|
@@ -189,11 +191,12 @@ declare class MuteButton extends Button {
|
|
|
189
191
|
* Can be "off" (muted), "low" (volume < 50%) or "high" (volume >= 50%).
|
|
190
192
|
*/
|
|
191
193
|
accessor volumeLevel: VolumeLevel;
|
|
194
|
+
accessor lang: string;
|
|
192
195
|
get player(): ChromelessPlayer | undefined;
|
|
193
196
|
set player(player: ChromelessPlayer | undefined);
|
|
194
197
|
private readonly _updateFromPlayer;
|
|
195
198
|
protected handleClick(): void;
|
|
196
|
-
|
|
199
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
197
200
|
private _updateAriaLabel;
|
|
198
201
|
protected render(): HTMLTemplateResult;
|
|
199
202
|
}
|
|
@@ -211,15 +214,15 @@ declare global {
|
|
|
211
214
|
declare class SeekButton extends Button {
|
|
212
215
|
static styles: lit.CSSResult[];
|
|
213
216
|
private _player;
|
|
214
|
-
connectedCallback(): void;
|
|
215
217
|
/**
|
|
216
218
|
* The offset (in seconds) by which to seek forward (if positive) or backward (if negative).
|
|
217
219
|
*/
|
|
218
220
|
accessor seekOffset: number;
|
|
221
|
+
accessor lang: string;
|
|
219
222
|
get player(): ChromelessPlayer | undefined;
|
|
220
223
|
set player(player: ChromelessPlayer | undefined);
|
|
221
224
|
protected handleClick(): void;
|
|
222
|
-
|
|
225
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
223
226
|
private _updateAriaLabel;
|
|
224
227
|
protected render(): lit_html.TemplateResult<1>;
|
|
225
228
|
}
|
|
@@ -256,6 +259,7 @@ declare class TimeDisplay extends LitElement {
|
|
|
256
259
|
* The stream type, either "vod", "live" or "dvr".
|
|
257
260
|
*/
|
|
258
261
|
accessor streamType: StreamType;
|
|
262
|
+
accessor lang: string;
|
|
259
263
|
private accessor _currentTime;
|
|
260
264
|
private accessor _duration;
|
|
261
265
|
private accessor _endTime;
|
|
@@ -563,8 +567,10 @@ declare global {
|
|
|
563
567
|
* This button must be placed inside a {@link Menu | `<theoplayer-menu>`}.
|
|
564
568
|
*/
|
|
565
569
|
declare class CloseMenuButton extends Button {
|
|
566
|
-
connectedCallback(): void;
|
|
567
570
|
protected handleClick(): void;
|
|
571
|
+
accessor lang: string;
|
|
572
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
573
|
+
private _updateAriaLabel;
|
|
568
574
|
protected render(): HTMLTemplateResult;
|
|
569
575
|
}
|
|
570
576
|
declare global {
|
|
@@ -578,8 +584,8 @@ declare global {
|
|
|
578
584
|
* and switches to that track when clicked.
|
|
579
585
|
*/
|
|
580
586
|
declare class MediaTrackRadioButton extends RadioButton {
|
|
581
|
-
private _track;
|
|
582
|
-
|
|
587
|
+
private accessor _track;
|
|
588
|
+
accessor lang: string;
|
|
583
589
|
/**
|
|
584
590
|
* The media track that is controlled by this radio button.
|
|
585
591
|
*/
|
|
@@ -620,6 +626,7 @@ declare class TrackRadioGroup extends LitElement {
|
|
|
620
626
|
* Can only be used with the `"subtitles"` track type.
|
|
621
627
|
*/
|
|
622
628
|
accessor showOffButton: boolean;
|
|
629
|
+
accessor lang: string;
|
|
623
630
|
get player(): ChromelessPlayer | undefined;
|
|
624
631
|
set player(player: ChromelessPlayer | undefined);
|
|
625
632
|
private _getTracksList;
|
|
@@ -639,8 +646,8 @@ declare global {
|
|
|
639
646
|
* `<theoplayer-text-track-radio-button>` -A radio button that shows the label of a given text track, and switches to that track when clicked.
|
|
640
647
|
*/
|
|
641
648
|
declare class TextTrackRadioButton extends RadioButton {
|
|
642
|
-
private _track;
|
|
643
|
-
|
|
649
|
+
private accessor _track;
|
|
650
|
+
accessor lang: string;
|
|
644
651
|
/**
|
|
645
652
|
* The text track that is controlled by this radio button.
|
|
646
653
|
*/
|
|
@@ -662,6 +669,7 @@ declare global {
|
|
|
662
669
|
* A radio button that disables the active subtitle track when clicked.
|
|
663
670
|
*/
|
|
664
671
|
declare class TextTrackOffRadioButton extends RadioButton {
|
|
672
|
+
accessor lang: string;
|
|
665
673
|
private _trackList;
|
|
666
674
|
get trackList(): TextTracksList | undefined;
|
|
667
675
|
set trackList(trackList: TextTracksList | undefined);
|
|
@@ -734,6 +742,7 @@ declare global {
|
|
|
734
742
|
* in a human-readable format.
|
|
735
743
|
*/
|
|
736
744
|
declare class TextTrackStyleDisplay extends LitElement {
|
|
745
|
+
accessor lang: string;
|
|
737
746
|
private _player;
|
|
738
747
|
private _property;
|
|
739
748
|
private _textTrackStyle;
|
|
@@ -763,6 +772,7 @@ declare global {
|
|
|
763
772
|
*/
|
|
764
773
|
declare class TextTrackStyleMenu extends MenuGroup {
|
|
765
774
|
static styles: lit.CSSResult[];
|
|
775
|
+
accessor lang: string;
|
|
766
776
|
protected render(): TemplateResult;
|
|
767
777
|
}
|
|
768
778
|
declare global {
|
|
@@ -778,6 +788,7 @@ declare global {
|
|
|
778
788
|
*/
|
|
779
789
|
declare class LanguageMenu extends MenuGroup {
|
|
780
790
|
static styles: lit.CSSResult[];
|
|
791
|
+
accessor lang: string;
|
|
781
792
|
private _player;
|
|
782
793
|
private _audioTrackList;
|
|
783
794
|
private _textTrackList;
|
|
@@ -804,10 +815,12 @@ declare class LanguageMenuButton extends MenuButton {
|
|
|
804
815
|
private _player;
|
|
805
816
|
private _audioTrackList;
|
|
806
817
|
private _textTrackList;
|
|
807
|
-
connectedCallback(): void;
|
|
808
818
|
get player(): ChromelessPlayer | undefined;
|
|
809
819
|
set player(player: ChromelessPlayer | undefined);
|
|
820
|
+
accessor lang: string;
|
|
810
821
|
private readonly _updateTracks;
|
|
822
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
823
|
+
private _updateAriaLabel;
|
|
811
824
|
protected render(): HTMLTemplateResult;
|
|
812
825
|
}
|
|
813
826
|
declare global {
|
|
@@ -853,7 +866,9 @@ declare global {
|
|
|
853
866
|
* @attribute menu - The ID of the playback rate menu.
|
|
854
867
|
*/
|
|
855
868
|
declare class PlaybackRateMenuButton extends MenuButton {
|
|
856
|
-
|
|
869
|
+
accessor lang: string;
|
|
870
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
871
|
+
private _updateAriaLabel;
|
|
857
872
|
protected render(): HTMLTemplateResult;
|
|
858
873
|
}
|
|
859
874
|
declare global {
|
|
@@ -868,6 +883,7 @@ declare global {
|
|
|
868
883
|
* @slot `heading` - A slot for the menu's heading.
|
|
869
884
|
*/
|
|
870
885
|
declare class PlaybackRateMenu extends Menu {
|
|
886
|
+
accessor lang: string;
|
|
871
887
|
protected renderMenuHeading(): HTMLTemplateResult;
|
|
872
888
|
protected renderMenuContent(): HTMLTemplateResult;
|
|
873
889
|
}
|
|
@@ -881,6 +897,7 @@ declare global {
|
|
|
881
897
|
* A control that displays the current playback rate of the player.
|
|
882
898
|
*/
|
|
883
899
|
declare class PlaybackRateDisplay extends LitElement {
|
|
900
|
+
accessor lang: string;
|
|
884
901
|
/**
|
|
885
902
|
* The current playback rate.
|
|
886
903
|
*/
|
|
@@ -905,6 +922,7 @@ declare class ActiveQualityDisplay extends LitElement {
|
|
|
905
922
|
* The list of target video qualities.
|
|
906
923
|
*/
|
|
907
924
|
accessor targetVideoQualities: VideoQuality[] | undefined;
|
|
925
|
+
accessor lang: string;
|
|
908
926
|
protected render(): HTMLTemplateResult;
|
|
909
927
|
}
|
|
910
928
|
declare global {
|
|
@@ -919,8 +937,8 @@ declare global {
|
|
|
919
937
|
*/
|
|
920
938
|
declare class QualityRadioButton extends RadioButton {
|
|
921
939
|
private _track;
|
|
922
|
-
private _quality;
|
|
923
|
-
|
|
940
|
+
private accessor _quality;
|
|
941
|
+
accessor lang: string;
|
|
924
942
|
/**
|
|
925
943
|
* The video track containing the quality being controlled.
|
|
926
944
|
*/
|
|
@@ -952,6 +970,7 @@ declare class QualityRadioGroup extends LitElement {
|
|
|
952
970
|
private _player;
|
|
953
971
|
private _videoTracks;
|
|
954
972
|
private accessor _track;
|
|
973
|
+
accessor lang: string;
|
|
955
974
|
protected firstUpdated(): void;
|
|
956
975
|
get player(): ChromelessPlayer | undefined;
|
|
957
976
|
set player(player: ChromelessPlayer | undefined);
|
|
@@ -970,6 +989,7 @@ declare global {
|
|
|
970
989
|
* A button that resets the text track style.
|
|
971
990
|
*/
|
|
972
991
|
declare class TextTrackStyleResetButton extends Button {
|
|
992
|
+
accessor lang: string;
|
|
973
993
|
private _player;
|
|
974
994
|
get player(): ChromelessPlayer | undefined;
|
|
975
995
|
set player(player: ChromelessPlayer | undefined);
|
|
@@ -990,6 +1010,7 @@ declare global {
|
|
|
990
1010
|
*/
|
|
991
1011
|
declare class SettingsMenu extends MenuGroup {
|
|
992
1012
|
static styles: lit.CSSResult[];
|
|
1013
|
+
accessor lang: string;
|
|
993
1014
|
protected render(): TemplateResult;
|
|
994
1015
|
}
|
|
995
1016
|
declare global {
|
|
@@ -1004,7 +1025,9 @@ declare global {
|
|
|
1004
1025
|
* @attribute `menu` - The ID of the settings menu.
|
|
1005
1026
|
*/
|
|
1006
1027
|
declare class SettingsMenuButton extends MenuButton {
|
|
1007
|
-
|
|
1028
|
+
accessor lang: string;
|
|
1029
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
1030
|
+
private _updateAriaLabel;
|
|
1008
1031
|
protected render(): HTMLTemplateResult;
|
|
1009
1032
|
}
|
|
1010
1033
|
declare global {
|
|
@@ -1023,8 +1046,9 @@ declare class FullscreenButton extends Button {
|
|
|
1023
1046
|
* Whether the player is in fullscreen mode.
|
|
1024
1047
|
*/
|
|
1025
1048
|
accessor fullscreen: boolean;
|
|
1049
|
+
accessor lang: string;
|
|
1026
1050
|
protected handleClick(): void;
|
|
1027
|
-
|
|
1051
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
1028
1052
|
private _updateAriaLabel;
|
|
1029
1053
|
protected render(): HTMLTemplateResult;
|
|
1030
1054
|
}
|
|
@@ -1278,6 +1302,7 @@ declare class TimeRange extends Range {
|
|
|
1278
1302
|
disconnectedCallback(): void;
|
|
1279
1303
|
get player(): ChromelessPlayer | undefined;
|
|
1280
1304
|
set player(player: ChromelessPlayer | undefined);
|
|
1305
|
+
accessor lang: string;
|
|
1281
1306
|
/**
|
|
1282
1307
|
* The stream type, either "vod", "live" or "dvr".
|
|
1283
1308
|
*/
|
|
@@ -1320,6 +1345,7 @@ declare class VolumeRange extends Range {
|
|
|
1320
1345
|
private _player;
|
|
1321
1346
|
constructor();
|
|
1322
1347
|
connectedCallback(): void;
|
|
1348
|
+
accessor lang: string;
|
|
1323
1349
|
get player(): ChromelessPlayer | undefined;
|
|
1324
1350
|
set player(player: ChromelessPlayer | undefined);
|
|
1325
1351
|
private readonly _updateFromPlayer;
|
|
@@ -1358,6 +1384,7 @@ declare class ErrorDisplay extends LitElement {
|
|
|
1358
1384
|
* Whether the player is in fullscreen mode.
|
|
1359
1385
|
*/
|
|
1360
1386
|
accessor fullscreen: boolean;
|
|
1387
|
+
accessor lang: string;
|
|
1361
1388
|
protected render(): lit_html.TemplateResult<1>;
|
|
1362
1389
|
}
|
|
1363
1390
|
declare global {
|
|
@@ -1402,7 +1429,8 @@ declare class ChromecastButton extends CastButton {
|
|
|
1402
1429
|
connectedCallback(): void;
|
|
1403
1430
|
get player(): ChromelessPlayer | undefined;
|
|
1404
1431
|
set player(player: ChromelessPlayer | undefined);
|
|
1405
|
-
|
|
1432
|
+
accessor lang: string;
|
|
1433
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
1406
1434
|
private _updateAriaLabel;
|
|
1407
1435
|
protected render(): lit_html.TemplateResult<1>;
|
|
1408
1436
|
}
|
|
@@ -1430,6 +1458,7 @@ declare class ChromecastDisplay extends LitElement {
|
|
|
1430
1458
|
static styles: lit.CSSResult[];
|
|
1431
1459
|
private _player;
|
|
1432
1460
|
private _castApi;
|
|
1461
|
+
accessor lang: string;
|
|
1433
1462
|
private accessor _receiverName;
|
|
1434
1463
|
connectedCallback(): void;
|
|
1435
1464
|
get player(): ChromelessPlayer | undefined;
|
|
@@ -1452,7 +1481,8 @@ declare class AirPlayButton extends CastButton {
|
|
|
1452
1481
|
connectedCallback(): void;
|
|
1453
1482
|
get player(): ChromelessPlayer | undefined;
|
|
1454
1483
|
set player(player: ChromelessPlayer | undefined);
|
|
1455
|
-
|
|
1484
|
+
accessor lang: string;
|
|
1485
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
1456
1486
|
private _updateAriaLabel;
|
|
1457
1487
|
protected render(): lit_html.TemplateResult<1>;
|
|
1458
1488
|
}
|
|
@@ -1529,7 +1559,6 @@ declare class LiveButton extends Button {
|
|
|
1529
1559
|
static styles: lit.CSSResult[];
|
|
1530
1560
|
private _player;
|
|
1531
1561
|
private _liveThreshold;
|
|
1532
|
-
connectedCallback(): void;
|
|
1533
1562
|
/**
|
|
1534
1563
|
* Whether the player is paused.
|
|
1535
1564
|
*/
|
|
@@ -1550,11 +1579,14 @@ declare class LiveButton extends Button {
|
|
|
1550
1579
|
* Whether the player is considered to be playing at the live point.
|
|
1551
1580
|
*/
|
|
1552
1581
|
accessor live: boolean;
|
|
1582
|
+
accessor lang: string;
|
|
1553
1583
|
get player(): ChromelessPlayer | undefined;
|
|
1554
1584
|
set player(player: ChromelessPlayer | undefined);
|
|
1555
1585
|
private readonly _updatePaused;
|
|
1556
1586
|
private readonly _updateLive;
|
|
1557
1587
|
protected handleClick(): void;
|
|
1588
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
1589
|
+
private _updateAriaLabel;
|
|
1558
1590
|
protected render(): HTMLTemplateResult;
|
|
1559
1591
|
}
|
|
1560
1592
|
declare global {
|
|
@@ -1599,7 +1631,9 @@ declare class AdDisplay extends LitElement {
|
|
|
1599
1631
|
static styles: lit.CSSResult[];
|
|
1600
1632
|
private _player;
|
|
1601
1633
|
private _ads;
|
|
1602
|
-
private accessor
|
|
1634
|
+
private accessor _currentAd;
|
|
1635
|
+
private accessor _totalAds;
|
|
1636
|
+
accessor lang: string;
|
|
1603
1637
|
connectedCallback(): void;
|
|
1604
1638
|
get player(): ChromelessPlayer | undefined;
|
|
1605
1639
|
set player(player: ChromelessPlayer | undefined);
|
|
@@ -1620,6 +1654,7 @@ declare class AdCountdown extends LitElement {
|
|
|
1620
1654
|
private _player;
|
|
1621
1655
|
private _ads;
|
|
1622
1656
|
private accessor _maxRemainingDuration;
|
|
1657
|
+
accessor lang: string;
|
|
1623
1658
|
get player(): ChromelessPlayer | undefined;
|
|
1624
1659
|
set player(player: ChromelessPlayer | undefined);
|
|
1625
1660
|
private readonly _onAdChange;
|
|
@@ -1646,6 +1681,7 @@ declare class AdClickThroughButton extends LinkButton {
|
|
|
1646
1681
|
*/
|
|
1647
1682
|
get clickThrough(): string | null;
|
|
1648
1683
|
set clickThrough(clickThrough: string | null);
|
|
1684
|
+
accessor lang: string;
|
|
1649
1685
|
get player(): ChromelessPlayer | undefined;
|
|
1650
1686
|
set player(player: ChromelessPlayer | undefined);
|
|
1651
1687
|
private readonly _updateFromPlayer;
|
|
@@ -1682,6 +1718,7 @@ declare class AdSkipButton extends Button {
|
|
|
1682
1718
|
private _ads;
|
|
1683
1719
|
private accessor _showCountdown;
|
|
1684
1720
|
private accessor _timeToSkip;
|
|
1721
|
+
accessor lang: string;
|
|
1685
1722
|
connectedCallback(): void;
|
|
1686
1723
|
get player(): ChromelessPlayer | undefined;
|
|
1687
1724
|
set player(player: ChromelessPlayer | undefined);
|
|
@@ -1696,6 +1733,75 @@ declare global {
|
|
|
1696
1733
|
}
|
|
1697
1734
|
}
|
|
1698
1735
|
|
|
1736
|
+
/**
|
|
1737
|
+
* A radio button that shows the label of a given video quality, and switches the video track's
|
|
1738
|
+
* {@link theoplayer!MediaTrack.targetQuality | target quality} to that quality when clicked.
|
|
1739
|
+
*/
|
|
1740
|
+
declare abstract class AbstractQualitySelector extends RadioButton {
|
|
1741
|
+
private _player;
|
|
1742
|
+
private _theoLive;
|
|
1743
|
+
protected _badNetworkMode: boolean;
|
|
1744
|
+
accessor lang: string;
|
|
1745
|
+
get player(): ChromelessPlayer | undefined;
|
|
1746
|
+
set player(player: ChromelessPlayer | undefined);
|
|
1747
|
+
private readonly handleEnterBadNetworkMode_;
|
|
1748
|
+
private readonly handleExitBadNetworkMode_;
|
|
1749
|
+
handleEnterBadNetworkMode(): void;
|
|
1750
|
+
handleExitBadNetworkMode(): void;
|
|
1751
|
+
protected abstract handlePlayer(): void;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
declare class AutomaticQualitySelector extends AbstractQualitySelector {
|
|
1755
|
+
handleEnterBadNetworkMode(): void;
|
|
1756
|
+
handleExitBadNetworkMode(): void;
|
|
1757
|
+
protected handlePlayer(): void;
|
|
1758
|
+
private update_;
|
|
1759
|
+
protected handleChange(): void;
|
|
1760
|
+
protected render(): HTMLTemplateResult;
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
/**
|
|
1764
|
+
* A menu button that opens a {@link BadNetworkModeMenu}.
|
|
1765
|
+
*
|
|
1766
|
+
* @attribute `menu` - The ID of the bad network menu.
|
|
1767
|
+
*/
|
|
1768
|
+
declare class BadNetworkModeButton extends MenuButton {
|
|
1769
|
+
static styles: lit.CSSResult[];
|
|
1770
|
+
private _player;
|
|
1771
|
+
private _theoLive;
|
|
1772
|
+
private accessor _inBadNetworkMode;
|
|
1773
|
+
private readonly handleEnterBadNetworkMode_;
|
|
1774
|
+
private readonly handleExitBadNetworkMode_;
|
|
1775
|
+
accessor lang: string;
|
|
1776
|
+
get player(): ChromelessPlayer | undefined;
|
|
1777
|
+
set player(player: ChromelessPlayer | undefined);
|
|
1778
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
1779
|
+
private _updateAriaLabel;
|
|
1780
|
+
protected render(): HTMLTemplateResult;
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
declare class BadNetworkModeSelector extends AbstractQualitySelector {
|
|
1784
|
+
handleEnterBadNetworkMode(): void;
|
|
1785
|
+
handleExitBadNetworkMode(): void;
|
|
1786
|
+
protected handlePlayer(): void;
|
|
1787
|
+
private update_;
|
|
1788
|
+
protected handleChange(): void;
|
|
1789
|
+
protected render(): HTMLTemplateResult;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
declare class BadNetworkModeMenu extends LitElement {
|
|
1793
|
+
static styles: lit.CSSResult[];
|
|
1794
|
+
private readonly _radioGroupRef;
|
|
1795
|
+
protected firstUpdated(): void;
|
|
1796
|
+
private readonly _onChange;
|
|
1797
|
+
protected render(): HTMLTemplateResult;
|
|
1798
|
+
}
|
|
1799
|
+
declare global {
|
|
1800
|
+
interface HTMLElementTagNameMap {
|
|
1801
|
+
'theolive-bad-network-menu': BadNetworkModeMenu;
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1699
1805
|
type Constructor<T> = abstract new (...args: any[]) => T;
|
|
1700
1806
|
|
|
1701
1807
|
/** @internal */
|
|
@@ -1710,6 +1816,7 @@ interface StateReceiverPropertyMap {
|
|
|
1710
1816
|
targetVideoQualities: VideoQuality[] | undefined;
|
|
1711
1817
|
error: THEOplayerError | undefined;
|
|
1712
1818
|
previewTime: number;
|
|
1819
|
+
lang: string;
|
|
1713
1820
|
}
|
|
1714
1821
|
/**
|
|
1715
1822
|
* A custom element that automatically receives selected state updates
|
|
@@ -1849,6 +1956,7 @@ declare class UIContainer extends LitElement {
|
|
|
1849
1956
|
private _deviceType;
|
|
1850
1957
|
private _streamType;
|
|
1851
1958
|
private _fluid;
|
|
1959
|
+
private _language;
|
|
1852
1960
|
private _userIdle;
|
|
1853
1961
|
private _userIdleTimeout;
|
|
1854
1962
|
private _isUserActive;
|
|
@@ -1893,6 +2001,15 @@ declare class UIContainer extends LitElement {
|
|
|
1893
2001
|
*/
|
|
1894
2002
|
get fluid(): boolean;
|
|
1895
2003
|
set fluid(value: boolean);
|
|
2004
|
+
/**
|
|
2005
|
+
* The language of this element.
|
|
2006
|
+
*
|
|
2007
|
+
* When set, this also updates the {@link Locale} of the UI if one is registered with {@link addLocale}.
|
|
2008
|
+
*
|
|
2009
|
+
* @see {@link HTMLElement.lang}
|
|
2010
|
+
*/
|
|
2011
|
+
get lang(): string;
|
|
2012
|
+
set lang(value: string | null);
|
|
1896
2013
|
/**
|
|
1897
2014
|
* Whether the player's audio is muted.
|
|
1898
2015
|
*/
|
|
@@ -2136,6 +2253,7 @@ declare class DefaultUI extends LitElement {
|
|
|
2136
2253
|
private _appliedExtensions;
|
|
2137
2254
|
private _configuration;
|
|
2138
2255
|
private _source;
|
|
2256
|
+
private _language;
|
|
2139
2257
|
private _userIdleTimeout;
|
|
2140
2258
|
private _deviceType;
|
|
2141
2259
|
private _dvrThreshold;
|
|
@@ -2174,6 +2292,15 @@ declare class DefaultUI extends LitElement {
|
|
|
2174
2292
|
* Whether to automatically adjust the player's height to fit the video's aspect ratio.
|
|
2175
2293
|
*/
|
|
2176
2294
|
accessor fluid: boolean;
|
|
2295
|
+
/**
|
|
2296
|
+
* The language of this element.
|
|
2297
|
+
*
|
|
2298
|
+
* When set, this also updates the {@link Locale} of the UI if one is registered with {@link addLocale}.
|
|
2299
|
+
*
|
|
2300
|
+
* @see {@link HTMLElement.lang}
|
|
2301
|
+
*/
|
|
2302
|
+
get lang(): string;
|
|
2303
|
+
set lang(value: string | null);
|
|
2177
2304
|
/**
|
|
2178
2305
|
* Whether the player's audio is muted.
|
|
2179
2306
|
*
|
|
@@ -2278,19 +2405,6 @@ type Extension = (ui: DefaultUI) => void;
|
|
|
2278
2405
|
*/
|
|
2279
2406
|
declare function registerExtension(extension: Extension): void;
|
|
2280
2407
|
|
|
2281
|
-
declare class BadNetworkModeMenu extends LitElement {
|
|
2282
|
-
static styles: lit.CSSResult[];
|
|
2283
|
-
private readonly _radioGroupRef;
|
|
2284
|
-
protected firstUpdated(): void;
|
|
2285
|
-
private readonly _onChange;
|
|
2286
|
-
protected render(): HTMLTemplateResult;
|
|
2287
|
-
}
|
|
2288
|
-
declare global {
|
|
2289
|
-
interface HTMLElementTagNameMap {
|
|
2290
|
-
'theolive-bad-network-menu': BadNetworkModeMenu;
|
|
2291
|
-
}
|
|
2292
|
-
}
|
|
2293
|
-
|
|
2294
2408
|
/**
|
|
2295
2409
|
* `<theolive-default-ui>` - A default UI for THEOlive.
|
|
2296
2410
|
*/
|
|
@@ -2372,14 +2486,423 @@ declare enum Attribute {
|
|
|
2372
2486
|
SHOW_AD_MARKERS = "show-ad-markers",
|
|
2373
2487
|
CLICKTHROUGH = "clickthrough",
|
|
2374
2488
|
PROPERTY = "property",
|
|
2375
|
-
VALUE = "value"
|
|
2489
|
+
VALUE = "value",
|
|
2490
|
+
LANG = "lang"
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
interface Locale {
|
|
2494
|
+
/**
|
|
2495
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link PlayButton} when it is showing a "play" button,
|
|
2496
|
+
* i.e. when the player is paused.
|
|
2497
|
+
*/
|
|
2498
|
+
playAria: string;
|
|
2499
|
+
/**
|
|
2500
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link PlayButton} when it is showing a "pause" button
|
|
2501
|
+
* i.e. when the player is playing.
|
|
2502
|
+
*/
|
|
2503
|
+
pauseAria: string;
|
|
2504
|
+
/**
|
|
2505
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link PlayButton} when it is showing a "replay" button
|
|
2506
|
+
* i.e. when the player is paused at the end of the stream.
|
|
2507
|
+
*/
|
|
2508
|
+
replayAria: string;
|
|
2509
|
+
/**
|
|
2510
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link MuteButton} when it is showing a "mute" button.
|
|
2511
|
+
*/
|
|
2512
|
+
muteAria: string;
|
|
2513
|
+
/**
|
|
2514
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link MuteButton} when it is showing an "unmute" button.
|
|
2515
|
+
*/
|
|
2516
|
+
unmuteAria: string;
|
|
2517
|
+
/**
|
|
2518
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link VolumeRange}.
|
|
2519
|
+
*/
|
|
2520
|
+
volumeAria: string;
|
|
2521
|
+
/**
|
|
2522
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link TimeRange}.
|
|
2523
|
+
*/
|
|
2524
|
+
seekAria: string;
|
|
2525
|
+
/**
|
|
2526
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link SeekButton} with a positive {@link SeekButton.seekOffset}.
|
|
2527
|
+
*
|
|
2528
|
+
* @param offset An offset that was formatted with {@link formatDuration}.
|
|
2529
|
+
*/
|
|
2530
|
+
seekForwardAria(offset: string): string;
|
|
2531
|
+
/**
|
|
2532
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link SeekButton} with a negative {@link SeekButton.seekOffset}.
|
|
2533
|
+
*
|
|
2534
|
+
* @param offset An offset that was formatted with {@link formatDuration}.
|
|
2535
|
+
*/
|
|
2536
|
+
seekBackwardAria(offset: string): string;
|
|
2537
|
+
/**
|
|
2538
|
+
* The text on a {@link LiveButton}, e.g. "LIVE".
|
|
2539
|
+
*/
|
|
2540
|
+
live: string;
|
|
2541
|
+
/**
|
|
2542
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link LiveButton}.
|
|
2543
|
+
*/
|
|
2544
|
+
seekToLiveAria: string;
|
|
2545
|
+
/**
|
|
2546
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link FullscreenButton}.
|
|
2547
|
+
*/
|
|
2548
|
+
fullscreenAria: string;
|
|
2549
|
+
/**
|
|
2550
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link FullscreenButton} when in fullscreen mode.
|
|
2551
|
+
*/
|
|
2552
|
+
fullscreenExitAria: string;
|
|
2553
|
+
/**
|
|
2554
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for an {@link AirPlayButton}.
|
|
2555
|
+
*/
|
|
2556
|
+
airplayAria: string;
|
|
2557
|
+
/**
|
|
2558
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for an {@link AirPlayButton} when it is connected to AirPlay.
|
|
2559
|
+
*/
|
|
2560
|
+
airplayConnectedAria: string;
|
|
2561
|
+
/**
|
|
2562
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link ChromecastButton}.
|
|
2563
|
+
*/
|
|
2564
|
+
chromecastAria: string;
|
|
2565
|
+
/**
|
|
2566
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link ChromecastButton} when it is connected to Chromecast.
|
|
2567
|
+
*/
|
|
2568
|
+
chromecastConnectedAria: string;
|
|
2569
|
+
/**
|
|
2570
|
+
* The heading for a {@link ChromecastDisplay} when playing on Chromecast.
|
|
2571
|
+
* This heading precedes the name of the connected Chromecast receiver.
|
|
2572
|
+
*/
|
|
2573
|
+
chromecastHeading: string;
|
|
2574
|
+
/**
|
|
2575
|
+
* The default receiver name for a {@link ChromecastDisplay} when playing on a Chromecast receiver with an unknown name.
|
|
2576
|
+
* This follows the {@link chromecastHeading}.
|
|
2577
|
+
*/
|
|
2578
|
+
chromecastDefaultReceiverName: string;
|
|
2579
|
+
/**
|
|
2580
|
+
* The {@link HTMLElement.ariaValueText | `aria-valuetext`} for a {@link TimeDisplay} and {@link TimeRange}
|
|
2581
|
+
* when it has both a valid time and duration to display.
|
|
2582
|
+
*
|
|
2583
|
+
* Examples:
|
|
2584
|
+
* - "5 seconds" and "10 seconds" → "5 seconds of 10 seconds"
|
|
2585
|
+
*
|
|
2586
|
+
* @param time A time duration that was formatted with {@link formatDuration} or {@link formatRemainingDuration}.
|
|
2587
|
+
* @param totalDuration A total duration that was formatted with {@link formatDuration} or {@link formatRemainingDuration}.
|
|
2588
|
+
*/
|
|
2589
|
+
timeOfTotalAria(time: string, totalDuration: string): string;
|
|
2590
|
+
/**
|
|
2591
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link TimeDisplay}.
|
|
2592
|
+
*/
|
|
2593
|
+
playbackTimeAria: string;
|
|
2594
|
+
/**
|
|
2595
|
+
* The {@link HTMLElement.ariaValueText | `aria-valuetext`} for a {@link TimeDisplay} and {@link TimeRange}
|
|
2596
|
+
* when it does not have a valid time to display.
|
|
2597
|
+
*/
|
|
2598
|
+
unknownTimeAria: string;
|
|
2599
|
+
/**
|
|
2600
|
+
* The text on an {@link AdDisplay}, e.g. "Ad".
|
|
2601
|
+
*/
|
|
2602
|
+
adText: string;
|
|
2603
|
+
/**
|
|
2604
|
+
* The text on an {@link AdDisplay} when playing multiple ads in an ad break, e.g. "Ad X of Y".
|
|
2605
|
+
*
|
|
2606
|
+
* @param currentAd The number of the currently playing ad.
|
|
2607
|
+
* @param totalAds The total number of ads in the current ad break.
|
|
2608
|
+
*/
|
|
2609
|
+
adBreakText(currentAd: number, totalAds: number): string;
|
|
2610
|
+
/**
|
|
2611
|
+
* The text on an {@link AdClickThroughButton}, e.g. "Visit Advertiser".
|
|
2612
|
+
*/
|
|
2613
|
+
adClickThroughText: string;
|
|
2614
|
+
/**
|
|
2615
|
+
* The text on an {@link AdCountdown}, e.g. "Content will resume in X seconds".
|
|
2616
|
+
*
|
|
2617
|
+
* @param remainingDuration The remaining time until the content can be resumed, after being formatted with {@link formatNarrowDuration}.
|
|
2618
|
+
*/
|
|
2619
|
+
adCountdownText(remainingDuration: string): string;
|
|
2620
|
+
/**
|
|
2621
|
+
* The text on an {@link AdSkipButton}, e.g. "Skip Ad".
|
|
2622
|
+
*/
|
|
2623
|
+
adSkipButtonText: string;
|
|
2624
|
+
/**
|
|
2625
|
+
* The text on an {@link AdSkipButton} when it is showing a countdown.
|
|
2626
|
+
*
|
|
2627
|
+
* @param remainingDuration The remaining time until the ad can be skipped, after being formatted with {@link formatNarrowDuration}.
|
|
2628
|
+
*/
|
|
2629
|
+
adSkipCountdownText(remainingDuration: string): string;
|
|
2630
|
+
/**
|
|
2631
|
+
* The announcement message on a {@link THEOliveDefaultUI} when the stream is loading.
|
|
2632
|
+
*/
|
|
2633
|
+
liveStreamLoading: string;
|
|
2634
|
+
/**
|
|
2635
|
+
* The announcement message on a {@link THEOliveDefaultUI} when the stream is offline and hasn't started yet.
|
|
2636
|
+
*/
|
|
2637
|
+
liveStreamOffline: string;
|
|
2638
|
+
/**
|
|
2639
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link CloseMenuButton}.
|
|
2640
|
+
*/
|
|
2641
|
+
closeMenuAria: string;
|
|
2642
|
+
/**
|
|
2643
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link LanguageMenuButton}.
|
|
2644
|
+
*/
|
|
2645
|
+
openLanguageMenuAria: string;
|
|
2646
|
+
/**
|
|
2647
|
+
* The heading for a {@link LanguageMenu}.
|
|
2648
|
+
*/
|
|
2649
|
+
languageMenuHeading: string;
|
|
2650
|
+
/**
|
|
2651
|
+
* The section header for audio tracks in a {@link LanguageMenu}.
|
|
2652
|
+
*/
|
|
2653
|
+
audioMenuHeading: string;
|
|
2654
|
+
/**
|
|
2655
|
+
* The section header for subtitle tracks in a {@link LanguageMenu}.
|
|
2656
|
+
*/
|
|
2657
|
+
subtitleMenuHeading: string;
|
|
2658
|
+
/**
|
|
2659
|
+
* The label for a {@link TextTrackOffRadioButton} to disable the active subtitle track.
|
|
2660
|
+
*/
|
|
2661
|
+
subtitleOff: string;
|
|
2662
|
+
/**
|
|
2663
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link PlaybackRateMenuButton}.
|
|
2664
|
+
*/
|
|
2665
|
+
openPlaybackRateMenuAria: string;
|
|
2666
|
+
/**
|
|
2667
|
+
* The heading for a {@link PlaybackRateMenu}.
|
|
2668
|
+
*/
|
|
2669
|
+
playbackRateMenuHeading: string;
|
|
2670
|
+
/**
|
|
2671
|
+
* Formats the given playback rate for a {@link PlaybackRateMenu} and {@link PlaybackRateDisplay}.
|
|
2672
|
+
*
|
|
2673
|
+
* Examples:
|
|
2674
|
+
* - `1` → "Normal"
|
|
2675
|
+
* - `1.5` → "1.5x"
|
|
2676
|
+
*
|
|
2677
|
+
* @param rate The playback rate.
|
|
2678
|
+
*/
|
|
2679
|
+
formatPlaybackRate(rate: number): string;
|
|
2680
|
+
/**
|
|
2681
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link SettingsMenuButton}.
|
|
2682
|
+
*/
|
|
2683
|
+
openSettingsMenuAria: string;
|
|
2684
|
+
/**
|
|
2685
|
+
* The heading for a {@link SettingsMenu}.
|
|
2686
|
+
*/
|
|
2687
|
+
settingsMenuHeading: string;
|
|
2688
|
+
/**
|
|
2689
|
+
* The text for the quality option in a {@link SettingsMenu}.
|
|
2690
|
+
*/
|
|
2691
|
+
qualityMenuHeading: string;
|
|
2692
|
+
/**
|
|
2693
|
+
* The heading for a {@link TextTrackStyleMenu}.
|
|
2694
|
+
*/
|
|
2695
|
+
textTrackStyleMenuHeading: string;
|
|
2696
|
+
/**
|
|
2697
|
+
* The heading for the font family style option in a {@link TextTrackStyleMenu}.
|
|
2698
|
+
*/
|
|
2699
|
+
textTrackStyleFontFamily: string;
|
|
2700
|
+
/**
|
|
2701
|
+
* The heading for the font color style option in a {@link TextTrackStyleMenu}.
|
|
2702
|
+
*/
|
|
2703
|
+
textTrackStyleFontColor: string;
|
|
2704
|
+
/**
|
|
2705
|
+
* The heading for the font opacity style option in a {@link TextTrackStyleMenu}.
|
|
2706
|
+
*/
|
|
2707
|
+
textTrackStyleFontOpacity: string;
|
|
2708
|
+
/**
|
|
2709
|
+
* The heading for the font size style option in a {@link TextTrackStyleMenu}.
|
|
2710
|
+
*/
|
|
2711
|
+
textTrackStyleFontSize: string;
|
|
2712
|
+
/**
|
|
2713
|
+
* The heading for the background color style option in a {@link TextTrackStyleMenu}.
|
|
2714
|
+
*/
|
|
2715
|
+
textTrackStyleBackgroundColor: string;
|
|
2716
|
+
/**
|
|
2717
|
+
* The heading for the background opacity style option in a {@link TextTrackStyleMenu}.
|
|
2718
|
+
*/
|
|
2719
|
+
textTrackStyleBackgroundOpacity: string;
|
|
2720
|
+
/**
|
|
2721
|
+
* The heading for the window color style option in a {@link TextTrackStyleMenu}.
|
|
2722
|
+
*/
|
|
2723
|
+
textTrackStyleWindowColor: string;
|
|
2724
|
+
/**
|
|
2725
|
+
* The heading for the window opacity style option in a {@link TextTrackStyleMenu}.
|
|
2726
|
+
*/
|
|
2727
|
+
textTrackStyleWindowOpacity: string;
|
|
2728
|
+
/**
|
|
2729
|
+
* The heading for the edge style option in a {@link TextTrackStyleMenu}.
|
|
2730
|
+
*/
|
|
2731
|
+
textTrackStyleEdgeStyle: string;
|
|
2732
|
+
/**
|
|
2733
|
+
* The label for the default style option in a {@link TextTrackStyleRadioGroup}.
|
|
2734
|
+
*/
|
|
2735
|
+
textTrackStyleDefaultLabel: string;
|
|
2736
|
+
/**
|
|
2737
|
+
* The label for a {@link TextTrackStyleDisplay} when it is showing a style option
|
|
2738
|
+
* that does not match any predefined values.
|
|
2739
|
+
*/
|
|
2740
|
+
textTrackStyleCustomLabel: string;
|
|
2741
|
+
/**
|
|
2742
|
+
* The label for a {@link TextTrackStyleResetButton} to reset the text track style.
|
|
2743
|
+
*/
|
|
2744
|
+
textTrackStyleResetLabel: string;
|
|
2745
|
+
/**
|
|
2746
|
+
* The labels for font family style options in a {@link TextTrackStyleRadioGroup},
|
|
2747
|
+
* keyed by the original English label (e.g. "Default" or "Monospace Serif").
|
|
2748
|
+
*/
|
|
2749
|
+
fontFamilyLabels: Record<KnownFontFamily, string>;
|
|
2750
|
+
/**
|
|
2751
|
+
* The labels for color style options in a {@link TextTrackStyleRadioGroup},
|
|
2752
|
+
* keyed by the original English label (e.g. "White", "Black" or "Red").
|
|
2753
|
+
*/
|
|
2754
|
+
colorLabels: Record<KnownColor, string>;
|
|
2755
|
+
/**
|
|
2756
|
+
* The labels for edge style options in a {@link TextTrackStyleRadioGroup},
|
|
2757
|
+
* keyed by an {@link EdgeStyle} value.
|
|
2758
|
+
*/
|
|
2759
|
+
edgeStyleLabels: Record<EdgeStyle, string>;
|
|
2760
|
+
/**
|
|
2761
|
+
* The label for an {@link ActiveQualityDisplay} or {@link QualityRadioButton} when it is showing the "Automatic" quality selection option.
|
|
2762
|
+
*/
|
|
2763
|
+
automaticQualityLabel: string;
|
|
2764
|
+
/**
|
|
2765
|
+
* The label for a {@link ActiveQualityDisplay} when it is showing a quality selection option
|
|
2766
|
+
* without any usable label.
|
|
2767
|
+
*/
|
|
2768
|
+
unknownQualityLabel: string;
|
|
2769
|
+
/**
|
|
2770
|
+
* The label for an {@link AutomaticQualitySelector} for THEOlive's {@link BadNetworkModeMenu}.
|
|
2771
|
+
*/
|
|
2772
|
+
highQualityLabel: string;
|
|
2773
|
+
/**
|
|
2774
|
+
* The label for a {@link BadNetworkModeSelector} for THEOlive's {@link BadNetworkModeMenu}.
|
|
2775
|
+
*/
|
|
2776
|
+
lowQualityLabel: string;
|
|
2777
|
+
/**
|
|
2778
|
+
* The heading for an {@link ErrorDisplay}.
|
|
2779
|
+
*/
|
|
2780
|
+
errorHeading: string;
|
|
2781
|
+
/**
|
|
2782
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link BadNetworkModeButton}.
|
|
2783
|
+
*/
|
|
2784
|
+
openBadNetworkModeMenuAria: string;
|
|
2785
|
+
/**
|
|
2786
|
+
* Formats the given time duration as a human-readable string.
|
|
2787
|
+
*
|
|
2788
|
+
* This is optional. If not provided, a default {@link Intl.DurationFormat} with the {@link Intl.DurationFormatStyle | `"long"` style} is used.
|
|
2789
|
+
*
|
|
2790
|
+
* Examples:
|
|
2791
|
+
* - `{ seconds: 5 }` → "5 seconds"
|
|
2792
|
+
* - `{ minutes: 2, seconds: 10 }` → "2 minutes and 10 seconds"
|
|
2793
|
+
*
|
|
2794
|
+
* @param duration A duration, compatible with {@link Intl.DurationFormat.format}.
|
|
2795
|
+
*/
|
|
2796
|
+
formatDuration(duration: Duration): string;
|
|
2797
|
+
/**
|
|
2798
|
+
* Formats the given time duration as a narrow human-readable string.
|
|
2799
|
+
*
|
|
2800
|
+
* This is optional. If not provided, a default {@link Intl.DurationFormat} with the {@link Intl.DurationFormatStyle | `"narrow"` style} is used.
|
|
2801
|
+
*
|
|
2802
|
+
* Examples:
|
|
2803
|
+
* - `{ seconds: 5 }` → "5s"
|
|
2804
|
+
* - `{ minutes: 2, seconds: 10 }` → "2m 10s"
|
|
2805
|
+
*
|
|
2806
|
+
* @param duration A duration, compatible with {@link Intl.DurationFormat.format}.
|
|
2807
|
+
*/
|
|
2808
|
+
formatNarrowDuration(duration: Duration): string;
|
|
2809
|
+
/**
|
|
2810
|
+
* Formats the given remaining time duration as a human-readable string.
|
|
2811
|
+
*
|
|
2812
|
+
* Examples:
|
|
2813
|
+
* - "5 seconds" → "5 seconds remaining"
|
|
2814
|
+
* - "2 minutes and 10 seconds" → "2 minutes and 10 seconds remaining"
|
|
2815
|
+
*
|
|
2816
|
+
* @param duration A duration that was formatted with {@link formatDuration}.
|
|
2817
|
+
*/
|
|
2818
|
+
formatRemainingDuration(duration: string): string;
|
|
2819
|
+
/**
|
|
2820
|
+
* Formats the given percentage as a human-readable string.
|
|
2821
|
+
*
|
|
2822
|
+
* This is optional. If not provided, a default {@link Intl.NumberFormat} with the {@link Intl.NumberFormatOptions.style | `"percent"` style} is used.
|
|
2823
|
+
*
|
|
2824
|
+
* Examples:
|
|
2825
|
+
* - `0.75` → "75%"
|
|
2826
|
+
* - `1.0` → "100%"
|
|
2827
|
+
*
|
|
2828
|
+
* @param percentage A percentage, between `0.0` and `1.0`.
|
|
2829
|
+
*/
|
|
2830
|
+
formatPercentage(percentage: number): string;
|
|
2831
|
+
/**
|
|
2832
|
+
* Formats a bandwidth value.
|
|
2833
|
+
*
|
|
2834
|
+
* This is optional. If not provided, a default {@link Intl.NumberFormat} with the {@link Intl.NumberFormatOptions.style | `"unit"` style} is used
|
|
2835
|
+
* that dynamically picks between the `"kilobit-per-second"` or `"megabit-per-second"` {@link Intl.NumberFormatOptions.unit | unit}s.
|
|
2836
|
+
*
|
|
2837
|
+
* Examples:
|
|
2838
|
+
* - `150_000` → "150kb/s"
|
|
2839
|
+
* - `2_500_000` → "2.5Mb/s"
|
|
2840
|
+
*
|
|
2841
|
+
* @param bandwidth A bandwidth value, in bits per second.
|
|
2842
|
+
*/
|
|
2843
|
+
formatBandwidth(bandwidth: number): string;
|
|
2844
|
+
/**
|
|
2845
|
+
* Formats a language name.
|
|
2846
|
+
*
|
|
2847
|
+
* This is optional. If not provided, a default {@link Intl.DisplayNames} with the {@link Intl.DisplayNamesOptions.type | `"language"` type} is used.
|
|
2848
|
+
*
|
|
2849
|
+
* Examples for an English locale:
|
|
2850
|
+
* - `"en"` → "English"
|
|
2851
|
+
* - `"fr"` → "French"
|
|
2852
|
+
* - `"pt-BR"` → "Brazilian Portuguese"
|
|
2853
|
+
*
|
|
2854
|
+
* Examples for a French locale:
|
|
2855
|
+
* - `"en"` → "anglais"
|
|
2856
|
+
* - `"fr"` → "français"
|
|
2857
|
+
* - `"pt-BR"` → "portugais brésilien"
|
|
2858
|
+
*
|
|
2859
|
+
* @param languageCode
|
|
2860
|
+
* @return A localized language name, or `undefined` if the language code is unknown.
|
|
2861
|
+
*/
|
|
2862
|
+
formatLanguage(languageCode: string): string | undefined;
|
|
2863
|
+
}
|
|
2864
|
+
/**
|
|
2865
|
+
* A duration, compatible with {@link Intl.DurationFormat.format} and {@link Temporal.Duration}.
|
|
2866
|
+
*/
|
|
2867
|
+
interface Duration {
|
|
2868
|
+
hours: number;
|
|
2869
|
+
minutes: number;
|
|
2870
|
+
seconds: number;
|
|
2376
2871
|
}
|
|
2872
|
+
/**
|
|
2873
|
+
* The known font families for a {@link TextTrackStyleRadioGroup}.
|
|
2874
|
+
*/
|
|
2875
|
+
type KnownFontFamily = 'Monospace Serif' | 'Proportional Serif' | 'Monospace Sans' | 'Proportional Sans';
|
|
2876
|
+
/**
|
|
2877
|
+
* The known colors for a {@link TextTrackStyleRadioGroup}.
|
|
2878
|
+
*/
|
|
2879
|
+
type KnownColor = 'White' | 'Yellow' | 'Green' | 'Cyan' | 'Blue' | 'Magenta' | 'Red' | 'Black';
|
|
2880
|
+
/**
|
|
2881
|
+
* A partial {@link Locale}.
|
|
2882
|
+
*/
|
|
2883
|
+
type PartialLocale = Partial<Locale> & {
|
|
2884
|
+
fontFamilyLabels?: Partial<Locale['fontFamilyLabels']>;
|
|
2885
|
+
colorLabels?: Partial<Locale['colorLabels']>;
|
|
2886
|
+
edgeStyleLabels?: Partial<Locale['edgeStyleLabels']>;
|
|
2887
|
+
};
|
|
2888
|
+
|
|
2889
|
+
/**
|
|
2890
|
+
* Register a new locale with the given name.
|
|
2891
|
+
*
|
|
2892
|
+
* The locale's name should preferably be a BCP 47 language identifier, so it can be set as
|
|
2893
|
+
* a valid [`lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/lang)
|
|
2894
|
+
* of the UI.
|
|
2895
|
+
*
|
|
2896
|
+
* @param name The name of the locale.
|
|
2897
|
+
* @param locale The locale.
|
|
2898
|
+
*/
|
|
2899
|
+
declare function addLocale(name: string, locale: PartialLocale): void;
|
|
2377
2900
|
|
|
2378
2901
|
/**
|
|
2379
2902
|
* The version of Open Video UI for Web.
|
|
2380
2903
|
*/
|
|
2381
2904
|
declare const version: string;
|
|
2382
2905
|
|
|
2383
|
-
export { ActiveQualityDisplay, AdClickThroughButton, AdCountdown, AdDisplay, AdSkipButton, AirPlayButton, Attribute, Button, CastButton, ChromecastButton, ChromecastDisplay, CloseMenuButton, ColorStops, ControlBar, DefaultUI, DurationDisplay, ErrorDisplay, ExtensionSlot, FullscreenButton, GestureReceiver, LanguageMenu, LanguageMenuButton, LinkButton, LiveButton, LoadingIndicator, MediaTrackRadioButton, Menu, MenuButton, MenuGroup, MuteButton, PlayButton, PlaybackRateDisplay, PlaybackRateMenu, PlaybackRateMenuButton, PlaybackRateRadioGroup, PreviewThumbnail, PreviewTimeDisplay, QualityRadioButton, QualityRadioGroup, RadioButton, RadioGroup, Range, SeekButton, SettingsMenu, SettingsMenuButton, SlotContainer, StateReceiverMixin, THEOliveDefaultUI, TextTrackOffRadioButton, TextTrackRadioButton, TextTrackStyleDisplay, TextTrackStyleMenu, TextTrackStyleRadioGroup, TextTrackStyleResetButton, TimeDisplay, TimeRange, TrackRadioGroup, UIContainer, VolumeRange, buttonTemplate, linkButtonTemplate, menuGroupTemplate, menuTemplate, registerExtension, stateReceiver, version };
|
|
2384
|
-
export type { ButtonOptions, Constructor, DeviceType, Extension, MenuGroupOptions, MenuOptions, StateReceiverElement, StateReceiverPropertyMap, StreamType, TextTrackStyleMap, TextTrackStyleOption, TrackType, VolumeLevel };
|
|
2906
|
+
export { ActiveQualityDisplay, AdClickThroughButton, AdCountdown, AdDisplay, AdSkipButton, AirPlayButton, Attribute, AutomaticQualitySelector, BadNetworkModeButton, BadNetworkModeMenu, BadNetworkModeSelector, Button, CastButton, ChromecastButton, ChromecastDisplay, CloseMenuButton, ColorStops, ControlBar, DefaultUI, DurationDisplay, ErrorDisplay, ExtensionSlot, FullscreenButton, GestureReceiver, LanguageMenu, LanguageMenuButton, LinkButton, LiveButton, LoadingIndicator, MediaTrackRadioButton, Menu, MenuButton, MenuGroup, MuteButton, PlayButton, PlaybackRateDisplay, PlaybackRateMenu, PlaybackRateMenuButton, PlaybackRateRadioGroup, PreviewThumbnail, PreviewTimeDisplay, QualityRadioButton, QualityRadioGroup, RadioButton, RadioGroup, Range, SeekButton, SettingsMenu, SettingsMenuButton, SlotContainer, StateReceiverMixin, THEOliveDefaultUI, TextTrackOffRadioButton, TextTrackRadioButton, TextTrackStyleDisplay, TextTrackStyleMenu, TextTrackStyleRadioGroup, TextTrackStyleResetButton, TimeDisplay, TimeRange, TrackRadioGroup, UIContainer, VolumeRange, addLocale, buttonTemplate, linkButtonTemplate, menuGroupTemplate, menuTemplate, registerExtension, stateReceiver, version };
|
|
2907
|
+
export type { ButtonOptions, Constructor, DeviceType, Duration, Extension, KnownColor, KnownFontFamily, Locale, MenuGroupOptions, MenuOptions, PartialLocale, StateReceiverElement, StateReceiverPropertyMap, StreamType, TextTrackStyleMap, TextTrackStyleOption, TrackType, VolumeLevel };
|
|
2385
2908
|
export as namespace THEOplayerUI;
|