@clappr/hlsjs-playback 1.9.13 → 2.0.1
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 +11 -0
- package/dist/hlsjs-playback.esm.js +4 -4
- package/dist/hlsjs-playback.esm.js.map +1 -0
- package/dist/hlsjs-playback.external.js +4 -4
- package/dist/hlsjs-playback.external.js.map +1 -0
- package/dist/hlsjs-playback.external.min.js +1 -1
- package/dist/hlsjs-playback.external.min.js.map +1 -1
- package/dist/hlsjs-playback.js +4 -4
- package/dist/hlsjs-playback.js.map +1 -0
- package/dist/hlsjs-playback.min.js +1 -1
- package/dist/hlsjs-playback.min.js.map +1 -1
- package/package.json +4 -3
- package/src/dist.smoke.test.js +109 -0
- package/src/hls.js +2 -3
- package/src/hls.test.js +780 -12
package/README.md
CHANGED
|
@@ -22,6 +22,17 @@ or as an npm package:
|
|
|
22
22
|
|
|
23
23
|
`yarn add @clappr/hlsjs-playback`
|
|
24
24
|
|
|
25
|
+
### Which artifact to load
|
|
26
|
+
|
|
27
|
+
| Scenario | Artifact |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `<script>` / CDN alongside `@clappr/core` (or `@clappr/player`) | `dist/hlsjs-playback.min.js` |
|
|
30
|
+
| Bundler that should resolve `hls.js` itself | `dist/hlsjs-playback.external.js` (or `.external.min.js`) |
|
|
31
|
+
| Bundler / ESM entry (embeds `hls.js`, leaves `@clappr/core` external) | `dist/hlsjs-playback.esm.js` (package `module` field) |
|
|
32
|
+
| Default CommonJS / UMD entry (embeds `hls.js`) | `dist/hlsjs-playback.js` (package `main` field) |
|
|
33
|
+
|
|
34
|
+
**Migration note (2.0+):** `hlsjs-playback.min.js` no longer embeds `@clappr/core`. Load core (or player) first so a global `Clappr` exists. Use `.external` builds when you supply your own `hls.js`.
|
|
35
|
+
|
|
25
36
|
Then just add `HlsjsPlayback` into the list of plugins of your player instance:
|
|
26
37
|
|
|
27
38
|
```javascript
|
|
@@ -36719,7 +36719,7 @@ class HlsjsPlayback extends HTML5Video {
|
|
|
36719
36719
|
}
|
|
36720
36720
|
get supportedVersion() {
|
|
36721
36721
|
return {
|
|
36722
|
-
min: "0.
|
|
36722
|
+
min: "0.15.0"
|
|
36723
36723
|
};
|
|
36724
36724
|
}
|
|
36725
36725
|
get levels() {
|
|
@@ -36891,7 +36891,7 @@ class HlsjsPlayback extends HTML5Video {
|
|
|
36891
36891
|
this._segmentTargetDuration = null;
|
|
36892
36892
|
// #EXT-X-PLAYLIST-TYPE
|
|
36893
36893
|
this._playlistType = null;
|
|
36894
|
-
this._recoverAttemptsRemaining = this.options.hlsRecoverAttempts
|
|
36894
|
+
this._recoverAttemptsRemaining = this.options.hlsRecoverAttempts ?? DEFAULT_RECOVER_ATTEMPTS;
|
|
36895
36895
|
}
|
|
36896
36896
|
_setup() {
|
|
36897
36897
|
this._destroyHLSInstance();
|
|
@@ -37039,8 +37039,7 @@ class HlsjsPlayback extends HTML5Video {
|
|
|
37039
37039
|
return this._startTime;
|
|
37040
37040
|
}
|
|
37041
37041
|
seekPercentage(percentage) {
|
|
37042
|
-
|
|
37043
|
-
this.seek(seekTo);
|
|
37042
|
+
this.seek(this._duration * (percentage / 100));
|
|
37044
37043
|
}
|
|
37045
37044
|
seek(time) {
|
|
37046
37045
|
if (time < 0) {
|
|
@@ -37425,3 +37424,4 @@ HlsjsPlayback.canPlay = function (resource, mimeType) {
|
|
|
37425
37424
|
};
|
|
37426
37425
|
|
|
37427
37426
|
export { HlsjsPlayback as default };
|
|
37427
|
+
//# sourceMappingURL=hlsjs-playback.esm.js.map
|