@theoplayer/web-ui 1.3.0 → 1.4.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/README.md CHANGED
@@ -42,15 +42,28 @@ The current THEOplayer Web SDK comes with a built-in UI based on [video.js](http
42
42
  3. Add `@theoplayer/web-ui` to your app:
43
43
  - Option 1: in your HTML.
44
44
  ```html
45
+ <script src="/path/to/node_modules/theoplayer/THEOplayer.chromeless.js"></script>
45
46
  <script src="/path/to/node_modules/@theoplayer/web-ui/dist/THEOplayerUI.js"></script>
46
47
  ```
47
48
  - Option 2: in your JavaScript.
48
49
  ```js
49
50
  import { DefaultUI } from '@theoplayer/web-ui';
50
51
  ```
51
-
52
- > **Warning**
53
- > THEOplayer Web SDK currently only supports being loaded through a regular `<script>` tag or as a [UMD module](https://github.com/umdjs/umd), and does not support being `import`ed as a native JavaScript module. If you use `import` with THEOplayer Web UI, make sure to use a JavaScript bundler such as Webpack or Rollup to include THEOplayer in your app. We're hoping to fix this incompatibility soon.
52
+ The Web UI will import THEOplayer from `theoplayer/chromeless`.
53
+ If you're using a bundler such as Webpack or Rollup, this dependency should automatically get bundled with your web app.
54
+ Alternatively, you can use an [import map](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap) to let the browser resolve it:
55
+ ```html
56
+ <script type="importmap">
57
+ {
58
+ "imports": {
59
+ "theoplayer/chromeless": "/path/to/node_modules/theoplayer/THEOplayer.chromeless.esm.js"
60
+ }
61
+ }
62
+ </script>
63
+ <!-- Import maps polyfill for browsers without import maps support (e.g. Safari 16.3) -->
64
+ <script async src="https://ga.jspm.io/npm:es-module-shims@1.8.0/dist/es-module-shims.js" crossorigin="anonymous"></script>
65
+ <script type="module" src="/path/to/my_app.js"></script>
66
+ ```
54
67
 
55
68
  ## Usage
56
69
 
@@ -118,15 +131,25 @@ By default, THEOplayer Web UI targets modern browsers that support modern JavaSc
118
131
 
119
132
  On older browsers (such as Internet Explorer 11 and older smart TVs), you need to load a different version of the THEOplayer Web UI that uses older JavaScript syntax. You also need to load additional polyfills for missing features such as Promises or Custom Elements. We recommend [Polyfill.io](https://polyfill.io/) and [Web Components Polyfills](https://github.com/webcomponents/polyfills) for these.
120
133
 
121
- - Option 1: in your HTML. This uses [differential serving](https://css-tricks.com/differential-serving/) so modern browsers will load the modern build (with `type="module"`, while legacy browsers will load the legacy build (with `nomodule`).
134
+ - Option 1: in your HTML. This uses [differential serving](https://css-tricks.com/differential-serving/) so modern browsers will load the modern build (with `type="module"`), while legacy browsers will load the legacy build (with `nomodule`).
122
135
 
123
136
  ```html
124
- <!-- Load polyfills -->
137
+ <!-- Modern browsers -->
138
+ <script type="importmap">
139
+ {
140
+ "imports": {
141
+ "theoplayer/chromeless": "/path/to/node_modules/theoplayer/THEOplayer.chromeless.esm.js"
142
+ }
143
+ }
144
+ </script>
145
+ <!-- Import maps polyfill for browsers without import maps support (e.g. Safari 16.3) -->
146
+ <script async src="https://ga.jspm.io/npm:es-module-shims@1.8.0/dist/es-module-shims.js" crossorigin="anonymous"></script>
147
+ <script type="module" src="/path/to/node_modules/@theoplayer/web-ui/dist/THEOplayerUI.mjs"></script>
148
+ <!-- Legacy browsers -->
125
149
  <script nomodule src="https://polyfill.io/v3/polyfill.min.js?features=es2015"></script>
126
150
  <script nomodule src="https://unpkg.com/@webcomponents/webcomponentsjs@2.8.0/custom-elements-es5-adapter.js"></script>
127
151
  <script nomodule src="https://unpkg.com/@webcomponents/webcomponentsjs@2.8.0/webcomponents-bundle.js"></script>
128
- <!-- Load modern or legacy build -->
129
- <script type="module" src="/path/to/node_modules/@theoplayer/web-ui/dist/THEOplayerUI.js"></script>
152
+ <script nomodule src="/path/to/node_modules/theoplayer/THEOplayer.chromeless.js"></script>
130
153
  <script nomodule src="/path/to/node_modules/@theoplayer/web-ui/dist/THEOplayerUI.es5.js"></script>
131
154
  ```
132
155
 
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * THEOplayer Web UI v1.3.0
2
+ * THEOplayer Web UI v1.4.0
3
3
  * License: MIT
4
4
  */
5
- import { ChromelessPlayer, VideoQuality, THEOplayerError, MediaTrack, TextTrack, TextTracksList, EdgeStyle, VendorCast, CastState, PlayerConfiguration, SourceDescription } from 'theoplayer/THEOplayer.chromeless';
5
+ import { ChromelessPlayer, VideoQuality, THEOplayerError, MediaTrack, TextTrack, TextTracksList, EdgeStyle, VendorCast, CastState, PlayerConfiguration, SourceDescription } from 'theoplayer/chromeless';
6
6
 
7
7
  /**
8
8
  * A horizontal control bar that can contain other controls.
@@ -204,6 +204,7 @@ declare class PlayButton extends PlayButton_base {
204
204
  private readonly _onPause;
205
205
  private readonly _updateFromPlayer;
206
206
  private _updateEnded;
207
+ private readonly _updateDisabled;
207
208
  protected handleClick(): void;
208
209
  attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
209
210
  private _updateAriaLabel;