@videojs/html 10.0.0-rc.5 → 10.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 +0 -2
- package/dist/default/define/media/dash-video.js +1 -1
- package/dist/default/define/media/hls-video.js +1 -1
- package/dist/default/define/media/hlsjs-video.js +1 -1
- package/dist/default/define/media/native-hls-video.js +1 -1
- package/dist/default/extensions/mux-data/extension.js +1 -1
- package/dist/default/ui/thumbnail/element.js +2 -2
- package/dist/default/version.js +1 -1
- package/dist/dev/define/audio/compat-skin2.js.map +1 -1
- package/dist/dev/define/audio/neutral-skin2.js.map +1 -1
- package/dist/dev/define/audio/skin2.js.map +1 -1
- package/dist/dev/define/live-audio/compat-skin2.js.map +1 -1
- package/dist/dev/define/live-video/compat-skin2.js.map +1 -1
- package/dist/dev/define/live-video/neutral-skin2.js.map +1 -1
- package/dist/dev/define/live-video/skin2.js.map +1 -1
- package/dist/dev/define/media/dash-video.d.ts +1 -1
- package/dist/dev/define/media/dash-video.js +1 -1
- package/dist/dev/define/media/dash-video.js.map +1 -1
- package/dist/dev/define/media/hls-video.d.ts +1 -1
- package/dist/dev/define/media/hls-video.js +1 -1
- package/dist/dev/define/media/hls-video.js.map +1 -1
- package/dist/dev/define/media/hlsjs-video.d.ts +1 -1
- package/dist/dev/define/media/hlsjs-video.js +1 -1
- package/dist/dev/define/media/hlsjs-video.js.map +1 -1
- package/dist/dev/define/media/native-hls-video.d.ts +1 -1
- package/dist/dev/define/media/native-hls-video.js +1 -1
- package/dist/dev/define/media/native-hls-video.js.map +1 -1
- package/dist/dev/extensions/mux-data/extension.d.ts +1 -1
- package/dist/dev/extensions/mux-data/extension.js +1 -1
- package/dist/dev/extensions/mux-data/extension.js.map +1 -1
- package/dist/dev/ui/thumbnail/element.js +2 -2
- package/dist/dev/ui/thumbnail/element.js.map +1 -1
- package/dist/dev/version.js +1 -1
- package/docs/README.md +1 -1
- package/docs/guides/architecture.md +3 -3
- package/docs/guides/autoplay.md +3 -3
- package/docs/guides/captions.md +5 -5
- package/docs/guides/casting.md +5 -5
- package/docs/guides/cdn.md +11 -11
- package/docs/guides/customize-skins.md +2 -2
- package/docs/guides/features.md +1 -1
- package/docs/guides/fullscreen.md +1 -1
- package/docs/guides/installation-cdn.md +2 -6
- package/docs/guides/installation-shadcn.md +4 -8
- package/docs/guides/installation-svelte.md +2 -6
- package/docs/guides/installation-vue.md +2 -6
- package/docs/guides/installation.md +2 -6
- package/docs/guides/internationalization.md +5 -5
- package/docs/guides/live-streams.md +3 -3
- package/docs/guides/llms.txt +5 -4
- package/docs/guides/media-sources.md +2 -2
- package/docs/guides/migrate-from-media-chrome.md +4 -4
- package/docs/guides/migrate-from-mux-player.md +7 -7
- package/docs/guides/migrate-from-plyr.md +8 -8
- package/docs/guides/migrate-from-video-js-8.md +9 -9
- package/docs/guides/migrate-from-vidstack.md +9 -9
- package/docs/guides/migrate.md +17 -0
- package/docs/guides/mux-data.md +1 -1
- package/docs/guides/playback-errors.md +4 -4
- package/docs/guides/presets.md +13 -13
- package/docs/guides/quality.md +3 -3
- package/docs/guides/self-hosting.md +6 -6
- package/docs/guides/skins.md +5 -5
- package/docs/guides/thumbnails.md +2 -2
- package/docs/guides/user-preferences.md +2 -2
- package/docs/guides/v10-roadmap.md +19 -54
- package/docs/llms.txt +5 -4
- package/docs/reference/api/feature-fullscreen.md +2 -2
- package/docs/reference/api/feature-metadata.md +2 -2
- package/docs/reference/api/feature-source.md +1 -1
- package/docs/reference/api/feature-text-tracks.md +2 -2
- package/docs/reference/api/llms.txt +1 -1
- package/docs/reference/api/media-capabilities.md +1 -1
- package/docs/reference/api/player-store.md +3 -3
- package/docs/reference/api/preset-audio.md +2 -2
- package/docs/reference/api/preset-background.md +3 -3
- package/docs/reference/api/preset-live-audio.md +3 -3
- package/docs/reference/api/preset-live-video.md +3 -3
- package/docs/reference/api/preset-video.md +2 -2
- package/docs/reference/api/resolve-adapter-type.md +2 -2
- package/docs/reference/api/vjs8-legacy-options.md +1 -1
- package/docs/reference/components/audio-compat-skin.md +33 -3
- package/docs/reference/components/audio-neutral-skin.md +34 -4
- package/docs/reference/components/audio-skin.md +34 -4
- package/docs/reference/components/audio.md +1 -1
- package/docs/reference/components/background-video-skin.md +36 -4
- package/docs/reference/components/background-video.md +1 -1
- package/docs/reference/components/cast-button.md +1 -1
- package/docs/reference/components/cloudflare-video.md +1 -1
- package/docs/reference/components/dash-video.md +1 -1
- package/docs/reference/components/google-cast.md +1 -1
- package/docs/reference/components/hls-audio.md +1 -1
- package/docs/reference/components/hls-background-video.md +1 -1
- package/docs/reference/components/hls-video.md +1 -1
- package/docs/reference/components/hlsjs-video.md +1 -1
- package/docs/reference/components/live-audio-compat-skin.md +35 -4
- package/docs/reference/components/live-audio-neutral-skin.md +36 -5
- package/docs/reference/components/live-audio-skin.md +36 -5
- package/docs/reference/components/live-video-compat-skin.md +36 -4
- package/docs/reference/components/live-video-neutral-skin.md +37 -5
- package/docs/reference/components/live-video-skin.md +37 -5
- package/docs/reference/components/llms.txt +1 -1
- package/docs/reference/components/mux-audio.md +2 -2
- package/docs/reference/components/mux-background-video.md +1 -1
- package/docs/reference/components/mux-data.md +1 -1
- package/docs/reference/components/mux-video.md +2 -2
- package/docs/reference/components/native-hls-video.md +1 -1
- package/docs/reference/components/player-container.md +1 -1
- package/docs/reference/components/player.md +4 -4
- package/docs/reference/components/shaka-video.md +1 -1
- package/docs/reference/components/spotify-audio.md +1 -1
- package/docs/reference/components/thumbnail.md +5 -5
- package/docs/reference/components/tiktok-video.md +1 -1
- package/docs/reference/components/twitch-video.md +1 -1
- package/docs/reference/components/video-compat-skin.md +36 -3
- package/docs/reference/components/video-neutral-skin.md +37 -4
- package/docs/reference/components/video-skin.md +37 -4
- package/docs/reference/components/video.md +1 -1
- package/docs/reference/components/vimeo-video.md +1 -1
- package/docs/reference/components/wistia-video.md +1 -1
- package/docs/reference/components/youtube-video.md +1 -1
- package/package.json +38 -40
|
@@ -46,14 +46,14 @@ Before loading Video.js HTML, remove every Media Chrome import and CDN script fr
|
|
|
46
46
|
For a page without a bundler, load the CDN video preset. It registers the player, the UI elements and icons used in the controller example below, and the `<media-i18n>` element:
|
|
47
47
|
|
|
48
48
|
```html
|
|
49
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
49
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/video.js"></script>
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
Some elements in the mapping table below need separate bundles. If you use any of these elements, also load its bundle:
|
|
53
53
|
|
|
54
|
-
- `media-seek-button`: `https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
55
|
-
- `media-playback-rate-button`: `https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
56
|
-
- `media-thumbnail`: `https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
54
|
+
- `media-seek-button`: `https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/ui/seek-button.js`
|
|
55
|
+
- `media-playback-rate-button`: `https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/ui/playback-rate-button.js`
|
|
56
|
+
- `media-thumbnail`: `https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/ui/thumbnail.js`
|
|
57
57
|
|
|
58
58
|
Load each with `<script type="module" src="…"></script>`. See [CDN](./cdn.md) for individual component bundles.
|
|
59
59
|
|
|
@@ -43,7 +43,7 @@ Make a migration checklist before changing your embed:
|
|
|
43
43
|
|
|
44
44
|
- **List the Mux Player attributes or React props you set.** Compare them with the mapping tables below.
|
|
45
45
|
- **Grep your codebase for `mux-player` selectors.** After the swap, CSS rules and `querySelector` calls that reach into the element stop matching, with no error. Look for patterns such as `mux-player::part(…)`, `mux-player [role="slider"]`, and `player.shadowRoot`. Restyle the UI with the skin’s custom properties or rebuild it with Video.js components.
|
|
46
|
-
- **Find your event listeners and imperative calls** (`play()`, `currentTime`, `addChapters`). Media APIs move to the media
|
|
46
|
+
- **Find your event listeners and imperative calls** (`play()`, `currentTime`, `addChapters`). Media APIs move to the media component; the rest is mapped under [Drive playback](#drive-playback).
|
|
47
47
|
- **Note your theme and CSS variables.** Compare your Mux Player theme with the two Video.js skins, and map its CSS variables.
|
|
48
48
|
- **Check [Known gaps](#known-gaps)** for features your app needs.
|
|
49
49
|
- **Check your catalog for MPEG-TS, raw ADTS AAC, AES-128, low-latency HLS, or DVR streams.** Check whether the SPF engine supports these requirements. If you use DRM, verify playback with whichever engine you choose. See [Which Mux media should you use?](#which-mux-media-should-you-use).
|
|
@@ -68,9 +68,9 @@ The examples keep a playback ID, analytics metadata, and a poster from two secon
|
|
|
68
68
|
From the CDN, load the video [preset](./presets.md), the Mux media, and analytics:
|
|
69
69
|
|
|
70
70
|
```html
|
|
71
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
72
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
73
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
71
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/video.js"></script>
|
|
72
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/mux-video.js"></script>
|
|
73
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/extensions/mux-data.js"></script>
|
|
74
74
|
|
|
75
75
|
<video-player content-title="Test VOD">
|
|
76
76
|
<video-skin style="aspect-ratio: 16 / 9">
|
|
@@ -421,8 +421,8 @@ Mux Player switches to live controls automatically. In Video.js, choose the live
|
|
|
421
421
|
Register the live preset and Mux media. From the CDN:
|
|
422
422
|
|
|
423
423
|
```html
|
|
424
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
425
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
424
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/live-video.js"></script>
|
|
425
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/mux-video.js"></script>
|
|
426
426
|
|
|
427
427
|
<live-video-player>
|
|
428
428
|
<live-video-skin>
|
|
@@ -452,7 +452,7 @@ Use [`createPlayer`](../reference/api/html-create-player.md) to build a player e
|
|
|
452
452
|
The live skin already includes a live button. If you build your own controls, use that same component and style it to match your app. It keeps track of whether playback is live and returns viewers to the newest available point in the stream.
|
|
453
453
|
|
|
454
454
|
```html
|
|
455
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
455
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/ui/live-button.js"></script>
|
|
456
456
|
|
|
457
457
|
<media-live-button class="station-live-button">On air</media-live-button>
|
|
458
458
|
```
|
|
@@ -72,7 +72,7 @@ The Neutral skin is the closest built-in starting point for this migration.
|
|
|
72
72
|
For an HTML page without a bundler, load the CDN preset:
|
|
73
73
|
|
|
74
74
|
```html
|
|
75
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
75
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/video-neutral.js"></script>
|
|
76
76
|
|
|
77
77
|
<video-player poster="/path/to/poster.jpg">
|
|
78
78
|
<video-neutral-skin style="aspect-ratio: 16 / 9">
|
|
@@ -119,7 +119,7 @@ The SPF [HLS video](../reference/components/hls-video.md) component is an altern
|
|
|
119
119
|
Replace `<video>` with `<hlsjs-video>`. If you’re using the CDN, add an additional script:
|
|
120
120
|
|
|
121
121
|
```html
|
|
122
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
122
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/hlsjs-video.js"></script>
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
For a bundler installation, install the adapter package and add the media import:
|
|
@@ -141,7 +141,7 @@ Use the DASH media component for an unprotected DASH source. For DRM-protected D
|
|
|
141
141
|
Replace `<video>` with `<dash-video>`. If you’re using the CDN, add an additional script:
|
|
142
142
|
|
|
143
143
|
```html
|
|
144
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
144
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/dash-video.js"></script>
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
For a package-manager installation, install the DASH adapter package and add the media import:
|
|
@@ -163,7 +163,7 @@ Use the Vimeo media component for your existing Vimeo source.
|
|
|
163
163
|
Replace `<video>` with `<vimeo-video>`. For a CDN installation, add the media script:
|
|
164
164
|
|
|
165
165
|
```html
|
|
166
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
166
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/vimeo-video.js"></script>
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
For a bundler installation, install the adapter package and add the module import:
|
|
@@ -185,7 +185,7 @@ Use the YouTube media component for your existing YouTube source.
|
|
|
185
185
|
Replace `<video>` with `<youtube-video>`. For a CDN installation, add the media script:
|
|
186
186
|
|
|
187
187
|
```html
|
|
188
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
188
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/youtube-video.js"></script>
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
For a bundler installation, install the adapter package and add the module import:
|
|
@@ -216,7 +216,7 @@ To select a locale, wrap the player in `<media-i18n>` and set `lang` to your loc
|
|
|
216
216
|
|
|
217
217
|
```html
|
|
218
218
|
<script type="module">
|
|
219
|
-
import { registerI18n } from 'https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
219
|
+
import { registerI18n } from 'https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/i18n.js';
|
|
220
220
|
|
|
221
221
|
registerI18n('en', {
|
|
222
222
|
buttons: {
|
|
@@ -229,7 +229,7 @@ To select a locale, wrap the player in `<media-i18n>` and set `lang` to your loc
|
|
|
229
229
|
});
|
|
230
230
|
</script>
|
|
231
231
|
|
|
232
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
232
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/video-neutral.js"></script>
|
|
233
233
|
|
|
234
234
|
<video-player>
|
|
235
235
|
<video-neutral-skin>
|
|
@@ -382,5 +382,5 @@ For changes to controls, layout, or icons, add the skin source to your project.
|
|
|
382
382
|
### Guides
|
|
383
383
|
|
|
384
384
|
- [Features](./features.md): The state and actions each feature adds to the player
|
|
385
|
-
- [Media sources](./media-sources.md): Set what a media
|
|
385
|
+
- [Media sources](./media-sources.md): Set what a media component plays and how its engine plays it with the structured source property
|
|
386
386
|
- [Customize skins](./customize-skins.md): Style a packaged Video.js skin or add its source to change controls, layout, styles, and interactions
|
|
@@ -65,7 +65,7 @@ Here’s a standard v8 setup: one file, captions, a poster, and the default skin
|
|
|
65
65
|
Load the video [preset](./presets.md) from the CDN and put your media inside its skin:
|
|
66
66
|
|
|
67
67
|
```html
|
|
68
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
68
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/video.js"></script>
|
|
69
69
|
|
|
70
70
|
<video-player poster="/poster.jpg">
|
|
71
71
|
<video-skin style="aspect-ratio: 16 / 9">
|
|
@@ -230,7 +230,7 @@ SPF and native HLS are included as dependencies of the HTML and React packages.
|
|
|
230
230
|
For hls.js video from the CDN:
|
|
231
231
|
|
|
232
232
|
```html
|
|
233
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
233
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/hlsjs-video.js"></script>
|
|
234
234
|
```
|
|
235
235
|
|
|
236
236
|
With a package manager, install the adapter and import its HTML registration:
|
|
@@ -315,7 +315,7 @@ Move license URLs from v8’s `keySystems` configuration to `source.drm`, keyed
|
|
|
315
315
|
|
|
316
316
|
The examples configure Widevine. Replace both URL placeholders and add every key system your supported browsers need.
|
|
317
317
|
|
|
318
|
-
With a bundler, install `@videojs/shaka-video` and import `@videojs/html/media/shaka-video`. From the CDN, load `https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
318
|
+
With a bundler, install `@videojs/shaka-video` and import `@videojs/html/media/shaka-video`. From the CDN, load `https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/shaka-video.js` in a `<script type="module">` tag. Then replace the media component inside your player’s skin with:
|
|
319
319
|
|
|
320
320
|
```html
|
|
321
321
|
<shaka-video id="protected-media"></shaka-video>
|
|
@@ -337,7 +337,7 @@ document.querySelector('#protected-media').source = {
|
|
|
337
337
|
|
|
338
338
|
### Events
|
|
339
339
|
|
|
340
|
-
Your media
|
|
340
|
+
Your media component is a real media element, so every event you already listen for still fires on it. Keep your listeners, and attach them to the media component instead of the v8 player.
|
|
341
341
|
|
|
342
342
|
```js
|
|
343
343
|
// Video.js 8
|
|
@@ -394,13 +394,13 @@ Replace v8 accessor methods with [player state](../reference/api/player-store.md
|
|
|
394
394
|
| `player.volume()` / `player.volume(0.5)` | `volume` in player state / `media.volume = 0.5` |
|
|
395
395
|
| `player.muted()` / `player.muted(true)` | `muted` in player state / the player’s `setMuted(true)` |
|
|
396
396
|
| `player.playbackRate()` / `player.playbackRate(1.5)` | `playbackRate` in player state / the player’s `setPlaybackRate(1.5)` |
|
|
397
|
-
| `player.src({ src, type })` | set `src` on the media or replace the media
|
|
397
|
+
| `player.src({ src, type })` | set `src` on the media or replace the media component (`<video>` tag, `<hlsjs-video>`, `<dash-video>`, etc) |
|
|
398
398
|
| `player.requestFullscreen()`, `exitFullscreen()` | the player’s `requestFullscreen`, `exitFullscreen` |
|
|
399
399
|
| `player.textTracks()`, `addRemoteTextTrack()` | `<track>` elements; read `textTrackList` from player state or `textTracks` from the media |
|
|
400
400
|
| `player.audioTracks()` | `audioTrackList` in player state, `audioTracks` in media |
|
|
401
401
|
| `player.error()` | `error` in player state |
|
|
402
402
|
| `player.dispose()` | remove the element |
|
|
403
|
-
| `player.tech()` | the media
|
|
403
|
+
| `player.tech()` | the media component’s `engine` property, where one exists |
|
|
404
404
|
| `videojs.getPlayer(id)` | hold a reference to the element |
|
|
405
405
|
|
|
406
406
|
Every item the table labels “the player’s” is a property of the player element’s `store`. Call these actions only after `player.store.target` is set, which means the media has attached. Fullscreen requests must run from a user interaction:
|
|
@@ -438,7 +438,7 @@ For a CDN page, register string overrides in a module script:
|
|
|
438
438
|
|
|
439
439
|
```html
|
|
440
440
|
<script type="module">
|
|
441
|
-
import { registerI18n } from 'https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
441
|
+
import { registerI18n } from 'https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/i18n.js';
|
|
442
442
|
|
|
443
443
|
registerI18n('en', {
|
|
444
444
|
buttons: { play: 'Start video', pause: 'Pause video' },
|
|
@@ -458,8 +458,8 @@ Replace `liveui` or `audioOnlyMode` with the matching live or audio [preset](./p
|
|
|
458
458
|
Load the live preset and the hls.js media component:
|
|
459
459
|
|
|
460
460
|
```html
|
|
461
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
462
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
461
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/live-video.js"></script>
|
|
462
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/hlsjs-video.js"></script>
|
|
463
463
|
|
|
464
464
|
<live-video-player>
|
|
465
465
|
<live-video-skin>
|
|
@@ -61,7 +61,7 @@ Video.js 10 splits those jobs:
|
|
|
61
61
|
|
|
62
62
|
**The player** holds state and hands it to everything inside it. It draws nothing and takes no layout. Which state it holds depends on the [features](./features.md) it’s built from.
|
|
63
63
|
|
|
64
|
-
**The media** plays the video. This is where Vidstack’s *provider* went, except you choose it yourself: a plain `<video>` for progressive files, or a [media component](./media-sources.md) for HLS, DASH, YouTube, Vimeo, and Mux. There’s no `<media-provider>`; the media
|
|
64
|
+
**The media** plays the video. This is where Vidstack’s *provider* went, except you choose it yourself: a plain `<video>` for progressive files, or a [media component](./media-sources.md) for HLS, DASH, YouTube, Vimeo, and Mux. There’s no `<media-provider>`; the media component sits inside the skin.
|
|
65
65
|
|
|
66
66
|
**The skin** is the UI, and it’s where Vidstack’s *layout* went. Every skin renders a container, the box that sizes the player, goes fullscreen, and receives gestures and hotkeys.
|
|
67
67
|
|
|
@@ -154,7 +154,7 @@ What changed:
|
|
|
154
154
|
Load the bundle as a module script. From the CDN, the video preset is one script:
|
|
155
155
|
|
|
156
156
|
```html
|
|
157
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
157
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/video.js"></script>
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
Pin every Video.js CDN URL on a page to the same version; see [CDN](./cdn.md).
|
|
@@ -188,7 +188,7 @@ Remove `controls` yourself: Video.js doesn’t turn native controls off when a s
|
|
|
188
188
|
|
|
189
189
|
`<media-player>` accepted about fifty props. In Video.js they scatter in four directions:
|
|
190
190
|
|
|
191
|
-
1. **Media attributes** move to the media
|
|
191
|
+
1. **Media attributes** move to the media component, where the browser already understands them.
|
|
192
192
|
2. **Player metadata**, the title and poster, stays on the player so the skin can render it.
|
|
193
193
|
3. **Playback values** such as volume and current time become actions you call.
|
|
194
194
|
4. **Behavior** such as live UI, shortcuts, and casting becomes a choice of preset, component, or extension.
|
|
@@ -233,7 +233,7 @@ Vidstack’s `<media-provider>` read `src`, guessed a type from the extension or
|
|
|
233
233
|
| Vimeo | [`<vimeo-video>`](../reference/components/vimeo-video.md) | `@videojs/vimeo-video` |
|
|
234
234
|
| Remotion | No equivalent ([#3053](https://github.com/videojs/v10/issues/3053)) | |
|
|
235
235
|
|
|
236
|
-
Register each media
|
|
236
|
+
Register each media component with `import '@videojs/html/media/<name>'`, or load `https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/<name>.js` from the CDN, where the engine is already bundled.
|
|
237
237
|
|
|
238
238
|
### HLS and DASH
|
|
239
239
|
|
|
@@ -267,7 +267,7 @@ media.source = { src: '/stream.m3u8', engine: { hlsJs: { maxBufferLength: 60 } }
|
|
|
267
267
|
|
|
268
268
|
`source` is replaced, not merged. Changing hls.js options rebuilds the engine; dash.js and Shaka apply new settings to the running one. See [Media sources](./media-sources.md) for the options every engine shares, such as `preferPlayback`, rendition caps, and DRM.
|
|
269
269
|
|
|
270
|
-
Where you used `provider.instance` or `onInstance`, read `.engine` on the media
|
|
270
|
+
Where you used `provider.instance` or `onInstance`, read `.engine` on the media component. For hls.js’s event names, import `Hls` from `@videojs/hlsjs-video`, the package you installed for `<hlsjs-video>`, which exports it for this kind of low-level access. Vidstack re-dispatched hls.js events as `hls-*` events on the player; Video.js doesn’t forward engine events, so subscribe on the engine itself:
|
|
271
271
|
|
|
272
272
|
```js
|
|
273
273
|
import { Hls } from '@videojs/hlsjs-video';
|
|
@@ -497,7 +497,7 @@ Most Vidstack components have a Video.js counterpart with the same job. What cha
|
|
|
497
497
|
| Vidstack | Video.js 10 |
|
|
498
498
|
| --- | --- |
|
|
499
499
|
| `<media-player>` | `<video-player>` plus the skin’s `<media-container>` |
|
|
500
|
-
| `<media-provider>` | The media
|
|
500
|
+
| `<media-provider>` | The media component: `<video>`, `<hlsjs-video>`, `<youtube-video>`, … |
|
|
501
501
|
| `<media-play-button>`, `<media-mute-button>`, `<media-fullscreen-button>`, `<media-airplay-button>`, `<media-live-button>`, `<media-seek-button>`, `<media-pip-button>` | Same tags |
|
|
502
502
|
| `<media-caption-button>` | `<media-captions-button>` |
|
|
503
503
|
| `<media-google-cast-button>` | `<media-cast-button>` |
|
|
@@ -637,7 +637,7 @@ Two keys behave differently. `started` can turn off again after the media is res
|
|
|
637
637
|
|
|
638
638
|
Vidstack fired a normalized set of events on `<media-player>`, including state-change events such as `fullscreen-change` and `controls-change`. Video.js fires no player events of its own.
|
|
639
639
|
|
|
640
|
-
Listen on the media
|
|
640
|
+
Listen on the media component with native event names: `canplay` for `can-play`, `loadedmetadata` for `loaded-metadata`, and so on. Media events don’t bubble, so a listener on `<video-player>` won’t hear them. For anything that isn’t a media event, subscribe to the store and compare values, as in [Read player state](#read-player-state).
|
|
641
641
|
|
|
642
642
|
| Vidstack event | Video.js 10 |
|
|
643
643
|
| --- | --- |
|
|
@@ -803,7 +803,7 @@ Vidstack’s `storage` saved volume, mute, captions, language, playback rate, qu
|
|
|
803
803
|
|
|
804
804
|
### Autoplay
|
|
805
805
|
|
|
806
|
-
Move `autoplay` from `<media-player>` to the media
|
|
806
|
+
Move `autoplay` from `<media-player>` to the media component, along with `muted` and `playsinline`. There’s no `auto-play-fail` event or `autoPlayError` state; a blocked autoplay looks like media that never started. To react to it, leave out `autoplay`, call `play()` once the player attaches, and catch the rejection. See [Autoplay](./autoplay.md).
|
|
807
807
|
|
|
808
808
|
## Angular and Solid
|
|
809
809
|
|
|
@@ -813,7 +813,7 @@ In Angular, add `CUSTOM_ELEMENTS_SCHEMA` to the `schemas` of the component that
|
|
|
813
813
|
|
|
814
814
|
## Element lifecycle
|
|
815
815
|
|
|
816
|
-
Vidstack elements destroyed themselves when they were removed from the page and not put back within a frame, unless they carried `keep-alive`, which the player passed down to its children. Video.js keeps the attribute but doesn’t pass it down: set it on each element you plan to move. When you’re done with them, call `destroy()` on the player and UI elements, and `adapter.destroy()` on media
|
|
816
|
+
Vidstack elements destroyed themselves when they were removed from the page and not put back within a frame, unless they carried `keep-alive`, which the player passed down to its children. Video.js keeps the attribute but doesn’t pass it down: set it on each element you plan to move. When you’re done with them, call `destroy()` on the player and UI elements, and `adapter.destroy()` on media components. Packaged skins don’t pass it to their controls either ([#3036](https://github.com/videojs/v10/issues/3036)), so move a player that uses one synchronously. See the player’s [lifecycle](../reference/components/player.md#lifecycle).
|
|
817
817
|
|
|
818
818
|
## Behavior changes to check
|
|
819
819
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Migrate to Video.js v10
|
|
2
|
+
|
|
3
|
+
Understand how Video.js v10 differs from the players it brings together, and choose the migration guide for the player you use today.
|
|
4
|
+
|
|
5
|
+
Video.js v10 brings together the people and lessons behind Video.js, Plyr, Vidstack, Media Chrome, and Mux Player. These projects approached web video from different directions: Video.js made HTML5 video work consistently across browsers, Plyr focused on the details of the player UI, Vidstack built for modern frameworks, Media Chrome made controls composable, and Mux Player simplified streaming integration.
|
|
6
|
+
|
|
7
|
+
Rather than merge their codebases, we rebuilt the player from scratch with what we learned from those projects. The result is one shared foundation, with native React and HTML components, customizable skins, and separate layers for player state, controls, and media playback. You can use a ready-made player or compose the pieces your application needs.
|
|
8
|
+
|
|
9
|
+
That also means v10+ is not a drop-in upgrade for any of these players. Migration involves translating your existing configuration, controls, and player API usage into the new components. Start with the guide for the player you’re using today.
|
|
10
|
+
|
|
11
|
+
## Choose your migration guide
|
|
12
|
+
|
|
13
|
+
- [Video.js 8](./migrate-from-video-js-8.md): Move from the options object, techs, plugins, and player API to v10’s composed components and player state.
|
|
14
|
+
- [Mux Player](./migrate-from-mux-player.md): Move from a single player element to separate player, media, and skin components.
|
|
15
|
+
- [Plyr](./migrate-from-plyr.md): Map your existing options, controls, and instance API to v10.
|
|
16
|
+
- [Media Chrome](./migrate-from-media-chrome.md): Map your controller, elements, and attributes to their v10 equivalents.
|
|
17
|
+
- [Vidstack](./migrate-from-vidstack.md): Map your Vidstack player, providers, layouts, and media store onto v10’s composed components.
|
package/docs/guides/mux-data.md
CHANGED
|
@@ -31,7 +31,7 @@ That’s the whole setup for Mux-hosted playback — no environment key required
|
|
|
31
31
|
|
|
32
32
|
> **Note**
|
|
33
33
|
>
|
|
34
|
-
> Mux Data is opt-in. No media
|
|
34
|
+
> Mux Data is opt-in. No media component monitors playback on its own, Mux ones included, so nothing is measured and no beacons are sent until you add the extension.
|
|
35
35
|
|
|
36
36
|
## Set the environment key
|
|
37
37
|
|
|
@@ -40,10 +40,10 @@ The dialog shows its text through child parts: a title, the error description, a
|
|
|
40
40
|
|
|
41
41
|
## How it works
|
|
42
42
|
|
|
43
|
-
The [error feature](../reference/api/feature-error.md) mirrors the media
|
|
43
|
+
The [error feature](../reference/api/feature-error.md) mirrors the media component’s error into player state:
|
|
44
44
|
|
|
45
45
|
- `error` holds the media’s error — `code`, `message` — or `null` when there is none.
|
|
46
|
-
- `dismissError()` clears the error from player state (the media
|
|
46
|
+
- `dismissError()` clears the error from player state (the media component keeps its own error until a new load).
|
|
47
47
|
- Loading a new source resets `error` to `null` automatically.
|
|
48
48
|
|
|
49
49
|
The dialog owns presentation, not recovery. Decide the next step in your application: let the user dismiss the message, choose another item, refresh an expired URL, or contact support.
|
|
@@ -110,7 +110,7 @@ These codes identify Video.js 8 APIs used with the Video.js 10 `video.js` packag
|
|
|
110
110
|
|
|
111
111
|
### Error code says the source isn’t supported
|
|
112
112
|
|
|
113
|
-
The browser can’t play the format through this media
|
|
113
|
+
The browser can’t play the format through this media component. HLS in a plain video element outside Safari is the classic case; use the matching streaming media component. See [Media sources](./media-sources.md).
|
|
114
114
|
|
|
115
115
|
### Reopening the source produces the same error
|
|
116
116
|
|
|
@@ -128,5 +128,5 @@ The failure is probably permanent for that source, such as a 404, revoked token,
|
|
|
128
128
|
|
|
129
129
|
### Guides
|
|
130
130
|
|
|
131
|
-
- [Media sources](./media-sources.md): Set what a media
|
|
131
|
+
- [Media sources](./media-sources.md): Set what a media component plays and how its engine plays it with the structured source property
|
|
132
132
|
- [Autoplay](./autoplay.md): Start playback automatically and handle browser autoplay restrictions.
|
package/docs/guides/presets.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Presets
|
|
2
2
|
|
|
3
|
-
Pre-packaged player configurations that bundle state management, skins, and media
|
|
3
|
+
Pre-packaged player configurations that bundle state management, skins, and media components for specific use cases.
|
|
4
4
|
|
|
5
|
-
A **preset** packages what you need for a specific player use case. It can include special [state management](./features.md), one or more [skins](./skins.md) for UI, and specific media
|
|
5
|
+
A **preset** packages what you need for a specific player use case. It can include special [state management](./features.md), one or more [skins](./skins.md) for UI, and specific media components. Instead of assembling these pieces individually, you pick a preset that matches what you’re building.
|
|
6
6
|
|
|
7
|
-
For example, the `@videojs/html/background` preset includes a media
|
|
7
|
+
For example, the `@videojs/html/background` preset includes a media component with autoplay, mute, and loop built in, a skin with no controls, and just the features needed to power them:
|
|
8
8
|
|
|
9
9
|
**index.html**
|
|
10
10
|
|
|
@@ -30,11 +30,11 @@ The video, audio, live video, and live audio presets also export Compat skins. F
|
|
|
30
30
|
|
|
31
31
|
| Import | Description | Details |
|
|
32
32
|
| --- | --- | --- |
|
|
33
|
-
| `@videojs/html/video` | General-purpose video player preset with full playback controls. | **Feature bundle:** `videoFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [playbackRate](../reference/api/feature-playback-rate.md), [quality](../reference/api/feature-quality.md), [audioTrack](../reference/api/feature-audio-track.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [fullscreen](../reference/api/feature-fullscreen.md), [pip](../reference/api/feature-pip.md), [remotePlayback](../reference/api/feature-remote-playback.md), [controls](../reference/api/feature-controls.md), [textTrack](../reference/api/feature-text-tracks.md), [error](../reference/api/feature-error.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<video-compat-skin>`, `<video-neutral-skin>`, `<video-skin>`; **Default media
|
|
34
|
-
| `@videojs/html/audio` | Audio-only player preset with playback and volume controls. | **Feature bundle:** `audioFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [playbackRate](../reference/api/feature-playback-rate.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [error](../reference/api/feature-error.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<audio-compat-skin>`, `<audio-neutral-skin>`, `<audio-skin>`; **Default media
|
|
35
|
-
| `@videojs/html/background` | Ambient background video preset with no user controls. | **Feature bundle:** `backgroundFeatures`; **Features:** –; **Skins:** `<background-video-skin>`; **Default media
|
|
36
|
-
| `@videojs/html/live-audio` | Live audio player preset — `audio` minus playback rate, plus the live feature, with a skin that swaps the time slider and time displays for a Live button. | **Feature bundle:** `liveAudioFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [error](../reference/api/feature-error.md), [live](../reference/api/feature-live.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<live-audio-compat-skin>`, `<live-audio-neutral-skin>`, `<live-audio-skin>`; **Default media
|
|
37
|
-
| `@videojs/html/live-video` | Live video player preset — `video` minus playback rate, quality selection, and audio-track selection, plus the live feature, with a skin that swaps the time slider and time displays for a Live button. | **Feature bundle:** `liveVideoFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [fullscreen](../reference/api/feature-fullscreen.md), [pip](../reference/api/feature-pip.md), [remotePlayback](../reference/api/feature-remote-playback.md), [controls](../reference/api/feature-controls.md), [textTrack](../reference/api/feature-text-tracks.md), [error](../reference/api/feature-error.md), [live](../reference/api/feature-live.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<live-video-compat-skin>`, `<live-video-neutral-skin>`, `<live-video-skin>`; **Default media
|
|
33
|
+
| `@videojs/html/video` | General-purpose video player preset with full playback controls. | **Feature bundle:** `videoFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [playbackRate](../reference/api/feature-playback-rate.md), [quality](../reference/api/feature-quality.md), [audioTrack](../reference/api/feature-audio-track.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [fullscreen](../reference/api/feature-fullscreen.md), [pip](../reference/api/feature-pip.md), [remotePlayback](../reference/api/feature-remote-playback.md), [controls](../reference/api/feature-controls.md), [textTrack](../reference/api/feature-text-tracks.md), [error](../reference/api/feature-error.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<video-compat-skin>`, `<video-neutral-skin>`, `<video-skin>`; **Default media component:** `<video>` |
|
|
34
|
+
| `@videojs/html/audio` | Audio-only player preset with playback and volume controls. | **Feature bundle:** `audioFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [playbackRate](../reference/api/feature-playback-rate.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [error](../reference/api/feature-error.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<audio-compat-skin>`, `<audio-neutral-skin>`, `<audio-skin>`; **Default media component:** `<audio>` |
|
|
35
|
+
| `@videojs/html/background` | Ambient background video preset with no user controls. | **Feature bundle:** `backgroundFeatures`; **Features:** –; **Skins:** `<background-video-skin>`; **Default media component:** `<background-video>` |
|
|
36
|
+
| `@videojs/html/live-audio` | Live audio player preset — `audio` minus playback rate, plus the live feature, with a skin that swaps the time slider and time displays for a Live button. | **Feature bundle:** `liveAudioFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [error](../reference/api/feature-error.md), [live](../reference/api/feature-live.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<live-audio-compat-skin>`, `<live-audio-neutral-skin>`, `<live-audio-skin>`; **Default media component:** `<audio>` |
|
|
37
|
+
| `@videojs/html/live-video` | Live video player preset — `video` minus playback rate, quality selection, and audio-track selection, plus the live feature, with a skin that swaps the time slider and time displays for a Live button. | **Feature bundle:** `liveVideoFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [fullscreen](../reference/api/feature-fullscreen.md), [pip](../reference/api/feature-pip.md), [remotePlayback](../reference/api/feature-remote-playback.md), [controls](../reference/api/feature-controls.md), [textTrack](../reference/api/feature-text-tracks.md), [error](../reference/api/feature-error.md), [live](../reference/api/feature-live.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<live-video-compat-skin>`, `<live-video-neutral-skin>`, `<live-video-skin>`; **Default media component:** `<video>` |
|
|
38
38
|
|
|
39
39
|
Each preset has a reference page that lists its player, feature bundle, skins, media, and exports:
|
|
40
40
|
|
|
@@ -46,9 +46,9 @@ Each preset has a reference page that lists its player, feature bundle, skins, m
|
|
|
46
46
|
|
|
47
47
|
## What’s in a preset
|
|
48
48
|
|
|
49
|
-
Each HTML preset provides registration entry points for a preconfigured player element, its skins, and any preset-specific media
|
|
49
|
+
Each HTML preset provides registration entry points for a preconfigured player element, its skins, and any preset-specific media component, plus the feature bundle needed to compose your own player. For example, `@videojs/html/video/player` registers `<video-player>`, while `@videojs/html/video/skin` registers `<video-skin>`.
|
|
50
50
|
|
|
51
|
-
These parts aren’t equally tied together. Skins depend tightly on their feature bundle — a skin expects specific features to exist. Media
|
|
51
|
+
These parts aren’t equally tied together. Skins depend tightly on their feature bundle — a skin expects specific features to exist. Media components are more interchangeable — you can swap in an HLS or DASH provider without changing your skin or features.
|
|
52
52
|
|
|
53
53
|
HTML preset roots are side-effect-free modules for importing the configured classes, typed controller, and feature bundle:
|
|
54
54
|
|
|
@@ -73,7 +73,7 @@ A complete player imports `video/player` and one skin. Each skin registration in
|
|
|
73
73
|
|
|
74
74
|
## Customizing a preset
|
|
75
75
|
|
|
76
|
-
You can customize a preset in three ways: extend its feature bundle, add its skin source to your project, or swap its media
|
|
76
|
+
You can customize a preset in three ways: extend its feature bundle, add its skin source to your project, or swap its media component.
|
|
77
77
|
|
|
78
78
|
### Extend the feature bundle
|
|
79
79
|
|
|
@@ -108,9 +108,9 @@ Add features to a preset’s feature bundle to enable new functionality. For exa
|
|
|
108
108
|
|
|
109
109
|
If a preset’s skin is close but not quite right, [add its source to your project](./customize-skins.md#style-skin-source) and customize its components and styles.
|
|
110
110
|
|
|
111
|
-
### Swap the media
|
|
111
|
+
### Swap the media component
|
|
112
112
|
|
|
113
|
-
A preset’s default media
|
|
113
|
+
A preset’s default media component is just the starting point. You can replace it with any compatible media provider. For example, using an HLS source with the video preset:
|
|
114
114
|
|
|
115
115
|
```html
|
|
116
116
|
<video-player>
|
package/docs/guides/quality.md
CHANGED
|
@@ -163,7 +163,7 @@ import '@videojs/html/ui/quality-radio-group';
|
|
|
163
163
|
|
|
164
164
|
## How it works
|
|
165
165
|
|
|
166
|
-
The [quality feature](../reference/api/feature-quality.md) mirrors the media
|
|
166
|
+
The [quality feature](../reference/api/feature-quality.md) mirrors the media component’s video renditions into player state:
|
|
167
167
|
|
|
168
168
|
- `videoRenditionList` holds each rendition’s `id`, `width`, `height`, `bitrate`, `frameRate`, `codec`, and whether it’s `selected`.
|
|
169
169
|
- `activeVideoRendition` is the rendition currently playing. When the engine doesn’t report one directly, the player matches it from the video’s current dimensions.
|
|
@@ -233,7 +233,7 @@ updateButton();
|
|
|
233
233
|
|
|
234
234
|
Confirm that the player includes `qualityFeature`. The live preset omits it; compose a custom player as described above.
|
|
235
235
|
|
|
236
|
-
Quality availability is `'unavailable'`. The source is progressive (no renditions), the manifest hasn’t loaded yet, or the media
|
|
236
|
+
Quality availability is `'unavailable'`. The source is progressive (no renditions), the manifest hasn’t loaded yet, or the media component doesn’t support renditions. Use a streaming media component such as [`<hls-video>`](../reference/components/hls-video.md) or [`<hlsjs-video>`](../reference/components/hlsjs-video.md).
|
|
237
237
|
|
|
238
238
|
### The menu doesn’t render for a single-rendition stream
|
|
239
239
|
|
|
@@ -259,4 +259,4 @@ The pinned rendition exceeds available bandwidth. Selecting “Auto” lets the
|
|
|
259
259
|
|
|
260
260
|
### Guides
|
|
261
261
|
|
|
262
|
-
- [Media sources](./media-sources.md): Set what a media
|
|
262
|
+
- [Media sources](./media-sources.md): Set what a media component plays and how its engine plays it with the structured source property
|
|
@@ -43,7 +43,7 @@ Bundle a single file when you already build your front end. Download the release
|
|
|
43
43
|
Unpack it into whatever your server treats as static files:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
VIDEOJS_VERSION=10.0.
|
|
46
|
+
VIDEOJS_VERSION=10.0.1
|
|
47
47
|
curl -fLO "https://github.com/videojs/v10/releases/download/@videojs/cdn@${VIDEOJS_VERSION}/videojs-cdn-${VIDEOJS_VERSION}.zip"
|
|
48
48
|
unzip "videojs-cdn-${VIDEOJS_VERSION}.zip" -d public/
|
|
49
49
|
```
|
|
@@ -51,7 +51,7 @@ unzip "videojs-cdn-${VIDEOJS_VERSION}.zip" -d public/
|
|
|
51
51
|
Then point a script tag at the player you want:
|
|
52
52
|
|
|
53
53
|
```html
|
|
54
|
-
<script type="module" src="/videojs-cdn-10.0.
|
|
54
|
+
<script type="module" src="/videojs-cdn-10.0.1/video.js"></script>
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
The archive holds the same production bundles the CDN serves, minus sourcemaps and development builds. Every path inside it is relative, so it runs from any origin with no outbound requests. `SHA256SUMS` on the release verifies the download.
|
|
@@ -67,17 +67,17 @@ For Composer-based projects such as Drupal, declare the archive as a package:
|
|
|
67
67
|
"type": "package",
|
|
68
68
|
"package": {
|
|
69
69
|
"name": "videojs/cdn",
|
|
70
|
-
"version": "10.0.
|
|
70
|
+
"version": "10.0.1",
|
|
71
71
|
"type": "drupal-library",
|
|
72
72
|
"dist": {
|
|
73
73
|
"type": "zip",
|
|
74
|
-
"url": "https://github.com/videojs/v10/releases/download/@videojs/cdn@10.0.
|
|
74
|
+
"url": "https://github.com/videojs/v10/releases/download/@videojs/cdn@10.0.1/videojs-cdn-10.0.1.zip"
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
79
|
"require": {
|
|
80
|
-
"videojs/cdn": "10.0.
|
|
80
|
+
"videojs/cdn": "10.0.1"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
```
|
|
@@ -140,4 +140,4 @@ There is no console error. The media module for your format isn’t part of your
|
|
|
140
140
|
### Guides
|
|
141
141
|
|
|
142
142
|
- [Installation](./installation.md): Install Video.js packages and build an accessible, customizable video player with composable controls
|
|
143
|
-
- [Media sources](./media-sources.md): Set what a media
|
|
143
|
+
- [Media sources](./media-sources.md): Set what a media component plays and how its engine plays it with the structured source property
|
package/docs/guides/skins.md
CHANGED
|
@@ -61,10 +61,10 @@ You’ll find a preconfigured player, its typed controller, a skin, and the matc
|
|
|
61
61
|
|
|
62
62
|
| Import | Description | Details |
|
|
63
63
|
| --- | --- | --- |
|
|
64
|
-
| `@videojs/html/video` | General-purpose video player preset with full playback controls. | **Feature bundle:** `videoFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [playbackRate](../reference/api/feature-playback-rate.md), [quality](../reference/api/feature-quality.md), [audioTrack](../reference/api/feature-audio-track.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [fullscreen](../reference/api/feature-fullscreen.md), [pip](../reference/api/feature-pip.md), [remotePlayback](../reference/api/feature-remote-playback.md), [controls](../reference/api/feature-controls.md), [textTrack](../reference/api/feature-text-tracks.md), [error](../reference/api/feature-error.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<video-compat-skin>`, `<video-neutral-skin>`, `<video-skin>`; **Default media
|
|
65
|
-
| `@videojs/html/audio` | Audio-only player preset with playback and volume controls. | **Feature bundle:** `audioFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [playbackRate](../reference/api/feature-playback-rate.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [error](../reference/api/feature-error.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<audio-compat-skin>`, `<audio-neutral-skin>`, `<audio-skin>`; **Default media
|
|
66
|
-
| `@videojs/html/background` | Ambient background video preset with no user controls. | **Feature bundle:** `backgroundFeatures`; **Features:** –; **Skins:** `<background-video-skin>`; **Default media
|
|
67
|
-
| `@videojs/html/live-audio` | Live audio player preset — `audio` minus playback rate, plus the live feature, with a skin that swaps the time slider and time displays for a Live button. | **Feature bundle:** `liveAudioFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [error](../reference/api/feature-error.md), [live](../reference/api/feature-live.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<live-audio-compat-skin>`, `<live-audio-neutral-skin>`, `<live-audio-skin>`; **Default media
|
|
68
|
-
| `@videojs/html/live-video` | Live video player preset — `video` minus playback rate, quality selection, and audio-track selection, plus the live feature, with a skin that swaps the time slider and time displays for a Live button. | **Feature bundle:** `liveVideoFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [fullscreen](../reference/api/feature-fullscreen.md), [pip](../reference/api/feature-pip.md), [remotePlayback](../reference/api/feature-remote-playback.md), [controls](../reference/api/feature-controls.md), [textTrack](../reference/api/feature-text-tracks.md), [error](../reference/api/feature-error.md), [live](../reference/api/feature-live.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<live-video-compat-skin>`, `<live-video-neutral-skin>`, `<live-video-skin>`; **Default media
|
|
64
|
+
| `@videojs/html/video` | General-purpose video player preset with full playback controls. | **Feature bundle:** `videoFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [playbackRate](../reference/api/feature-playback-rate.md), [quality](../reference/api/feature-quality.md), [audioTrack](../reference/api/feature-audio-track.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [fullscreen](../reference/api/feature-fullscreen.md), [pip](../reference/api/feature-pip.md), [remotePlayback](../reference/api/feature-remote-playback.md), [controls](../reference/api/feature-controls.md), [textTrack](../reference/api/feature-text-tracks.md), [error](../reference/api/feature-error.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<video-compat-skin>`, `<video-neutral-skin>`, `<video-skin>`; **Default media component:** `<video>` |
|
|
65
|
+
| `@videojs/html/audio` | Audio-only player preset with playback and volume controls. | **Feature bundle:** `audioFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [playbackRate](../reference/api/feature-playback-rate.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [error](../reference/api/feature-error.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<audio-compat-skin>`, `<audio-neutral-skin>`, `<audio-skin>`; **Default media component:** `<audio>` |
|
|
66
|
+
| `@videojs/html/background` | Ambient background video preset with no user controls. | **Feature bundle:** `backgroundFeatures`; **Features:** –; **Skins:** `<background-video-skin>`; **Default media component:** `<background-video>` |
|
|
67
|
+
| `@videojs/html/live-audio` | Live audio player preset — `audio` minus playback rate, plus the live feature, with a skin that swaps the time slider and time displays for a Live button. | **Feature bundle:** `liveAudioFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [error](../reference/api/feature-error.md), [live](../reference/api/feature-live.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<live-audio-compat-skin>`, `<live-audio-neutral-skin>`, `<live-audio-skin>`; **Default media component:** `<audio>` |
|
|
68
|
+
| `@videojs/html/live-video` | Live video player preset — `video` minus playback rate, quality selection, and audio-track selection, plus the live feature, with a skin that swaps the time slider and time displays for a Live button. | **Feature bundle:** `liveVideoFeatures`; **Features:** [playback](../reference/api/feature-playback.md), [volume](../reference/api/feature-volume.md), [time](../reference/api/feature-time.md), [source](../reference/api/feature-source.md), [buffer](../reference/api/feature-buffer.md), [fullscreen](../reference/api/feature-fullscreen.md), [pip](../reference/api/feature-pip.md), [remotePlayback](../reference/api/feature-remote-playback.md), [controls](../reference/api/feature-controls.md), [textTrack](../reference/api/feature-text-tracks.md), [error](../reference/api/feature-error.md), [live](../reference/api/feature-live.md), [metadata](../reference/api/feature-metadata.md); **Skins:** `<live-video-compat-skin>`, `<live-video-neutral-skin>`, `<live-video-skin>`; **Default media component:** `<video>` |
|
|
69
69
|
|
|
70
70
|
- [Read about presets](./presets.md)
|
|
@@ -140,7 +140,7 @@ storyboard.jpg#xywh=256,0,256,160
|
|
|
140
140
|
## Availability and constraints
|
|
141
141
|
|
|
142
142
|
- Thumbnails require a storyboard asset generated alongside the media; the player doesn’t extract frames from the video itself.
|
|
143
|
-
- Cross-origin storyboards need CORS headers, and `crossorigin` on the media
|
|
143
|
+
- Cross-origin storyboards need CORS headers, and `crossorigin` on the media component for the track to load.
|
|
144
144
|
- Cues load asynchronously. The track appears before its cues are parsed, so previews fill in when the track finishes loading.
|
|
145
145
|
- Storyboard images download on demand; oversized sprite sheets hurt seek-preview responsiveness more than they help quality.
|
|
146
146
|
|
|
@@ -169,7 +169,7 @@ Inside a packaged skin, an `<img slot="thumbnail">` replaces the image the skin
|
|
|
169
169
|
|
|
170
170
|
### Thumbnails don’t appear while scrubbing
|
|
171
171
|
|
|
172
|
-
Confirm the storyboard track is `kind="metadata"` with `label="thumbnails"` and has the `default` attribute — the browser leaves a non-default track disabled and never loads its cues. Then confirm the VTT loads (network panel) and cross-origin assets have CORS headers with `crossorigin` set on the media
|
|
172
|
+
Confirm the storyboard track is `kind="metadata"` with `label="thumbnails"` and has the `default` attribute — the browser leaves a non-default track disabled and never loads its cues. Then confirm the VTT loads (network panel) and cross-origin assets have CORS headers with `crossorigin` set on the media component.
|
|
173
173
|
|
|
174
174
|
### Thumbnails are blurry or slow
|
|
175
175
|
|
|
@@ -75,12 +75,12 @@ Subscribe to the state you want to remember, write it to storage when it changes
|
|
|
75
75
|
- Player state is the single source of truth: it already reflects every change, whatever caused it — your UI, keyboard shortcuts, native controls, or scripts.
|
|
76
76
|
- `store.subscribe(callback)` fires on any state change. The store batches notifications per microtask, so changes made in the same tick produce one callback. There is no per-key subscription on the store: read the state and diff the slice you care about.
|
|
77
77
|
- Feature selectors exported by `@videojs/html` (`selectVolume`, `selectTextTrack`, `selectQuality`, and the rest) read a feature’s slice from any store, returning `undefined` when the feature isn’t present.
|
|
78
|
-
- Restore through the feature actions (`setVolume`, `setMuted`, `selectSubtitlesTrack`, `selectVideoRendition`) rather than poking the media
|
|
78
|
+
- Restore through the feature actions (`setVolume`, `setMuted`, `selectSubtitlesTrack`, `selectVideoRendition`) rather than poking the media component, so state and UI stay consistent.
|
|
79
79
|
- Actions need an attached media target: calling one before the store attaches throws. Check `store.target` and defer the restore until it is set, as the examples do.
|
|
80
80
|
|
|
81
81
|
## Availability and constraints
|
|
82
82
|
|
|
83
|
-
- Video.js does not write preferences to storage. Initial values come from the media
|
|
83
|
+
- Video.js does not write preferences to storage. Initial values come from the media component, track markup, and playback engine.
|
|
84
84
|
- `setVolume` clamps to 0–1 and unmutes above zero. Restore volume first, then call `setMuted(true)` if the saved preference is muted. Calling `setMuted(false)` at zero raises the volume to 0.25.
|
|
85
85
|
- The volume examples leave autoplay off. For muted autoplay, defer volume restoration until a user action: restoring a positive volume unmutes the media and can interrupt autoplay, even if you immediately mute it again.
|
|
86
86
|
- `setVolume` and `setMuted` update `store.state` immediately. A React hook’s selected value updates on the next render.
|