@clappr/hlsjs-playback 2.0.1 → 3.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 +21 -15
- package/dist/hlsjs-playback.esm.js +901 -37302
- package/dist/hlsjs-playback.esm.js.map +1 -1
- package/dist/hlsjs-playback.js +888 -37290
- package/dist/hlsjs-playback.js.map +1 -1
- package/dist/hlsjs-playback.min.js +1 -1
- package/dist/hlsjs-playback.min.js.map +1 -1
- package/package.json +4 -5
- package/src/dist.smoke.test.js +42 -10
- package/src/hls.js +4 -0
- package/dist/hlsjs-playback.external.js +0 -732
- package/dist/hlsjs-playback.external.js.map +0 -1
- package/dist/hlsjs-playback.external.min.js +0 -2
- package/dist/hlsjs-playback.external.min.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,36 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
A [Clappr](https://github.com/clappr/clappr) playback to play HTTP Live Streaming (HLS) based on the [hls.js](https://github.com/video-dev/hls.js).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<a href="https://github.com/clappr/hlsjs-playback/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-BSD--3--Clause-blue.svg"></a>
|
|
11
|
-
<a href="https://www.jsdelivr.com/package/npm/@clappr/hlsjs-playback"><img alt="jsDelivr hits (npm)" src="https://img.shields.io/jsdelivr/npm/hm/@clappr/hlsjs-playback?color=orange"></a>
|
|
12
|
-
</p>
|
|
5
|
+
[](https://github.com/clappr/clappr/actions/workflows/ci.yml)
|
|
6
|
+
[](https://www.npmjs.com/package/@clappr/hlsjs-playback)
|
|
7
|
+
[](https://github.com/clappr/clappr/blob/main/LICENSE)
|
|
8
|
+
[](https://bundlephobia.com/package/@clappr/hlsjs-playback)
|
|
9
|
+
[](https://www.jsdelivr.com/package/npm/@clappr/hlsjs-playback)
|
|
13
10
|
|
|
11
|
+
> **Breaking change in 3.0.0 —** `hls.js` is no longer bundled. Every artifact now expects
|
|
12
|
+
> you to provide it. See the migration note below.
|
|
14
13
|
|
|
15
14
|
## Usage
|
|
16
15
|
|
|
17
16
|
You can use it from JSDelivr:
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
```html
|
|
19
|
+
<script src="https://cdn.jsdelivr.net/npm/@clappr/core@latest/dist/clappr-core.min.js"></script>
|
|
20
|
+
<script src="https://cdn.jsdelivr.net/npm/hls.js@1/dist/hls.min.js"></script>
|
|
21
|
+
<script src="https://cdn.jsdelivr.net/npm/@clappr/hlsjs-playback@3/dist/hlsjs-playback.min.js"></script>
|
|
22
|
+
```
|
|
20
23
|
|
|
21
24
|
or as an npm package:
|
|
22
25
|
|
|
23
|
-
`yarn add @clappr/hlsjs-playback`
|
|
26
|
+
`yarn add @clappr/hlsjs-playback hls.js@^1`
|
|
24
27
|
|
|
25
28
|
### Which artifact to load
|
|
26
29
|
|
|
27
30
|
| Scenario | Artifact |
|
|
28
31
|
|---|---|
|
|
29
|
-
| `<script>` / CDN
|
|
30
|
-
| Bundler
|
|
31
|
-
| Bundler
|
|
32
|
-
|
|
32
|
+
| `<script>` / CDN, after `@clappr/core` and `hls.js` | `dist/hlsjs-playback.min.js` |
|
|
33
|
+
| Bundler, CommonJS / UMD entry | `dist/hlsjs-playback.js` (package `main`) |
|
|
34
|
+
| Bundler, ESM entry | `dist/hlsjs-playback.esm.js` (package `module`) |
|
|
35
|
+
|
|
36
|
+
**Migration note (3.0+):** Every artifact now expects `hls.js` from the page or bundler. If you loaded `hlsjs-playback.min.js` with a single script tag, add `hls.js` before it. If you aliased the deep path to avoid the bundled copy, remove that entry from your bundler's `resolve.alias` (webpack) or equivalent (Vite `resolve.alias`, Rollup `alias`) — the default entry is external now:
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
```diff
|
|
39
|
+
- '@clappr/hlsjs-playback': '@clappr/hlsjs-playback/dist/hlsjs-playback.external.js',
|
|
40
|
+
```
|
|
35
41
|
|
|
36
42
|
Then just add `HlsjsPlayback` into the list of plugins of your player instance:
|
|
37
43
|
|