@videojs/html 10.0.0 → 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/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-audio/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/define/video/compat-skin2.js.map +1 -1
- package/dist/dev/define/video/skin2.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 -2
- package/docs/guides/installation-shadcn.md +4 -4
- package/docs/guides/installation-svelte.md +2 -2
- package/docs/guides/installation-vue.md +2 -2
- package/docs/guides/installation.md +2 -2
- package/docs/guides/internationalization.md +5 -5
- package/docs/guides/live-streams.md +3 -3
- package/docs/guides/llms.txt +4 -3
- 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/llms.txt +4 -3
- 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
|
@@ -13,27 +13,58 @@ import '@videojs/html/live-audio/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/live-audio-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
|
<live-audio-player>
|
|
25
25
|
<live-audio-neutral-skin>
|
|
26
|
-
<mux-audio
|
|
26
|
+
<mux-audio></mux-audio>
|
|
27
27
|
</live-audio-neutral-skin>
|
|
28
28
|
</live-audio-player>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
This uses the [Mux audio element](./mux-audio.md): a plain `<audio>` can’t play HLS in most browsers, and this element reports the live playback state the skin’s Live button needs. See [Play live streams](../../guides/live-streams.md).
|
|
32
32
|
|
|
33
33
|
## Styling
|
|
34
34
|
|
|
35
35
|
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.
|
|
36
36
|
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
### Basic Usage
|
|
40
|
+
|
|
41
|
+
**index.html**
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<live-audio-player>
|
|
45
|
+
<live-audio-neutral-skin class="html-live-audio-neutral-skin-basic">
|
|
46
|
+
<mux-audio src="https://stream.mux.com/v69RSHhFelSm4701snP22dYz2jICy4E4FUyk02rW4gxRM.m3u8" crossorigin="anonymous"></mux-audio>
|
|
47
|
+
</live-audio-neutral-skin>
|
|
48
|
+
</live-audio-player>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**index.css**
|
|
52
|
+
|
|
53
|
+
```css
|
|
54
|
+
.html-live-audio-neutral-skin-basic {
|
|
55
|
+
display: block;
|
|
56
|
+
width: 100%;
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**index.ts**
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import '@videojs/html/live-audio/player';
|
|
64
|
+
import '@videojs/html/live-audio/neutral-skin';
|
|
65
|
+
import '@videojs/html/media/mux-audio';
|
|
66
|
+
```
|
|
67
|
+
|
|
37
68
|
## Own the UI
|
|
38
69
|
|
|
39
70
|
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,27 +13,58 @@ import '@videojs/html/live-audio/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/live-audio.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
|
<live-audio-player>
|
|
25
25
|
<live-audio-skin>
|
|
26
|
-
<mux-audio
|
|
26
|
+
<mux-audio></mux-audio>
|
|
27
27
|
</live-audio-skin>
|
|
28
28
|
</live-audio-player>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
This uses the [Mux audio element](./mux-audio.md): a plain `<audio>` can’t play HLS in most browsers, and this element reports the live playback state the skin’s Live button needs. See [Play live streams](../../guides/live-streams.md).
|
|
32
32
|
|
|
33
33
|
## Styling
|
|
34
34
|
|
|
35
35
|
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.
|
|
36
36
|
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
### Basic Usage
|
|
40
|
+
|
|
41
|
+
**index.html**
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<live-audio-player>
|
|
45
|
+
<live-audio-skin class="html-live-audio-skin-basic">
|
|
46
|
+
<mux-audio src="https://stream.mux.com/v69RSHhFelSm4701snP22dYz2jICy4E4FUyk02rW4gxRM.m3u8" crossorigin="anonymous"></mux-audio>
|
|
47
|
+
</live-audio-skin>
|
|
48
|
+
</live-audio-player>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**index.css**
|
|
52
|
+
|
|
53
|
+
```css
|
|
54
|
+
.html-live-audio-skin-basic {
|
|
55
|
+
display: block;
|
|
56
|
+
width: 100%;
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**index.ts**
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import '@videojs/html/live-audio/player';
|
|
64
|
+
import '@videojs/html/live-audio/skin';
|
|
65
|
+
import '@videojs/html/media/mux-audio';
|
|
66
|
+
```
|
|
67
|
+
|
|
37
68
|
## Own the UI
|
|
38
69
|
|
|
39
70
|
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.
|
|
@@ -10,19 +10,19 @@ The Compat skin of the live video preset provides basic controls and plain surfa
|
|
|
10
10
|
import '@videojs/html/live-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
|
<live-video-player>
|
|
19
19
|
<live-video-compat-skin>
|
|
20
|
-
<hls-video
|
|
20
|
+
<hls-video></hls-video>
|
|
21
21
|
</live-video-compat-skin>
|
|
22
22
|
</live-video-player>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
This uses the lightweight [HLS video element](./hls-video.md) because most browsers can’t play HLS streams with a plain `<video>`. See [Play live streams](../../guides/live-streams.md).
|
|
26
26
|
|
|
27
27
|
## Poster
|
|
28
28
|
|
|
@@ -34,6 +34,38 @@ See [Add a poster and loading placeholder](../../guides/poster.md) for complete
|
|
|
34
34
|
|
|
35
35
|
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.
|
|
36
36
|
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
### Basic Usage
|
|
40
|
+
|
|
41
|
+
**index.html**
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<live-video-player>
|
|
45
|
+
<live-video-compat-skin class="html-live-video-compat-skin-basic">
|
|
46
|
+
<hls-video src="https://stream.mux.com/v69RSHhFelSm4701snP22dYz2jICy4E4FUyk02rW4gxRM.m3u8" playsinline crossorigin="anonymous"></hls-video>
|
|
47
|
+
</live-video-compat-skin>
|
|
48
|
+
</live-video-player>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**index.css**
|
|
52
|
+
|
|
53
|
+
```css
|
|
54
|
+
.html-live-video-compat-skin-basic {
|
|
55
|
+
display: block;
|
|
56
|
+
width: 100%;
|
|
57
|
+
aspect-ratio: 16 / 9;
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**index.ts**
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
import '@videojs/html/live-video/player';
|
|
65
|
+
import '@videojs/html/live-video/compat-skin';
|
|
66
|
+
import '@videojs/html/media/hls-video';
|
|
67
|
+
```
|
|
68
|
+
|
|
37
69
|
## Own the UI
|
|
38
70
|
|
|
39
71
|
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,22 +13,22 @@ import '@videojs/html/live-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/live-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
|
<live-video-player>
|
|
25
25
|
<live-video-neutral-skin>
|
|
26
|
-
<hls-video
|
|
26
|
+
<hls-video></hls-video>
|
|
27
27
|
</live-video-neutral-skin>
|
|
28
28
|
</live-video-player>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
This uses the lightweight [HLS video element](./hls-video.md) because most browsers can’t play HLS streams with a plain `<video>`. See [Play live streams](../../guides/live-streams.md).
|
|
32
32
|
|
|
33
33
|
## Poster
|
|
34
34
|
|
|
@@ -40,6 +40,38 @@ See [Add a poster and loading placeholder](../../guides/poster.md) for complete
|
|
|
40
40
|
|
|
41
41
|
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.
|
|
42
42
|
|
|
43
|
+
## Examples
|
|
44
|
+
|
|
45
|
+
### Basic Usage
|
|
46
|
+
|
|
47
|
+
**index.html**
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<live-video-player>
|
|
51
|
+
<live-video-neutral-skin class="html-live-video-neutral-skin-basic">
|
|
52
|
+
<hls-video src="https://stream.mux.com/v69RSHhFelSm4701snP22dYz2jICy4E4FUyk02rW4gxRM.m3u8" playsinline crossorigin="anonymous"></hls-video>
|
|
53
|
+
</live-video-neutral-skin>
|
|
54
|
+
</live-video-player>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**index.css**
|
|
58
|
+
|
|
59
|
+
```css
|
|
60
|
+
.html-live-video-neutral-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/live-video/player';
|
|
71
|
+
import '@videojs/html/live-video/neutral-skin';
|
|
72
|
+
import '@videojs/html/media/hls-video';
|
|
73
|
+
```
|
|
74
|
+
|
|
43
75
|
## Own the UI
|
|
44
76
|
|
|
45
77
|
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,22 +13,22 @@ import '@videojs/html/live-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/live-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
|
<live-video-player>
|
|
25
25
|
<live-video-skin>
|
|
26
|
-
<hls-video
|
|
26
|
+
<hls-video></hls-video>
|
|
27
27
|
</live-video-skin>
|
|
28
28
|
</live-video-player>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
This uses the lightweight [HLS video element](./hls-video.md) because most browsers can’t play HLS streams with a plain `<video>`. See [Play live streams](../../guides/live-streams.md).
|
|
32
32
|
|
|
33
33
|
## Poster
|
|
34
34
|
|
|
@@ -40,6 +40,38 @@ See [Add a poster and loading placeholder](../../guides/poster.md) for complete
|
|
|
40
40
|
|
|
41
41
|
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.
|
|
42
42
|
|
|
43
|
+
## Examples
|
|
44
|
+
|
|
45
|
+
### Basic Usage
|
|
46
|
+
|
|
47
|
+
**index.html**
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<live-video-player>
|
|
51
|
+
<live-video-skin class="html-live-video-skin-basic">
|
|
52
|
+
<hls-video src="https://stream.mux.com/v69RSHhFelSm4701snP22dYz2jICy4E4FUyk02rW4gxRM.m3u8" playsinline crossorigin="anonymous"></hls-video>
|
|
53
|
+
</live-video-skin>
|
|
54
|
+
</live-video-player>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**index.css**
|
|
58
|
+
|
|
59
|
+
```css
|
|
60
|
+
.html-live-video-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/live-video/player';
|
|
71
|
+
import '@videojs/html/live-video/skin';
|
|
72
|
+
import '@videojs/html/media/hls-video';
|
|
73
|
+
```
|
|
74
|
+
|
|
43
75
|
## Own the UI
|
|
44
76
|
|
|
45
77
|
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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Video.js v10 — HTML Components
|
|
2
2
|
|
|
3
|
-
> API reference for skins, media components, extensions, and interface components. Bundled with `@videojs/html` v10.0.
|
|
3
|
+
> API reference for skins, media components, extensions, and interface components. Bundled with `@videojs/html` v10.0.1. Links are relative paths to files in this directory.
|
|
4
4
|
|
|
5
5
|
## Layout
|
|
6
6
|
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/media/mux-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/mux-audio.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Analytics and casting
|
|
@@ -91,7 +91,7 @@ These Video.js-specific attributes configure media behavior:
|
|
|
91
91
|
| `liveEdgeStart` | `number` | — | Read-only. Presentation time marking the start of the Live Edge Window. Derived from the delegate on every read; `NaN` when no delegate is attached or the stream is not live. |
|
|
92
92
|
| `preload` | `MediaPreloadType` | `'metadata'` | Preload type (`'none'` / `'metadata'` / `'auto'`). |
|
|
93
93
|
| `source` | `{ type?: 'application/vnd.apple.mpegurl' \| 'video/mp4' \| string & {}; preferPlayback?: 'mse' \| 'native' \| string & {}; maxAutoResolution?: '270p' \| '360p' \| '480p' \| '540p' \| '720p' \| '1080p' \| '1440p' \| '2160p'; capRenditionToPlayerSize?: boolean; minAutoResolution?: '270p' \| '360p' \| '480p' \| '540p' \| '720p' \| '1080p' \| '1440p' \| '2160p'; engine?: HlsEngineConfig; src?: string; playbackId?: string; customDomain?: string; playback?: MuxPlaybackParams; poster?: MuxPosterParams; storyboard?: MuxStoryboardParams; drm?: MuxDrmParams } \| null` | `null` | Structured Mux source. Setting it derives `src` from the playback ID, custom domain, and `playback` params (appended as `snake_case` query params). A `playback.token` replaces all other params — signed URLs bake them into the token. Engine options live under `engine`. A `drm.token` fills in `drm` itself: Mux's FairPlay, Widevine, and PlayReady license servers for this playback ID, so protected media plays whichever path the browser takes. License servers named alongside the token win, key by key, for content Mux does not license. `playback.maxResolution` and `playback.minResolution` are server-side: they decide which renditions Mux puts in the manifest at all. The inherited `maxAutoResolution` and `minAutoResolution` only look like their pair — those are client-side and bound which of the renditions that *do* arrive adaptive selection reaches for. The two halves are independent. |
|
|
94
|
-
| `src` | `string` | `''` | Media source URL. Setting a Mux stream URL (`https://stream.mux.com/<playback-id>.m3u8
|
|
94
|
+
| `src` | `string` | `''` | Media source URL. Setting a Mux stream URL (`https://stream.mux.com/<playback-id>.m3u8?...`, with or without the `.m3u8` extension) extracts the playback ID and query params into `source`; other URLs are kept as a plain `source.src`. Only playback options carry over. Mux identity comes from the URL, and the signed `poster`, `storyboard`, and `drm` tokens are scoped to a playback ID, so carrying them onto a different source would build rejected URLs. |
|
|
95
95
|
| `streamType` | `'on-demand' \| 'live' \| 'unknown'` | `'unknown'` | Current stream type (`'on-demand'` / `'live'` / `'unknown'`). |
|
|
96
96
|
| `targetLiveWindow` | `number` | — | Read-only. Seekable range size for live content. `0` for standard live, `Infinity` for DVR, `NaN` for on-demand or unknown. Fires `targetlivewindowchange` when the value changes (bridged from the delegate). |
|
|
97
97
|
| `videoRenditions` | `VideoRenditionListLike \| undefined` | — | Read-only. Selectable quality levels, populated only while the hls.js (MSE) engine is active; otherwise `undefined`. |
|
|
@@ -15,7 +15,7 @@ import '@videojs/html/media/mux-background-video';
|
|
|
15
15
|
Or load it from the [CDN](../../guides/cdn.md):
|
|
16
16
|
|
|
17
17
|
```html
|
|
18
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
18
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/media/mux-background-video.js"></script>
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Load a Mux source
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/extensions/mux-data';
|
|
|
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/extensions/mux-data.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Anatomy
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/media/mux-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/mux-video.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Load a source
|
|
@@ -170,7 +170,7 @@ These Video.js-specific attributes configure media behavior:
|
|
|
170
170
|
| `liveEdgeStart` | `number` | — | Read-only. Presentation time marking the start of the Live Edge Window. Derived from the delegate on every read; `NaN` when no delegate is attached or the stream is not live. |
|
|
171
171
|
| `preload` | `MediaPreloadType` | `'metadata'` | Preload type (`'none'` / `'metadata'` / `'auto'`). |
|
|
172
172
|
| `source` | `{ type?: 'application/vnd.apple.mpegurl' \| 'video/mp4' \| string & {}; preferPlayback?: 'mse' \| 'native' \| string & {}; maxAutoResolution?: '270p' \| '360p' \| '480p' \| '540p' \| '720p' \| '1080p' \| '1440p' \| '2160p'; capRenditionToPlayerSize?: boolean; minAutoResolution?: '270p' \| '360p' \| '480p' \| '540p' \| '720p' \| '1080p' \| '1440p' \| '2160p'; engine?: HlsEngineConfig; src?: string; playbackId?: string; customDomain?: string; playback?: MuxPlaybackParams; poster?: MuxPosterParams; storyboard?: MuxStoryboardParams; drm?: MuxDrmParams } \| null` | `null` | Structured Mux source. Setting it derives `src` from the playback ID, custom domain, and `playback` params (appended as `snake_case` query params). A `playback.token` replaces all other params — signed URLs bake them into the token. Engine options live under `engine`. A `drm.token` fills in `drm` itself: Mux's FairPlay, Widevine, and PlayReady license servers for this playback ID, so protected media plays whichever path the browser takes. License servers named alongside the token win, key by key, for content Mux does not license. `playback.maxResolution` and `playback.minResolution` are server-side: they decide which renditions Mux puts in the manifest at all. The inherited `maxAutoResolution` and `minAutoResolution` only look like their pair — those are client-side and bound which of the renditions that *do* arrive adaptive selection reaches for. The two halves are independent. |
|
|
173
|
-
| `src` | `string` | `''` | Media source URL. Setting a Mux stream URL (`https://stream.mux.com/<playback-id>.m3u8
|
|
173
|
+
| `src` | `string` | `''` | Media source URL. Setting a Mux stream URL (`https://stream.mux.com/<playback-id>.m3u8?...`, with or without the `.m3u8` extension) extracts the playback ID and query params into `source`; other URLs are kept as a plain `source.src`. Only playback options carry over. Mux identity comes from the URL, and the signed `poster`, `storyboard`, and `drm` tokens are scoped to a playback ID, so carrying them onto a different source would build rejected URLs. |
|
|
174
174
|
| `streamType` | `'on-demand' \| 'live' \| 'unknown'` | `'unknown'` | Current stream type (`'on-demand'` / `'live'` / `'unknown'`). |
|
|
175
175
|
| `targetLiveWindow` | `number` | — | Read-only. Seekable range size for live content. `0` for standard live, `Infinity` for DVR, `NaN` for on-demand or unknown. Fires `targetlivewindowchange` when the value changes (bridged from the delegate). |
|
|
176
176
|
| `videoRenditions` | `VideoRenditionListLike \| undefined` | — | Read-only. Selectable quality levels, populated only while the hls.js (MSE) engine is active; otherwise `undefined`. |
|
|
@@ -13,7 +13,7 @@ import '@videojs/html/media/native-hls-video';
|
|
|
13
13
|
Or load it from the [CDN](../../guides/cdn.md):
|
|
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/media/native-hls-video.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Examples
|
|
@@ -73,7 +73,7 @@ Custom video elements such as `<mux-video>` and `<hlsjs-video>` do not create th
|
|
|
73
73
|
|
|
74
74
|
### Media attachment
|
|
75
75
|
|
|
76
|
-
Media discovery is handled by the player provider, not the container.
|
|
76
|
+
Media discovery is handled by the player provider, not the container. Media components like `<hlsjs-video>` register themselves via context when they connect. Plain `<video>` and `<audio>` elements are tracked automatically, including when they are added, removed, or replaced after connection. No `slot="media"` attribute is needed.
|
|
77
77
|
|
|
78
78
|
### Interaction surface
|
|
79
79
|
|
|
@@ -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.
|