@videojs/html 10.2.0 → 10.3.0
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/audio/compat-skin.css +72 -5
- package/dist/default/define/audio/compat-skin2.js +1 -1
- package/dist/default/define/audio/neutral-skin.css +23 -5
- package/dist/default/define/audio/neutral-skin2.js +1 -1
- package/dist/default/define/audio/scaffold-skin.css +63 -4
- package/dist/default/define/audio/scaffold-skin2.js +1 -1
- package/dist/default/define/audio/skin.css +21 -5
- package/dist/default/define/audio/skin2.js +1 -1
- package/dist/default/define/extensions/google-analytics.js +6 -0
- package/dist/default/define/live-audio/compat-skin.css +54 -5
- package/dist/default/define/live-audio/compat-skin2.js +1 -1
- package/dist/default/define/live-audio/neutral-skin.css +8 -4
- package/dist/default/define/live-audio/neutral-skin2.js +1 -1
- package/dist/default/define/live-audio/scaffold-skin.css +45 -4
- package/dist/default/define/live-audio/scaffold-skin2.js +1 -1
- package/dist/default/define/live-audio/skin.css +6 -4
- package/dist/default/define/live-audio/skin2.js +1 -1
- package/dist/default/define/live-video/compat-skin.css +115 -13
- package/dist/default/define/live-video/compat-skin2.js +1 -1
- package/dist/default/define/live-video/neutral-skin.css +82 -14
- package/dist/default/define/live-video/neutral-skin2.js +1 -1
- package/dist/default/define/live-video/scaffold-skin.css +95 -13
- package/dist/default/define/live-video/scaffold-skin2.js +1 -1
- package/dist/default/define/live-video/skin.css +96 -16
- package/dist/default/define/live-video/skin2.js +1 -1
- package/dist/default/define/media/dailymotion-video.js +11 -0
- package/dist/default/define/media/mixcloud-audio.js +11 -0
- package/dist/default/define/media/soundcloud-audio.js +11 -0
- package/dist/default/define/video/compat-skin.css +115 -13
- package/dist/default/define/video/compat-skin2.js +1 -1
- package/dist/default/define/video/neutral-skin.css +83 -14
- package/dist/default/define/video/neutral-skin2.js +1 -1
- package/dist/default/define/video/scaffold-skin.css +95 -13
- package/dist/default/define/video/scaffold-skin2.js +1 -1
- package/dist/default/define/video/skin.css +94 -16
- package/dist/default/define/video/skin2.js +1 -1
- package/dist/default/extensions/google-analytics/extension.js +75 -0
- package/dist/default/extensions/mux-data/extension.js +7 -2
- package/dist/default/internal/skins/compat-audio/skin.css +72 -5
- package/dist/default/internal/skins/compat-audio/template.js +1 -1
- package/dist/default/internal/skins/compat-live-audio/skin.css +54 -5
- package/dist/default/internal/skins/compat-live-video/skin.css +115 -13
- package/dist/default/internal/skins/compat-video/skin.css +115 -13
- package/dist/default/internal/skins/default-audio/skin.css +21 -5
- package/dist/default/internal/skins/default-live-audio/skin.css +6 -4
- package/dist/default/internal/skins/default-live-video/skin.css +96 -16
- package/dist/default/internal/skins/default-video/skin.css +94 -16
- package/dist/default/internal/skins/neutral-audio/skin.css +23 -5
- package/dist/default/internal/skins/neutral-live-audio/skin.css +8 -4
- package/dist/default/internal/skins/neutral-live-video/skin.css +82 -14
- package/dist/default/internal/skins/neutral-video/skin.css +83 -14
- package/dist/default/internal/skins/scaffold-audio/skin.css +63 -4
- package/dist/default/internal/skins/scaffold-audio/template.js +1 -1
- package/dist/default/internal/skins/scaffold-live-audio/skin.css +45 -4
- package/dist/default/internal/skins/scaffold-live-video/skin.css +95 -13
- package/dist/default/internal/skins/scaffold-video/skin.css +95 -13
- package/dist/default/media/dailymotion-video/adapter.js +31 -0
- package/dist/default/media/hls-background-video/adapter.js +7 -0
- package/dist/default/media/mixcloud-audio/adapter.js +16 -0
- package/dist/default/media/soundcloud-audio/adapter.js +16 -0
- package/dist/default/player/element.js +1 -5
- package/dist/default/presets/background/skin.js +2 -2
- package/dist/default/presets/skin.js +4 -3
- package/dist/default/ui/dialog/element.js +13 -1
- package/dist/default/ui/gesture/element.js +3 -0
- package/dist/default/ui/media-button-element.js +10 -1
- package/dist/default/ui/playback-rate-button/element.js +7 -2
- package/dist/default/ui/playback-rate-radio-group/element.js +10 -3
- package/dist/default/ui/radio-options/controller.js +18 -5
- package/dist/default/version.js +1 -1
- package/dist/dev/define/audio/compat-skin.css +72 -5
- package/dist/dev/define/audio/compat-skin2.js +1 -1
- package/dist/dev/define/audio/compat-skin2.js.map +1 -1
- package/dist/dev/define/audio/neutral-skin.css +23 -5
- package/dist/dev/define/audio/neutral-skin2.js +1 -1
- package/dist/dev/define/audio/neutral-skin2.js.map +1 -1
- package/dist/dev/define/audio/scaffold-skin.css +63 -4
- package/dist/dev/define/audio/scaffold-skin2.js +1 -1
- package/dist/dev/define/audio/scaffold-skin2.js.map +1 -1
- package/dist/dev/define/audio/skin.css +21 -5
- package/dist/dev/define/audio/skin2.js +1 -1
- package/dist/dev/define/audio/skin2.js.map +1 -1
- package/dist/dev/define/extensions/google-analytics.d.ts +11 -0
- package/dist/dev/define/extensions/google-analytics.js +8 -0
- package/dist/dev/define/extensions/google-analytics.js.map +1 -0
- package/dist/dev/define/live-audio/compat-skin.css +54 -5
- package/dist/dev/define/live-audio/compat-skin2.js +1 -1
- package/dist/dev/define/live-audio/compat-skin2.js.map +1 -1
- package/dist/dev/define/live-audio/neutral-skin.css +8 -4
- package/dist/dev/define/live-audio/neutral-skin2.js +1 -1
- package/dist/dev/define/live-audio/neutral-skin2.js.map +1 -1
- package/dist/dev/define/live-audio/scaffold-skin.css +45 -4
- package/dist/dev/define/live-audio/scaffold-skin2.js +1 -1
- package/dist/dev/define/live-audio/scaffold-skin2.js.map +1 -1
- package/dist/dev/define/live-audio/skin.css +6 -4
- package/dist/dev/define/live-audio/skin2.js +1 -1
- package/dist/dev/define/live-audio/skin2.js.map +1 -1
- package/dist/dev/define/live-video/compat-skin.css +115 -13
- package/dist/dev/define/live-video/compat-skin2.js +1 -1
- package/dist/dev/define/live-video/compat-skin2.js.map +1 -1
- package/dist/dev/define/live-video/neutral-skin.css +82 -14
- package/dist/dev/define/live-video/neutral-skin2.js +1 -1
- package/dist/dev/define/live-video/neutral-skin2.js.map +1 -1
- package/dist/dev/define/live-video/scaffold-skin.css +95 -13
- package/dist/dev/define/live-video/scaffold-skin2.js +1 -1
- package/dist/dev/define/live-video/scaffold-skin2.js.map +1 -1
- package/dist/dev/define/live-video/skin.css +96 -16
- package/dist/dev/define/live-video/skin2.js +1 -1
- package/dist/dev/define/live-video/skin2.js.map +1 -1
- package/dist/dev/define/media/dailymotion-video.d.ts +15 -0
- package/dist/dev/define/media/dailymotion-video.js +13 -0
- package/dist/dev/define/media/dailymotion-video.js.map +1 -0
- package/dist/dev/define/media/mixcloud-audio.d.ts +15 -0
- package/dist/dev/define/media/mixcloud-audio.js +13 -0
- package/dist/dev/define/media/mixcloud-audio.js.map +1 -0
- package/dist/dev/define/media/soundcloud-audio.d.ts +15 -0
- package/dist/dev/define/media/soundcloud-audio.js +13 -0
- package/dist/dev/define/media/soundcloud-audio.js.map +1 -0
- package/dist/dev/define/video/compat-skin.css +115 -13
- package/dist/dev/define/video/compat-skin2.js +1 -1
- package/dist/dev/define/video/compat-skin2.js.map +1 -1
- package/dist/dev/define/video/neutral-skin.css +83 -14
- package/dist/dev/define/video/neutral-skin2.js +1 -1
- package/dist/dev/define/video/neutral-skin2.js.map +1 -1
- package/dist/dev/define/video/scaffold-skin.css +95 -13
- package/dist/dev/define/video/scaffold-skin2.js +1 -1
- package/dist/dev/define/video/scaffold-skin2.js.map +1 -1
- package/dist/dev/define/video/skin.css +94 -16
- package/dist/dev/define/video/skin2.js +1 -1
- package/dist/dev/define/video/skin2.js.map +1 -1
- package/dist/dev/extensions/google-analytics/extension.d.ts +52 -0
- package/dist/dev/extensions/google-analytics/extension.js +77 -0
- package/dist/dev/extensions/google-analytics/extension.js.map +1 -0
- package/dist/dev/extensions/google-analytics/index.d.ts +2 -0
- package/dist/dev/extensions/mux-data/extension.d.ts +4 -1
- package/dist/dev/extensions/mux-data/extension.js +7 -2
- package/dist/dev/extensions/mux-data/extension.js.map +1 -1
- package/dist/dev/index.d.ts +3 -3
- package/dist/dev/internal/skins/compat-audio/skin.css +72 -5
- package/dist/dev/internal/skins/compat-audio/template.js +1 -1
- package/dist/dev/internal/skins/compat-audio/template.js.map +1 -1
- package/dist/dev/internal/skins/compat-live-audio/skin.css +54 -5
- package/dist/dev/internal/skins/compat-live-video/skin.css +115 -13
- package/dist/dev/internal/skins/compat-video/skin.css +115 -13
- package/dist/dev/internal/skins/default-audio/skin.css +21 -5
- package/dist/dev/internal/skins/default-live-audio/skin.css +6 -4
- package/dist/dev/internal/skins/default-live-video/skin.css +96 -16
- package/dist/dev/internal/skins/default-video/skin.css +94 -16
- package/dist/dev/internal/skins/neutral-audio/skin.css +23 -5
- package/dist/dev/internal/skins/neutral-live-audio/skin.css +8 -4
- package/dist/dev/internal/skins/neutral-live-video/skin.css +82 -14
- package/dist/dev/internal/skins/neutral-video/skin.css +83 -14
- package/dist/dev/internal/skins/scaffold-audio/skin.css +63 -4
- package/dist/dev/internal/skins/scaffold-audio/template.js +1 -1
- package/dist/dev/internal/skins/scaffold-audio/template.js.map +1 -1
- package/dist/dev/internal/skins/scaffold-live-audio/skin.css +45 -4
- package/dist/dev/internal/skins/scaffold-live-video/skin.css +95 -13
- package/dist/dev/internal/skins/scaffold-video/skin.css +95 -13
- package/dist/dev/media/dailymotion-video/adapter.d.ts +17 -0
- package/dist/dev/media/dailymotion-video/adapter.js +47 -0
- package/dist/dev/media/dailymotion-video/adapter.js.map +1 -0
- package/dist/dev/media/dailymotion-video/index.d.ts +2 -0
- package/dist/dev/media/hls-background-video/adapter.d.ts +6 -1
- package/dist/dev/media/hls-background-video/adapter.js +7 -0
- package/dist/dev/media/hls-background-video/adapter.js.map +1 -1
- package/dist/dev/media/mixcloud-audio/adapter.d.ts +11 -0
- package/dist/dev/media/mixcloud-audio/adapter.js +52 -0
- package/dist/dev/media/mixcloud-audio/adapter.js.map +1 -0
- package/dist/dev/media/mixcloud-audio/index.d.ts +2 -0
- package/dist/dev/media/soundcloud-audio/adapter.d.ts +11 -0
- package/dist/dev/media/soundcloud-audio/adapter.js +53 -0
- package/dist/dev/media/soundcloud-audio/adapter.js.map +1 -0
- package/dist/dev/media/soundcloud-audio/index.d.ts +2 -0
- package/dist/dev/player/element.js +1 -5
- package/dist/dev/player/element.js.map +1 -1
- package/dist/dev/presets/background/skin.d.ts +2 -1
- package/dist/dev/presets/background/skin.js +2 -2
- package/dist/dev/presets/background/skin.js.map +1 -1
- package/dist/dev/presets/skin.d.ts +4 -3
- package/dist/dev/presets/skin.js +4 -3
- package/dist/dev/presets/skin.js.map +1 -1
- package/dist/dev/ui/dialog/element.js +13 -1
- package/dist/dev/ui/dialog/element.js.map +1 -1
- package/dist/dev/ui/gesture/element.js +3 -0
- package/dist/dev/ui/gesture/element.js.map +1 -1
- package/dist/dev/ui/media-button-element.d.ts +9 -0
- package/dist/dev/ui/media-button-element.js +10 -1
- package/dist/dev/ui/media-button-element.js.map +1 -1
- package/dist/dev/ui/play-button/element.d.ts +2 -0
- package/dist/dev/ui/playback-rate-button/element.d.ts +9 -1
- package/dist/dev/ui/playback-rate-button/element.js +7 -2
- package/dist/dev/ui/playback-rate-button/element.js.map +1 -1
- package/dist/dev/ui/playback-rate-radio-group/element.d.ts +4 -0
- package/dist/dev/ui/playback-rate-radio-group/element.js +10 -3
- package/dist/dev/ui/playback-rate-radio-group/element.js.map +1 -1
- package/dist/dev/ui/radio-options/controller.js +18 -5
- package/dist/dev/ui/radio-options/controller.js.map +1 -1
- package/dist/dev/version.js +1 -1
- package/docs/README.md +1 -1
- package/docs/guides/autoplay.md +1 -1
- package/docs/guides/browser-support.md +2 -0
- package/docs/guides/build-your-own-skin.md +3 -1
- package/docs/guides/cdn.md +10 -9
- package/docs/guides/content-security-policy.md +3 -0
- package/docs/guides/customize-skins.md +4 -2
- package/docs/guides/features.md +1 -1
- package/docs/guides/google-analytics.md +199 -0
- package/docs/guides/installation-cdn.md +4 -4
- package/docs/guides/installation-shadcn.md +3 -3
- package/docs/guides/installation-svelte.md +4 -4
- package/docs/guides/installation-vue.md +4 -4
- package/docs/guides/installation.md +4 -4
- package/docs/guides/internationalization.md +5 -5
- package/docs/guides/keyboard-shortcuts.md +1 -1
- package/docs/guides/llms.txt +2 -1
- package/docs/guides/media-sources.md +3 -0
- package/docs/guides/migrate-from-media-chrome.md +4 -4
- package/docs/guides/migrate-from-mux-player.md +9 -9
- package/docs/guides/migrate-from-plyr.md +8 -8
- package/docs/guides/migrate-from-video-js-8.md +8 -9
- package/docs/guides/migrate-from-vidstack.md +8 -8
- package/docs/guides/mux-data.md +22 -0
- package/docs/guides/presets.md +1 -1
- package/docs/guides/self-hosting.md +5 -5
- package/docs/guides/skins.md +16 -1
- package/docs/guides/ui-components.md +1 -1
- package/docs/llms.txt +10 -5
- package/docs/reference/api/feature-playback-rate.md +54 -3
- package/docs/reference/api/feature-playback.md +5 -1
- package/docs/reference/api/html-create-player.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 +6 -3
- package/docs/reference/api/preset-audio.md +13 -5
- package/docs/reference/api/preset-background.md +2 -2
- package/docs/reference/api/preset-live-audio.md +13 -5
- package/docs/reference/api/preset-live-video.md +13 -5
- package/docs/reference/api/preset-video.md +13 -5
- package/docs/reference/api/resolve-adapter-type.md +4 -1
- package/docs/reference/api/ui-element.md +2 -2
- package/docs/reference/components/alert-dialog.md +21 -16
- package/docs/reference/components/audio-compat-skin.md +8 -2
- package/docs/reference/components/audio-neutral-skin.md +2 -2
- package/docs/reference/components/audio-scaffold-skin.md +2 -2
- package/docs/reference/components/audio-skin.md +2 -2
- package/docs/reference/components/audio-track-radio-group.md +2 -2
- package/docs/reference/components/background-video-skin.md +1 -1
- package/docs/reference/components/background-video.md +1 -1
- package/docs/reference/components/buffering-indicator.md +2 -2
- package/docs/reference/components/captions-radio-group.md +2 -2
- package/docs/reference/components/cloudflare-video.md +1 -1
- package/docs/reference/components/dailymotion-video.md +192 -0
- package/docs/reference/components/dash-video.md +2 -1
- package/docs/reference/components/dialog.md +49 -22
- package/docs/reference/components/error-dialog.md +13 -10
- package/docs/reference/components/gesture.md +2 -2
- package/docs/reference/components/google-analytics.md +51 -0
- 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 +4 -1
- package/docs/reference/components/hls-video.md +1 -1
- package/docs/reference/components/hlsjs-video.md +3 -1
- package/docs/reference/components/hotkey.md +2 -2
- package/docs/reference/components/live-audio-compat-skin.md +8 -2
- package/docs/reference/components/live-audio-neutral-skin.md +2 -2
- package/docs/reference/components/live-audio-scaffold-skin.md +2 -2
- package/docs/reference/components/live-audio-skin.md +2 -2
- package/docs/reference/components/live-video-compat-skin.md +8 -2
- package/docs/reference/components/live-video-neutral-skin.md +2 -2
- package/docs/reference/components/live-video-scaffold-skin.md +2 -2
- package/docs/reference/components/live-video-skin.md +2 -2
- package/docs/reference/components/llms.txt +9 -5
- package/docs/reference/components/mixcloud-audio.md +203 -0
- package/docs/reference/components/mux-audio.md +3 -1
- package/docs/reference/components/mux-background-video.md +1 -1
- package/docs/reference/components/mux-data.md +20 -2
- package/docs/reference/components/mux-video.md +3 -1
- package/docs/reference/components/native-hls-video.md +2 -1
- package/docs/reference/components/play-button.md +7 -5
- package/docs/reference/components/playback-rate-button.md +26 -7
- package/docs/reference/components/playback-rate-radio-group.md +7 -4
- package/docs/reference/components/player.md +3 -3
- package/docs/reference/components/playerjs-video.md +1 -1
- package/docs/reference/components/quality-radio-group.md +2 -2
- package/docs/reference/components/shaka-video.md +2 -1
- package/docs/reference/components/soundcloud-audio.md +227 -0
- package/docs/reference/components/spotify-audio.md +2 -2
- package/docs/reference/components/tiktok-video.md +2 -2
- package/docs/reference/components/twitch-video.md +2 -3
- package/docs/reference/components/video-compat-skin.md +8 -2
- package/docs/reference/components/video-neutral-skin.md +2 -2
- package/docs/reference/components/video-scaffold-skin.md +2 -2
- package/docs/reference/components/video-skin.md +2 -2
- package/docs/reference/components/vimeo-video.md +2 -1
- package/docs/reference/components/wistia-video.md +1 -1
- package/docs/reference/components/youtube-video.md +2 -1
- package/package.json +60 -40
|
@@ -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.
|
|
16
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/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.
|
|
20
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/hlsjs-video.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Examples
|
|
@@ -81,10 +81,12 @@ These Video.js-specific attributes configure media behavior:
|
|
|
81
81
|
| `contentData` | `MediaContentData \| undefined` | — | Read-only. |
|
|
82
82
|
| `disableRemotePlayback` | `unknown` | `false` | Whether remote playback (AirPlay, Google Cast) is disabled for this media. |
|
|
83
83
|
| `engine` | `Hls \| null` | — | Read-only. Underlying playback engine — the hls.js `Hls` instance when playing via MSE, otherwise `null`. An advanced escape hatch for direct engine access; normal playback is driven through this element's own properties and methods. |
|
|
84
|
+
| `engineName` | `string \| undefined` | — | Read-only. Engine this media is playing through, reported to analytics such as Mux Data: `hlsjs` via MSE, `browser` for native HLS, or `undefined` until a source loads. Read from the instance because the engine is picked per source. |
|
|
84
85
|
| `error` | `MediaError \| null` | — | Read-only. |
|
|
85
86
|
| `isFullscreen` | `boolean` | — | Read-only. |
|
|
86
87
|
| `isPictureInPicture` | `boolean` | — | Read-only. |
|
|
87
88
|
| `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. |
|
|
89
|
+
| `playbackRateRange` | `{ min: number; max: number } \| undefined` | — | Read-only. The target's narrower rate range, when it reports one; native media accept the browser's range. |
|
|
88
90
|
| `preload` | `MediaPreloadType` | `'metadata'` | Preload type (`'none'` / `'metadata'` / `'auto'`). |
|
|
89
91
|
| `source` | `{ src?: string; type?: 'application/vnd.apple.mpegurl' \| 'video/mp4' \| string & {}; preferPlayback?: 'mse' \| 'native' \| string & {}; drm?: Partial<Record<KeySystem, DrmSystemConfig>>; maxAutoResolution?: '270p' \| '360p' \| '480p' \| '540p' \| '720p' \| '1080p' \| '1440p' \| '2160p'; capRenditionToPlayerSize?: boolean; minAutoResolution?: '270p' \| '360p' \| '480p' \| '540p' \| '720p' \| '1080p' \| '1440p' \| '2160p'; engine?: HlsEngineConfig } \| null` | `null` | Structured source: what to play (`src`, an optional `type`) plus how to play it (`preferPlayback`, `engine`). Assigning it derives `src`. Sources are compared structurally, so reassigning an equivalent object is a no-op. Only a change to the engine options (or to the resolved content type) recreates the playback engine. |
|
|
90
92
|
| `src` | `string` | `''` | Media source URL. Assigning it replaces the identity half of `source` and leaves `type` and the engine options intact, so changing the URL never disturbs engine configuration. |
|
|
@@ -27,7 +27,7 @@ Key patterns are case-insensitive and may use:
|
|
|
27
27
|
- `Mod` for `Meta` on macOS and `Ctrl` elsewhere.
|
|
28
28
|
- The special `0-9` range for digit-based seeking.
|
|
29
29
|
|
|
30
|
-
Choose an `action` from the API reference below. Pass `value` as seconds for `seekStep`, a volume delta such as `0.05` or `-0.05` for `volumeStep`,
|
|
30
|
+
Choose an `action` from the API reference below. Pass `value` as seconds for `seekStep`, a volume delta such as `0.05` or `-0.05` for `volumeStep`, a percentage from 0 to 100 for `seekToPercent`, or a rate change such as `0.1` for `speedUp` and `speedDown`. When omitted, `seekStep` defaults to 10 seconds and `volumeStep` defaults to five percentage points; `ArrowLeft`, `j`, and `ArrowDown` use the negative step. When `value` is omitted from `seekToPercent` with `keys="0-9"`, the pressed digit supplies the percentage. When it is omitted from `speedUp` and `speedDown`, they move to the next faster or slower of the player’s playback rates.
|
|
31
31
|
|
|
32
32
|
Toggle actions ignore held-key repeats. Step, rate, and percentage actions may repeat. A matched shortcut prevents the browser’s default behavior. Unmodified shortcuts are ignored in editable fields, and Space or Enter still activates focused buttons, links, and sliders normally.
|
|
33
33
|
|
|
@@ -127,4 +127,4 @@ import '@videojs/html/ui/play-button';
|
|
|
127
127
|
| `keys` (required) | `string` | — | Key pattern to match, such as `Space`, `ArrowRight`, or `Mod+k`. |
|
|
128
128
|
| `disabled` | `boolean` | — | Whether the hotkey is disabled. |
|
|
129
129
|
| `target` | `'player' \| 'document'` | — | Whether to listen on the player container or the document. |
|
|
130
|
-
| `value` | `number` | — | Numeric value passed to actions such as `seekStep`, `volumeStep`, and `
|
|
130
|
+
| `value` | `number` | — | Numeric value passed to actions such as `seekStep`, `volumeStep`, `seekToPercent`, `speedUp`, and `speedDown`. Arrow-key seek and volume actions use their shared input-action step when omitted, and the speed actions move through the player's playback rates. |
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# live-audio-compat-skin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The live audio preset's plain, unbranded skin, a polished step above native controls
|
|
4
4
|
|
|
5
|
-
The Compat skin of the live audio preset
|
|
5
|
+
The Compat skin of the live audio preset: the same core controls with plain, unbranded surfaces that avoid newer visual effects such as backdrop blur. It shows a Live button in place of time controls and adds captions and AirPlay buttons that the default live audio skin leaves out. The preset also provides [LiveAudioSkin](./live-audio-skin.md), [NeutralLiveAudioSkin](./live-audio-neutral-skin.md), and [ScaffoldLiveAudioSkin](./live-audio-scaffold-skin.md). See [Skins](../../guides/skins.md#choose-a-skin) to choose between them and [Customize skins](../../guides/customize-skins.md) to install and edit its source.
|
|
6
6
|
|
|
7
7
|
## Import
|
|
8
8
|
|
|
@@ -10,6 +10,12 @@ 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
|
+
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
|
+
|
|
15
|
+
```html
|
|
16
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-audio-compat.js"></script>
|
|
17
|
+
```
|
|
18
|
+
|
|
13
19
|
## Anatomy
|
|
14
20
|
|
|
15
21
|
The skin goes between the player and the media component. It renders its controls around the media.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The live audio preset's visually lighter skin, closer to a classic control bar
|
|
4
4
|
|
|
5
|
-
The neutral skin of the live audio preset: the same player and the same controls in a visually lighter design, closer to a classic control bar. Like the default skin, it shows a Live button in place of time controls. [LiveAudioSkin](./live-audio-skin.md)
|
|
5
|
+
The neutral skin of the live audio preset: the same player and the same controls in a visually lighter design, closer to a classic control bar. Like the default skin, it shows a Live button in place of time controls. The preset also provides [LiveAudioSkin](./live-audio-skin.md), [CompatLiveAudioSkin](./live-audio-compat-skin.md), and [ScaffoldLiveAudioSkin](./live-audio-scaffold-skin.md). See [Skins](../../guides/skins.md#choose-a-skin) to choose between them and [Presets](../../guides/presets.md) for what the live audio preset ships.
|
|
6
6
|
|
|
7
7
|
## Import
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ 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.
|
|
16
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-audio-neutral.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Anatomy
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A live audio skin with minimal styling for custom skins
|
|
4
4
|
|
|
5
|
-
The Scaffold skin of the live audio preset provides functional controls with minimal styling and no transitions. It is a starting point for a custom skin, intended to be restyled before use. It shows a Live button in place of time controls. See [Customize skins](../../guides/customize-skins.md) to install and edit its source.
|
|
5
|
+
The Scaffold skin of the live audio preset provides functional controls with minimal styling and no transitions. It is a starting point for a custom skin, intended to be restyled before use. It shows a Live button in place of time controls. The preset also provides [LiveAudioSkin](./live-audio-skin.md), [NeutralLiveAudioSkin](./live-audio-neutral-skin.md), and [CompatLiveAudioSkin](./live-audio-compat-skin.md). See [Skins](../../guides/skins.md#choose-a-skin) to choose between them and [Customize skins](../../guides/customize-skins.md) to install and edit its source.
|
|
6
6
|
|
|
7
7
|
## Import
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ import '@videojs/html/live-audio/scaffold-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.
|
|
16
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-audio-scaffold.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The live audio preset's default skin, which swaps time controls for a Live button
|
|
4
4
|
|
|
5
|
-
The default skin of the live audio preset: the audio layout with the time slider and time displays swapped for a Live button. [NeutralLiveAudioSkin](./live-audio-neutral-skin.md)
|
|
5
|
+
The default skin of the live audio preset: the audio layout with the time slider and time displays swapped for a Live button. The preset also provides [NeutralLiveAudioSkin](./live-audio-neutral-skin.md), [CompatLiveAudioSkin](./live-audio-compat-skin.md), and [ScaffoldLiveAudioSkin](./live-audio-scaffold-skin.md). See [Skins](../../guides/skins.md#choose-a-skin) to choose between them and [Presets](../../guides/presets.md) for what the live audio preset ships.
|
|
6
6
|
|
|
7
7
|
## Import
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ 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.
|
|
16
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-audio.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Anatomy
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# live-video-compat-skin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The live video preset's plain, unbranded skin, a polished step above native controls
|
|
4
4
|
|
|
5
|
-
The Compat skin of the live video preset
|
|
5
|
+
The Compat skin of the live video preset: the same core controls with plain, unbranded surfaces that avoid newer visual effects such as backdrop blur. It puts a large play button in the center, fullscreen, picture-in-picture, Cast, and AirPlay in a top corner, and a Live button in place of time controls. The preset also provides [LiveVideoSkin](./live-video-skin.md), [NeutralLiveVideoSkin](./live-video-neutral-skin.md), and [ScaffoldLiveVideoSkin](./live-video-scaffold-skin.md). See [Skins](../../guides/skins.md#choose-a-skin) to choose between them and [Customize skins](../../guides/customize-skins.md) to install and edit its source.
|
|
6
6
|
|
|
7
7
|
## Import
|
|
8
8
|
|
|
@@ -10,6 +10,12 @@ 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
|
+
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
|
+
|
|
15
|
+
```html
|
|
16
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-video-compat.js"></script>
|
|
17
|
+
```
|
|
18
|
+
|
|
13
19
|
## Anatomy
|
|
14
20
|
|
|
15
21
|
The skin goes between the player and the media component. It renders its controls around the media.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The live video preset's visually lighter skin, closer to a classic control bar
|
|
4
4
|
|
|
5
|
-
The neutral skin of the live video preset: the same player and the same controls in a visually lighter design, closer to a classic control bar. Like the default skin, it shows a Live button in place of time controls. [LiveVideoSkin](./live-video-skin.md)
|
|
5
|
+
The neutral skin of the live video preset: the same player and the same controls in a visually lighter design, closer to a classic control bar. Like the default skin, it shows a Live button in place of time controls. The preset also provides [LiveVideoSkin](./live-video-skin.md), [CompatLiveVideoSkin](./live-video-compat-skin.md), and [ScaffoldLiveVideoSkin](./live-video-scaffold-skin.md). See [Skins](../../guides/skins.md#choose-a-skin) to choose between them and [Presets](../../guides/presets.md) for what the live video preset ships.
|
|
6
6
|
|
|
7
7
|
## Import
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ 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.
|
|
16
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-video-neutral.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Anatomy
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A live video skin with minimal styling for custom skins
|
|
4
4
|
|
|
5
|
-
The Scaffold skin of the live video preset provides functional controls with minimal styling and no transitions. It is a starting point for a custom skin, intended to be restyled before use. It shows a Live button in place of time controls. See [Customize skins](../../guides/customize-skins.md) to install and edit its source.
|
|
5
|
+
The Scaffold skin of the live video preset provides functional controls with minimal styling and no transitions. It is a starting point for a custom skin, intended to be restyled before use. It shows a Live button in place of time controls. The preset also provides [LiveVideoSkin](./live-video-skin.md), [NeutralLiveVideoSkin](./live-video-neutral-skin.md), and [CompatLiveVideoSkin](./live-video-compat-skin.md). See [Skins](../../guides/skins.md#choose-a-skin) to choose between them and [Customize skins](../../guides/customize-skins.md) to install and edit its source.
|
|
6
6
|
|
|
7
7
|
## Import
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ import '@videojs/html/live-video/scaffold-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.
|
|
16
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-video-scaffold.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The live video preset's default skin, which swaps time controls for a Live button
|
|
4
4
|
|
|
5
|
-
The default skin of the live video preset: the video layout with the time slider and time displays swapped for a Live button. [NeutralLiveVideoSkin](./live-video-neutral-skin.md)
|
|
5
|
+
The default skin of the live video preset: the video layout with the time slider and time displays swapped for a Live button. The preset also provides [NeutralLiveVideoSkin](./live-video-neutral-skin.md), [CompatLiveVideoSkin](./live-video-compat-skin.md), and [ScaffoldLiveVideoSkin](./live-video-scaffold-skin.md). See [Skins](../../guides/skins.md#choose-a-skin) to choose between them and [Presets](../../guides/presets.md) for what the live video preset ships.
|
|
6
6
|
|
|
7
7
|
## Import
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ 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.
|
|
16
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-video.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Anatomy
|
|
@@ -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.
|
|
3
|
+
> API reference for skins, media components, extensions, and interface components. Bundled with `@videojs/html` v10.3.0. Links are relative paths to files in this directory.
|
|
4
4
|
|
|
5
5
|
## Layout
|
|
6
6
|
|
|
@@ -16,19 +16,19 @@ API reference for the packaged skins each preset ships.
|
|
|
16
16
|
|
|
17
17
|
- [video-skin](./video-skin.md): The video preset's default skin with the modern, frosted look
|
|
18
18
|
- [video-neutral-skin](./video-neutral-skin.md): The video preset's visually lighter skin, closer to a classic control bar
|
|
19
|
-
- [video-compat-skin](./video-compat-skin.md):
|
|
19
|
+
- [video-compat-skin](./video-compat-skin.md): The video preset's plain, unbranded skin, a polished step above native controls
|
|
20
20
|
- [video-scaffold-skin](./video-scaffold-skin.md): A video skin with minimal styling for custom skins
|
|
21
21
|
- [audio-skin](./audio-skin.md): The audio preset's default skin with the modern, frosted look
|
|
22
22
|
- [audio-neutral-skin](./audio-neutral-skin.md): The audio preset's visually lighter skin, closer to a classic control bar
|
|
23
|
-
- [audio-compat-skin](./audio-compat-skin.md):
|
|
23
|
+
- [audio-compat-skin](./audio-compat-skin.md): The audio preset's plain, unbranded skin, a polished step above native controls
|
|
24
24
|
- [audio-scaffold-skin](./audio-scaffold-skin.md): An audio skin with minimal styling for custom skins
|
|
25
25
|
- [live-video-skin](./live-video-skin.md): The live video preset's default skin, which swaps time controls for a Live button
|
|
26
26
|
- [live-video-neutral-skin](./live-video-neutral-skin.md): The live video preset's visually lighter skin, closer to a classic control bar
|
|
27
|
-
- [live-video-compat-skin](./live-video-compat-skin.md):
|
|
27
|
+
- [live-video-compat-skin](./live-video-compat-skin.md): The live video preset's plain, unbranded skin, a polished step above native controls
|
|
28
28
|
- [live-video-scaffold-skin](./live-video-scaffold-skin.md): A live video skin with minimal styling for custom skins
|
|
29
29
|
- [live-audio-skin](./live-audio-skin.md): The live audio preset's default skin, which swaps time controls for a Live button
|
|
30
30
|
- [live-audio-neutral-skin](./live-audio-neutral-skin.md): The live audio preset's visually lighter skin, closer to a classic control bar
|
|
31
|
-
- [live-audio-compat-skin](./live-audio-compat-skin.md):
|
|
31
|
+
- [live-audio-compat-skin](./live-audio-compat-skin.md): The live audio preset's plain, unbranded skin, a polished step above native controls
|
|
32
32
|
- [live-audio-scaffold-skin](./live-audio-scaffold-skin.md): A live audio skin with minimal styling for custom skins
|
|
33
33
|
- [background-video-skin](./background-video-skin.md): The background preset's chrome-less skin for ambient video
|
|
34
34
|
|
|
@@ -39,17 +39,20 @@ API reference for media components that handle streaming protocols and playback.
|
|
|
39
39
|
- [audio](./audio.md): Native audio playback that can provide media to a Video.js player
|
|
40
40
|
- [background-video](./background-video.md): Decorative background video element with automatic muting and looping
|
|
41
41
|
- [cloudflare-video](./cloudflare-video.md): Video component that plays Cloudflare Stream videos through the Stream player
|
|
42
|
+
- [dailymotion-video](./dailymotion-video.md): Video component that plays Dailymotion videos through a Dailymotion player configuration
|
|
42
43
|
- [dash-video](./dash-video.md): DASH video element powered by dash.js for adaptive bitrate streaming
|
|
43
44
|
- [hls-audio](./hls-audio.md): Audio-only HLS element that plays the audio rendition of an HLS stream
|
|
44
45
|
- [hls-background-video](./hls-background-video.md): HLS background video without controls, audio, captions, or adaptive quality
|
|
45
46
|
- [hls-video](./hls-video.md): Lightweight HLS video element with minimal bundle size
|
|
46
47
|
- [hlsjs-video](./hlsjs-video.md): HLS video element powered by hls.js for adaptive bitrate streaming
|
|
48
|
+
- [mixcloud-audio](./mixcloud-audio.md): Audio component that plays Mixcloud shows through the Mixcloud Widget
|
|
47
49
|
- [mux-audio](./mux-audio.md): Audio element for Mux-hosted HLS streams
|
|
48
50
|
- [mux-background-video](./mux-background-video.md): Mux-specific name for the HLS background video component
|
|
49
51
|
- [mux-video](./mux-video.md): Video element for Mux-hosted HLS streams
|
|
50
52
|
- [native-hls-video](./native-hls-video.md): HLS video element using the browser's built-in HLS support
|
|
51
53
|
- [playerjs-video](./playerjs-video.md): Video component that plays any embed implementing the player.js protocol, such as Mux Player, Gumlet, FrameRate, Livid, Bunny Stream, and Streamable
|
|
52
54
|
- [shaka-video](./shaka-video.md): Video element powered by Shaka Player for DASH, HLS, and progressive playback with DRM
|
|
55
|
+
- [soundcloud-audio](./soundcloud-audio.md): Audio component that plays SoundCloud tracks and sets through the SoundCloud Widget
|
|
53
56
|
- [spotify-audio](./spotify-audio.md): Audio component that plays Spotify tracks, episodes, playlists, and shows through the Spotify embed
|
|
54
57
|
- [tiktok-video](./tiktok-video.md): Video component that plays TikTok videos through the TikTok embed player
|
|
55
58
|
- [twitch-video](./twitch-video.md): Video component that plays Twitch videos and live channels through the Twitch embed player
|
|
@@ -62,6 +65,7 @@ API reference for media components that handle streaming protocols and playback.
|
|
|
62
65
|
|
|
63
66
|
API reference for extensions that connect external services to the player.
|
|
64
67
|
|
|
68
|
+
- [google-analytics](./google-analytics.md): Options for the Google Analytics 4 extension that tracks video engagement and playback events
|
|
65
69
|
- [google-cast](./google-cast.md): Options for the Google Cast extension that configures the receiver and load request
|
|
66
70
|
- [mux-data](./mux-data.md): Options for the Mux Data extension that monitors playback quality
|
|
67
71
|
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# mixcloud-audio
|
|
2
|
+
|
|
3
|
+
Audio component that plays Mixcloud shows through the Mixcloud Widget
|
|
4
|
+
|
|
5
|
+
The [Mixcloud Widget](https://www.mixcloud.com/developers/widget/) plays Mixcloud shows. This component drives the widget and reports its state like a native `<audio>` element, so a [player skin](../../guides/skins.md) can control it.
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add @videojs/mixcloud-audio
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import '@videojs/html/media/mixcloud-audio';
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or load it from the [CDN](../../guides/cdn.md):
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/mixcloud-audio.js"></script>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Load a source
|
|
24
|
+
|
|
25
|
+
`src` takes either of these Mixcloud URLs:
|
|
26
|
+
|
|
27
|
+
- A show: `mixcloud.com/<user>/<show>/`
|
|
28
|
+
- A widget embed URL with its widget parameters, as Mixcloud’s embed code gives it: `www.mixcloud.com/widget/iframe/?feed=...`
|
|
29
|
+
|
|
30
|
+
`www.` and `m.` links work too. Profiles, playlists, and other pages that list shows are not supported.
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<mixcloud-audio src="https://www.mixcloud.com/spartacus/lambiance/"></mixcloud-audio>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Controls
|
|
37
|
+
|
|
38
|
+
The widget is the only UI Mixcloud offers, so `controls` decides whether the component is visible at all. Without `controls`, the component hides itself and plays as an invisible transport: a hidden iframe still loads and plays, so a [player skin](../../guides/skins.md) drives playback while the widget takes no room on the page.
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<audio-player>
|
|
42
|
+
<audio-skin>
|
|
43
|
+
<mixcloud-audio src="https://www.mixcloud.com/spartacus/lambiance/"></mixcloud-audio>
|
|
44
|
+
</audio-skin>
|
|
45
|
+
</audio-player>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
With `controls`, the component shows the widget, and the audio skin draws its controls below it, so the two do not overlap. Anything the listener does in the widget shows in the skin: play, pause, and seek. The widget is also the part of the page that credits the show and links back to it on Mixcloud (see [Mixcloud’s terms of use](#mixclouds-terms-of-use)).
|
|
49
|
+
|
|
50
|
+
```html
|
|
51
|
+
<mixcloud-audio src="https://www.mixcloud.com/spartacus/lambiance/" controls></mixcloud-audio>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
With `controls`, the component is 120 pixels tall by default, Mixcloud’s classic layout. Set a height to change it. With [widget parameters](#widget-parameters), `mini: true` selects the mini layout, which needs 60 pixels, and `hide_cover: false` selects the picture layout, a large cover that needs about 400 pixels. The widget hides the Mixcloud logo when it is narrower than 560 pixels.
|
|
55
|
+
|
|
56
|
+
## Widget parameters
|
|
57
|
+
|
|
58
|
+
By default, the component sets `hide_cover`, so the widget does not use its picture layout. Change it, or set `mini`, `hide_artwork`, `hide_tracklist`, or `light`, under `source.engine.mixcloud`, spelled as Mixcloud spells them:
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
const audio = document.querySelector('mixcloud-audio');
|
|
62
|
+
audio.source = {
|
|
63
|
+
src: 'https://www.mixcloud.com/spartacus/lambiance/',
|
|
64
|
+
engine: { mixcloud: { light: true, hide_artwork: true } },
|
|
65
|
+
};
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Without JavaScript, put the parameters on a widget embed URL instead:
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<mixcloud-audio
|
|
72
|
+
src="https://www.mixcloud.com/widget/iframe/?feed=%2Fspartacus%2Flambiance%2F&light=1&hide_artwork=1"
|
|
73
|
+
></mixcloud-audio>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Engine options win over the parameters of a widget embed URL, which win over the defaults. Set an option to `null` to drop a default. The widget applies `mini`, `hide_cover`, `hide_artwork`, `hide_tracklist`, and `light` without reloading the show. Other options reload it.
|
|
77
|
+
|
|
78
|
+
`light` is the only theme option: Mixcloud offers no other colors. The widget has no start time parameter, so it ignores `start_time`. Set `currentTime` instead.
|
|
79
|
+
|
|
80
|
+
## Behavior
|
|
81
|
+
|
|
82
|
+
- `play()` asks the widget to play. Browsers apply their autoplay policy to the widget as they do to any embed, so a play without a user gesture can be refused. Then the widget reports nothing, and the media stays paused.
|
|
83
|
+
- `autoplay` starts playback once the widget is ready, after the volume applies. The widget’s own `autoplay` parameter does the same and is never written to the widget URL.
|
|
84
|
+
- The widget loads from `player-widget.mixcloud.com`, the host that Mixcloud’s embed URL redirects to. A frame that redirects to another host loses the `autoplay` permission of the page, and then the widget cannot start playback from the skin.
|
|
85
|
+
- Seeking uses whole seconds, as the widget does. The widget ignores a seek before the show first plays, so the component keeps that seek and applies it when playback starts.
|
|
86
|
+
- Mixcloud limits seeks and replays for listeners without a Mixcloud subscription: 6 fast-forwards and 6 rewinds per show in a rolling 60-minute period, and 4 replays of a show in a rolling 14-day period (see [Mixcloud’s help center](https://help.mixcloud.com/hc/en-us/articles/360004054059-Why-are-there-limits-for-rewinds-and-fast-forwards)). When the widget refuses a seek, `currentTime` goes back to the position of the widget, and `seeked` fires.
|
|
87
|
+
- `loop` plays the show again from the start when it ends.
|
|
88
|
+
- Volume and mute both work. The widget has no separate mute, so muting sets its volume to `0`, and unmuting restores the previous level.
|
|
89
|
+
- `buffered` is always empty, because the widget does not report how much of the show it has loaded.
|
|
90
|
+
- The widget does not support playback rate, picture-in-picture, fullscreen, or text tracks, so the component offers none of them, and a player skin hides those controls.
|
|
91
|
+
- `preload`, `playsinline`, and `poster` are accepted for parity with `<audio>` but have no effect.
|
|
92
|
+
- A URL that is not a Mixcloud show reports a `MEDIA_ERR_SRC_NOT_SUPPORTED` error, and so does a show the widget cannot find, such as a private or removed show. A show whose audio the widget does not load within 15 seconds reports a `MEDIA_ERR_NETWORK` error. An error the widget reports before playback starts is a `MEDIA_ERR_SRC_NOT_SUPPORTED` error, and an error during playback is a `MEDIA_ERR_NETWORK` error.
|
|
93
|
+
|
|
94
|
+
## Mixcloud’s terms of use
|
|
95
|
+
|
|
96
|
+
The Mixcloud widget is subject to Mixcloud’s own terms. Before you use this component, read the [Mixcloud Terms of Use](https://www.mixcloud.com/terms/) and the [Widget documentation](https://www.mixcloud.com/developers/widget/) to learn where and how you can use the widget. To keep the widget visible on the page, set `controls`.
|
|
97
|
+
|
|
98
|
+
## Privacy
|
|
99
|
+
|
|
100
|
+
The widget is subject to Mixcloud’s own privacy policy. Read the [Mixcloud Privacy Policy](https://www.mixcloud.com/privacy/) to learn what the widget collects from visitors and what you must do when you embed it. The widget loads from Mixcloud as soon as the component renders, so to wait for a visitor’s consent, render the component only after the visitor agrees.
|
|
101
|
+
|
|
102
|
+
## Examples
|
|
103
|
+
|
|
104
|
+
### Basic Usage
|
|
105
|
+
|
|
106
|
+
**index.html**
|
|
107
|
+
|
|
108
|
+
```html
|
|
109
|
+
<mixcloud-audio class="mixcloud-audio" src="https://www.mixcloud.com/spartacus/lambiance/" controls></mixcloud-audio>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**index.css**
|
|
113
|
+
|
|
114
|
+
```css
|
|
115
|
+
.mixcloud-audio {
|
|
116
|
+
width: 100%;
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**index.ts**
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
import '@videojs/html/media/mixcloud-audio';
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## API Reference
|
|
127
|
+
|
|
128
|
+
### Attributes
|
|
129
|
+
|
|
130
|
+
These attributes configure the embedded media adapter:
|
|
131
|
+
|
|
132
|
+
| Attribute | Type | Default | Description |
|
|
133
|
+
| --- | --- | --- | --- |
|
|
134
|
+
| `autoplay` | `boolean` | `false` | Starts playback once the widget is ready, after the volume applies. Browsers may refuse it. |
|
|
135
|
+
| `controls` | `boolean` | `false` | |
|
|
136
|
+
| `loop` | `boolean` | `false` | Plays the show again from the start when it ends. |
|
|
137
|
+
| `muted` | `boolean` | `false` | |
|
|
138
|
+
| `playsinline` | `boolean` | `true` | |
|
|
139
|
+
| `poster` | `string` | `''` | |
|
|
140
|
+
| `preload` | `MediaPreloadType` | `'metadata'` | |
|
|
141
|
+
| `src` | `string` | `''` | |
|
|
142
|
+
|
|
143
|
+
### Properties
|
|
144
|
+
|
|
145
|
+
| Property | Type | Default | Description |
|
|
146
|
+
| --- | --- | --- | --- |
|
|
147
|
+
| `autoplay` | `boolean` | `false` | Starts playback once the widget is ready, after the volume applies. Browsers may refuse it. |
|
|
148
|
+
| `buffered` | `TimeRangeLike` | — | Read-only. Always empty: the widget does not report how much of the show it has loaded. |
|
|
149
|
+
| `controls` | `boolean` | `false` | |
|
|
150
|
+
| `currentSrc` | `string` | — | Read-only. |
|
|
151
|
+
| `currentTime` | `number` | — | |
|
|
152
|
+
| `defaultMuted` | `boolean` | `false` | |
|
|
153
|
+
| `duration` | `number` | — | Read-only. |
|
|
154
|
+
| `ended` | `boolean` | — | Read-only. |
|
|
155
|
+
| `engine` | `Window \| null` | — | Read-only. The widget's window, which commands are posted to. Null until rendered. |
|
|
156
|
+
| `error` | `MediaError \| null` | — | Read-only. |
|
|
157
|
+
| `loop` | `boolean` | `false` | Plays the show again from the start when it ends. |
|
|
158
|
+
| `muted` | `boolean` | `false` | |
|
|
159
|
+
| `paused` | `boolean` | — | Read-only. |
|
|
160
|
+
| `played` | `{ length: number; start(index: number): number; end(index: number): number }` | — | Read-only. |
|
|
161
|
+
| `playsInline` | `boolean` | `true` | |
|
|
162
|
+
| `poster` | `string` | `''` | |
|
|
163
|
+
| `preload` | `MediaPreloadType` | `'metadata'` | |
|
|
164
|
+
| `readyState` | `number` | — | Read-only. |
|
|
165
|
+
| `seekable` | `TimeRangeLike` | — | Read-only. |
|
|
166
|
+
| `seeking` | `boolean` | — | Read-only. |
|
|
167
|
+
| `source` | `{ src?: string; engine?: MixcloudSourceEngineConfig } \| null` | `null` | Mixcloud show URL in `src`, widget parameters under `engine.mixcloud`. Replacing it re-derives `src`. |
|
|
168
|
+
| `src` | `string` | `''` | |
|
|
169
|
+
| `textTracks` | `TextTrackListLike` | — | Read-only. Always empty: Mixcloud has no captions or other text tracks. |
|
|
170
|
+
| `volume` | `number` | — | |
|
|
171
|
+
|
|
172
|
+
### Engine options
|
|
173
|
+
|
|
174
|
+
#### `source.engine.mixcloud`
|
|
175
|
+
|
|
176
|
+
Pass Mixcloud Widget options under `source.engine.mixcloud`, spelled exactly as Mixcloud spells them, plus anything Mixcloud adds next. [Media Sources](../../guides/media-sources.md) covers how engine options fit into a structured source.
|
|
177
|
+
|
|
178
|
+
The show comes from `src`, so `feed` has no `engine.mixcloud` spelling. `referrerPolicy` sets the `referrerpolicy` of the widget iframe rather than a widget parameter.
|
|
179
|
+
|
|
180
|
+
| Option | Type | Description |
|
|
181
|
+
| --- | --- | --- |
|
|
182
|
+
| `autoplay` | `boolean \| null \| undefined` | Start playback once the widget is ready, as `autoplay` does. Never written to the URL. |
|
|
183
|
+
| `hide_artwork` | `boolean \| null \| undefined` | Hide the show's artwork. |
|
|
184
|
+
| `hide_cover` | `boolean \| null \| undefined` | Hide the picture layout, a large cover that needs about 400 pixels of height. Defaults to `true`. |
|
|
185
|
+
| `hide_tracklist` | `boolean \| null \| undefined` | Hide the tracklist. |
|
|
186
|
+
| `light` | `boolean \| null \| undefined` | The light theme. Mixcloud offers no other colors. |
|
|
187
|
+
| `mini` | `boolean \| null \| undefined` | The mini layout, 60 pixels tall, without the repost, favorite, and share buttons. |
|
|
188
|
+
| `referrerPolicy` | `ReferrerPolicy \| undefined` | `referrerpolicy` for the widget iframe. Not a widget parameter. |
|
|
189
|
+
|
|
190
|
+
### Methods
|
|
191
|
+
|
|
192
|
+
Supports these media methods: `load`, `pause`, `play`.
|
|
193
|
+
|
|
194
|
+
### Events
|
|
195
|
+
|
|
196
|
+
Implements these standard media events through the embedded player: `canplay`, `canplaythrough`, `durationchange`, `emptied`, `ended`, `error`, `loadeddata`, `loadedmetadata`, `loadstart`, `pause`, `play`, `playing`, `seeked`, `seeking`, `timeupdate`, `volumechange`, `waiting`.
|
|
197
|
+
|
|
198
|
+
Also emits these Video.js-specific events:
|
|
199
|
+
|
|
200
|
+
| Event | Description |
|
|
201
|
+
| --- | --- |
|
|
202
|
+
| `loadcomplete` | |
|
|
203
|
+
| `sourcechange` | Fired when `source` changes, either directly or by resolving a new `src`. Read `source` for the new value. |
|
|
@@ -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.
|
|
20
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/mux-audio.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Analytics and casting
|
|
@@ -87,8 +87,10 @@ These Video.js-specific attributes configure media behavior:
|
|
|
87
87
|
| `contentData` | `{ readonly [key: string]: MediaContentValue; title?: string; poster?: string; storyboard?: string }` | — | Read-only. What `source` says about its content. `poster` and `storyboard` are image URLs it describes rather than plays, from its `poster` and `storyboard` params; a key is absent when the URL can't be built — no playback ID, or signed playback without a matching image token. `title` and the rest come from the metadata Mux publishes for the asset, which loads with the source, so they arrive later than the URLs and are absent until then. The same object is handed back until something in it changes, and `contentdatachange` announces it when it does. Nothing here is applied for you, apart from the thumbnail track `<mux-video>` adds from `storyboard` (and drops for live streams). |
|
|
88
88
|
| `disableRemotePlayback` | `unknown` | `false` | Whether remote playback (AirPlay, Google Cast) is disabled for this media. |
|
|
89
89
|
| `engine` | `Hls \| null` | — | Read-only. Underlying playback engine — the hls.js `Hls` instance when playing via MSE, otherwise `null`. An advanced escape hatch for direct engine access; normal playback is driven through this element's own properties and methods. |
|
|
90
|
+
| `engineName` | `string \| undefined` | — | Read-only. Engine this media is playing through, reported to analytics such as Mux Data: `hlsjs` via MSE, `browser` for native HLS, or `undefined` until a source loads. Read from the instance because the engine is picked per source. |
|
|
90
91
|
| `error` | `MediaError \| null` | — | Read-only. |
|
|
91
92
|
| `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. |
|
|
93
|
+
| `playbackRateRange` | `{ min: number; max: number } \| undefined` | — | Read-only. The target's narrower rate range, when it reports one; native media accept the browser's range. |
|
|
92
94
|
| `preload` | `MediaPreloadType` | `'metadata'` | Preload type (`'none'` / `'metadata'` / `'auto'`). |
|
|
93
95
|
| `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
96
|
| `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. |
|
|
@@ -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.
|
|
18
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/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.
|
|
20
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/extensions/mux-data.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Anatomy
|
|
@@ -32,7 +32,7 @@ Or load it from the [CDN](../../guides/cdn.md):
|
|
|
32
32
|
| --- | --- | --- |
|
|
33
33
|
| `env-key` | `envKey` | Mux Data environment key the beacons are sent to. Optional for Mux-hosted playback |
|
|
34
34
|
| — | `metadata` | Mux Data metadata for the view |
|
|
35
|
-
| `player-software-name` | `playerSoftwareName` | Player name reported to Mux Data. Defaults to `
|
|
35
|
+
| `player-software-name` | `playerSoftwareName` | Player name reported to Mux Data. Defaults to `videojs-html-<engine>`; see [Player software name](#player-software-name) |
|
|
36
36
|
| `player-software-version` | `playerSoftwareVersion` | Player version reported to Mux Data. Defaults to the Video.js version |
|
|
37
37
|
| `player-init-time` | `playerInitTime` | Epoch milliseconds the player was initialized. Defaults to when the player was created |
|
|
38
38
|
| `beacon-collection-domain` | `beaconCollectionDomain` | Custom domain the beacons are sent to |
|
|
@@ -44,6 +44,24 @@ Or load it from the [CDN](../../guides/cdn.md):
|
|
|
44
44
|
|
|
45
45
|
Views also report the extension itself as the Mux plugin, so they can be told apart from other Video.js integrations such as `videojs-mux`.
|
|
46
46
|
|
|
47
|
+
## Player software name
|
|
48
|
+
|
|
49
|
+
When no player software name is set, views report `videojs-<framework>-<engine>`, where the framework is `html` or `react` and the engine is the one playing the current source:
|
|
50
|
+
|
|
51
|
+
| Engine | Played by |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| `hlsjs` | hls.js |
|
|
54
|
+
| `spf-hls-video` | The SPF video engine |
|
|
55
|
+
| `spf-hls-audio` | The audio-only SPF engine |
|
|
56
|
+
| `spf-hls-background-video` | The SPF background video engine |
|
|
57
|
+
| `shaka` | Shaka Player |
|
|
58
|
+
| `dashjs` | dash.js |
|
|
59
|
+
| `browser` | The browser itself, like native HLS in Safari or an MP4 file |
|
|
60
|
+
|
|
61
|
+
The framework is always one word, so everything after the second hyphen is the engine. The name updates on the current view when a source change switches engines. Media that doesn’t declare an engine name leaves it out, as in `videojs-html`. A player software name you set always takes precedence.
|
|
62
|
+
|
|
63
|
+
The player software version defaults to the Video.js version, and the Mux plugin is reported as `@videojs/mux-data` at the same version.
|
|
64
|
+
|
|
47
65
|
Changing `MuxDataSdk`, `beaconCollectionDomain`, `debug`, or `disableCookies` restarts monitoring, which ends the current view and starts a new one. The rest update the view in place.
|
|
48
66
|
|
|
49
67
|
## See also
|
|
@@ -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.
|
|
20
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/mux-video.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Load a source
|
|
@@ -164,10 +164,12 @@ These Video.js-specific attributes configure media behavior:
|
|
|
164
164
|
| `contentData` | `{ readonly [key: string]: MediaContentValue; title?: string; poster?: string; storyboard?: string }` | — | Read-only. What `source` says about its content. `poster` and `storyboard` are image URLs it describes rather than plays, from its `poster` and `storyboard` params; a key is absent when the URL can't be built — no playback ID, or signed playback without a matching image token. `title` and the rest come from the metadata Mux publishes for the asset, which loads with the source, so they arrive later than the URLs and are absent until then. The same object is handed back until something in it changes, and `contentdatachange` announces it when it does. Nothing here is applied for you, apart from the thumbnail track `<mux-video>` adds from `storyboard` (and drops for live streams). |
|
|
165
165
|
| `disableRemotePlayback` | `unknown` | `false` | Whether remote playback (AirPlay, Google Cast) is disabled for this media. |
|
|
166
166
|
| `engine` | `Hls \| null` | — | Read-only. Underlying playback engine — the hls.js `Hls` instance when playing via MSE, otherwise `null`. An advanced escape hatch for direct engine access; normal playback is driven through this element's own properties and methods. |
|
|
167
|
+
| `engineName` | `string \| undefined` | — | Read-only. Engine this media is playing through, reported to analytics such as Mux Data: `hlsjs` via MSE, `browser` for native HLS, or `undefined` until a source loads. Read from the instance because the engine is picked per source. |
|
|
167
168
|
| `error` | `MediaError \| null` | — | Read-only. |
|
|
168
169
|
| `isFullscreen` | `boolean` | — | Read-only. |
|
|
169
170
|
| `isPictureInPicture` | `boolean` | — | Read-only. |
|
|
170
171
|
| `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. |
|
|
172
|
+
| `playbackRateRange` | `{ min: number; max: number } \| undefined` | — | Read-only. The target's narrower rate range, when it reports one; native media accept the browser's range. |
|
|
171
173
|
| `preload` | `MediaPreloadType` | `'metadata'` | Preload type (`'none'` / `'metadata'` / `'auto'`). |
|
|
172
174
|
| `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
175
|
| `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. |
|
|
@@ -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.
|
|
16
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/native-hls-video.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Examples
|
|
@@ -68,6 +68,7 @@ These Video.js-specific attributes configure media behavior:
|
|
|
68
68
|
| `isFullscreen` | `boolean` | — | Read-only. |
|
|
69
69
|
| `isPictureInPicture` | `boolean` | — | Read-only. |
|
|
70
70
|
| `liveEdgeStart` | `number` | — | Read-only. Playback time where the live edge begins. Calculated from the newest available time and the playlist's live-edge offset. `NaN` when the stream is not live or the offset is unavailable. |
|
|
71
|
+
| `playbackRateRange` | `{ min: number; max: number } \| undefined` | — | Read-only. The target's narrower rate range, when it reports one; native media accept the browser's range. |
|
|
71
72
|
| `preload` | `MediaPreloadType` | `'metadata'` | Preload type (`'none'` / `'metadata'` / `'auto'`). |
|
|
72
73
|
| `source` | `{ src?: string; drm?: Partial<Record<KeySystem, DrmSystemConfig>>; engine?: NativeHlsEngineConfig } \| null` | `null` | Structured source: what to play (`src`) plus how to play it (`engine.nativeHls`). Assigning it derives `src`. Only a new URL reaches the element, so reassigning an equivalent source neither reloads nor disturbs key exchange. Use `src` or `load()` to reload what is already playing. Changing this source does not emit `sourcechange`. When the hls.js media component uses native HLS playback, it emits its own `sourcechange` and forwards the native playback events. |
|
|
73
74
|
| `src` | `string` | `''` | Media source URL. Assigning it replaces the identity half of `source` and leaves `engine` intact, so changing the URL never disturbs key exchange. Like the element's own `src`, assigning it always loads — including the URL already playing. |
|