@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
|
@@ -53,7 +53,7 @@ Everything that needs player state goes inside `<video-player>`: skins, containe
|
|
|
53
53
|
```html
|
|
54
54
|
<video-player>
|
|
55
55
|
<video-skin> <!-- skin — includes container + controls -->
|
|
56
|
-
<video src="..."></video> <!-- media
|
|
56
|
+
<video src="..."></video> <!-- media component -->
|
|
57
57
|
</video-skin>
|
|
58
58
|
<my-custom-overlay></my-custom-overlay> <!-- your own element — can use PlayerController -->
|
|
59
59
|
</video-player>
|
|
@@ -63,7 +63,7 @@ Everything that needs player state goes inside `<video-player>`: skins, containe
|
|
|
63
63
|
|
|
64
64
|
Packaged skins make `<video-player>` boxless with `display: contents`. Width, height, positioning, transforms, and `getBoundingClientRect()` do not describe a visible player box there. Put layout and measurements on the [`<media-container>`](./player-container.md) instead.
|
|
65
65
|
|
|
66
|
-
If you omit `<video-skin>` and import only the player and media
|
|
66
|
+
If you omit `<video-skin>` and import only the player and media components, those skin styles are not loaded. The player element still owns state, not layout, so add and style a `<media-container>` instead of using the player itself as the layout surface.
|
|
67
67
|
|
|
68
68
|
## Accessing state
|
|
69
69
|
|
|
@@ -122,7 +122,7 @@ The player’s scope can extend beyond the fullscreen target. Playlists, transcr
|
|
|
122
122
|
Video.js elements clean up after themselves when you remove them from the page:
|
|
123
123
|
|
|
124
124
|
- `<video-player>` and the UI elements destroy themselves two animation frames after they’re removed. Destroying the player also destroys its store.
|
|
125
|
-
- Media
|
|
125
|
+
- Media components such as `<hlsjs-video>` tear down their playback engine in a microtask after they’re removed.
|
|
126
126
|
|
|
127
127
|
Moving an element synchronously, removing it and inserting it elsewhere with no `await` in between, triggers neither. To keep an element through a longer move, add the `keep-alive` attribute:
|
|
128
128
|
|
|
@@ -134,4 +134,4 @@ Moving an element synchronously, removing it and inserting it elsewhere with no
|
|
|
134
134
|
</video-player>
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
`keep-alive` applies only to the element that carries it; descendants don’t inherit it. Set it on every Video.js element in the tree you move. Packaged skins don’t pass it to the controls inside them, so move a player that uses a packaged skin synchronously. An element with `keep-alive` is never destroyed automatically. When you’re finished with it, call `destroy()` on the player and UI elements, and `adapter.destroy()` on media
|
|
137
|
+
`keep-alive` applies only to the element that carries it; descendants don’t inherit it. Set it on every Video.js element in the tree you move. Packaged skins don’t pass it to the controls inside them, so move a player that uses a packaged skin synchronously. An element with `keep-alive` is never destroyed automatically. When you’re finished with it, call `destroy()` on the player and UI elements, and `adapter.destroy()` on media components, which release their engine that way. A destroyed element can’t be reconnected; create a new one instead.
|
|
@@ -21,7 +21,7 @@ import '@videojs/html/media/shaka-video';
|
|
|
21
21
|
Or load it from the [CDN](../../guides/cdn.md):
|
|
22
22
|
|
|
23
23
|
```html
|
|
24
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
24
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/shaka-video.js"></script>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Load a source
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/media/spotify-audio';
|
|
|
17
17
|
Or load it from the [CDN](../../guides/cdn.md):
|
|
18
18
|
|
|
19
19
|
```html
|
|
20
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
20
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/spotify-audio.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Load a source
|
|
@@ -4,13 +4,13 @@ Time-based thumbnail preview component for timeline scrubbing and hover previews
|
|
|
4
4
|
|
|
5
5
|
## Quick Start: Video Track
|
|
6
6
|
|
|
7
|
-
`<media-thumbnail>` can read thumbnail cues directly from your video track. Add a `<track>` with `kind="metadata"` and `label="thumbnails"` to your media
|
|
7
|
+
`<media-thumbnail>` can read thumbnail cues directly from your video track. Add a `<track>` with `kind="metadata"` and `label="thumbnails"` to your media component.
|
|
8
8
|
|
|
9
9
|
[Mux](https://www.mux.com/?utm_source=videojs&utm_campaign=vjs10&utm_content=docs-content) provides this as `storyboard.vtt`:
|
|
10
10
|
|
|
11
11
|
`https://image.mux.com/{PLAYBACK_ID}/storyboard.vtt`
|
|
12
12
|
|
|
13
|
-
That track is cross-origin, and a cross-origin `<track>` only loads when the media
|
|
13
|
+
That track is cross-origin, and a cross-origin `<track>` only loads when the media component is CORS-enabled:
|
|
14
14
|
|
|
15
15
|
```html
|
|
16
16
|
<video src="video.mp4" crossorigin="anonymous">
|
|
@@ -58,7 +58,7 @@ The component picks the latest thumbnail whose `startTime` is less than or equal
|
|
|
58
58
|
|
|
59
59
|
### Cross-origin images
|
|
60
60
|
|
|
61
|
-
Leave `crossOrigin` unset and the
|
|
61
|
+
Leave `crossOrigin` unset and the thumbnail follows the media component. A cross-origin thumbnail `<track>` only loads when the media is CORS-enabled, so the images its cues point at are fetched with that same mode. Skins get this for free, with nothing to thread through.
|
|
62
62
|
|
|
63
63
|
Opt out to fetch them without CORS:
|
|
64
64
|
|
|
@@ -67,11 +67,11 @@ const thumbnail = document.querySelector('media-thumbnail');
|
|
|
67
67
|
thumbnail.crossOrigin = null;
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
Leaving the `crossorigin` attribute off is not the opt out. An absent attribute means “follow the media
|
|
70
|
+
Leaving the `crossorigin` attribute off is not the opt out. An absent attribute means “follow the media component”; only the property set to `null` opts out.
|
|
71
71
|
|
|
72
72
|
An empty value does not opt out either. The [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/crossorigin) reads anything other than `use-credentials` as Anonymous, so it is a value like any other.
|
|
73
73
|
|
|
74
|
-
Thumbnails you supply through `thumbnails` never inherit, since they need not be related to the media
|
|
74
|
+
Thumbnails you supply through `thumbnails` never inherit, since they need not be related to the media component at all. Set `crossOrigin` yourself when those images need it.
|
|
75
75
|
|
|
76
76
|
## Styling
|
|
77
77
|
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/media/tiktok-video';
|
|
|
17
17
|
Or load it from the [CDN](../../guides/cdn.md):
|
|
18
18
|
|
|
19
19
|
```html
|
|
20
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
20
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/tiktok-video.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Load a source
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/media/twitch-video';
|
|
|
17
17
|
Or load it from the [CDN](../../guides/cdn.md):
|
|
18
18
|
|
|
19
19
|
```html
|
|
20
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
20
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/twitch-video.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Load a source
|
|
@@ -10,14 +10,14 @@ The Compat skin of the video preset provides basic controls and plain surfaces,
|
|
|
10
10
|
import '@videojs/html/video/compat-skin';
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Anatomy
|
|
14
14
|
|
|
15
|
-
The skin goes between the player and the media
|
|
15
|
+
The skin goes between the player and the media component. It renders its controls around the media.
|
|
16
16
|
|
|
17
17
|
```html
|
|
18
18
|
<video-player>
|
|
19
19
|
<video-compat-skin>
|
|
20
|
-
<video
|
|
20
|
+
<video></video>
|
|
21
21
|
</video-compat-skin>
|
|
22
22
|
</video-player>
|
|
23
23
|
```
|
|
@@ -38,6 +38,39 @@ See [Show timeline thumbnail previews](../../guides/thumbnails.md) for complete
|
|
|
38
38
|
|
|
39
39
|
Packaged skins style themselves and expose a small set of public CSS custom properties. Everything else inside the skin is private and may change between releases. [Customize skins](../../guides/customize-skins.md#style-a-packaged-skin) documents the properties. For deeper changes, the Video.js registry provides the skin files.
|
|
40
40
|
|
|
41
|
+
## Examples
|
|
42
|
+
|
|
43
|
+
### Basic Usage
|
|
44
|
+
|
|
45
|
+
**index.html**
|
|
46
|
+
|
|
47
|
+
```html
|
|
48
|
+
<video-player poster="https://image.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/thumbnail.jpg">
|
|
49
|
+
<video-compat-skin class="html-video-compat-skin-basic">
|
|
50
|
+
<video src="https://stream.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/highest.mp4" playsinline crossorigin="anonymous">
|
|
51
|
+
<track kind="metadata" label="thumbnails" src="https://image.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/storyboard.vtt" default />
|
|
52
|
+
</video>
|
|
53
|
+
</video-compat-skin>
|
|
54
|
+
</video-player>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**index.css**
|
|
58
|
+
|
|
59
|
+
```css
|
|
60
|
+
.html-video-compat-skin-basic {
|
|
61
|
+
display: block;
|
|
62
|
+
width: 100%;
|
|
63
|
+
aspect-ratio: 16 / 9;
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**index.ts**
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
import '@videojs/html/video/player';
|
|
71
|
+
import '@videojs/html/video/compat-skin';
|
|
72
|
+
```
|
|
73
|
+
|
|
41
74
|
## Own the UI
|
|
42
75
|
|
|
43
76
|
Packaged skins keep their controls and layout inside Video.js. When you need to add, remove, rearrange, or deeply restyle controls, use Shadcn to add the skin source to your project. Its components, layout, styles, and interactions become local files you can change.
|
|
@@ -13,17 +13,17 @@ import '@videojs/html/video/neutral-skin';
|
|
|
13
13
|
The import registers the skin and every UI element it composes. The [CDN](../../guides/cdn.md) player bundle registers this skin together with its player:
|
|
14
14
|
|
|
15
15
|
```html
|
|
16
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
16
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/video-neutral.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Anatomy
|
|
20
20
|
|
|
21
|
-
The skin goes between the player and the media
|
|
21
|
+
The skin goes between the player and the media component. It renders its controls around the media.
|
|
22
22
|
|
|
23
23
|
```html
|
|
24
24
|
<video-player>
|
|
25
25
|
<video-neutral-skin>
|
|
26
|
-
<video
|
|
26
|
+
<video></video>
|
|
27
27
|
</video-neutral-skin>
|
|
28
28
|
</video-player>
|
|
29
29
|
```
|
|
@@ -44,6 +44,39 @@ See [Show timeline thumbnail previews](../../guides/thumbnails.md) for complete
|
|
|
44
44
|
|
|
45
45
|
Packaged skins style themselves and expose a small set of public CSS custom properties. Everything else inside the skin is private and may change between releases. [Customize skins](../../guides/customize-skins.md#style-a-packaged-skin) documents the properties. For deeper changes, the Video.js registry provides the skin files.
|
|
46
46
|
|
|
47
|
+
## Examples
|
|
48
|
+
|
|
49
|
+
### Basic Usage
|
|
50
|
+
|
|
51
|
+
**index.html**
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<video-player poster="https://image.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/thumbnail.jpg">
|
|
55
|
+
<video-neutral-skin class="html-video-neutral-skin-basic">
|
|
56
|
+
<video src="https://stream.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/highest.mp4" playsinline crossorigin="anonymous">
|
|
57
|
+
<track kind="metadata" label="thumbnails" src="https://image.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/storyboard.vtt" default />
|
|
58
|
+
</video>
|
|
59
|
+
</video-neutral-skin>
|
|
60
|
+
</video-player>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**index.css**
|
|
64
|
+
|
|
65
|
+
```css
|
|
66
|
+
.html-video-neutral-skin-basic {
|
|
67
|
+
display: block;
|
|
68
|
+
width: 100%;
|
|
69
|
+
aspect-ratio: 16 / 9;
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**index.ts**
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
import '@videojs/html/video/player';
|
|
77
|
+
import '@videojs/html/video/neutral-skin';
|
|
78
|
+
```
|
|
79
|
+
|
|
47
80
|
## Own the UI
|
|
48
81
|
|
|
49
82
|
Packaged skins keep their controls and layout inside Video.js. When you need to add, remove, rearrange, or deeply restyle controls, use Shadcn to add the skin source to your project. Its components, layout, styles, and interactions become local files you can change.
|
|
@@ -13,17 +13,17 @@ import '@videojs/html/video/skin';
|
|
|
13
13
|
The import registers the skin and every UI element it composes. The [CDN](../../guides/cdn.md) player bundle registers this skin together with its player:
|
|
14
14
|
|
|
15
15
|
```html
|
|
16
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
16
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/video.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Anatomy
|
|
20
20
|
|
|
21
|
-
The skin goes between the player and the media
|
|
21
|
+
The skin goes between the player and the media component. It renders its controls around the media.
|
|
22
22
|
|
|
23
23
|
```html
|
|
24
24
|
<video-player>
|
|
25
25
|
<video-skin>
|
|
26
|
-
<video
|
|
26
|
+
<video></video>
|
|
27
27
|
</video-skin>
|
|
28
28
|
</video-player>
|
|
29
29
|
```
|
|
@@ -44,6 +44,39 @@ See [Show timeline thumbnail previews](../../guides/thumbnails.md) for complete
|
|
|
44
44
|
|
|
45
45
|
Packaged skins style themselves and expose a small set of public CSS custom properties. Everything else inside the skin is private and may change between releases. [Customize skins](../../guides/customize-skins.md#style-a-packaged-skin) documents the properties. For deeper changes, the Video.js registry provides the skin files.
|
|
46
46
|
|
|
47
|
+
## Examples
|
|
48
|
+
|
|
49
|
+
### Basic Usage
|
|
50
|
+
|
|
51
|
+
**index.html**
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<video-player poster="https://image.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/thumbnail.jpg">
|
|
55
|
+
<video-skin class="html-video-skin-basic">
|
|
56
|
+
<video src="https://stream.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/highest.mp4" playsinline crossorigin="anonymous">
|
|
57
|
+
<track kind="metadata" label="thumbnails" src="https://image.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/storyboard.vtt" default />
|
|
58
|
+
</video>
|
|
59
|
+
</video-skin>
|
|
60
|
+
</video-player>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**index.css**
|
|
64
|
+
|
|
65
|
+
```css
|
|
66
|
+
.html-video-skin-basic {
|
|
67
|
+
display: block;
|
|
68
|
+
width: 100%;
|
|
69
|
+
aspect-ratio: 16 / 9;
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**index.ts**
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
import '@videojs/html/video/player';
|
|
77
|
+
import '@videojs/html/video/skin';
|
|
78
|
+
```
|
|
79
|
+
|
|
47
80
|
## Own the UI
|
|
48
81
|
|
|
49
82
|
Packaged skins keep their controls and layout inside Video.js. When you need to add, remove, rearrange, or deeply restyle controls, use Shadcn to add the skin source to your project. Its components, layout, styles, and interactions become local files you can change.
|
|
@@ -4,7 +4,7 @@ Native video playback that can provide media to a Video.js player
|
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
7
|
-
The media
|
|
7
|
+
The media component is the browser’s native `<video>`. Import the video player registration when it should provide media to Video.js:
|
|
8
8
|
|
|
9
9
|
```ts
|
|
10
10
|
import '@videojs/html/video/player';
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/media/vimeo-video';
|
|
|
17
17
|
Or load it from the [CDN](../../guides/cdn.md):
|
|
18
18
|
|
|
19
19
|
```html
|
|
20
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
20
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/vimeo-video.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Load a source
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/media/wistia-video';
|
|
|
17
17
|
Or load it from the [CDN](../../guides/cdn.md):
|
|
18
18
|
|
|
19
19
|
```html
|
|
20
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
20
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/wistia-video.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Load a source
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/media/youtube-video';
|
|
|
17
17
|
Or load it from the [CDN](../../guides/cdn.md):
|
|
18
18
|
|
|
19
19
|
```html
|
|
20
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
20
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/youtube-video.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Load a source
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@videojs/html",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "Video.js 10 for HTML, Vue, and Svelte: player custom elements and skins for video and audio",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"audio",
|
|
@@ -164,51 +164,49 @@
|
|
|
164
164
|
"access": "public"
|
|
165
165
|
},
|
|
166
166
|
"dependencies": {
|
|
167
|
-
"@videojs/core": "10.0.
|
|
168
|
-
"@videojs/element": "10.0.
|
|
169
|
-
"@videojs/media": "10.0.
|
|
170
|
-
"@videojs/native-hls-video": "10.0.
|
|
171
|
-
"@videojs/spf": "10.0.
|
|
172
|
-
"@videojs/store": "10.0.
|
|
173
|
-
"@videojs/utils": "10.0.
|
|
167
|
+
"@videojs/core": "10.0.1",
|
|
168
|
+
"@videojs/element": "10.0.1",
|
|
169
|
+
"@videojs/media": "10.0.1",
|
|
170
|
+
"@videojs/native-hls-video": "10.0.1",
|
|
171
|
+
"@videojs/spf": "10.0.1",
|
|
172
|
+
"@videojs/store": "10.0.1",
|
|
173
|
+
"@videojs/utils": "10.0.1"
|
|
174
174
|
},
|
|
175
175
|
"devDependencies": {
|
|
176
|
-
"@
|
|
177
|
-
"@videojs/
|
|
178
|
-
"@videojs/
|
|
179
|
-
"@videojs/
|
|
180
|
-
"@videojs/
|
|
181
|
-
"@videojs/
|
|
182
|
-
"@videojs/mux-
|
|
183
|
-
"@videojs/mux-
|
|
184
|
-
"@videojs/
|
|
185
|
-
"@videojs/
|
|
186
|
-
"@videojs/
|
|
187
|
-
"@videojs/
|
|
188
|
-
"@videojs/
|
|
189
|
-
"@videojs/
|
|
190
|
-
"@videojs/
|
|
191
|
-
"@videojs/
|
|
192
|
-
"@videojs/youtube-video": "10.0.0-rc.5",
|
|
176
|
+
"@videojs/cloudflare-video": "10.0.1",
|
|
177
|
+
"@videojs/dash-video": "10.0.1",
|
|
178
|
+
"@videojs/google-cast": "10.0.1",
|
|
179
|
+
"@videojs/hlsjs-video": "10.0.1",
|
|
180
|
+
"@videojs/icons": "10.0.1",
|
|
181
|
+
"@videojs/mux-audio": "10.0.1",
|
|
182
|
+
"@videojs/mux-data": "10.0.1",
|
|
183
|
+
"@videojs/mux-video": "10.0.1",
|
|
184
|
+
"@videojs/shaka-video": "10.0.1",
|
|
185
|
+
"@videojs/skins": "10.0.1",
|
|
186
|
+
"@videojs/spotify-audio": "10.0.1",
|
|
187
|
+
"@videojs/tiktok-video": "10.0.1",
|
|
188
|
+
"@videojs/twitch-video": "10.0.1",
|
|
189
|
+
"@videojs/vimeo-video": "10.0.1",
|
|
190
|
+
"@videojs/wistia-video": "10.0.1",
|
|
191
|
+
"@videojs/youtube-video": "10.0.1",
|
|
193
192
|
"happy-dom": "^20.11.1",
|
|
194
|
-
"typescript": "^6.0.2",
|
|
195
193
|
"vite-plus": "1.0.0"
|
|
196
194
|
},
|
|
197
195
|
"peerDependencies": {
|
|
198
|
-
"@videojs/cloudflare-video": "10.0.
|
|
199
|
-
"@videojs/dash-video": "10.0.
|
|
200
|
-
"@videojs/google-cast": "10.0.
|
|
201
|
-
"@videojs/hlsjs-video": "10.0.
|
|
202
|
-
"@videojs/mux-audio": "10.0.
|
|
203
|
-
"@videojs/mux-data": "10.0.
|
|
204
|
-
"@videojs/mux-video": "10.0.
|
|
205
|
-
"@videojs/shaka-video": "10.0.
|
|
206
|
-
"@videojs/spotify-audio": "10.0.
|
|
207
|
-
"@videojs/tiktok-video": "10.0.
|
|
208
|
-
"@videojs/twitch-video": "10.0.
|
|
209
|
-
"@videojs/vimeo-video": "10.0.
|
|
210
|
-
"@videojs/wistia-video": "10.0.
|
|
211
|
-
"@videojs/youtube-video": "10.0.
|
|
196
|
+
"@videojs/cloudflare-video": "10.0.1",
|
|
197
|
+
"@videojs/dash-video": "10.0.1",
|
|
198
|
+
"@videojs/google-cast": "10.0.1",
|
|
199
|
+
"@videojs/hlsjs-video": "10.0.1",
|
|
200
|
+
"@videojs/mux-audio": "10.0.1",
|
|
201
|
+
"@videojs/mux-data": "10.0.1",
|
|
202
|
+
"@videojs/mux-video": "10.0.1",
|
|
203
|
+
"@videojs/shaka-video": "10.0.1",
|
|
204
|
+
"@videojs/spotify-audio": "10.0.1",
|
|
205
|
+
"@videojs/tiktok-video": "10.0.1",
|
|
206
|
+
"@videojs/twitch-video": "10.0.1",
|
|
207
|
+
"@videojs/vimeo-video": "10.0.1",
|
|
208
|
+
"@videojs/wistia-video": "10.0.1",
|
|
209
|
+
"@videojs/youtube-video": "10.0.1"
|
|
212
210
|
},
|
|
213
211
|
"peerDependenciesMeta": {
|
|
214
212
|
"@videojs/cloudflare-video": {
|