@theoplayer/web-ui 1.7.2 → 1.8.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 +10 -0
- package/README.md +2 -2
- package/dist/THEOplayerUI.d.ts +217 -169
- package/dist/THEOplayerUI.es5.js +2 -2
- package/dist/THEOplayerUI.es5.mjs +2 -2
- package/dist/THEOplayerUI.js +26 -20
- package/dist/THEOplayerUI.js.map +1 -1
- package/dist/THEOplayerUI.mjs +26 -20
- package/dist/THEOplayerUI.mjs.map +1 -1
- package/dist/THEOplayerUI.node.mjs +18 -17
- package/dist/THEOplayerUI.node.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Find out what's new in Open Video UI for Web.
|
|
3
|
+
sidebar_custom_props: { 'icon': '📰' }
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Changelog
|
|
2
7
|
|
|
3
8
|
> **Tags:**
|
|
@@ -10,6 +15,11 @@
|
|
|
10
15
|
> - 🏠 Internal
|
|
11
16
|
> - 💅 Polish
|
|
12
17
|
|
|
18
|
+
## v1.8.0 (2024-04-12)
|
|
19
|
+
|
|
20
|
+
- 💥 **Breaking Change**: This project now requires THEOplayer version 7.0.0 or higher. ([#60](https://github.com/THEOplayer/web-ui/pull/60))
|
|
21
|
+
- 🚀 Added `<theolive-default-ui>` that provides a default UI for THEOlive streams. ([#58](https://github.com/THEOplayer/web-ui/pull/58))
|
|
22
|
+
|
|
13
23
|
## v1.7.2 (2024-03-18)
|
|
14
24
|
|
|
15
25
|
- 🚀 Added `<theoplayer-slot-container>`. ([#55](https://github.com/THEOplayer/web-ui/pull/55))
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ the [THEOplayer Web SDK](https://www.theoplayer.com/product/theoplayer).
|
|
|
18
18
|
|
|
19
19
|
## Motivation
|
|
20
20
|
|
|
21
|
-
The current THEOplayer Web SDK comes with a built-in UI based on [video.js](https://github.com/videojs/video.js) through [the `Player` constructor](https://
|
|
21
|
+
The current THEOplayer Web SDK comes with a built-in UI based on [video.js](https://github.com/videojs/video.js) through [the `Player` constructor](https://www.theoplayer.com/docs/theoplayer/v6/api-reference/web/classes/Player.html). This new UI aims to solve some limitations from the old approach:
|
|
22
22
|
|
|
23
23
|
- Designed with customization in mind. With the old UI, customizing anything beyond changing some text and icon colors was difficult, and could break in unpredictable ways when updating to a new THEOplayer version. With the new UI, all components can be customized in a variety of ways with well-documented attributes and CSS custom properties.
|
|
24
24
|
- Built for the modern web. The old UI was built at a time when Internet Explorer was still a major browser, so it couldn't use newer web technologies. The new UI breaks with the past and takes full advantage of Web Components, so it works well in modern web apps.
|
|
@@ -127,7 +127,7 @@ If you want to fully customize your video player layout, you can use a `<theopla
|
|
|
127
127
|
|
|
128
128
|
See [docs/examples/custom-ui.html](https://github.com/THEOplayer/web-ui/blob/main/docs/examples/custom-ui.html) for a complete example.
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
### Legacy browser support
|
|
131
131
|
|
|
132
132
|
By default, Open Video UI for Web targets modern browsers that support modern JavaScript syntax (such as [async/await](https://caniuse.com/async-functions)) and native [Custom Elements](https://caniuse.com/custom-elementsv1). This keeps the download size small, so your viewers can spend less time waiting for your page to load and start watching their video faster.
|
|
133
133
|
|
package/dist/THEOplayerUI.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* THEOplayer Open Video UI for Web (v1.
|
|
2
|
+
* THEOplayer Open Video UI for Web (v1.8.0)
|
|
3
3
|
* License: MIT
|
|
4
4
|
*/
|
|
5
5
|
import { ChromelessPlayer, VideoQuality, THEOplayerError, MediaTrack, TextTrack, TextTracksList, EdgeStyle, VendorCast, CastState, PlayerConfiguration, SourceDescription } from 'theoplayer/chromeless';
|
|
@@ -1759,173 +1759,6 @@ declare enum ExtensionSlot {
|
|
|
1759
1759
|
|
|
1760
1760
|
declare const READY_EVENT: "theoplayerready";
|
|
1761
1761
|
|
|
1762
|
-
/**
|
|
1763
|
-
* `<theoplayer-default-ui>` - A default UI for THEOplayer.
|
|
1764
|
-
*
|
|
1765
|
-
* This default UI provides a great player experience out-of-the-box, that works well on all types of devices
|
|
1766
|
-
* and for all types of streams. It provides all the common playback controls for playing, seeking,
|
|
1767
|
-
* changing languages and qualities. It also supports advertisements and casting.
|
|
1768
|
-
*
|
|
1769
|
-
* ## Usage
|
|
1770
|
-
*
|
|
1771
|
-
* 1. Create a `<theoplayer-default-ui>` element.
|
|
1772
|
-
* 2. Set its `configuration` attribute or property to a valid player configuration.
|
|
1773
|
-
* 3. Set its `source` attribute or property to a valid stream source.
|
|
1774
|
-
* 4. Optionally, customize the player using CSS custom properties and/or extra controls.
|
|
1775
|
-
*
|
|
1776
|
-
* ## Customization
|
|
1777
|
-
*
|
|
1778
|
-
* The styling can be controlled using CSS custom properties (see {@link UIContainer | `<theoplayer-ui>`}).
|
|
1779
|
-
* Additional controls can be added to the `top-control-bar` and `bottom-control-bar` slots.
|
|
1780
|
-
* For more extensive customizations, we recommend defining your own custom UI using
|
|
1781
|
-
* a {@link UIContainer | `<theoplayer-ui>`}.
|
|
1782
|
-
*
|
|
1783
|
-
* @attribute `configuration` - The THEOplayer {@link theoplayer!PlayerConfiguration | PlayerConfiguration}, as a JSON string.
|
|
1784
|
-
* @attribute `source` - The THEOplayer {@link theoplayer!SourceDescription | SourceDescription}, as a JSON string.
|
|
1785
|
-
* @attribute `fluid` - If set, the player automatically adjusts its height to fit the video's aspect ratio.
|
|
1786
|
-
* @attribute `muted` - If set, the player starts out as muted. Reflects `ui.player.muted`.
|
|
1787
|
-
* @attribute `autoplay` - If set, the player attempts to automatically start playing (if allowed).
|
|
1788
|
-
* @attribute `device-type` - The device type, either "desktop", "mobile" or "tv".
|
|
1789
|
-
* Can be used in CSS to show/hide certain device-specific UI controls.
|
|
1790
|
-
* @attribute `mobile` - Whether the user is on a mobile device. Equivalent to `device-type == "mobile"`.
|
|
1791
|
-
* @attribute `tv` - Whether the user is on a TV device. Equivalent to `device-type == "tv"`.
|
|
1792
|
-
* @attribute `stream-type` - The stream type, either "vod", "live" or "dvr".
|
|
1793
|
-
* Can be used to show/hide certain UI controls specific for livestreams, such as
|
|
1794
|
-
* a {@link LiveButton | `<theoplayer-live-button>`}.
|
|
1795
|
-
* If you know in advance that the source will be a livestream, you can set this attribute to avoid a screen flicker
|
|
1796
|
-
* when the player switches between its VOD-specific and live-only controls.
|
|
1797
|
-
* @attribute `user-idle-timeout` - The timeout (in seconds) between when the user stops interacting with the UI,
|
|
1798
|
-
* and when the user is considered to be "idle".
|
|
1799
|
-
* @attribute `dvr-threshold` - The minimum length (in seconds) of a livestream's sliding window for the stream to be DVR
|
|
1800
|
-
* and its stream type to be set to "dvr".
|
|
1801
|
-
*
|
|
1802
|
-
* @slot `title` - A slot for the stream's title in the top control bar.
|
|
1803
|
-
* @slot `top-control-bar` - A slot for extra UI controls in the top control bar.
|
|
1804
|
-
* @slot `bottom-control-bar` - A slot for extra UI controls in the bottom control bar.
|
|
1805
|
-
* @slot `menu` - A slot for extra menus (see {@link Menu | `<theoplayer-menu>`}).
|
|
1806
|
-
* @group Components
|
|
1807
|
-
*/
|
|
1808
|
-
declare class DefaultUI extends HTMLElement {
|
|
1809
|
-
/**
|
|
1810
|
-
* Fired when the backing player is created, and the {@link DefaultUI.player} property is set.
|
|
1811
|
-
*
|
|
1812
|
-
* @group Events
|
|
1813
|
-
*/
|
|
1814
|
-
static READY_EVENT: typeof READY_EVENT;
|
|
1815
|
-
static get observedAttributes(): Attribute[];
|
|
1816
|
-
private readonly _ui;
|
|
1817
|
-
private readonly _titleSlot;
|
|
1818
|
-
private readonly _timeRange;
|
|
1819
|
-
private _appliedExtensions;
|
|
1820
|
-
/**
|
|
1821
|
-
* Creates a new THEOplayer default UI.
|
|
1822
|
-
*
|
|
1823
|
-
* @param configuration - The player configuration.
|
|
1824
|
-
* Will be passed to the {@link theoplayer!ChromelessPlayer | ChromelessPlayer} constructor to create
|
|
1825
|
-
* the underlying THEOplayer instance.
|
|
1826
|
-
* Can also be set later on through the {@link configuration} property.
|
|
1827
|
-
*/
|
|
1828
|
-
constructor(configuration?: PlayerConfiguration);
|
|
1829
|
-
private _upgradeProperty;
|
|
1830
|
-
/**
|
|
1831
|
-
* The underlying THEOplayer player instance.
|
|
1832
|
-
*
|
|
1833
|
-
* This is constructed automatically as soon as a valid {@link configuration} is set.
|
|
1834
|
-
*/
|
|
1835
|
-
get player(): ChromelessPlayer | undefined;
|
|
1836
|
-
/**
|
|
1837
|
-
* The player configuration.
|
|
1838
|
-
*
|
|
1839
|
-
* Used to create the underlying THEOplayer instance.
|
|
1840
|
-
*/
|
|
1841
|
-
get configuration(): PlayerConfiguration;
|
|
1842
|
-
set configuration(configuration: PlayerConfiguration);
|
|
1843
|
-
private setConfiguration_;
|
|
1844
|
-
/**
|
|
1845
|
-
* The player's current source.
|
|
1846
|
-
*/
|
|
1847
|
-
get source(): SourceDescription | undefined;
|
|
1848
|
-
set source(value: SourceDescription | undefined);
|
|
1849
|
-
/**
|
|
1850
|
-
* Whether to automatically adjusts the player's height to fit the video's aspect ratio.
|
|
1851
|
-
*/
|
|
1852
|
-
get fluid(): boolean;
|
|
1853
|
-
set fluid(value: boolean);
|
|
1854
|
-
/**
|
|
1855
|
-
* Whether the player's audio is muted.
|
|
1856
|
-
*/
|
|
1857
|
-
get muted(): boolean;
|
|
1858
|
-
set muted(value: boolean);
|
|
1859
|
-
/**
|
|
1860
|
-
* Whether the player should attempt to automatically start playback.
|
|
1861
|
-
*/
|
|
1862
|
-
get autoplay(): boolean;
|
|
1863
|
-
set autoplay(value: boolean);
|
|
1864
|
-
/**
|
|
1865
|
-
* The stream type, either "vod", "live" or "dvr".
|
|
1866
|
-
*
|
|
1867
|
-
* If you know in advance that the source will be a livestream, you can set this property to avoid a screen flicker
|
|
1868
|
-
* when the player switches between its VOD-specific and live-only controls.
|
|
1869
|
-
*/
|
|
1870
|
-
get streamType(): StreamType;
|
|
1871
|
-
set streamType(value: StreamType);
|
|
1872
|
-
/**
|
|
1873
|
-
* The timeout (in seconds) between when the user stops interacting with the UI,
|
|
1874
|
-
* and when the user is considered to be "idle".
|
|
1875
|
-
*/
|
|
1876
|
-
get userIdleTimeout(): number;
|
|
1877
|
-
set userIdleTimeout(value: number);
|
|
1878
|
-
/**
|
|
1879
|
-
* The minimum length (in seconds) of a livestream's sliding window for the stream to be DVR
|
|
1880
|
-
* and its stream type to be set to "dvr".
|
|
1881
|
-
*/
|
|
1882
|
-
get dvrThreshold(): number;
|
|
1883
|
-
set dvrThreshold(value: number);
|
|
1884
|
-
connectedCallback(): void;
|
|
1885
|
-
disconnectedCallback(): void;
|
|
1886
|
-
attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
|
|
1887
|
-
private readonly _updateStreamType;
|
|
1888
|
-
private readonly _dispatchReadyEvent;
|
|
1889
|
-
private readonly _onTitleSlotChange;
|
|
1890
|
-
}
|
|
1891
|
-
declare global {
|
|
1892
|
-
interface HTMLElementTagNameMap {
|
|
1893
|
-
'theoplayer-default-ui': DefaultUI;
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1896
|
-
|
|
1897
|
-
/**
|
|
1898
|
-
* An extension for the default UI.
|
|
1899
|
-
*
|
|
1900
|
-
* This is called whenever a `<theoplayer-default-ui>` element is created.
|
|
1901
|
-
* The extension can then choose to modify this element, for example by appending extra elements
|
|
1902
|
-
* or attaching extra event listeners.
|
|
1903
|
-
*
|
|
1904
|
-
* @example
|
|
1905
|
-
* The following extension adds an extra button to the bottom control bar of every default UI:
|
|
1906
|
-
* ```javascript
|
|
1907
|
-
* THEOplayerUI.registerExtension((ui) => {
|
|
1908
|
-
* // Create a new button
|
|
1909
|
-
* const button = new THEOplayerUI.Button();
|
|
1910
|
-
* button.innerHTML = "Click me!";
|
|
1911
|
-
* button.addEventListener("click", () => alert("I was clicked!"));
|
|
1912
|
-
* // Place it in the bottom control bar
|
|
1913
|
-
* button.slot = "bottom-control-bar";
|
|
1914
|
-
* ui.appendChild(button);
|
|
1915
|
-
* });
|
|
1916
|
-
* ```
|
|
1917
|
-
* See the documentation of `<theoplayer-default-ui>` for more information about the available slots
|
|
1918
|
-
* in which you can add extra elements.
|
|
1919
|
-
*/
|
|
1920
|
-
type Extension = (ui: DefaultUI) => void;
|
|
1921
|
-
/**
|
|
1922
|
-
* Registers an extension for the default UI.
|
|
1923
|
-
*
|
|
1924
|
-
* @param extension The extension.
|
|
1925
|
-
* @see {@link Extension}
|
|
1926
|
-
*/
|
|
1927
|
-
declare function registerExtension(extension: Extension): void;
|
|
1928
|
-
|
|
1929
1762
|
/**
|
|
1930
1763
|
* `<theoplayer-ui>` - The container element for a THEOplayer UI.
|
|
1931
1764
|
*
|
|
@@ -2159,10 +1992,225 @@ declare global {
|
|
|
2159
1992
|
}
|
|
2160
1993
|
}
|
|
2161
1994
|
|
|
1995
|
+
/**
|
|
1996
|
+
* `<theoplayer-default-ui>` - A default UI for THEOplayer.
|
|
1997
|
+
*
|
|
1998
|
+
* This default UI provides a great player experience out-of-the-box, that works well on all types of devices
|
|
1999
|
+
* and for all types of streams. It provides all the common playback controls for playing, seeking,
|
|
2000
|
+
* changing languages and qualities. It also supports advertisements and casting.
|
|
2001
|
+
*
|
|
2002
|
+
* ## Usage
|
|
2003
|
+
*
|
|
2004
|
+
* 1. Create a `<theoplayer-default-ui>` element.
|
|
2005
|
+
* 2. Set its `configuration` attribute or property to a valid player configuration.
|
|
2006
|
+
* 3. Set its `source` attribute or property to a valid stream source.
|
|
2007
|
+
* 4. Optionally, customize the player using CSS custom properties and/or extra controls.
|
|
2008
|
+
*
|
|
2009
|
+
* ## Customization
|
|
2010
|
+
*
|
|
2011
|
+
* The styling can be controlled using CSS custom properties (see {@link UIContainer | `<theoplayer-ui>`}).
|
|
2012
|
+
* Additional controls can be added to the `top-control-bar` and `bottom-control-bar` slots.
|
|
2013
|
+
* For more extensive customizations, we recommend defining your own custom UI using
|
|
2014
|
+
* a {@link UIContainer | `<theoplayer-ui>`}.
|
|
2015
|
+
*
|
|
2016
|
+
* @attribute `configuration` - The THEOplayer {@link theoplayer!PlayerConfiguration | PlayerConfiguration}, as a JSON string.
|
|
2017
|
+
* @attribute `source` - The THEOplayer {@link theoplayer!SourceDescription | SourceDescription}, as a JSON string.
|
|
2018
|
+
* @attribute `fluid` - If set, the player automatically adjusts its height to fit the video's aspect ratio.
|
|
2019
|
+
* @attribute `muted` - If set, the player starts out as muted. Reflects `ui.player.muted`.
|
|
2020
|
+
* @attribute `autoplay` - If set, the player attempts to automatically start playing (if allowed).
|
|
2021
|
+
* @attribute `device-type` - The device type, either "desktop", "mobile" or "tv".
|
|
2022
|
+
* Can be used in CSS to show/hide certain device-specific UI controls.
|
|
2023
|
+
* @attribute `mobile` - Whether the user is on a mobile device. Equivalent to `device-type == "mobile"`.
|
|
2024
|
+
* @attribute `tv` - Whether the user is on a TV device. Equivalent to `device-type == "tv"`.
|
|
2025
|
+
* @attribute `stream-type` - The stream type, either "vod", "live" or "dvr".
|
|
2026
|
+
* Can be used to show/hide certain UI controls specific for livestreams, such as
|
|
2027
|
+
* a {@link LiveButton | `<theoplayer-live-button>`}.
|
|
2028
|
+
* If you know in advance that the source will be a livestream, you can set this attribute to avoid a screen flicker
|
|
2029
|
+
* when the player switches between its VOD-specific and live-only controls.
|
|
2030
|
+
* @attribute `user-idle-timeout` - The timeout (in seconds) between when the user stops interacting with the UI,
|
|
2031
|
+
* and when the user is considered to be "idle".
|
|
2032
|
+
* @attribute `dvr-threshold` - The minimum length (in seconds) of a livestream's sliding window for the stream to be DVR
|
|
2033
|
+
* and its stream type to be set to "dvr".
|
|
2034
|
+
*
|
|
2035
|
+
* @slot `title` - A slot for the stream's title in the top control bar.
|
|
2036
|
+
* @slot `top-control-bar` - A slot for extra UI controls in the top control bar.
|
|
2037
|
+
* @slot `bottom-control-bar` - A slot for extra UI controls in the bottom control bar.
|
|
2038
|
+
* @slot `menu` - A slot for extra menus (see {@link Menu | `<theoplayer-menu>`}).
|
|
2039
|
+
* @group Components
|
|
2040
|
+
*/
|
|
2041
|
+
declare class DefaultUI extends HTMLElement {
|
|
2042
|
+
/**
|
|
2043
|
+
* Fired when the backing player is created, and the {@link DefaultUI.player} property is set.
|
|
2044
|
+
*
|
|
2045
|
+
* @group Events
|
|
2046
|
+
*/
|
|
2047
|
+
static READY_EVENT: typeof READY_EVENT;
|
|
2048
|
+
static get observedAttributes(): Attribute[];
|
|
2049
|
+
protected readonly _shadowRoot: ShadowRoot;
|
|
2050
|
+
protected readonly _ui: UIContainer;
|
|
2051
|
+
private readonly _titleSlot;
|
|
2052
|
+
private readonly _timeRange;
|
|
2053
|
+
private _appliedExtensions;
|
|
2054
|
+
/**
|
|
2055
|
+
* Creates a new THEOplayer default UI.
|
|
2056
|
+
*
|
|
2057
|
+
* @param configuration - The player configuration.
|
|
2058
|
+
* Will be passed to the {@link theoplayer!ChromelessPlayer | ChromelessPlayer} constructor to create
|
|
2059
|
+
* the underlying THEOplayer instance.
|
|
2060
|
+
* Can also be set later on through the {@link configuration} property.
|
|
2061
|
+
*/
|
|
2062
|
+
constructor(configuration?: PlayerConfiguration);
|
|
2063
|
+
protected initShadowRoot(): ShadowRoot;
|
|
2064
|
+
private _upgradeProperty;
|
|
2065
|
+
/**
|
|
2066
|
+
* The underlying THEOplayer player instance.
|
|
2067
|
+
*
|
|
2068
|
+
* This is constructed automatically as soon as a valid {@link configuration} is set.
|
|
2069
|
+
*/
|
|
2070
|
+
get player(): ChromelessPlayer | undefined;
|
|
2071
|
+
/**
|
|
2072
|
+
* The player configuration.
|
|
2073
|
+
*
|
|
2074
|
+
* Used to create the underlying THEOplayer instance.
|
|
2075
|
+
*/
|
|
2076
|
+
get configuration(): PlayerConfiguration;
|
|
2077
|
+
set configuration(configuration: PlayerConfiguration);
|
|
2078
|
+
private setConfiguration_;
|
|
2079
|
+
/**
|
|
2080
|
+
* The player's current source.
|
|
2081
|
+
*/
|
|
2082
|
+
get source(): SourceDescription | undefined;
|
|
2083
|
+
set source(value: SourceDescription | undefined);
|
|
2084
|
+
/**
|
|
2085
|
+
* Whether to automatically adjusts the player's height to fit the video's aspect ratio.
|
|
2086
|
+
*/
|
|
2087
|
+
get fluid(): boolean;
|
|
2088
|
+
set fluid(value: boolean);
|
|
2089
|
+
/**
|
|
2090
|
+
* Whether the player's audio is muted.
|
|
2091
|
+
*/
|
|
2092
|
+
get muted(): boolean;
|
|
2093
|
+
set muted(value: boolean);
|
|
2094
|
+
/**
|
|
2095
|
+
* Whether the player should attempt to automatically start playback.
|
|
2096
|
+
*/
|
|
2097
|
+
get autoplay(): boolean;
|
|
2098
|
+
set autoplay(value: boolean);
|
|
2099
|
+
/**
|
|
2100
|
+
* The stream type, either "vod", "live" or "dvr".
|
|
2101
|
+
*
|
|
2102
|
+
* If you know in advance that the source will be a livestream, you can set this property to avoid a screen flicker
|
|
2103
|
+
* when the player switches between its VOD-specific and live-only controls.
|
|
2104
|
+
*/
|
|
2105
|
+
get streamType(): StreamType;
|
|
2106
|
+
set streamType(value: StreamType);
|
|
2107
|
+
/**
|
|
2108
|
+
* The timeout (in seconds) between when the user stops interacting with the UI,
|
|
2109
|
+
* and when the user is considered to be "idle".
|
|
2110
|
+
*/
|
|
2111
|
+
get userIdleTimeout(): number;
|
|
2112
|
+
set userIdleTimeout(value: number);
|
|
2113
|
+
/**
|
|
2114
|
+
* The minimum length (in seconds) of a livestream's sliding window for the stream to be DVR
|
|
2115
|
+
* and its stream type to be set to "dvr".
|
|
2116
|
+
*/
|
|
2117
|
+
get dvrThreshold(): number;
|
|
2118
|
+
set dvrThreshold(value: number);
|
|
2119
|
+
connectedCallback(): void;
|
|
2120
|
+
disconnectedCallback(): void;
|
|
2121
|
+
attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
|
|
2122
|
+
private readonly _updateStreamType;
|
|
2123
|
+
private readonly _dispatchReadyEvent;
|
|
2124
|
+
private readonly _onTitleSlotChange;
|
|
2125
|
+
}
|
|
2126
|
+
declare global {
|
|
2127
|
+
interface HTMLElementTagNameMap {
|
|
2128
|
+
'theoplayer-default-ui': DefaultUI;
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
/**
|
|
2133
|
+
* An extension for the default UI.
|
|
2134
|
+
*
|
|
2135
|
+
* This is called whenever a `<theoplayer-default-ui>` element is created.
|
|
2136
|
+
* The extension can then choose to modify this element, for example by appending extra elements
|
|
2137
|
+
* or attaching extra event listeners.
|
|
2138
|
+
*
|
|
2139
|
+
* @example
|
|
2140
|
+
* The following extension adds an extra button to the bottom control bar of every default UI:
|
|
2141
|
+
* ```javascript
|
|
2142
|
+
* THEOplayerUI.registerExtension((ui) => {
|
|
2143
|
+
* // Create a new button
|
|
2144
|
+
* const button = new THEOplayerUI.Button();
|
|
2145
|
+
* button.innerHTML = "Click me!";
|
|
2146
|
+
* button.addEventListener("click", () => alert("I was clicked!"));
|
|
2147
|
+
* // Place it in the bottom control bar
|
|
2148
|
+
* button.slot = "bottom-control-bar";
|
|
2149
|
+
* ui.appendChild(button);
|
|
2150
|
+
* });
|
|
2151
|
+
* ```
|
|
2152
|
+
* See the documentation of `<theoplayer-default-ui>` for more information about the available slots
|
|
2153
|
+
* in which you can add extra elements.
|
|
2154
|
+
*/
|
|
2155
|
+
type Extension = (ui: DefaultUI) => void;
|
|
2156
|
+
/**
|
|
2157
|
+
* Registers an extension for the default UI.
|
|
2158
|
+
*
|
|
2159
|
+
* @param extension The extension.
|
|
2160
|
+
* @see {@link Extension}
|
|
2161
|
+
*/
|
|
2162
|
+
declare function registerExtension(extension: Extension): void;
|
|
2163
|
+
|
|
2164
|
+
declare class BadNetworkModeMenu extends HTMLElement {
|
|
2165
|
+
private readonly _radioGroup;
|
|
2166
|
+
constructor();
|
|
2167
|
+
protected _upgradeProperty(prop: keyof this): void;
|
|
2168
|
+
connectedCallback(): void;
|
|
2169
|
+
disconnectedCallback(): void;
|
|
2170
|
+
private readonly _onChange;
|
|
2171
|
+
}
|
|
2172
|
+
declare global {
|
|
2173
|
+
interface HTMLElementTagNameMap {
|
|
2174
|
+
'theolive-bad-network-menu': BadNetworkModeMenu;
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
/**
|
|
2179
|
+
* `<theolive-default-ui>` - A default UI for THEOlive.
|
|
2180
|
+
*
|
|
2181
|
+
* @group Components
|
|
2182
|
+
*/
|
|
2183
|
+
declare class THEOliveDefaultUI extends DefaultUI {
|
|
2184
|
+
private readonly _loading;
|
|
2185
|
+
private readonly _offline;
|
|
2186
|
+
private readonly _announcement;
|
|
2187
|
+
private readonly _errorDisplay;
|
|
2188
|
+
private readonly _playButton;
|
|
2189
|
+
private readonly _root;
|
|
2190
|
+
constructor(configuration?: PlayerConfiguration);
|
|
2191
|
+
protected initShadowRoot(): ShadowRoot;
|
|
2192
|
+
private readonly onReady;
|
|
2193
|
+
private onLoadChannelStart;
|
|
2194
|
+
private onChannelOffline;
|
|
2195
|
+
private onChannelLoaded;
|
|
2196
|
+
private onError;
|
|
2197
|
+
private hidePlayerError;
|
|
2198
|
+
private stopHidingPlayerError;
|
|
2199
|
+
private hidePlayerPlayButton_;
|
|
2200
|
+
private stopHidingPlayerPlayButton;
|
|
2201
|
+
private showMessage_;
|
|
2202
|
+
private hideMessage_;
|
|
2203
|
+
}
|
|
2204
|
+
declare global {
|
|
2205
|
+
interface HTMLElementTagNameMap {
|
|
2206
|
+
'theolive-default-ui': THEOliveDefaultUI;
|
|
2207
|
+
}
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2162
2210
|
/**
|
|
2163
2211
|
* The version of Open Video UI for Web.
|
|
2164
2212
|
*/
|
|
2165
2213
|
declare const version: string;
|
|
2166
2214
|
|
|
2167
|
-
export { ActiveQualityDisplay, AdClickThroughButton, AdCountdown, AdDisplay, AdSkipButton, AirPlayButton, Attribute, Button, ButtonOptions, CastButton, ChromecastButton, ChromecastDisplay, CloseMenuButton, ColorStops, Constructor, ControlBar, DefaultUI, DeviceType, DurationDisplay, ErrorDisplay, Extension, ExtensionSlot, FullscreenButton, GestureReceiver, LanguageMenu, LanguageMenuButton, LinkButton, LiveButton, LoadingIndicator, MediaTrackRadioButton, Menu, MenuButton, MenuGroup, MenuGroupOptions, MenuOptions, MuteButton, PlayButton, PlaybackRateDisplay, PlaybackRateMenu, PlaybackRateMenuButton, PlaybackRateRadioGroup, PreviewThumbnail, PreviewTimeDisplay, QualityRadioButton, QualityRadioGroup, RadioButton, RadioGroup, Range, RangeOptions, SeekButton, SettingsMenu, SettingsMenuButton, SlotContainer, StateReceiverElement, StateReceiverMixin, StateReceiverPropertyMap, StreamType, TextTrackOffRadioButton, TextTrackRadioButton, TextTrackStyleDisplay, TextTrackStyleMap, TextTrackStyleMenu, TextTrackStyleOption, TextTrackStyleRadioGroup, TextTrackStyleResetButton, TimeDisplay, TimeRange, TrackRadioGroup, TrackType, UIContainer, VolumeLevel, VolumeRange, buttonTemplate, linkButtonTemplate, menuGroupTemplate, menuTemplate, rangeTemplate, registerExtension, version };
|
|
2215
|
+
export { ActiveQualityDisplay, AdClickThroughButton, AdCountdown, AdDisplay, AdSkipButton, AirPlayButton, Attribute, Button, ButtonOptions, CastButton, ChromecastButton, ChromecastDisplay, CloseMenuButton, ColorStops, Constructor, ControlBar, DefaultUI, DeviceType, DurationDisplay, ErrorDisplay, Extension, ExtensionSlot, FullscreenButton, GestureReceiver, LanguageMenu, LanguageMenuButton, LinkButton, LiveButton, LoadingIndicator, MediaTrackRadioButton, Menu, MenuButton, MenuGroup, MenuGroupOptions, MenuOptions, MuteButton, PlayButton, PlaybackRateDisplay, PlaybackRateMenu, PlaybackRateMenuButton, PlaybackRateRadioGroup, PreviewThumbnail, PreviewTimeDisplay, QualityRadioButton, QualityRadioGroup, RadioButton, RadioGroup, Range, RangeOptions, SeekButton, SettingsMenu, SettingsMenuButton, SlotContainer, StateReceiverElement, StateReceiverMixin, StateReceiverPropertyMap, StreamType, THEOliveDefaultUI, TextTrackOffRadioButton, TextTrackRadioButton, TextTrackStyleDisplay, TextTrackStyleMap, TextTrackStyleMenu, TextTrackStyleOption, TextTrackStyleRadioGroup, TextTrackStyleResetButton, TimeDisplay, TimeRange, TrackRadioGroup, TrackType, UIContainer, VolumeLevel, VolumeRange, buttonTemplate, linkButtonTemplate, menuGroupTemplate, menuTemplate, rangeTemplate, registerExtension, version };
|
|
2168
2216
|
export as namespace THEOplayerUI;
|