@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
|
@@ -14,7 +14,7 @@ Every guard on this page is a named export of the same package.
|
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
17
|
-
The player element’s `store.target` holds the media the player attached. It’s `null` until a media
|
|
17
|
+
The player element’s `store.target` holds the media the player attached. It’s `null` until a media component inside the player registers, so read it when you need it rather than once at startup:
|
|
18
18
|
|
|
19
19
|
**index.ts**
|
|
20
20
|
|
|
@@ -45,7 +45,7 @@ Each feature links to the same entry on its reference page.
|
|
|
45
45
|
| `setMuted` | `(muted: boolean) => boolean` | [`volumeFeature`](./feature-volume.md#volume-action-setMuted) | Set the muted state, updating the store immediately. Unmuting at volume 0 restores volume to 0.25. Returns the new muted value. |
|
|
46
46
|
| `isFullscreen` | `boolean` | [`fullscreenFeature`](./feature-fullscreen.md#fullscreen-state-isFullscreen) | Whether fullscreen mode is currently active. |
|
|
47
47
|
| `fullscreenAvailability` | `'available' \| 'unavailable' \| 'unsupported'` | [`fullscreenFeature`](./feature-fullscreen.md#fullscreen-state-fullscreenAvailability) | Whether fullscreen can be requested on this platform. |
|
|
48
|
-
| `requestFullscreen` | `() => Promise<void>` | [`fullscreenFeature`](./feature-fullscreen.md#fullscreen-action-requestFullscreen) | Enter fullscreen mode. Tries container first, falls back to media
|
|
48
|
+
| `requestFullscreen` | `() => Promise<void>` | [`fullscreenFeature`](./feature-fullscreen.md#fullscreen-action-requestFullscreen) | Enter fullscreen mode. Tries container first, falls back to media component. |
|
|
49
49
|
| `exitFullscreen` | `() => Promise<void>` | [`fullscreenFeature`](./feature-fullscreen.md#fullscreen-action-exitFullscreen) | Exit fullscreen mode. |
|
|
50
50
|
| `userActive` | `boolean` | [`controlsFeature`](./feature-controls.md#controls-state-userActive) | Whether the user has recently interacted with the player. |
|
|
51
51
|
| `controlsVisible` | `boolean` | [`controlsFeature`](./feature-controls.md#controls-state-controlsVisible) | Whether controls should be visible. |
|
|
@@ -53,7 +53,7 @@ Each feature links to the same entry on its reference page.
|
|
|
53
53
|
| `toggleControls` | `(forceShow?: boolean) => boolean` | [`controlsFeature`](./feature-controls.md#controls-action-toggleControls) | Toggle controls visibility, or force it with `forceShow`. Returns the new `controlsVisible` value. |
|
|
54
54
|
| `buffered` | `[number, number][]` | [`bufferFeature`](./feature-buffer.md#buffer-state-buffered) | Buffered time ranges as \[start, end\] tuples. |
|
|
55
55
|
| `seekable` | `[number, number][]` | [`bufferFeature`](./feature-buffer.md#buffer-state-seekable) | Seekable time ranges as \[start, end\] tuples. |
|
|
56
|
-
| `textTrackList` | `MediaTextTrack[]` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-state-textTrackList) | All text tracks available on the media
|
|
56
|
+
| `textTrackList` | `MediaTextTrack[]` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-state-textTrackList) | All text tracks available on the media component. |
|
|
57
57
|
| `subtitlesShowing` | `boolean` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-state-subtitlesShowing) | Whether a captions/subtitles track is showing. |
|
|
58
58
|
| `chaptersCues` | `MediaTextCue[]` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-state-chaptersCues) | Cues from the first `kind="chapters"` track, with cue ends clamped to a finite media duration. |
|
|
59
59
|
| `thumbnailsTrack` | `{ cues: MediaTextCue[]; src: string \| null; crossOrigin: 'anonymous' \| 'use-credentials' \| null } \| null` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-state-thumbnailsTrack) | The first thumbnails track, or `null` when there is none. |
|
|
@@ -69,7 +69,7 @@ Each feature links to the same entry on its reference page.
|
|
|
69
69
|
| `error` | `{ code: number; message: string } \| null` | [`errorFeature`](./feature-error.md#error-state-error) | The current media error, or null if none. |
|
|
70
70
|
| `dismissError` | `() => void` | [`errorFeature`](./feature-error.md#error-action-dismissError) | Dismiss the current error by clearing it. |
|
|
71
71
|
| `title` | `string` | [`metadataFeature`](./feature-metadata.md#metadata-state-title) | The resolved content title. Set it through the player, not through the store. |
|
|
72
|
-
| `poster` | `string` | [`metadataFeature`](./feature-metadata.md#metadata-state-poster) | The resolved poster URL, independent of the media
|
|
72
|
+
| `poster` | `string` | [`metadataFeature`](./feature-metadata.md#metadata-state-poster) | The resolved poster URL, independent of the media component's own `poster`. Set it through the player, not through the store. |
|
|
73
73
|
| `currentSrc` | `string` | [`sourceFeature`](./feature-source.md#source-state-currentSrc) | Current media source URL (empty string if none). |
|
|
74
74
|
| `canPlay` | `boolean` | [`sourceFeature`](./feature-source.md#source-state-canPlay) | Whether enough data is loaded to begin playback. |
|
|
75
75
|
| `videoRenditionList` | `MediaVideoRendition[]` | [`qualityFeature`](./feature-quality.md#quality-state-videoRenditionList) | Video renditions available for manual quality selection. |
|
|
@@ -14,7 +14,7 @@ import '@videojs/html/audio/skin';
|
|
|
14
14
|
Import `@videojs/html/audio/neutral-skin` instead for the neutral skin. Or load one [CDN](../../guides/cdn.md) bundle that registers the player and a skin together:
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
17
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/audio.js"></script>
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
`audio-neutral.js` registers the neutral skin instead, and `audio-player.js` registers `<audio-player>` alone.
|
|
@@ -91,7 +91,7 @@ customElements.define('my-audio-player', PlayerElement);
|
|
|
91
91
|
|
|
92
92
|
## Media
|
|
93
93
|
|
|
94
|
-
The preset plays through a native [`<audio>`](../components/audio.md), so it registers no media
|
|
94
|
+
The preset plays through a native [`<audio>`](../components/audio.md), so it registers no media component of its own. Swap it for any compatible [media component](../../guides/media-sources.md), such as [`<hls-audio>`](../components/hls-audio.md) for HLS.
|
|
95
95
|
|
|
96
96
|
## Exports
|
|
97
97
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The background video preset — a player, feature bundle, skin, and media for ambient video with no controls
|
|
4
4
|
|
|
5
|
-
`@videojs/html/background` is the preset for ambient background video with no user controls. It bundles the `<background-video-player>` element, the `backgroundFeatures` bundle it is configured with, one chrome-less skin, and the `<background-video>` media
|
|
5
|
+
`@videojs/html/background` is the preset for ambient background video with no user controls. It bundles the `<background-video-player>` element, the `backgroundFeatures` bundle it is configured with, one chrome-less skin, and the `<background-video>` media component, which autoplays, mutes, and loops. See [Presets](../../guides/presets.md) for how presets fit together and [Background video](../../guides/background-video.md) for building one.
|
|
6
6
|
|
|
7
7
|
## Import
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ import '@videojs/html/background/video';
|
|
|
15
15
|
Or load the [CDN](../../guides/cdn.md) bundle that registers all three:
|
|
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/background.js"></script>
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Unlike the other presets, the background preset has one bundle and no player-only bundle.
|
|
@@ -52,7 +52,7 @@ The preset root also exports a `PlayerController` bound to the background player
|
|
|
52
52
|
|
|
53
53
|
## Feature bundle
|
|
54
54
|
|
|
55
|
-
`backgroundFeatures` is the array of [features](../../guides/features.md) the player is configured with. The background media
|
|
55
|
+
`backgroundFeatures` is the array of [features](../../guides/features.md) the player is configured with. The background media component handles autoplay, muting, and looping on its own:
|
|
56
56
|
|
|
57
57
|
`backgroundFeatures` is currently empty, so the player's store holds no feature state or actions.
|
|
58
58
|
|
|
@@ -14,14 +14,14 @@ import '@videojs/html/live-audio/skin';
|
|
|
14
14
|
Import `@videojs/html/live-audio/neutral-skin` instead for the neutral skin. Or load one [CDN](../../guides/cdn.md) bundle that registers the player and a skin together:
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
17
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/live-audio.js"></script>
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
`live-audio-neutral.js` registers the neutral skin instead, and `live-audio-player.js` registers `<live-audio-player>` alone.
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
24
|
-
Live streams are usually HLS, so this example plays through an HLS media
|
|
24
|
+
Live streams are usually HLS, so this example plays through an HLS media component instead of the preset’s native audio.
|
|
25
25
|
|
|
26
26
|
**index.html**
|
|
27
27
|
|
|
@@ -94,7 +94,7 @@ customElements.define('my-live-audio-player', PlayerElement);
|
|
|
94
94
|
|
|
95
95
|
## Media
|
|
96
96
|
|
|
97
|
-
The preset plays through a native [`<audio>`](../components/audio.md), so it registers no media
|
|
97
|
+
The preset plays through a native [`<audio>`](../components/audio.md), so it registers no media component of its own. Most browsers need a streaming [media component](../../guides/media-sources.md) to play a live source, such as [`<hls-audio>`](../components/hls-audio.md) for HLS.
|
|
98
98
|
|
|
99
99
|
## Exports
|
|
100
100
|
|
|
@@ -14,14 +14,14 @@ import '@videojs/html/live-video/skin';
|
|
|
14
14
|
Import `@videojs/html/live-video/neutral-skin` instead for the neutral skin. Or load one [CDN](../../guides/cdn.md) bundle that registers the player and a skin together:
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
17
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/live-video.js"></script>
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
`live-video-neutral.js` registers the neutral skin instead, and `live-video-player.js` registers `<live-video-player>` alone.
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
24
|
-
Live streams are usually HLS, so this example plays through an HLS media
|
|
24
|
+
Live streams are usually HLS, so this example plays through an HLS media component instead of the preset’s native video.
|
|
25
25
|
|
|
26
26
|
**index.html**
|
|
27
27
|
|
|
@@ -99,7 +99,7 @@ customElements.define('my-live-video-player', PlayerElement);
|
|
|
99
99
|
|
|
100
100
|
## Media
|
|
101
101
|
|
|
102
|
-
The preset plays through a native [`<video>`](../components/video.md), so it registers no media
|
|
102
|
+
The preset plays through a native [`<video>`](../components/video.md), so it registers no media component of its own. Most browsers need a streaming [media component](../../guides/media-sources.md) to play a live source, such as [`<hlsjs-video>`](../components/hlsjs-video.md) for HLS.
|
|
103
103
|
|
|
104
104
|
## Exports
|
|
105
105
|
|
|
@@ -14,7 +14,7 @@ import '@videojs/html/video/skin';
|
|
|
14
14
|
Import `@videojs/html/video/neutral-skin` instead for the neutral skin. Or load one [CDN](../../guides/cdn.md) bundle that registers the player and a skin together:
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.
|
|
17
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.1/video.js"></script>
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
`video-neutral.js` registers the neutral skin instead, and `video-player.js` registers `<video-player>` alone.
|
|
@@ -98,7 +98,7 @@ customElements.define('my-video-player', PlayerElement);
|
|
|
98
98
|
|
|
99
99
|
## Media
|
|
100
100
|
|
|
101
|
-
The preset plays through a native [`<video>`](../components/video.md), so it registers no media
|
|
101
|
+
The preset plays through a native [`<video>`](../components/video.md), so it registers no media component of its own. Swap it for any compatible [media component](../../guides/media-sources.md), such as [`<hlsjs-video>`](../components/hlsjs-video.md) for HLS.
|
|
102
102
|
|
|
103
103
|
## Exports
|
|
104
104
|
|
|
@@ -14,7 +14,7 @@ Resolution is a pure string check. It doesn’t fetch the source, load an engine
|
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
17
|
-
Look up the media
|
|
17
|
+
Look up the media component for the result and give it the same `src`:
|
|
18
18
|
|
|
19
19
|
```ts
|
|
20
20
|
import { resolveAdapterType } from '@videojs/html';
|
|
@@ -39,7 +39,7 @@ Each media module you import adds its engine to your bundle, so import the rarel
|
|
|
39
39
|
|
|
40
40
|
### Adapter types
|
|
41
41
|
|
|
42
|
-
| Adapter type | Recognized sources | Media
|
|
42
|
+
| Adapter type | Recognized sources | Media component |
|
|
43
43
|
| --- | --- | --- |
|
|
44
44
|
| `youtube` | `youtube.com`, `youtu.be`, and `youtube-nocookie.com` video and playlist URLs | `<youtube-video>` |
|
|
45
45
|
| `vimeo` | `vimeo.com` and `player.vimeo.com` URLs | `<vimeo-video>` |
|
|
@@ -12,7 +12,7 @@ videojs.options.autoplay = true;
|
|
|
12
12
|
|
|
13
13
|
## Video.js 10 equivalent
|
|
14
14
|
|
|
15
|
-
Set attributes on `<video-player>`, `<video-skin>`, and the media
|
|
15
|
+
Set attributes on `<video-player>`, `<video-skin>`, and the media component.
|
|
16
16
|
|
|
17
17
|
See [Migrate from Video.js 8](../../guides/migrate-from-video-js-8.md) for the full setup.
|
|
18
18
|
|
|
@@ -10,14 +10,14 @@ The Compat skin of the audio preset provides basic controls and plain surfaces,
|
|
|
10
10
|
import '@videojs/html/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
|
<audio-player>
|
|
19
19
|
<audio-compat-skin>
|
|
20
|
-
<audio
|
|
20
|
+
<audio></audio>
|
|
21
21
|
</audio-compat-skin>
|
|
22
22
|
</audio-player>
|
|
23
23
|
```
|
|
@@ -26,6 +26,36 @@ The skin goes between the player and the media element. It renders its controls
|
|
|
26
26
|
|
|
27
27
|
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.
|
|
28
28
|
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### Basic Usage
|
|
32
|
+
|
|
33
|
+
**index.html**
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<audio-player>
|
|
37
|
+
<audio-compat-skin class="html-audio-compat-skin-basic">
|
|
38
|
+
<audio src="https://stream.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/audio.m4a" crossorigin="anonymous"></audio>
|
|
39
|
+
</audio-compat-skin>
|
|
40
|
+
</audio-player>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**index.css**
|
|
44
|
+
|
|
45
|
+
```css
|
|
46
|
+
.html-audio-compat-skin-basic {
|
|
47
|
+
display: block;
|
|
48
|
+
width: 100%;
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**index.ts**
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
import '@videojs/html/audio/player';
|
|
56
|
+
import '@videojs/html/audio/compat-skin';
|
|
57
|
+
```
|
|
58
|
+
|
|
29
59
|
## Own the UI
|
|
30
60
|
|
|
31
61
|
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/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/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
|
<audio-player>
|
|
25
25
|
<audio-neutral-skin>
|
|
26
|
-
<audio
|
|
26
|
+
<audio></audio>
|
|
27
27
|
</audio-neutral-skin>
|
|
28
28
|
</audio-player>
|
|
29
29
|
```
|
|
@@ -32,6 +32,36 @@ The skin goes between the player and the media element. It renders its controls
|
|
|
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. For deeper changes, the Video.js registry provides the skin files.
|
|
34
34
|
|
|
35
|
+
## Examples
|
|
36
|
+
|
|
37
|
+
### Basic Usage
|
|
38
|
+
|
|
39
|
+
**index.html**
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<audio-player>
|
|
43
|
+
<audio-neutral-skin class="html-audio-neutral-skin-basic">
|
|
44
|
+
<audio src="https://stream.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/audio.m4a" crossorigin="anonymous"></audio>
|
|
45
|
+
</audio-neutral-skin>
|
|
46
|
+
</audio-player>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**index.css**
|
|
50
|
+
|
|
51
|
+
```css
|
|
52
|
+
.html-audio-neutral-skin-basic {
|
|
53
|
+
display: block;
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**index.ts**
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
import '@videojs/html/audio/player';
|
|
62
|
+
import '@videojs/html/audio/neutral-skin';
|
|
63
|
+
```
|
|
64
|
+
|
|
35
65
|
## Own the UI
|
|
36
66
|
|
|
37
67
|
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/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/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
|
<audio-player>
|
|
25
25
|
<audio-skin>
|
|
26
|
-
<audio
|
|
26
|
+
<audio></audio>
|
|
27
27
|
</audio-skin>
|
|
28
28
|
</audio-player>
|
|
29
29
|
```
|
|
@@ -32,6 +32,36 @@ The skin goes between the player and the media element. It renders its controls
|
|
|
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. For deeper changes, the Video.js registry provides the skin files.
|
|
34
34
|
|
|
35
|
+
## Examples
|
|
36
|
+
|
|
37
|
+
### Basic Usage
|
|
38
|
+
|
|
39
|
+
**index.html**
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<audio-player>
|
|
43
|
+
<audio-skin class="html-audio-skin-basic">
|
|
44
|
+
<audio src="https://stream.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/audio.m4a" crossorigin="anonymous"></audio>
|
|
45
|
+
</audio-skin>
|
|
46
|
+
</audio-player>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**index.css**
|
|
50
|
+
|
|
51
|
+
```css
|
|
52
|
+
.html-audio-skin-basic {
|
|
53
|
+
display: block;
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**index.ts**
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
import '@videojs/html/audio/player';
|
|
62
|
+
import '@videojs/html/audio/skin';
|
|
63
|
+
```
|
|
64
|
+
|
|
35
65
|
## Own the UI
|
|
36
66
|
|
|
37
67
|
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 audio 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 `<audio>`. Import the audio player registration when it should provide media to Video.js:
|
|
8
8
|
|
|
9
9
|
```ts
|
|
10
10
|
import '@videojs/html/audio/player';
|
|
@@ -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.
|