@theoplayer/web-ui 2.1.3 → 2.3.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 +16 -0
- package/dist/THEOplayerUI.d.ts +634 -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 +2 -2
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.3.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
|
}
|
|
@@ -1034,6 +1058,58 @@ declare global {
|
|
|
1034
1058
|
}
|
|
1035
1059
|
}
|
|
1036
1060
|
|
|
1061
|
+
/**
|
|
1062
|
+
* A button that toggles stereoscopic VR mode.
|
|
1063
|
+
*
|
|
1064
|
+
* The button is only shown when the current source supports VR (e.g. a 360° video),
|
|
1065
|
+
* and is disabled when the device cannot present VR content.
|
|
1066
|
+
*/
|
|
1067
|
+
declare class VRButton extends Button {
|
|
1068
|
+
private _player;
|
|
1069
|
+
connectedCallback(): void;
|
|
1070
|
+
get player(): ChromelessPlayer | undefined;
|
|
1071
|
+
set player(player: ChromelessPlayer | undefined);
|
|
1072
|
+
/**
|
|
1073
|
+
* Whether stereoscopic VR mode is currently active.
|
|
1074
|
+
*/
|
|
1075
|
+
accessor stereo: boolean;
|
|
1076
|
+
accessor lang: string;
|
|
1077
|
+
private readonly _updateFromPlayer;
|
|
1078
|
+
protected handleClick(): void;
|
|
1079
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
1080
|
+
private _updateAriaLabel;
|
|
1081
|
+
protected render(): HTMLTemplateResult;
|
|
1082
|
+
}
|
|
1083
|
+
declare global {
|
|
1084
|
+
interface HTMLElementTagNameMap {
|
|
1085
|
+
'theoplayer-vr-button': VRButton;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* A compass that indicates the current viewing direction of a 360° (VR) video.
|
|
1091
|
+
*
|
|
1092
|
+
* @cssproperty `--theoplayer-vr-compass-size` - The size (diameter) of the compass. Defaults to `26px`.
|
|
1093
|
+
* @cssproperty `--theoplayer-vr-compass-color` - The color of the compass border, center dot and pointer.
|
|
1094
|
+
* Defaults to `#fff`.
|
|
1095
|
+
* @cssproperty `--theoplayer-vr-compass-fov-color` - The color of the field-of-view indicator.
|
|
1096
|
+
* Defaults to `rgba(255, 255, 255, 0.75)`.
|
|
1097
|
+
*/
|
|
1098
|
+
declare class VRCompass extends LitElement {
|
|
1099
|
+
static styles: lit.CSSResult[];
|
|
1100
|
+
private _player;
|
|
1101
|
+
private accessor _yaw;
|
|
1102
|
+
get player(): ChromelessPlayer | undefined;
|
|
1103
|
+
set player(player: ChromelessPlayer | undefined);
|
|
1104
|
+
private readonly _updateFromPlayer;
|
|
1105
|
+
protected render(): HTMLTemplateResult;
|
|
1106
|
+
}
|
|
1107
|
+
declare global {
|
|
1108
|
+
interface HTMLElementTagNameMap {
|
|
1109
|
+
'theoplayer-vr-compass': VRCompass;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1037
1113
|
declare class ColorStops {
|
|
1038
1114
|
private _stops;
|
|
1039
1115
|
constructor();
|
|
@@ -1278,6 +1354,7 @@ declare class TimeRange extends Range {
|
|
|
1278
1354
|
disconnectedCallback(): void;
|
|
1279
1355
|
get player(): ChromelessPlayer | undefined;
|
|
1280
1356
|
set player(player: ChromelessPlayer | undefined);
|
|
1357
|
+
accessor lang: string;
|
|
1281
1358
|
/**
|
|
1282
1359
|
* The stream type, either "vod", "live" or "dvr".
|
|
1283
1360
|
*/
|
|
@@ -1320,6 +1397,7 @@ declare class VolumeRange extends Range {
|
|
|
1320
1397
|
private _player;
|
|
1321
1398
|
constructor();
|
|
1322
1399
|
connectedCallback(): void;
|
|
1400
|
+
accessor lang: string;
|
|
1323
1401
|
get player(): ChromelessPlayer | undefined;
|
|
1324
1402
|
set player(player: ChromelessPlayer | undefined);
|
|
1325
1403
|
private readonly _updateFromPlayer;
|
|
@@ -1358,6 +1436,7 @@ declare class ErrorDisplay extends LitElement {
|
|
|
1358
1436
|
* Whether the player is in fullscreen mode.
|
|
1359
1437
|
*/
|
|
1360
1438
|
accessor fullscreen: boolean;
|
|
1439
|
+
accessor lang: string;
|
|
1361
1440
|
protected render(): lit_html.TemplateResult<1>;
|
|
1362
1441
|
}
|
|
1363
1442
|
declare global {
|
|
@@ -1402,7 +1481,8 @@ declare class ChromecastButton extends CastButton {
|
|
|
1402
1481
|
connectedCallback(): void;
|
|
1403
1482
|
get player(): ChromelessPlayer | undefined;
|
|
1404
1483
|
set player(player: ChromelessPlayer | undefined);
|
|
1405
|
-
|
|
1484
|
+
accessor lang: string;
|
|
1485
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
1406
1486
|
private _updateAriaLabel;
|
|
1407
1487
|
protected render(): lit_html.TemplateResult<1>;
|
|
1408
1488
|
}
|
|
@@ -1430,6 +1510,7 @@ declare class ChromecastDisplay extends LitElement {
|
|
|
1430
1510
|
static styles: lit.CSSResult[];
|
|
1431
1511
|
private _player;
|
|
1432
1512
|
private _castApi;
|
|
1513
|
+
accessor lang: string;
|
|
1433
1514
|
private accessor _receiverName;
|
|
1434
1515
|
connectedCallback(): void;
|
|
1435
1516
|
get player(): ChromelessPlayer | undefined;
|
|
@@ -1452,7 +1533,8 @@ declare class AirPlayButton extends CastButton {
|
|
|
1452
1533
|
connectedCallback(): void;
|
|
1453
1534
|
get player(): ChromelessPlayer | undefined;
|
|
1454
1535
|
set player(player: ChromelessPlayer | undefined);
|
|
1455
|
-
|
|
1536
|
+
accessor lang: string;
|
|
1537
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
1456
1538
|
private _updateAriaLabel;
|
|
1457
1539
|
protected render(): lit_html.TemplateResult<1>;
|
|
1458
1540
|
}
|
|
@@ -1529,7 +1611,6 @@ declare class LiveButton extends Button {
|
|
|
1529
1611
|
static styles: lit.CSSResult[];
|
|
1530
1612
|
private _player;
|
|
1531
1613
|
private _liveThreshold;
|
|
1532
|
-
connectedCallback(): void;
|
|
1533
1614
|
/**
|
|
1534
1615
|
* Whether the player is paused.
|
|
1535
1616
|
*/
|
|
@@ -1550,11 +1631,14 @@ declare class LiveButton extends Button {
|
|
|
1550
1631
|
* Whether the player is considered to be playing at the live point.
|
|
1551
1632
|
*/
|
|
1552
1633
|
accessor live: boolean;
|
|
1634
|
+
accessor lang: string;
|
|
1553
1635
|
get player(): ChromelessPlayer | undefined;
|
|
1554
1636
|
set player(player: ChromelessPlayer | undefined);
|
|
1555
1637
|
private readonly _updatePaused;
|
|
1556
1638
|
private readonly _updateLive;
|
|
1557
1639
|
protected handleClick(): void;
|
|
1640
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
1641
|
+
private _updateAriaLabel;
|
|
1558
1642
|
protected render(): HTMLTemplateResult;
|
|
1559
1643
|
}
|
|
1560
1644
|
declare global {
|
|
@@ -1599,7 +1683,9 @@ declare class AdDisplay extends LitElement {
|
|
|
1599
1683
|
static styles: lit.CSSResult[];
|
|
1600
1684
|
private _player;
|
|
1601
1685
|
private _ads;
|
|
1602
|
-
private accessor
|
|
1686
|
+
private accessor _currentAd;
|
|
1687
|
+
private accessor _totalAds;
|
|
1688
|
+
accessor lang: string;
|
|
1603
1689
|
connectedCallback(): void;
|
|
1604
1690
|
get player(): ChromelessPlayer | undefined;
|
|
1605
1691
|
set player(player: ChromelessPlayer | undefined);
|
|
@@ -1620,6 +1706,7 @@ declare class AdCountdown extends LitElement {
|
|
|
1620
1706
|
private _player;
|
|
1621
1707
|
private _ads;
|
|
1622
1708
|
private accessor _maxRemainingDuration;
|
|
1709
|
+
accessor lang: string;
|
|
1623
1710
|
get player(): ChromelessPlayer | undefined;
|
|
1624
1711
|
set player(player: ChromelessPlayer | undefined);
|
|
1625
1712
|
private readonly _onAdChange;
|
|
@@ -1646,6 +1733,7 @@ declare class AdClickThroughButton extends LinkButton {
|
|
|
1646
1733
|
*/
|
|
1647
1734
|
get clickThrough(): string | null;
|
|
1648
1735
|
set clickThrough(clickThrough: string | null);
|
|
1736
|
+
accessor lang: string;
|
|
1649
1737
|
get player(): ChromelessPlayer | undefined;
|
|
1650
1738
|
set player(player: ChromelessPlayer | undefined);
|
|
1651
1739
|
private readonly _updateFromPlayer;
|
|
@@ -1682,6 +1770,7 @@ declare class AdSkipButton extends Button {
|
|
|
1682
1770
|
private _ads;
|
|
1683
1771
|
private accessor _showCountdown;
|
|
1684
1772
|
private accessor _timeToSkip;
|
|
1773
|
+
accessor lang: string;
|
|
1685
1774
|
connectedCallback(): void;
|
|
1686
1775
|
get player(): ChromelessPlayer | undefined;
|
|
1687
1776
|
set player(player: ChromelessPlayer | undefined);
|
|
@@ -1696,6 +1785,75 @@ declare global {
|
|
|
1696
1785
|
}
|
|
1697
1786
|
}
|
|
1698
1787
|
|
|
1788
|
+
/**
|
|
1789
|
+
* A radio button that shows the label of a given video quality, and switches the video track's
|
|
1790
|
+
* {@link theoplayer!MediaTrack.targetQuality | target quality} to that quality when clicked.
|
|
1791
|
+
*/
|
|
1792
|
+
declare abstract class AbstractQualitySelector extends RadioButton {
|
|
1793
|
+
private _player;
|
|
1794
|
+
private _theoLive;
|
|
1795
|
+
protected _badNetworkMode: boolean;
|
|
1796
|
+
accessor lang: string;
|
|
1797
|
+
get player(): ChromelessPlayer | undefined;
|
|
1798
|
+
set player(player: ChromelessPlayer | undefined);
|
|
1799
|
+
private readonly handleEnterBadNetworkMode_;
|
|
1800
|
+
private readonly handleExitBadNetworkMode_;
|
|
1801
|
+
handleEnterBadNetworkMode(): void;
|
|
1802
|
+
handleExitBadNetworkMode(): void;
|
|
1803
|
+
protected abstract handlePlayer(): void;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
declare class AutomaticQualitySelector extends AbstractQualitySelector {
|
|
1807
|
+
handleEnterBadNetworkMode(): void;
|
|
1808
|
+
handleExitBadNetworkMode(): void;
|
|
1809
|
+
protected handlePlayer(): void;
|
|
1810
|
+
private update_;
|
|
1811
|
+
protected handleChange(): void;
|
|
1812
|
+
protected render(): HTMLTemplateResult;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
/**
|
|
1816
|
+
* A menu button that opens a {@link BadNetworkModeMenu}.
|
|
1817
|
+
*
|
|
1818
|
+
* @attribute `menu` - The ID of the bad network menu.
|
|
1819
|
+
*/
|
|
1820
|
+
declare class BadNetworkModeButton extends MenuButton {
|
|
1821
|
+
static styles: lit.CSSResult[];
|
|
1822
|
+
private _player;
|
|
1823
|
+
private _theoLive;
|
|
1824
|
+
private accessor _inBadNetworkMode;
|
|
1825
|
+
private readonly handleEnterBadNetworkMode_;
|
|
1826
|
+
private readonly handleExitBadNetworkMode_;
|
|
1827
|
+
accessor lang: string;
|
|
1828
|
+
get player(): ChromelessPlayer | undefined;
|
|
1829
|
+
set player(player: ChromelessPlayer | undefined);
|
|
1830
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
1831
|
+
private _updateAriaLabel;
|
|
1832
|
+
protected render(): HTMLTemplateResult;
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
declare class BadNetworkModeSelector extends AbstractQualitySelector {
|
|
1836
|
+
handleEnterBadNetworkMode(): void;
|
|
1837
|
+
handleExitBadNetworkMode(): void;
|
|
1838
|
+
protected handlePlayer(): void;
|
|
1839
|
+
private update_;
|
|
1840
|
+
protected handleChange(): void;
|
|
1841
|
+
protected render(): HTMLTemplateResult;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
declare class BadNetworkModeMenu extends LitElement {
|
|
1845
|
+
static styles: lit.CSSResult[];
|
|
1846
|
+
private readonly _radioGroupRef;
|
|
1847
|
+
protected firstUpdated(): void;
|
|
1848
|
+
private readonly _onChange;
|
|
1849
|
+
protected render(): HTMLTemplateResult;
|
|
1850
|
+
}
|
|
1851
|
+
declare global {
|
|
1852
|
+
interface HTMLElementTagNameMap {
|
|
1853
|
+
'theolive-bad-network-menu': BadNetworkModeMenu;
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1699
1857
|
type Constructor<T> = abstract new (...args: any[]) => T;
|
|
1700
1858
|
|
|
1701
1859
|
/** @internal */
|
|
@@ -1710,6 +1868,7 @@ interface StateReceiverPropertyMap {
|
|
|
1710
1868
|
targetVideoQualities: VideoQuality[] | undefined;
|
|
1711
1869
|
error: THEOplayerError | undefined;
|
|
1712
1870
|
previewTime: number;
|
|
1871
|
+
lang: string;
|
|
1713
1872
|
}
|
|
1714
1873
|
/**
|
|
1715
1874
|
* A custom element that automatically receives selected state updates
|
|
@@ -1849,6 +2008,7 @@ declare class UIContainer extends LitElement {
|
|
|
1849
2008
|
private _deviceType;
|
|
1850
2009
|
private _streamType;
|
|
1851
2010
|
private _fluid;
|
|
2011
|
+
private _language;
|
|
1852
2012
|
private _userIdle;
|
|
1853
2013
|
private _userIdleTimeout;
|
|
1854
2014
|
private _isUserActive;
|
|
@@ -1893,6 +2053,15 @@ declare class UIContainer extends LitElement {
|
|
|
1893
2053
|
*/
|
|
1894
2054
|
get fluid(): boolean;
|
|
1895
2055
|
set fluid(value: boolean);
|
|
2056
|
+
/**
|
|
2057
|
+
* The language of this element.
|
|
2058
|
+
*
|
|
2059
|
+
* When set, this also updates the {@link Locale} of the UI if one is registered with {@link addLocale}.
|
|
2060
|
+
*
|
|
2061
|
+
* @see {@link HTMLElement.lang}
|
|
2062
|
+
*/
|
|
2063
|
+
get lang(): string;
|
|
2064
|
+
set lang(value: string | null);
|
|
1896
2065
|
/**
|
|
1897
2066
|
* Whether the player's audio is muted.
|
|
1898
2067
|
*/
|
|
@@ -1999,6 +2168,7 @@ declare class UIContainer extends LitElement {
|
|
|
1999
2168
|
private tryInitializePlayer_;
|
|
2000
2169
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
2001
2170
|
protected firstUpdated(): void;
|
|
2171
|
+
protected updated(): void;
|
|
2002
2172
|
disconnectedCallback(): void;
|
|
2003
2173
|
private readonly _onMutation;
|
|
2004
2174
|
private readonly _onSlotChange;
|
|
@@ -2020,7 +2190,15 @@ declare class UIContainer extends LitElement {
|
|
|
2020
2190
|
private readonly _onMenuPointerDown;
|
|
2021
2191
|
private readonly _onMenuClick;
|
|
2022
2192
|
private readonly _onEnterFullscreen;
|
|
2193
|
+
private _enterFullscreen;
|
|
2023
2194
|
private readonly _onExitFullscreen;
|
|
2195
|
+
private _exitFullscreen;
|
|
2196
|
+
/**
|
|
2197
|
+
* On iOS, presenting stereoscopic VR requires the player to fill the screen.
|
|
2198
|
+
*/
|
|
2199
|
+
private _vrFullscreen;
|
|
2200
|
+
private _vrWasFullscreen;
|
|
2201
|
+
private readonly _onVrStateChange;
|
|
2024
2202
|
private readonly _onFullscreenChange;
|
|
2025
2203
|
private readonly _exitFullscreenOnEsc;
|
|
2026
2204
|
private readonly _updateAspectRatio;
|
|
@@ -2136,6 +2314,7 @@ declare class DefaultUI extends LitElement {
|
|
|
2136
2314
|
private _appliedExtensions;
|
|
2137
2315
|
private _configuration;
|
|
2138
2316
|
private _source;
|
|
2317
|
+
private _language;
|
|
2139
2318
|
private _userIdleTimeout;
|
|
2140
2319
|
private _deviceType;
|
|
2141
2320
|
private _dvrThreshold;
|
|
@@ -2174,6 +2353,15 @@ declare class DefaultUI extends LitElement {
|
|
|
2174
2353
|
* Whether to automatically adjust the player's height to fit the video's aspect ratio.
|
|
2175
2354
|
*/
|
|
2176
2355
|
accessor fluid: boolean;
|
|
2356
|
+
/**
|
|
2357
|
+
* The language of this element.
|
|
2358
|
+
*
|
|
2359
|
+
* When set, this also updates the {@link Locale} of the UI if one is registered with {@link addLocale}.
|
|
2360
|
+
*
|
|
2361
|
+
* @see {@link HTMLElement.lang}
|
|
2362
|
+
*/
|
|
2363
|
+
get lang(): string;
|
|
2364
|
+
set lang(value: string | null);
|
|
2177
2365
|
/**
|
|
2178
2366
|
* Whether the player's audio is muted.
|
|
2179
2367
|
*
|
|
@@ -2278,19 +2466,6 @@ type Extension = (ui: DefaultUI) => void;
|
|
|
2278
2466
|
*/
|
|
2279
2467
|
declare function registerExtension(extension: Extension): void;
|
|
2280
2468
|
|
|
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
2469
|
/**
|
|
2295
2470
|
* `<theolive-default-ui>` - A default UI for THEOlive.
|
|
2296
2471
|
*/
|
|
@@ -2354,6 +2529,7 @@ declare enum Attribute {
|
|
|
2354
2529
|
REMAINING = "remaining",
|
|
2355
2530
|
REMAINING_WHEN_LIVE = "remaining-when-live",
|
|
2356
2531
|
SHOW_DURATION = "show-duration",
|
|
2532
|
+
STEREO = "stereo",
|
|
2357
2533
|
SEEK_OFFSET = "seek-offset",
|
|
2358
2534
|
MENU = "menu",
|
|
2359
2535
|
MENU_OPENED = "menu-opened",
|
|
@@ -2372,14 +2548,435 @@ declare enum Attribute {
|
|
|
2372
2548
|
SHOW_AD_MARKERS = "show-ad-markers",
|
|
2373
2549
|
CLICKTHROUGH = "clickthrough",
|
|
2374
2550
|
PROPERTY = "property",
|
|
2375
|
-
VALUE = "value"
|
|
2551
|
+
VALUE = "value",
|
|
2552
|
+
LANG = "lang"
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
interface Locale {
|
|
2556
|
+
/**
|
|
2557
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link PlayButton} when it is showing a "play" button,
|
|
2558
|
+
* i.e. when the player is paused.
|
|
2559
|
+
*/
|
|
2560
|
+
playAria: string;
|
|
2561
|
+
/**
|
|
2562
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link PlayButton} when it is showing a "pause" button
|
|
2563
|
+
* i.e. when the player is playing.
|
|
2564
|
+
*/
|
|
2565
|
+
pauseAria: string;
|
|
2566
|
+
/**
|
|
2567
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link PlayButton} when it is showing a "replay" button
|
|
2568
|
+
* i.e. when the player is paused at the end of the stream.
|
|
2569
|
+
*/
|
|
2570
|
+
replayAria: string;
|
|
2571
|
+
/**
|
|
2572
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link MuteButton} when it is showing a "mute" button.
|
|
2573
|
+
*/
|
|
2574
|
+
muteAria: string;
|
|
2575
|
+
/**
|
|
2576
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link MuteButton} when it is showing an "unmute" button.
|
|
2577
|
+
*/
|
|
2578
|
+
unmuteAria: string;
|
|
2579
|
+
/**
|
|
2580
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link VolumeRange}.
|
|
2581
|
+
*/
|
|
2582
|
+
volumeAria: string;
|
|
2583
|
+
/**
|
|
2584
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link TimeRange}.
|
|
2585
|
+
*/
|
|
2586
|
+
seekAria: string;
|
|
2587
|
+
/**
|
|
2588
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link SeekButton} with a positive {@link SeekButton.seekOffset}.
|
|
2589
|
+
*
|
|
2590
|
+
* @param offset An offset that was formatted with {@link formatDuration}.
|
|
2591
|
+
*/
|
|
2592
|
+
seekForwardAria(offset: string): string;
|
|
2593
|
+
/**
|
|
2594
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link SeekButton} with a negative {@link SeekButton.seekOffset}.
|
|
2595
|
+
*
|
|
2596
|
+
* @param offset An offset that was formatted with {@link formatDuration}.
|
|
2597
|
+
*/
|
|
2598
|
+
seekBackwardAria(offset: string): string;
|
|
2599
|
+
/**
|
|
2600
|
+
* The text on a {@link LiveButton}, e.g. "LIVE".
|
|
2601
|
+
*/
|
|
2602
|
+
live: string;
|
|
2603
|
+
/**
|
|
2604
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link LiveButton}.
|
|
2605
|
+
*/
|
|
2606
|
+
seekToLiveAria: string;
|
|
2607
|
+
/**
|
|
2608
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link FullscreenButton}.
|
|
2609
|
+
*/
|
|
2610
|
+
fullscreenAria: string;
|
|
2611
|
+
/**
|
|
2612
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link FullscreenButton} when in fullscreen mode.
|
|
2613
|
+
*/
|
|
2614
|
+
fullscreenExitAria: string;
|
|
2615
|
+
/**
|
|
2616
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link VRButton}.
|
|
2617
|
+
*/
|
|
2618
|
+
vrAria: string;
|
|
2619
|
+
/**
|
|
2620
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link VRButton} when VR (stereo) mode is active.
|
|
2621
|
+
*/
|
|
2622
|
+
vrExitAria: string;
|
|
2623
|
+
/**
|
|
2624
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link VRButton} when no VR capable device is available.
|
|
2625
|
+
*/
|
|
2626
|
+
vrUnavailableAria: string;
|
|
2627
|
+
/**
|
|
2628
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for an {@link AirPlayButton}.
|
|
2629
|
+
*/
|
|
2630
|
+
airplayAria: string;
|
|
2631
|
+
/**
|
|
2632
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for an {@link AirPlayButton} when it is connected to AirPlay.
|
|
2633
|
+
*/
|
|
2634
|
+
airplayConnectedAria: string;
|
|
2635
|
+
/**
|
|
2636
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link ChromecastButton}.
|
|
2637
|
+
*/
|
|
2638
|
+
chromecastAria: string;
|
|
2639
|
+
/**
|
|
2640
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link ChromecastButton} when it is connected to Chromecast.
|
|
2641
|
+
*/
|
|
2642
|
+
chromecastConnectedAria: string;
|
|
2643
|
+
/**
|
|
2644
|
+
* The heading for a {@link ChromecastDisplay} when playing on Chromecast.
|
|
2645
|
+
* This heading precedes the name of the connected Chromecast receiver.
|
|
2646
|
+
*/
|
|
2647
|
+
chromecastHeading: string;
|
|
2648
|
+
/**
|
|
2649
|
+
* The default receiver name for a {@link ChromecastDisplay} when playing on a Chromecast receiver with an unknown name.
|
|
2650
|
+
* This follows the {@link chromecastHeading}.
|
|
2651
|
+
*/
|
|
2652
|
+
chromecastDefaultReceiverName: string;
|
|
2653
|
+
/**
|
|
2654
|
+
* The {@link HTMLElement.ariaValueText | `aria-valuetext`} for a {@link TimeDisplay} and {@link TimeRange}
|
|
2655
|
+
* when it has both a valid time and duration to display.
|
|
2656
|
+
*
|
|
2657
|
+
* Examples:
|
|
2658
|
+
* - "5 seconds" and "10 seconds" → "5 seconds of 10 seconds"
|
|
2659
|
+
*
|
|
2660
|
+
* @param time A time duration that was formatted with {@link formatDuration} or {@link formatRemainingDuration}.
|
|
2661
|
+
* @param totalDuration A total duration that was formatted with {@link formatDuration} or {@link formatRemainingDuration}.
|
|
2662
|
+
*/
|
|
2663
|
+
timeOfTotalAria(time: string, totalDuration: string): string;
|
|
2664
|
+
/**
|
|
2665
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link TimeDisplay}.
|
|
2666
|
+
*/
|
|
2667
|
+
playbackTimeAria: string;
|
|
2668
|
+
/**
|
|
2669
|
+
* The {@link HTMLElement.ariaValueText | `aria-valuetext`} for a {@link TimeDisplay} and {@link TimeRange}
|
|
2670
|
+
* when it does not have a valid time to display.
|
|
2671
|
+
*/
|
|
2672
|
+
unknownTimeAria: string;
|
|
2673
|
+
/**
|
|
2674
|
+
* The text on an {@link AdDisplay}, e.g. "Ad".
|
|
2675
|
+
*/
|
|
2676
|
+
adText: string;
|
|
2677
|
+
/**
|
|
2678
|
+
* The text on an {@link AdDisplay} when playing multiple ads in an ad break, e.g. "Ad X of Y".
|
|
2679
|
+
*
|
|
2680
|
+
* @param currentAd The number of the currently playing ad.
|
|
2681
|
+
* @param totalAds The total number of ads in the current ad break.
|
|
2682
|
+
*/
|
|
2683
|
+
adBreakText(currentAd: number, totalAds: number): string;
|
|
2684
|
+
/**
|
|
2685
|
+
* The text on an {@link AdClickThroughButton}, e.g. "Visit Advertiser".
|
|
2686
|
+
*/
|
|
2687
|
+
adClickThroughText: string;
|
|
2688
|
+
/**
|
|
2689
|
+
* The text on an {@link AdCountdown}, e.g. "Content will resume in X seconds".
|
|
2690
|
+
*
|
|
2691
|
+
* @param remainingDuration The remaining time until the content can be resumed, after being formatted with {@link formatNarrowDuration}.
|
|
2692
|
+
*/
|
|
2693
|
+
adCountdownText(remainingDuration: string): string;
|
|
2694
|
+
/**
|
|
2695
|
+
* The text on an {@link AdSkipButton}, e.g. "Skip Ad".
|
|
2696
|
+
*/
|
|
2697
|
+
adSkipButtonText: string;
|
|
2698
|
+
/**
|
|
2699
|
+
* The text on an {@link AdSkipButton} when it is showing a countdown.
|
|
2700
|
+
*
|
|
2701
|
+
* @param remainingDuration The remaining time until the ad can be skipped, after being formatted with {@link formatNarrowDuration}.
|
|
2702
|
+
*/
|
|
2703
|
+
adSkipCountdownText(remainingDuration: string): string;
|
|
2704
|
+
/**
|
|
2705
|
+
* The announcement message on a {@link THEOliveDefaultUI} when the stream is loading.
|
|
2706
|
+
*/
|
|
2707
|
+
liveStreamLoading: string;
|
|
2708
|
+
/**
|
|
2709
|
+
* The announcement message on a {@link THEOliveDefaultUI} when the stream is offline and hasn't started yet.
|
|
2710
|
+
*/
|
|
2711
|
+
liveStreamOffline: string;
|
|
2712
|
+
/**
|
|
2713
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link CloseMenuButton}.
|
|
2714
|
+
*/
|
|
2715
|
+
closeMenuAria: string;
|
|
2716
|
+
/**
|
|
2717
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link LanguageMenuButton}.
|
|
2718
|
+
*/
|
|
2719
|
+
openLanguageMenuAria: string;
|
|
2720
|
+
/**
|
|
2721
|
+
* The heading for a {@link LanguageMenu}.
|
|
2722
|
+
*/
|
|
2723
|
+
languageMenuHeading: string;
|
|
2724
|
+
/**
|
|
2725
|
+
* The section header for audio tracks in a {@link LanguageMenu}.
|
|
2726
|
+
*/
|
|
2727
|
+
audioMenuHeading: string;
|
|
2728
|
+
/**
|
|
2729
|
+
* The section header for subtitle tracks in a {@link LanguageMenu}.
|
|
2730
|
+
*/
|
|
2731
|
+
subtitleMenuHeading: string;
|
|
2732
|
+
/**
|
|
2733
|
+
* The label for a {@link TextTrackOffRadioButton} to disable the active subtitle track.
|
|
2734
|
+
*/
|
|
2735
|
+
subtitleOff: string;
|
|
2736
|
+
/**
|
|
2737
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link PlaybackRateMenuButton}.
|
|
2738
|
+
*/
|
|
2739
|
+
openPlaybackRateMenuAria: string;
|
|
2740
|
+
/**
|
|
2741
|
+
* The heading for a {@link PlaybackRateMenu}.
|
|
2742
|
+
*/
|
|
2743
|
+
playbackRateMenuHeading: string;
|
|
2744
|
+
/**
|
|
2745
|
+
* Formats the given playback rate for a {@link PlaybackRateMenu} and {@link PlaybackRateDisplay}.
|
|
2746
|
+
*
|
|
2747
|
+
* Examples:
|
|
2748
|
+
* - `1` → "Normal"
|
|
2749
|
+
* - `1.5` → "1.5x"
|
|
2750
|
+
*
|
|
2751
|
+
* @param rate The playback rate.
|
|
2752
|
+
*/
|
|
2753
|
+
formatPlaybackRate(rate: number): string;
|
|
2754
|
+
/**
|
|
2755
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link SettingsMenuButton}.
|
|
2756
|
+
*/
|
|
2757
|
+
openSettingsMenuAria: string;
|
|
2758
|
+
/**
|
|
2759
|
+
* The heading for a {@link SettingsMenu}.
|
|
2760
|
+
*/
|
|
2761
|
+
settingsMenuHeading: string;
|
|
2762
|
+
/**
|
|
2763
|
+
* The text for the quality option in a {@link SettingsMenu}.
|
|
2764
|
+
*/
|
|
2765
|
+
qualityMenuHeading: string;
|
|
2766
|
+
/**
|
|
2767
|
+
* The heading for a {@link TextTrackStyleMenu}.
|
|
2768
|
+
*/
|
|
2769
|
+
textTrackStyleMenuHeading: string;
|
|
2770
|
+
/**
|
|
2771
|
+
* The heading for the font family style option in a {@link TextTrackStyleMenu}.
|
|
2772
|
+
*/
|
|
2773
|
+
textTrackStyleFontFamily: string;
|
|
2774
|
+
/**
|
|
2775
|
+
* The heading for the font color style option in a {@link TextTrackStyleMenu}.
|
|
2776
|
+
*/
|
|
2777
|
+
textTrackStyleFontColor: string;
|
|
2778
|
+
/**
|
|
2779
|
+
* The heading for the font opacity style option in a {@link TextTrackStyleMenu}.
|
|
2780
|
+
*/
|
|
2781
|
+
textTrackStyleFontOpacity: string;
|
|
2782
|
+
/**
|
|
2783
|
+
* The heading for the font size style option in a {@link TextTrackStyleMenu}.
|
|
2784
|
+
*/
|
|
2785
|
+
textTrackStyleFontSize: string;
|
|
2786
|
+
/**
|
|
2787
|
+
* The heading for the background color style option in a {@link TextTrackStyleMenu}.
|
|
2788
|
+
*/
|
|
2789
|
+
textTrackStyleBackgroundColor: string;
|
|
2790
|
+
/**
|
|
2791
|
+
* The heading for the background opacity style option in a {@link TextTrackStyleMenu}.
|
|
2792
|
+
*/
|
|
2793
|
+
textTrackStyleBackgroundOpacity: string;
|
|
2794
|
+
/**
|
|
2795
|
+
* The heading for the window color style option in a {@link TextTrackStyleMenu}.
|
|
2796
|
+
*/
|
|
2797
|
+
textTrackStyleWindowColor: string;
|
|
2798
|
+
/**
|
|
2799
|
+
* The heading for the window opacity style option in a {@link TextTrackStyleMenu}.
|
|
2800
|
+
*/
|
|
2801
|
+
textTrackStyleWindowOpacity: string;
|
|
2802
|
+
/**
|
|
2803
|
+
* The heading for the edge style option in a {@link TextTrackStyleMenu}.
|
|
2804
|
+
*/
|
|
2805
|
+
textTrackStyleEdgeStyle: string;
|
|
2806
|
+
/**
|
|
2807
|
+
* The label for the default style option in a {@link TextTrackStyleRadioGroup}.
|
|
2808
|
+
*/
|
|
2809
|
+
textTrackStyleDefaultLabel: string;
|
|
2810
|
+
/**
|
|
2811
|
+
* The label for a {@link TextTrackStyleDisplay} when it is showing a style option
|
|
2812
|
+
* that does not match any predefined values.
|
|
2813
|
+
*/
|
|
2814
|
+
textTrackStyleCustomLabel: string;
|
|
2815
|
+
/**
|
|
2816
|
+
* The label for a {@link TextTrackStyleResetButton} to reset the text track style.
|
|
2817
|
+
*/
|
|
2818
|
+
textTrackStyleResetLabel: string;
|
|
2819
|
+
/**
|
|
2820
|
+
* The labels for font family style options in a {@link TextTrackStyleRadioGroup},
|
|
2821
|
+
* keyed by the original English label (e.g. "Default" or "Monospace Serif").
|
|
2822
|
+
*/
|
|
2823
|
+
fontFamilyLabels: Record<KnownFontFamily, string>;
|
|
2824
|
+
/**
|
|
2825
|
+
* The labels for color style options in a {@link TextTrackStyleRadioGroup},
|
|
2826
|
+
* keyed by the original English label (e.g. "White", "Black" or "Red").
|
|
2827
|
+
*/
|
|
2828
|
+
colorLabels: Record<KnownColor, string>;
|
|
2829
|
+
/**
|
|
2830
|
+
* The labels for edge style options in a {@link TextTrackStyleRadioGroup},
|
|
2831
|
+
* keyed by an {@link EdgeStyle} value.
|
|
2832
|
+
*/
|
|
2833
|
+
edgeStyleLabels: Record<EdgeStyle, string>;
|
|
2834
|
+
/**
|
|
2835
|
+
* The label for an {@link ActiveQualityDisplay} or {@link QualityRadioButton} when it is showing the "Automatic" quality selection option.
|
|
2836
|
+
*/
|
|
2837
|
+
automaticQualityLabel: string;
|
|
2838
|
+
/**
|
|
2839
|
+
* The label for a {@link ActiveQualityDisplay} when it is showing a quality selection option
|
|
2840
|
+
* without any usable label.
|
|
2841
|
+
*/
|
|
2842
|
+
unknownQualityLabel: string;
|
|
2843
|
+
/**
|
|
2844
|
+
* The label for an {@link AutomaticQualitySelector} for THEOlive's {@link BadNetworkModeMenu}.
|
|
2845
|
+
*/
|
|
2846
|
+
highQualityLabel: string;
|
|
2847
|
+
/**
|
|
2848
|
+
* The label for a {@link BadNetworkModeSelector} for THEOlive's {@link BadNetworkModeMenu}.
|
|
2849
|
+
*/
|
|
2850
|
+
lowQualityLabel: string;
|
|
2851
|
+
/**
|
|
2852
|
+
* The heading for an {@link ErrorDisplay}.
|
|
2853
|
+
*/
|
|
2854
|
+
errorHeading: string;
|
|
2855
|
+
/**
|
|
2856
|
+
* The {@link HTMLElement.ariaLabel | `aria-label`} for a {@link BadNetworkModeButton}.
|
|
2857
|
+
*/
|
|
2858
|
+
openBadNetworkModeMenuAria: string;
|
|
2859
|
+
/**
|
|
2860
|
+
* Formats the given time duration as a human-readable string.
|
|
2861
|
+
*
|
|
2862
|
+
* This is optional. If not provided, a default {@link Intl.DurationFormat} with the {@link Intl.DurationFormatStyle | `"long"` style} is used.
|
|
2863
|
+
*
|
|
2864
|
+
* Examples:
|
|
2865
|
+
* - `{ seconds: 5 }` → "5 seconds"
|
|
2866
|
+
* - `{ minutes: 2, seconds: 10 }` → "2 minutes and 10 seconds"
|
|
2867
|
+
*
|
|
2868
|
+
* @param duration A duration, compatible with {@link Intl.DurationFormat.format}.
|
|
2869
|
+
*/
|
|
2870
|
+
formatDuration(duration: Duration): string;
|
|
2871
|
+
/**
|
|
2872
|
+
* Formats the given time duration as a narrow human-readable string.
|
|
2873
|
+
*
|
|
2874
|
+
* This is optional. If not provided, a default {@link Intl.DurationFormat} with the {@link Intl.DurationFormatStyle | `"narrow"` style} is used.
|
|
2875
|
+
*
|
|
2876
|
+
* Examples:
|
|
2877
|
+
* - `{ seconds: 5 }` → "5s"
|
|
2878
|
+
* - `{ minutes: 2, seconds: 10 }` → "2m 10s"
|
|
2879
|
+
*
|
|
2880
|
+
* @param duration A duration, compatible with {@link Intl.DurationFormat.format}.
|
|
2881
|
+
*/
|
|
2882
|
+
formatNarrowDuration(duration: Duration): string;
|
|
2883
|
+
/**
|
|
2884
|
+
* Formats the given remaining time duration as a human-readable string.
|
|
2885
|
+
*
|
|
2886
|
+
* Examples:
|
|
2887
|
+
* - "5 seconds" → "5 seconds remaining"
|
|
2888
|
+
* - "2 minutes and 10 seconds" → "2 minutes and 10 seconds remaining"
|
|
2889
|
+
*
|
|
2890
|
+
* @param duration A duration that was formatted with {@link formatDuration}.
|
|
2891
|
+
*/
|
|
2892
|
+
formatRemainingDuration(duration: string): string;
|
|
2893
|
+
/**
|
|
2894
|
+
* Formats the given percentage as a human-readable string.
|
|
2895
|
+
*
|
|
2896
|
+
* This is optional. If not provided, a default {@link Intl.NumberFormat} with the {@link Intl.NumberFormatOptions.style | `"percent"` style} is used.
|
|
2897
|
+
*
|
|
2898
|
+
* Examples:
|
|
2899
|
+
* - `0.75` → "75%"
|
|
2900
|
+
* - `1.0` → "100%"
|
|
2901
|
+
*
|
|
2902
|
+
* @param percentage A percentage, between `0.0` and `1.0`.
|
|
2903
|
+
*/
|
|
2904
|
+
formatPercentage(percentage: number): string;
|
|
2905
|
+
/**
|
|
2906
|
+
* Formats a bandwidth value.
|
|
2907
|
+
*
|
|
2908
|
+
* This is optional. If not provided, a default {@link Intl.NumberFormat} with the {@link Intl.NumberFormatOptions.style | `"unit"` style} is used
|
|
2909
|
+
* that dynamically picks between the `"kilobit-per-second"` or `"megabit-per-second"` {@link Intl.NumberFormatOptions.unit | unit}s.
|
|
2910
|
+
*
|
|
2911
|
+
* Examples:
|
|
2912
|
+
* - `150_000` → "150kb/s"
|
|
2913
|
+
* - `2_500_000` → "2.5Mb/s"
|
|
2914
|
+
*
|
|
2915
|
+
* @param bandwidth A bandwidth value, in bits per second.
|
|
2916
|
+
*/
|
|
2917
|
+
formatBandwidth(bandwidth: number): string;
|
|
2918
|
+
/**
|
|
2919
|
+
* Formats a language name.
|
|
2920
|
+
*
|
|
2921
|
+
* This is optional. If not provided, a default {@link Intl.DisplayNames} with the {@link Intl.DisplayNamesOptions.type | `"language"` type} is used.
|
|
2922
|
+
*
|
|
2923
|
+
* Examples for an English locale:
|
|
2924
|
+
* - `"en"` → "English"
|
|
2925
|
+
* - `"fr"` → "French"
|
|
2926
|
+
* - `"pt-BR"` → "Brazilian Portuguese"
|
|
2927
|
+
*
|
|
2928
|
+
* Examples for a French locale:
|
|
2929
|
+
* - `"en"` → "anglais"
|
|
2930
|
+
* - `"fr"` → "français"
|
|
2931
|
+
* - `"pt-BR"` → "portugais brésilien"
|
|
2932
|
+
*
|
|
2933
|
+
* @param languageCode
|
|
2934
|
+
* @return A localized language name, or `undefined` if the language code is unknown.
|
|
2935
|
+
*/
|
|
2936
|
+
formatLanguage(languageCode: string): string | undefined;
|
|
2376
2937
|
}
|
|
2938
|
+
/**
|
|
2939
|
+
* A duration, compatible with {@link Intl.DurationFormat.format} and {@link Temporal.Duration}.
|
|
2940
|
+
*/
|
|
2941
|
+
interface Duration {
|
|
2942
|
+
hours: number;
|
|
2943
|
+
minutes: number;
|
|
2944
|
+
seconds: number;
|
|
2945
|
+
}
|
|
2946
|
+
/**
|
|
2947
|
+
* The known font families for a {@link TextTrackStyleRadioGroup}.
|
|
2948
|
+
*/
|
|
2949
|
+
type KnownFontFamily = 'Monospace Serif' | 'Proportional Serif' | 'Monospace Sans' | 'Proportional Sans';
|
|
2950
|
+
/**
|
|
2951
|
+
* The known colors for a {@link TextTrackStyleRadioGroup}.
|
|
2952
|
+
*/
|
|
2953
|
+
type KnownColor = 'White' | 'Yellow' | 'Green' | 'Cyan' | 'Blue' | 'Magenta' | 'Red' | 'Black';
|
|
2954
|
+
/**
|
|
2955
|
+
* A partial {@link Locale}.
|
|
2956
|
+
*/
|
|
2957
|
+
type PartialLocale = Partial<Locale> & {
|
|
2958
|
+
fontFamilyLabels?: Partial<Locale['fontFamilyLabels']>;
|
|
2959
|
+
colorLabels?: Partial<Locale['colorLabels']>;
|
|
2960
|
+
edgeStyleLabels?: Partial<Locale['edgeStyleLabels']>;
|
|
2961
|
+
};
|
|
2962
|
+
|
|
2963
|
+
/**
|
|
2964
|
+
* Register a new locale with the given name.
|
|
2965
|
+
*
|
|
2966
|
+
* The locale's name should preferably be a BCP 47 language identifier, so it can be set as
|
|
2967
|
+
* a valid [`lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/lang)
|
|
2968
|
+
* of the UI.
|
|
2969
|
+
*
|
|
2970
|
+
* @param name The name of the locale.
|
|
2971
|
+
* @param locale The locale.
|
|
2972
|
+
*/
|
|
2973
|
+
declare function addLocale(name: string, locale: PartialLocale): void;
|
|
2377
2974
|
|
|
2378
2975
|
/**
|
|
2379
2976
|
* The version of Open Video UI for Web.
|
|
2380
2977
|
*/
|
|
2381
2978
|
declare const version: string;
|
|
2382
2979
|
|
|
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 };
|
|
2980
|
+
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, VRButton, VRCompass, VolumeRange, addLocale, buttonTemplate, linkButtonTemplate, menuGroupTemplate, menuTemplate, registerExtension, stateReceiver, version };
|
|
2981
|
+
export type { ButtonOptions, Constructor, DeviceType, Duration, Extension, KnownColor, KnownFontFamily, Locale, MenuGroupOptions, MenuOptions, PartialLocale, StateReceiverElement, StateReceiverPropertyMap, StreamType, TextTrackStyleMap, TextTrackStyleOption, TrackType, VolumeLevel };
|
|
2385
2982
|
export as namespace THEOplayerUI;
|