@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
|
@@ -13,17 +13,17 @@ import '@videojs/html/background/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/background.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 sizes the ambient video and renders no visible controls.
|
|
22
22
|
|
|
23
23
|
```html
|
|
24
24
|
<background-video-player>
|
|
25
25
|
<background-video-skin>
|
|
26
|
-
<background-video
|
|
26
|
+
<background-video></background-video>
|
|
27
27
|
</background-video-skin>
|
|
28
28
|
</background-video-player>
|
|
29
29
|
```
|
|
@@ -32,6 +32,38 @@ The skin goes between the player and the media element. It sizes the ambient vid
|
|
|
32
32
|
|
|
33
33
|
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.
|
|
34
34
|
|
|
35
|
+
## Examples
|
|
36
|
+
|
|
37
|
+
### Basic Usage
|
|
38
|
+
|
|
39
|
+
**index.html**
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<background-video-player>
|
|
43
|
+
<background-video-skin class="html-background-video-skin-basic">
|
|
44
|
+
<background-video src="https://stream.mux.com/601n4w1fq88NJiVpzvrQQeQfNnnjjfKMIN7dCGAEarTs/highest.mp4"></background-video>
|
|
45
|
+
</background-video-skin>
|
|
46
|
+
</background-video-player>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**index.css**
|
|
50
|
+
|
|
51
|
+
```css
|
|
52
|
+
.html-background-video-skin-basic {
|
|
53
|
+
display: block;
|
|
54
|
+
width: 100%;
|
|
55
|
+
aspect-ratio: 16 / 9;
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**index.ts**
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
import '@videojs/html/background/player';
|
|
63
|
+
import '@videojs/html/background/skin';
|
|
64
|
+
import '@videojs/html/background/video';
|
|
65
|
+
```
|
|
66
|
+
|
|
35
67
|
## Own the UI
|
|
36
68
|
|
|
37
69
|
Owning the UI means keeping its components, layout, styles, and interactions as local files you can change. The [Shadcn installation guide](../../guides/installation-shadcn.md) adds that source for supported skins. The registry does not provide background video skin source because it has no control UI. Follow [Add a background video](../../guides/background-video.md) to compose the media directly, then add only the UI your use case needs.
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/media/background-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/background-video.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Examples
|
|
@@ -24,7 +24,7 @@ The button derives its presentation from `availability`:
|
|
|
24
24
|
- **`"unavailable"`** — the button remains visible and focusable with `aria-disabled="true"` and `data-disabled`, but does not open the picker. This lets a tooltip explain that no Cast device is reachable.
|
|
25
25
|
- **`"available"`** — the button is fully interactive unless the `disabled` prop is set.
|
|
26
26
|
|
|
27
|
-
Configurable Cast sessions come from the [Google Cast extension](./google-cast.md). Add it to the player next to your media
|
|
27
|
+
Configurable Cast sessions come from the [Google Cast extension](./google-cast.md). Add it to the player next to your media component; without it the button drives the browser’s native Remote Playback API instead, which offers no receiver or load-request configuration. See [Cast to AirPlay and Chromecast](../../guides/casting.md) for the complete setup.
|
|
28
28
|
|
|
29
29
|
## Styling
|
|
30
30
|
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/media/cloudflare-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/cloudflare-video.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Load a source
|
|
@@ -21,7 +21,7 @@ import '@videojs/html/media/dash-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/dash-video.js"></script>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Examples
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/extensions/google-cast';
|
|
|
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/google-cast.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Anatomy
|
|
@@ -13,7 +13,7 @@ import '@videojs/html/media/hls-audio';
|
|
|
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/hls-audio.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Examples
|
|
@@ -15,7 +15,7 @@ import '@videojs/html/media/hls-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/hls-background-video.js"></script>
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Source behavior
|
|
@@ -13,7 +13,7 @@ import '@videojs/html/media/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/hls-video.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Examples
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/media/hlsjs-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/hlsjs-video.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Examples
|
|
@@ -10,24 +10,55 @@ The Compat skin of the live audio preset provides basic controls and plain surfa
|
|
|
10
10
|
import '@videojs/html/live-audio/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-audio-player>
|
|
19
19
|
<live-audio-compat-skin>
|
|
20
|
-
<mux-audio
|
|
20
|
+
<mux-audio></mux-audio>
|
|
21
21
|
</live-audio-compat-skin>
|
|
22
22
|
</live-audio-player>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
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).
|
|
26
26
|
|
|
27
27
|
## Styling
|
|
28
28
|
|
|
29
29
|
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.
|
|
30
30
|
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
### Basic Usage
|
|
34
|
+
|
|
35
|
+
**index.html**
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<live-audio-player>
|
|
39
|
+
<live-audio-compat-skin class="html-live-audio-compat-skin-basic">
|
|
40
|
+
<mux-audio src="https://stream.mux.com/v69RSHhFelSm4701snP22dYz2jICy4E4FUyk02rW4gxRM.m3u8" crossorigin="anonymous"></mux-audio>
|
|
41
|
+
</live-audio-compat-skin>
|
|
42
|
+
</live-audio-player>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**index.css**
|
|
46
|
+
|
|
47
|
+
```css
|
|
48
|
+
.html-live-audio-compat-skin-basic {
|
|
49
|
+
display: block;
|
|
50
|
+
width: 100%;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**index.ts**
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import '@videojs/html/live-audio/player';
|
|
58
|
+
import '@videojs/html/live-audio/compat-skin';
|
|
59
|
+
import '@videojs/html/media/mux-audio';
|
|
60
|
+
```
|
|
61
|
+
|
|
31
62
|
## Own the UI
|
|
32
63
|
|
|
33
64
|
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/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
|
|