@videojs/html 10.1.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 +116 -65
- package/dist/default/define/audio/compat-skin2.js +1 -1
- package/dist/default/define/audio/neutral-skin.css +25 -16
- package/dist/default/define/audio/neutral-skin2.js +1 -1
- package/dist/default/define/audio/scaffold-skin.css +93 -51
- package/dist/default/define/audio/scaffold-skin2.js +1 -1
- package/dist/default/define/audio/skin.css +21 -6
- 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 +98 -65
- package/dist/default/define/live-audio/compat-skin2.js +1 -1
- package/dist/default/define/live-audio/neutral-skin.css +8 -5
- package/dist/default/define/live-audio/neutral-skin2.js +1 -1
- package/dist/default/define/live-audio/scaffold-skin.css +75 -51
- package/dist/default/define/live-audio/scaffold-skin2.js +1 -1
- package/dist/default/define/live-audio/skin.css +6 -5
- package/dist/default/define/live-audio/skin2.js +1 -1
- package/dist/default/define/live-video/compat-skin.css +123 -21
- 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 +107 -26
- 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 +123 -21
- package/dist/default/define/video/compat-skin2.js +1 -1
- package/dist/default/define/video/neutral-skin.css +85 -24
- package/dist/default/define/video/neutral-skin2.js +1 -1
- package/dist/default/define/video/scaffold-skin.css +107 -26
- 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/register.js +0 -10
- package/dist/default/internal/skins/compat-audio/skin.css +116 -65
- package/dist/default/internal/skins/compat-audio/template.js +15 -39
- package/dist/default/internal/skins/compat-live-audio/register.js +0 -10
- package/dist/default/internal/skins/compat-live-audio/skin.css +98 -65
- package/dist/default/internal/skins/compat-live-audio/template.js +2 -26
- package/dist/default/internal/skins/compat-live-video/skin.css +123 -21
- package/dist/default/internal/skins/compat-video/skin.css +123 -21
- package/dist/default/internal/skins/default-audio/skin.css +21 -6
- package/dist/default/internal/skins/default-live-audio/skin.css +6 -5
- 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 +25 -16
- package/dist/default/internal/skins/neutral-audio/template.js +1 -1
- package/dist/default/internal/skins/neutral-live-audio/skin.css +8 -5
- package/dist/default/internal/skins/neutral-live-video/skin.css +82 -14
- package/dist/default/internal/skins/neutral-video/skin.css +85 -24
- package/dist/default/internal/skins/neutral-video/template.js +1 -1
- package/dist/default/internal/skins/scaffold-audio/register.js +0 -10
- package/dist/default/internal/skins/scaffold-audio/skin.css +93 -51
- package/dist/default/internal/skins/scaffold-audio/template.js +15 -39
- package/dist/default/internal/skins/scaffold-live-audio/register.js +0 -10
- package/dist/default/internal/skins/scaffold-live-audio/skin.css +75 -51
- package/dist/default/internal/skins/scaffold-live-audio/template.js +2 -26
- package/dist/default/internal/skins/scaffold-live-video/skin.css +107 -26
- package/dist/default/internal/skins/scaffold-video/skin.css +107 -26
- package/dist/default/media/dailymotion-video/adapter.js +31 -0
- package/dist/default/media/hls-audio/adapter.js +1 -1
- package/dist/default/media/hls-background-video/adapter.js +8 -1
- package/dist/default/media/hls-video/adapter.js +1 -1
- 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/ui/slider/element.js +3 -1
- package/dist/default/ui/time-slider/element.js +19 -7
- package/dist/default/ui/volume-slider/element.js +3 -1
- package/dist/default/version.js +1 -1
- package/dist/dev/define/audio/compat-skin.css +116 -65
- 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 +25 -16
- 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 +93 -51
- 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 -6
- 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 +98 -65
- 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 -5
- 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 +75 -51
- 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 -5
- 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 +123 -21
- 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 +107 -26
- 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 +123 -21
- 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 +85 -24
- 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 +107 -26
- 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/register.d.ts +3 -5
- package/dist/dev/internal/skins/compat-audio/register.js +0 -10
- package/dist/dev/internal/skins/compat-audio/register.js.map +1 -1
- package/dist/dev/internal/skins/compat-audio/skin.css +116 -65
- package/dist/dev/internal/skins/compat-audio/template.js +15 -39
- package/dist/dev/internal/skins/compat-audio/template.js.map +1 -1
- package/dist/dev/internal/skins/compat-live-audio/register.d.ts +0 -2
- package/dist/dev/internal/skins/compat-live-audio/register.js +0 -10
- package/dist/dev/internal/skins/compat-live-audio/register.js.map +1 -1
- package/dist/dev/internal/skins/compat-live-audio/skin.css +98 -65
- package/dist/dev/internal/skins/compat-live-audio/template.js +2 -26
- package/dist/dev/internal/skins/compat-live-audio/template.js.map +1 -1
- package/dist/dev/internal/skins/compat-live-video/register.d.ts +2 -2
- package/dist/dev/internal/skins/compat-live-video/skin.css +123 -21
- package/dist/dev/internal/skins/compat-video/register.d.ts +5 -5
- package/dist/dev/internal/skins/compat-video/skin.css +123 -21
- package/dist/dev/internal/skins/default-audio/register.d.ts +1 -1
- package/dist/dev/internal/skins/default-audio/skin.css +21 -6
- package/dist/dev/internal/skins/default-live-audio/skin.css +6 -5
- package/dist/dev/internal/skins/default-live-video/register.d.ts +2 -2
- package/dist/dev/internal/skins/default-live-video/skin.css +96 -16
- package/dist/dev/internal/skins/default-video/register.d.ts +3 -3
- package/dist/dev/internal/skins/default-video/skin.css +94 -16
- package/dist/dev/internal/skins/neutral-audio/register.d.ts +3 -3
- package/dist/dev/internal/skins/neutral-audio/skin.css +25 -16
- package/dist/dev/internal/skins/neutral-audio/template.js +1 -1
- package/dist/dev/internal/skins/neutral-audio/template.js.map +1 -1
- package/dist/dev/internal/skins/neutral-live-audio/skin.css +8 -5
- package/dist/dev/internal/skins/neutral-live-video/register.d.ts +2 -2
- package/dist/dev/internal/skins/neutral-live-video/skin.css +82 -14
- package/dist/dev/internal/skins/neutral-video/register.d.ts +5 -5
- package/dist/dev/internal/skins/neutral-video/skin.css +85 -24
- package/dist/dev/internal/skins/neutral-video/template.js +1 -1
- package/dist/dev/internal/skins/neutral-video/template.js.map +1 -1
- package/dist/dev/internal/skins/scaffold-audio/register.d.ts +3 -5
- package/dist/dev/internal/skins/scaffold-audio/register.js +0 -10
- package/dist/dev/internal/skins/scaffold-audio/register.js.map +1 -1
- package/dist/dev/internal/skins/scaffold-audio/skin.css +93 -51
- package/dist/dev/internal/skins/scaffold-audio/template.js +15 -39
- package/dist/dev/internal/skins/scaffold-audio/template.js.map +1 -1
- package/dist/dev/internal/skins/scaffold-live-audio/register.d.ts +0 -2
- package/dist/dev/internal/skins/scaffold-live-audio/register.js +0 -10
- package/dist/dev/internal/skins/scaffold-live-audio/register.js.map +1 -1
- package/dist/dev/internal/skins/scaffold-live-audio/skin.css +75 -51
- package/dist/dev/internal/skins/scaffold-live-audio/template.js +2 -26
- package/dist/dev/internal/skins/scaffold-live-audio/template.js.map +1 -1
- package/dist/dev/internal/skins/scaffold-live-video/register.d.ts +2 -2
- package/dist/dev/internal/skins/scaffold-live-video/skin.css +107 -26
- package/dist/dev/internal/skins/scaffold-video/register.d.ts +5 -5
- package/dist/dev/internal/skins/scaffold-video/skin.css +107 -26
- 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-audio/adapter.d.ts +1 -1
- package/dist/dev/media/hls-audio/adapter.js +1 -1
- package/dist/dev/media/hls-audio/adapter.js.map +1 -1
- package/dist/dev/media/hls-background-video/adapter.d.ts +6 -1
- package/dist/dev/media/hls-background-video/adapter.js +8 -1
- package/dist/dev/media/hls-background-video/adapter.js.map +1 -1
- package/dist/dev/media/hls-video/adapter.d.ts +1 -1
- package/dist/dev/media/hls-video/adapter.js +1 -1
- package/dist/dev/media/hls-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/ui/slider/element.js +3 -1
- package/dist/dev/ui/slider/element.js.map +1 -1
- package/dist/dev/ui/time-slider/element.js +19 -7
- package/dist/dev/ui/time-slider/element.js.map +1 -1
- package/dist/dev/ui/volume-slider/element.js +3 -1
- package/dist/dev/ui/volume-slider/element.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 +13 -11
- package/docs/guides/build-your-own-skin.md +383 -0
- package/docs/guides/cdn.md +10 -9
- package/docs/guides/content-security-policy.md +3 -0
- package/docs/guides/customize-skins.md +6 -3
- 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 +3 -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 +9 -10
- package/docs/guides/migrate-from-vidstack.md +9 -9
- package/docs/guides/mux-data.md +22 -0
- package/docs/guides/presets.md +1 -1
- package/docs/guides/self-hosting.md +9 -6
- package/docs/guides/skins.md +17 -1
- package/docs/guides/ui-components.md +1 -1
- package/docs/llms.txt +12 -6
- 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 +2 -48
- package/docs/reference/components/hls-background-video.md +4 -1
- package/docs/reference/components/hls-video.md +2 -66
- 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 +22 -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/slider.md +2 -0
- 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/time-slider.md +7 -5
- 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/volume-slider.md +8 -6
- package/docs/reference/components/wistia-video.md +1 -1
- package/docs/reference/components/youtube-video.md +2 -1
- package/package.json +62 -43
|
@@ -72,7 +72,7 @@ The Neutral skin is the closest built-in starting point for this migration.
|
|
|
72
72
|
For an HTML page without a bundler, load the CDN preset:
|
|
73
73
|
|
|
74
74
|
```html
|
|
75
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
75
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/video-neutral.js"></script>
|
|
76
76
|
|
|
77
77
|
<video-player poster="/path/to/poster.jpg">
|
|
78
78
|
<video-neutral-skin style="aspect-ratio: 16 / 9">
|
|
@@ -119,7 +119,7 @@ The SPF [HLS video](../reference/components/hls-video.md) component is an altern
|
|
|
119
119
|
Replace `<video>` with `<hlsjs-video>`. If you’re using the CDN, add an additional script:
|
|
120
120
|
|
|
121
121
|
```html
|
|
122
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
122
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/hlsjs-video.js"></script>
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
For a bundler installation, install the adapter package and add the media import:
|
|
@@ -141,7 +141,7 @@ Use the DASH media component for an unprotected DASH source. For DRM-protected D
|
|
|
141
141
|
Replace `<video>` with `<dash-video>`. If you’re using the CDN, add an additional script:
|
|
142
142
|
|
|
143
143
|
```html
|
|
144
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
144
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/dash-video.js"></script>
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
For a package-manager installation, install the DASH adapter package and add the media import:
|
|
@@ -163,7 +163,7 @@ Use the Vimeo media component for your existing Vimeo source.
|
|
|
163
163
|
Replace `<video>` with `<vimeo-video>`. For a CDN installation, add the media script:
|
|
164
164
|
|
|
165
165
|
```html
|
|
166
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
166
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/vimeo-video.js"></script>
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
For a bundler installation, install the adapter package and add the module import:
|
|
@@ -185,7 +185,7 @@ Use the YouTube media component for your existing YouTube source.
|
|
|
185
185
|
Replace `<video>` with `<youtube-video>`. For a CDN installation, add the media script:
|
|
186
186
|
|
|
187
187
|
```html
|
|
188
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
188
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/youtube-video.js"></script>
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
For a bundler installation, install the adapter package and add the module import:
|
|
@@ -216,7 +216,7 @@ To select a locale, wrap the player in `<media-i18n>` and set `lang` to your loc
|
|
|
216
216
|
|
|
217
217
|
```html
|
|
218
218
|
<script type="module">
|
|
219
|
-
import { registerI18n } from 'https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
219
|
+
import { registerI18n } from 'https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/i18n.js';
|
|
220
220
|
|
|
221
221
|
registerI18n('en', {
|
|
222
222
|
buttons: {
|
|
@@ -229,7 +229,7 @@ To select a locale, wrap the player in `<media-i18n>` and set `lang` to your loc
|
|
|
229
229
|
});
|
|
230
230
|
</script>
|
|
231
231
|
|
|
232
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
232
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/video-neutral.js"></script>
|
|
233
233
|
|
|
234
234
|
<video-player>
|
|
235
235
|
<video-neutral-skin>
|
|
@@ -370,7 +370,7 @@ For changes to controls, layout, or icons, add the skin source to your project.
|
|
|
370
370
|
|
|
371
371
|
- Plyr’s `ads` option has no built-in equivalent.
|
|
372
372
|
- Plyr’s `storage` option has no built-in equivalent for persisted volume, captions language, muted state, speed, or quality. Player setting persistence is tracked in [#944](https://github.com/videojs/v10/issues/944). For application-managed persistence, follow [Remember user preferences](./user-preferences.md).
|
|
373
|
-
-
|
|
373
|
+
- Plyr’s `speed.options` maps to `defaultPlaybackRates` on the player. See the [playback rate feature](../reference/api/feature-playback-rate.md).
|
|
374
374
|
- Plyr’s full-window fullscreen fallback has no matching Video.js feature. Test fullscreen on your supported browsers; see [Browser support](./browser-support.md).
|
|
375
375
|
- Plain MP4 source arrays with `size` metadata do not automatically create a quality menu. Use Mux, HLS, or DASH for adaptive quality when possible.
|
|
376
376
|
- Preset skins segment the time slider and show chapter titles when the media includes a default `<track kind="chapters">`. Cue points are not implemented yet; see [#1442](https://github.com/videojs/v10/issues/1442).
|
|
@@ -4,7 +4,7 @@ Move a Video.js 8 integration to v10, mapping the options object, techs, plugins
|
|
|
4
4
|
|
|
5
5
|
Move your Video.js 8 setup to v10 by replacing `videojs()` with a player, media component, and skin. This guide maps your options, techs, plugins, and imperative calls to those pieces.
|
|
6
6
|
|
|
7
|
-
Video.js 10 ships as scoped `@videojs/*` packages. The `video.js` npm package
|
|
7
|
+
Video.js 10 ships as scoped `@videojs/*` packages. The `video.js` npm package contains no player; install `video.js@8` to stay on Video.js 8, whose [repository](https://github.com/videojs/videojs-v8) and [docs](https://legacy.videojs.org) remain available.
|
|
8
8
|
|
|
9
9
|
## Before you migrate
|
|
10
10
|
|
|
@@ -65,7 +65,7 @@ Here’s a standard v8 setup: one file, captions, a poster, and the default skin
|
|
|
65
65
|
Load the video [preset](./presets.md) from the CDN and put your media inside its skin:
|
|
66
66
|
|
|
67
67
|
```html
|
|
68
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
68
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/video.js"></script>
|
|
69
69
|
|
|
70
70
|
<video-player poster="/poster.jpg">
|
|
71
71
|
<video-skin style="aspect-ratio: 16 / 9">
|
|
@@ -185,7 +185,7 @@ These options need a migration decision. Each row links to the relevant guidance
|
|
|
185
185
|
| `languages`, `language`, `videojs.addLanguage` | [Languages](#languages) |
|
|
186
186
|
| `liveui`, `liveTracker` | [Live and audio-only](#live-and-audio-only) |
|
|
187
187
|
| `audioOnlyMode`, `audioPosterMode` | [Live and audio-only](#live-and-audio-only) |
|
|
188
|
-
| `playbackRates` |
|
|
188
|
+
| `playbackRates` | `defaultPlaybackRates` on the player, or `rates` on a single control. See the [playback rate feature](../reference/api/feature-playback-rate.md) |
|
|
189
189
|
| `textTrackSettings` | no equivalent; see [Known gaps](#known-gaps) |
|
|
190
190
|
| `spatialNavigation` | no equivalent; see [Known gaps](#known-gaps) |
|
|
191
191
|
| `inactivityTimeout` | delay not configurable yet ([#1728](https://github.com/videojs/v10/issues/1728)); `inactivityTimeout: 0` maps to `visibility="always"` on the controls component |
|
|
@@ -230,7 +230,7 @@ SPF and native HLS are included as dependencies of the HTML and React packages.
|
|
|
230
230
|
For hls.js video from the CDN:
|
|
231
231
|
|
|
232
232
|
```html
|
|
233
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
233
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/hlsjs-video.js"></script>
|
|
234
234
|
```
|
|
235
235
|
|
|
236
236
|
With a package manager, install the adapter and import its HTML registration:
|
|
@@ -323,7 +323,7 @@ Move license URLs from v8’s `keySystems` configuration to `source.drm`, keyed
|
|
|
323
323
|
|
|
324
324
|
The examples configure Widevine. Replace both URL placeholders and add every key system your supported browsers need.
|
|
325
325
|
|
|
326
|
-
With a bundler, install `@videojs/shaka-video` and import `@videojs/html/media/shaka-video`. From the CDN, load `https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
326
|
+
With a bundler, install `@videojs/shaka-video` and import `@videojs/html/media/shaka-video`. From the CDN, load `https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/shaka-video.js` in a `<script type="module">` tag. Then replace the media component inside your player’s skin with:
|
|
327
327
|
|
|
328
328
|
```html
|
|
329
329
|
<shaka-video id="protected-media"></shaka-video>
|
|
@@ -446,7 +446,7 @@ For a CDN page, register string overrides in a module script:
|
|
|
446
446
|
|
|
447
447
|
```html
|
|
448
448
|
<script type="module">
|
|
449
|
-
import { registerI18n } from 'https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
449
|
+
import { registerI18n } from 'https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/i18n.js';
|
|
450
450
|
|
|
451
451
|
registerI18n('en', {
|
|
452
452
|
buttons: { play: 'Start video', pause: 'Pause video' },
|
|
@@ -466,8 +466,8 @@ Replace `liveui` or `audioOnlyMode` with the matching live or audio [preset](./p
|
|
|
466
466
|
Load the live preset and the hls.js media component:
|
|
467
467
|
|
|
468
468
|
```html
|
|
469
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
470
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
469
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-video.js"></script>
|
|
470
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/hlsjs-video.js"></script>
|
|
471
471
|
|
|
472
472
|
<live-video-player>
|
|
473
473
|
<live-video-skin>
|
|
@@ -520,7 +520,6 @@ Check these limitations against your required features:
|
|
|
520
520
|
- **No ads support.** v8’s IMA and ad-plugin ecosystem has no v10 equivalent. If your player depends on ads, resolve that requirement before replacing it.
|
|
521
521
|
- **No playlist support.** No `videojs-playlist` equivalent.
|
|
522
522
|
- **No plugin system**, by design. Budget for rebuilding UI plugins as components. See [Plugins](#plugins).
|
|
523
|
-
- Playback rates are a fixed set — `0.2`, `0.5`, `0.7`, `1`, `1.2`, `1.5`, `1.7`, `2` — so v8’s `playbackRates` has no equivalent yet ([#1404](https://github.com/videojs/v10/issues/1404)).
|
|
524
523
|
- No text-track settings dialog equivalent to v8’s `textTrackSettings`. You can still style browser-rendered cues with `::cue`; see [Show captions and subtitles](./captions.md).
|
|
525
524
|
- No spatial navigation. v8’s `spatialNavigation` for TV and D-pad remotes has no equivalent.
|
|
526
525
|
- Player preferences such as volume, captions language, speed, and quality are not persisted automatically ([#944](https://github.com/videojs/v10/issues/944)). For application-managed persistence, follow [Remember user preferences](./user-preferences.md).
|
|
@@ -529,7 +528,7 @@ Check these limitations against your required features:
|
|
|
529
528
|
- The controls auto-hide delay isn’t configurable, so arbitrary `inactivityTimeout` values have no equivalent ([#1728](https://github.com/videojs/v10/issues/1728)). For `inactivityTimeout: 0`, set `visibility="always"` on the controls component in a custom layout or installed skin source.
|
|
530
529
|
- No full-window fullscreen fallback. Test fullscreen on your supported browsers; see [Browser support](./browser-support.md).
|
|
531
530
|
- Multiple `<source>` elements with `size` metadata don’t become a quality menu. Use HLS or DASH for adaptive quality.
|
|
532
|
-
- The Default, Neutral, and
|
|
531
|
+
- The Default, Neutral, Compat, and Scaffold skins are available. Runtime theme switching is not supported.
|
|
533
532
|
- Native controls are not automatically removed when custom controls load ([#1160](https://github.com/videojs/v10/issues/1160)).
|
|
534
533
|
- Debug mode has no equivalent yet ([#1406](https://github.com/videojs/v10/issues/1406)).
|
|
535
534
|
|
|
@@ -154,7 +154,7 @@ What changed:
|
|
|
154
154
|
Load the bundle as a module script. From the CDN, the video preset is one script:
|
|
155
155
|
|
|
156
156
|
```html
|
|
157
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
157
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/video.js"></script>
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
Pin every Video.js CDN URL on a page to the same version; see [CDN](./cdn.md).
|
|
@@ -214,7 +214,7 @@ Remove `controls` yourself: Video.js doesn’t turn native controls off when a s
|
|
|
214
214
|
| `live-edge-tolerance`, `min-live-dvr-window` | No equivalent ([#1730](https://github.com/videojs/v10/issues/1730)) |
|
|
215
215
|
| `artist`, `artwork` | No equivalent; Video.js doesn’t set Media Session metadata ([#3042](https://github.com/videojs/v10/issues/3042)) |
|
|
216
216
|
| `log-level` | No equivalent ([#1406](https://github.com/videojs/v10/issues/1406)); development builds print warnings |
|
|
217
|
-
| `keep-alive` | `keep-alive` on
|
|
217
|
+
| `keep-alive` | `keep-alive` on the player and on its media component. See [Element lifecycle](#element-lifecycle) |
|
|
218
218
|
|
|
219
219
|
Vidstack queued `paused`, `volume`, and the other playback props until the media could play. Video.js doesn’t queue: most actions fail until the player has attached to its media, `seek()` included, which only waits for metadata once attached. Call them from event handlers.
|
|
220
220
|
|
|
@@ -233,7 +233,7 @@ Vidstack’s `<media-provider>` read `src`, guessed a type from the extension or
|
|
|
233
233
|
| Vimeo | [`<vimeo-video>`](../reference/components/vimeo-video.md) | `@videojs/vimeo-video` |
|
|
234
234
|
| Remotion | No equivalent ([#3053](https://github.com/videojs/v10/issues/3053)) | |
|
|
235
235
|
|
|
236
|
-
Register each media component with `import '@videojs/html/media/<name>'`, or load `https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
236
|
+
Register each media component with `import '@videojs/html/media/<name>'`, or load `https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/<name>.js` from the CDN, where the engine is already bundled.
|
|
237
237
|
|
|
238
238
|
### HLS and DASH
|
|
239
239
|
|
|
@@ -336,7 +336,7 @@ async function load(src) {
|
|
|
336
336
|
|
|
337
337
|
Each media module loads with `import()`, so the page only downloads the engine its source needs, the way Vidstack’s provider loaders did. A plain `<video>` needs no module. When the media changes, the player detaches from the old one, resets its state, and attaches to the new one; the skin follows.
|
|
338
338
|
|
|
339
|
-
`resolveAdapterType` recognizes the URLs and shorthands Vidstack’s providers did, plus Wistia, Mux, Cloudflare Stream, Spotify, TikTok, and Twitch, and returns `null` for anything else. Vidstack sent a `HEAD` request when a URL had no file extension; pass the MIME type as the second argument instead. The result names a kind of source, not an engine: `hls` covers every HLS media, so choose one yourself.
|
|
339
|
+
`resolveAdapterType` recognizes the URLs and shorthands Vidstack’s providers did, plus Wistia, Mux, Cloudflare Stream, Spotify, SoundCloud, Mixcloud, TikTok, and Twitch, and returns `null` for anything else. Vidstack sent a `HEAD` request when a URL had no file extension; pass the MIME type as the second argument instead. The result names a kind of source, not an engine: `hls` covers every HLS media, so choose one yourself.
|
|
340
340
|
|
|
341
341
|
For a single source, change the media’s `src` or `source` instead. The same media swaps the URL without being replaced.
|
|
342
342
|
|
|
@@ -372,7 +372,7 @@ Packaged skins take almost no props. Most layout props either move somewhere els
|
|
|
372
372
|
| `color-scheme` | CSS `color-scheme`; see [Color scheme](#color-scheme) |
|
|
373
373
|
| `small-when` | Container queries built into the skin; see [Responsive layouts](#responsive-layouts) |
|
|
374
374
|
| `seek-step` | 10 seconds in the skin’s hotkeys and gestures; edit skin source to change it |
|
|
375
|
-
| `playback-rates` |
|
|
375
|
+
| `playback-rates` | `default-playback-rates`, or `rates` on a single control. See the [playback rate feature](../reference/api/feature-playback-rate.md) |
|
|
376
376
|
| `no-gestures`, `no-keyboard-animations`, `disable-time-slider`, `menu-group` | Edit skin source |
|
|
377
377
|
| `hide-quality-bitrate` | Bitrate shows only to tell apart renditions of the same size |
|
|
378
378
|
| `no-modal`, `menu-container` | Not needed. Menus render in the browser’s top layer |
|
|
@@ -392,7 +392,7 @@ Vidstack customization climbed from layout props, through CSS variables and slot
|
|
|
392
392
|
|
|
393
393
|
#### Level 1: pick a skin
|
|
394
394
|
|
|
395
|
-
Choose Default, Neutral, or
|
|
395
|
+
Choose Default, Neutral, Compat, or Scaffold for video, audio, live video, or live audio. See [Choose a skin](./skins.md#choose-a-skin).
|
|
396
396
|
|
|
397
397
|
#### Level 2: restyle it
|
|
398
398
|
|
|
@@ -755,7 +755,7 @@ import '@videojs/html/media/hlsjs-video';
|
|
|
755
755
|
```
|
|
756
756
|
|
|
757
757
|
- **DVR comes from the stream.** `live:dvr` becomes `targetLiveWindow === Infinity`, which the media reports for event playlists. There’s no way to force DVR on a sliding window. Add a time slider in skin source to let viewers seek.
|
|
758
|
-
- **The live edge moved to the live button.** `liveEdge`, `userBehindLiveEdge`, and `seekToLiveEdge()` become the live button’s state and behavior. It counts playback as live within 5 seconds of the stream’s live edge start, which already sits behind the seekable end by the
|
|
758
|
+
- **The live edge moved to the live button.** `liveEdge`, `userBehindLiveEdge`, and `seekToLiveEdge()` become the live button’s state and behavior. It counts playback as live within 5 seconds of the stream’s live edge start, which already sits behind the seekable end by the media’s live latency. The hls.js media uses the hls.js target latency, which `source.engine.hlsJs` can change; the other media derive it from the stream. Vidstack counted the last `liveEdgeTolerance` seconds before the seekable end, 10 by default and configurable ([#1730](https://github.com/videojs/v10/issues/1730)).
|
|
759
759
|
- **`streamType` needs a feature.** No preset includes `streamTypeFeature`; add it to a custom player when one player switches between live and on-demand UI.
|
|
760
760
|
- **Live presets are narrower.** They leave out playback rate, quality, and audio-track state. Build a player from a feature list to add them back.
|
|
761
761
|
|
|
@@ -813,7 +813,7 @@ In Angular, add `CUSTOM_ELEMENTS_SCHEMA` to the `schemas` of the component that
|
|
|
813
813
|
|
|
814
814
|
## Element lifecycle
|
|
815
815
|
|
|
816
|
-
Vidstack elements destroyed themselves when they were removed from the page and not put back within a frame, unless they carried `keep-alive`, which the player passed down to its children. Video.js
|
|
816
|
+
Vidstack elements destroyed themselves when they were removed from the page and not put back within a frame, unless they carried `keep-alive`, which the player passed down to its children. Video.js passes it from the player to the UI elements inside it, including a packaged skin’s controls, but not to media components: set `keep-alive` on the media component too. When you’re done, call `destroy()` on the player, which also destroys the UI elements inside it, and `adapter.destroy()` on media components. See the player’s [lifecycle](../reference/components/player.md#lifecycle).
|
|
817
817
|
|
|
818
818
|
## Behavior changes to check
|
|
819
819
|
|
|
@@ -840,7 +840,7 @@ Ordered roughly by how likely each is to block a Vidstack migration. Follow [Vid
|
|
|
840
840
|
- **Nothing persists** between visits: volume, captions, language, rate, quality, or position ([#944](https://github.com/videojs/v10/issues/944)).
|
|
841
841
|
- **No caption style settings** ([#1437](https://github.com/videojs/v10/issues/1437)), no custom caption renderer ([#3038](https://github.com/videojs/v10/issues/3038)), and WebVTT only: no SRT, SSA/ASS, or JSON captions ([#3037](https://github.com/videojs/v10/issues/3037)). Audio players don’t show captions ([#3039](https://github.com/videojs/v10/issues/3039)).
|
|
842
842
|
- **No chapters menu** or chapter title outside the time slider ([#1873](https://github.com/videojs/v10/issues/1873)), and no dedicated API for chapters from code ([#1268](https://github.com/videojs/v10/issues/1268)). Cue points and markers aren’t implemented ([#1442](https://github.com/videojs/v10/issues/1442)).
|
|
843
|
-
- **
|
|
843
|
+
- **No speed or quality sliders** ([#3052](https://github.com/videojs/v10/issues/3052)).
|
|
844
844
|
- **No audio gain or boost** ([#1135](https://github.com/videojs/v10/issues/1135)).
|
|
845
845
|
- **No load strategies.** Vidstack’s media and poster loading strategies and `startLoading()` have no equivalent ([#3043](https://github.com/videojs/v10/issues/3043)), and embeds don’t preconnect ([#1433](https://github.com/videojs/v10/issues/1433)).
|
|
846
846
|
- **No clipping.** Vidstack’s clip start and end times have no equivalent ([#3040](https://github.com/videojs/v10/issues/3040)).
|
package/docs/guides/mux-data.md
CHANGED
|
@@ -64,6 +64,28 @@ How much the extension reports depends on the engine playing the stream. All med
|
|
|
64
64
|
|
|
65
65
|
The `video_id` it reports is the Mux playback ID for streams served from `stream.mux.com`, and the source URL otherwise. Each view also gets a generated `view_session_id`. Override either through `metadata`.
|
|
66
66
|
|
|
67
|
+
## Name the player
|
|
68
|
+
|
|
69
|
+
Each view reports a player software name of `videojs-html-<engine>`, with the Video.js version as the player software version, so you can compare views by engine in Mux Data. For example, a stream played by hls.js reports `videojs-html-hlsjs`.
|
|
70
|
+
|
|
71
|
+
| Engine | Played by |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| `hlsjs` | [hls.js](https://github.com/video-dev/hls.js/) |
|
|
74
|
+
| `spf-hls-video` | The Video.js SPF engine for video, used by HLS video and the SPF flavor of Mux video |
|
|
75
|
+
| `spf-hls-audio` | The audio-only SPF engine, used by HLS audio and the SPF flavor of Mux audio |
|
|
76
|
+
| `spf-hls-background-video` | The SPF engine for background video |
|
|
77
|
+
| `shaka` | [Shaka Player](https://github.com/shaka-project/shaka-player) |
|
|
78
|
+
| `dashjs` | [dash.js](https://github.com/Dash-Industry-Forum/dash.js) |
|
|
79
|
+
| `browser` | The browser itself, like native HLS in Safari or an MP4 file |
|
|
80
|
+
|
|
81
|
+
The name follows the engine that’s playing, so a source change that switches engines updates the name for the current view.
|
|
82
|
+
|
|
83
|
+
To report your own name instead, set the player software name. It takes precedence over the default:
|
|
84
|
+
|
|
85
|
+
```html
|
|
86
|
+
<mux-data player-software-name="my-player" player-software-version="2.4.0"></mux-data>
|
|
87
|
+
```
|
|
88
|
+
|
|
67
89
|
## Describe the view
|
|
68
90
|
|
|
69
91
|
Pass Mux Data [metadata](https://www.mux.com/docs/guides/make-your-data-actionable-with-metadata?utm_source=videojs&utm_campaign=vjs10&utm_content=docs-content) to label views with your own titles, viewer IDs, and custom dimensions. `metadata` takes an object. In HTML, set it as a JavaScript property:
|
package/docs/guides/presets.md
CHANGED
|
@@ -26,7 +26,7 @@ For example, the `@videojs/html/background` preset includes a media component wi
|
|
|
26
26
|
|
|
27
27
|
The default presets are `/video` and `/audio`. These cover the baseline controls you’d expect from the HTML `<video>` and `<audio>` tags. Beyond the defaults, presets target more specific use cases — the `/background` preset, for example, needs layout but not controls. Over time we’ll add more: short-form players, podcast players, TV streaming players, and others.
|
|
28
28
|
|
|
29
|
-
The video, audio, live video, and live audio presets
|
|
29
|
+
The video, audio, live video, and live audio presets each export four skins: Default, Neutral, Compat, and Scaffold. For example, React exports `ScaffoldVideoSkin` with `@videojs/react/video/scaffold-skin.css`; HTML registers `<video-scaffold-skin>` through `@videojs/html/video/scaffold-skin`. See [Choose a skin](./skins.md#choose-a-skin) to compare them.
|
|
30
30
|
|
|
31
31
|
| Import | Description | Details |
|
|
32
32
|
| --- | --- | --- |
|
|
@@ -43,7 +43,7 @@ Bundle a single file when you already build your front end. Download the release
|
|
|
43
43
|
Unpack it into whatever your server treats as static files:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
VIDEOJS_VERSION=10.
|
|
46
|
+
VIDEOJS_VERSION=10.3.0
|
|
47
47
|
curl -fLO "https://github.com/videojs/video.js/releases/download/@videojs/cdn@${VIDEOJS_VERSION}/videojs-cdn-${VIDEOJS_VERSION}.zip"
|
|
48
48
|
unzip "videojs-cdn-${VIDEOJS_VERSION}.zip" -d public/
|
|
49
49
|
```
|
|
@@ -51,7 +51,7 @@ unzip "videojs-cdn-${VIDEOJS_VERSION}.zip" -d public/
|
|
|
51
51
|
Then point a script tag at the player you want:
|
|
52
52
|
|
|
53
53
|
```html
|
|
54
|
-
<script type="module" src="/videojs-cdn-10.
|
|
54
|
+
<script type="module" src="/videojs-cdn-10.3.0/video.js"></script>
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
The archive holds the same production bundles the CDN serves, minus sourcemaps and development builds. Every path inside it is relative, so it runs from any origin with no outbound requests. `SHA256SUMS` on the release verifies the download.
|
|
@@ -67,22 +67,25 @@ For Composer-based projects such as Drupal, declare the archive as a package:
|
|
|
67
67
|
"type": "package",
|
|
68
68
|
"package": {
|
|
69
69
|
"name": "videojs/cdn",
|
|
70
|
-
"version": "10.
|
|
70
|
+
"version": "10.3.0",
|
|
71
71
|
"type": "drupal-library",
|
|
72
|
+
"extra": {
|
|
73
|
+
"installer-name": "videojs-cdn"
|
|
74
|
+
},
|
|
72
75
|
"dist": {
|
|
73
76
|
"type": "zip",
|
|
74
|
-
"url": "https://github.com/videojs/video.js/releases/download/@videojs/cdn@10.
|
|
77
|
+
"url": "https://github.com/videojs/video.js/releases/download/@videojs/cdn@10.3.0/videojs-cdn-10.3.0.zip"
|
|
75
78
|
}
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
81
|
],
|
|
79
82
|
"require": {
|
|
80
|
-
"videojs/cdn": "10.
|
|
83
|
+
"videojs/cdn": "10.3.0"
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
86
|
```
|
|
84
87
|
|
|
85
|
-
Composer strips the archive’s top-level directory, so the player lands
|
|
88
|
+
Composer strips the archive’s top-level directory, and `installer-name` sets the install directory, so the player lands in `libraries/videojs-cdn/`.
|
|
86
89
|
|
|
87
90
|
### Mirror the prebuilt CDN files
|
|
88
91
|
|
package/docs/guides/skins.md
CHANGED
|
@@ -8,7 +8,22 @@ Packaged player designs that include both UI components and their styles.
|
|
|
8
8
|
|
|
9
9
|
A skin wraps the media component and provides the player’s complete interface. It combines a specific set of UI components with the styles that arrange and present them.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Choose a skin
|
|
12
|
+
|
|
13
|
+
The video, audio, live video, and live audio presets each provide four skins: Default, Neutral, Compat, and Scaffold. Compare them on three questions: which features you need, how much of the design you want to bring, and how consistently the player should look across browsers.
|
|
14
|
+
|
|
15
|
+
| | Default | Neutral | Compat | Scaffold |
|
|
16
|
+
| --- | --- | --- | --- | --- |
|
|
17
|
+
| Features | Complete | Same as Default | The same core controls in a simpler layout | Same as Compat |
|
|
18
|
+
| Styling | Opinionated and distinctly Video.js | Opinionated and easy to brand | Unbranded, a polished step above native controls | Unbranded and minimal, a foundation to restyle |
|
|
19
|
+
| Browser compatibility | Uses newer visual effects where browsers support them | Same as Default | Avoids newer visual effects, so it looks consistent across browsers | Same as Compat |
|
|
20
|
+
|
|
21
|
+
- **Default** is our design, with frosted surfaces and a modern look. Choose it when you want the player to look like Video.js.
|
|
22
|
+
- **Neutral** has the same controls in a lighter design, closer to a classic control bar. Choose it to apply your brand to a finished design: set your accent color, font, and corner radius through [CSS custom properties](./customize-skins.md#set-the-skins-styles).
|
|
23
|
+
- **Compat** has plain, unbranded surfaces. Choose it when the player should blend into content pages, such as an encyclopedia article. It avoids backdrop blur, anchor-positioned menu highlights, and squircle corners, which some browsers render differently or skip.
|
|
24
|
+
- **Scaffold** has Compat’s controls with minimal styling: square corners, no shadows or blur, your page’s font, and no transitions. Choose it as the foundation for your own design, when you plan to restyle the whole player rather than brand a finished one.
|
|
25
|
+
|
|
26
|
+
All four skins support the same [browsers](./browser-support.md), keyboard shortcuts, and gestures. To build your own design instead, add Scaffold’s [source](#skin-source-in-your-project) to your project, start from another skin’s source, or build a [custom interface](#custom-interface).
|
|
12
27
|
|
|
13
28
|
## Packaged skins and skin source
|
|
14
29
|
|
|
@@ -51,6 +66,7 @@ The skin source contains the complete interface. You can add, remove, rearrange,
|
|
|
51
66
|
|
|
52
67
|
You can also build an interface without starting from a skin. In that model, you choose and arrange individual [UI components](./ui-components.md) around the media. This takes more work, but it avoids inheriting a skin’s layout and interactions.
|
|
53
68
|
|
|
69
|
+
- [Build your own skin](./build-your-own-skin.md)
|
|
54
70
|
- [Build your own component](./build-your-own-component.md)
|
|
55
71
|
|
|
56
72
|
## Skins, features, and presets
|
|
@@ -39,7 +39,7 @@ import '@videojs/html/icons/element';
|
|
|
39
39
|
|
|
40
40
|
### Style components with state
|
|
41
41
|
|
|
42
|
-
Components add `data-*` attributes to describe their current state. For example, a play button adds `data-paused` while the media is paused. Use those attributes in CSS:
|
|
42
|
+
Components add `data-*` attributes to describe their current state. For example, a play button adds `data-paused` while the media is paused, except while autoplay is pending, when the button shows pause. Use those attributes in CSS:
|
|
43
43
|
|
|
44
44
|
```css
|
|
45
45
|
.my-play-button .pause-icon {
|
package/docs/llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Video.js v10 — HTML Documentation
|
|
2
2
|
|
|
3
|
-
> Bundled with `@videojs/html` v10.
|
|
3
|
+
> Bundled with `@videojs/html` v10.3.0. Links are relative paths to files in this directory.
|
|
4
4
|
|
|
5
5
|
> Install the [Video.js skill](https://github.com/videojs/skills) to help AI coding agents find version-matched pages from this index.
|
|
6
6
|
|
|
7
|
-
> The `video.js` package on npm
|
|
7
|
+
> The `video.js` package on npm contains no player; install `video.js@8` to stay on Video.js 8. Video.js 10 ships as `@videojs/html`; to move existing Video.js 8 code, read https://videojs.org/docs/framework/html/guides/migrate-from-video-js-8.md
|
|
8
8
|
|
|
9
9
|
> Vidstack Player is in security-only maintenance. To move existing `vidstack` code, read https://videojs.org/docs/framework/html/guides/migrate-from-vidstack.md
|
|
10
10
|
|
|
@@ -28,6 +28,7 @@ Install Video.js, customize a skin, understand its main pieces, check browser an
|
|
|
28
28
|
- [Build your own UI component](./guides/build-your-own-component.md): Create custom player controls that read state, dispatch actions, and stay accessible.
|
|
29
29
|
- [Architecture](./guides/architecture.md): How Video.js players are structured — state, UI, media, and extensions
|
|
30
30
|
- [Customize skins](./guides/customize-skins.md): Style a packaged Video.js skin or add its source to change controls, layout, styles, and interactions
|
|
31
|
+
- [Build your own skin](./guides/build-your-own-skin.md): Create a skin project, preview it locally, and compose your own player interface from Video.js UI components
|
|
31
32
|
- [Why Video.js?](./guides/why-videojs.md): The open-source video player for React and HTML. Lightweight, accessible components built for performance and streaming.
|
|
32
33
|
- [Browser support](./guides/browser-support.md): Browsers and rendering environments supported by Video.js 10, and how the packaged skins reach them
|
|
33
34
|
- [Build with AI](./guides/build-with-ai.md): Install the Video.js skill and give AI coding agents version-matched docs for building and migrating players
|
|
@@ -81,6 +82,7 @@ Guides for one player capability each: the recommended setup, how it works, brow
|
|
|
81
82
|
- [Remember user preferences](./guides/user-preferences.md): Save volume and caption preferences, restore them after loading, and adapt the pattern for quality selection.
|
|
82
83
|
- [Add a background video](./guides/background-video.md): Add an accessible background video from an MP4, WebM, HLS, or Mux source
|
|
83
84
|
- [Internationalize the player](./guides/internationalization.md): Translate player labels and announcements: shipped locale packs, custom translations, runtime switching, and server rendering.
|
|
85
|
+
- [Track video telemetry with Google Analytics 4](./guides/google-analytics.md): Track video engagement, progress milestones, and playback interactions by adding the Google Analytics extension to a player
|
|
84
86
|
- [Monitor playback with Mux Data](./guides/mux-data.md): Measure startup time, rebuffering, failures, and watch time by adding the Mux Data extension to a player
|
|
85
87
|
|
|
86
88
|
### Migrate
|
|
@@ -114,19 +116,19 @@ API reference for the packaged skins each preset ships.
|
|
|
114
116
|
|
|
115
117
|
- [video-skin](./reference/components/video-skin.md): The video preset's default skin with the modern, frosted look
|
|
116
118
|
- [video-neutral-skin](./reference/components/video-neutral-skin.md): The video preset's visually lighter skin, closer to a classic control bar
|
|
117
|
-
- [video-compat-skin](./reference/components/video-compat-skin.md):
|
|
119
|
+
- [video-compat-skin](./reference/components/video-compat-skin.md): The video preset's plain, unbranded skin, a polished step above native controls
|
|
118
120
|
- [video-scaffold-skin](./reference/components/video-scaffold-skin.md): A video skin with minimal styling for custom skins
|
|
119
121
|
- [audio-skin](./reference/components/audio-skin.md): The audio preset's default skin with the modern, frosted look
|
|
120
122
|
- [audio-neutral-skin](./reference/components/audio-neutral-skin.md): The audio preset's visually lighter skin, closer to a classic control bar
|
|
121
|
-
- [audio-compat-skin](./reference/components/audio-compat-skin.md):
|
|
123
|
+
- [audio-compat-skin](./reference/components/audio-compat-skin.md): The audio preset's plain, unbranded skin, a polished step above native controls
|
|
122
124
|
- [audio-scaffold-skin](./reference/components/audio-scaffold-skin.md): An audio skin with minimal styling for custom skins
|
|
123
125
|
- [live-video-skin](./reference/components/live-video-skin.md): The live video preset's default skin, which swaps time controls for a Live button
|
|
124
126
|
- [live-video-neutral-skin](./reference/components/live-video-neutral-skin.md): The live video preset's visually lighter skin, closer to a classic control bar
|
|
125
|
-
- [live-video-compat-skin](./reference/components/live-video-compat-skin.md):
|
|
127
|
+
- [live-video-compat-skin](./reference/components/live-video-compat-skin.md): The live video preset's plain, unbranded skin, a polished step above native controls
|
|
126
128
|
- [live-video-scaffold-skin](./reference/components/live-video-scaffold-skin.md): A live video skin with minimal styling for custom skins
|
|
127
129
|
- [live-audio-skin](./reference/components/live-audio-skin.md): The live audio preset's default skin, which swaps time controls for a Live button
|
|
128
130
|
- [live-audio-neutral-skin](./reference/components/live-audio-neutral-skin.md): The live audio preset's visually lighter skin, closer to a classic control bar
|
|
129
|
-
- [live-audio-compat-skin](./reference/components/live-audio-compat-skin.md):
|
|
131
|
+
- [live-audio-compat-skin](./reference/components/live-audio-compat-skin.md): The live audio preset's plain, unbranded skin, a polished step above native controls
|
|
130
132
|
- [live-audio-scaffold-skin](./reference/components/live-audio-scaffold-skin.md): A live audio skin with minimal styling for custom skins
|
|
131
133
|
- [background-video-skin](./reference/components/background-video-skin.md): The background preset's chrome-less skin for ambient video
|
|
132
134
|
|
|
@@ -137,17 +139,20 @@ API reference for media components that handle streaming protocols and playback.
|
|
|
137
139
|
- [audio](./reference/components/audio.md): Native audio playback that can provide media to a Video.js player
|
|
138
140
|
- [background-video](./reference/components/background-video.md): Decorative background video element with automatic muting and looping
|
|
139
141
|
- [cloudflare-video](./reference/components/cloudflare-video.md): Video component that plays Cloudflare Stream videos through the Stream player
|
|
142
|
+
- [dailymotion-video](./reference/components/dailymotion-video.md): Video component that plays Dailymotion videos through a Dailymotion player configuration
|
|
140
143
|
- [dash-video](./reference/components/dash-video.md): DASH video element powered by dash.js for adaptive bitrate streaming
|
|
141
144
|
- [hls-audio](./reference/components/hls-audio.md): Audio-only HLS element that plays the audio rendition of an HLS stream
|
|
142
145
|
- [hls-background-video](./reference/components/hls-background-video.md): HLS background video without controls, audio, captions, or adaptive quality
|
|
143
146
|
- [hls-video](./reference/components/hls-video.md): Lightweight HLS video element with minimal bundle size
|
|
144
147
|
- [hlsjs-video](./reference/components/hlsjs-video.md): HLS video element powered by hls.js for adaptive bitrate streaming
|
|
148
|
+
- [mixcloud-audio](./reference/components/mixcloud-audio.md): Audio component that plays Mixcloud shows through the Mixcloud Widget
|
|
145
149
|
- [mux-audio](./reference/components/mux-audio.md): Audio element for Mux-hosted HLS streams
|
|
146
150
|
- [mux-background-video](./reference/components/mux-background-video.md): Mux-specific name for the HLS background video component
|
|
147
151
|
- [mux-video](./reference/components/mux-video.md): Video element for Mux-hosted HLS streams
|
|
148
152
|
- [native-hls-video](./reference/components/native-hls-video.md): HLS video element using the browser's built-in HLS support
|
|
149
153
|
- [playerjs-video](./reference/components/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
|
|
150
154
|
- [shaka-video](./reference/components/shaka-video.md): Video element powered by Shaka Player for DASH, HLS, and progressive playback with DRM
|
|
155
|
+
- [soundcloud-audio](./reference/components/soundcloud-audio.md): Audio component that plays SoundCloud tracks and sets through the SoundCloud Widget
|
|
151
156
|
- [spotify-audio](./reference/components/spotify-audio.md): Audio component that plays Spotify tracks, episodes, playlists, and shows through the Spotify embed
|
|
152
157
|
- [tiktok-video](./reference/components/tiktok-video.md): Video component that plays TikTok videos through the TikTok embed player
|
|
153
158
|
- [twitch-video](./reference/components/twitch-video.md): Video component that plays Twitch videos and live channels through the Twitch embed player
|
|
@@ -160,6 +165,7 @@ API reference for media components that handle streaming protocols and playback.
|
|
|
160
165
|
|
|
161
166
|
API reference for extensions that connect external services to the player.
|
|
162
167
|
|
|
168
|
+
- [google-analytics](./reference/components/google-analytics.md): Options for the Google Analytics 4 extension that tracks video engagement and playback events
|
|
163
169
|
- [google-cast](./reference/components/google-cast.md): Options for the Google Cast extension that configures the receiver and load request
|
|
164
170
|
- [mux-data](./reference/components/mux-data.md): Options for the Mux Data extension that monitors playback quality
|
|
165
171
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Playback speed state and actions for the player store
|
|
4
4
|
|
|
5
|
-
Controls speed of playback.
|
|
5
|
+
Controls speed of playback. `playbackRateAvailability` is `unsupported` when the media has no playback rate, such as an embed whose provider takes no speed command.
|
|
6
6
|
|
|
7
7
|
## Import
|
|
8
8
|
|
|
@@ -14,23 +14,74 @@ The `audioFeatures` and `videoFeatures` [feature bundles](../../guides/presets.m
|
|
|
14
14
|
|
|
15
15
|
## API Reference
|
|
16
16
|
|
|
17
|
+
### Configuration
|
|
18
|
+
|
|
19
|
+
Attributes and matching properties the player element accepts. They exist only while this feature is selected.
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Default | Description |
|
|
22
|
+
| --- | --- | --- | --- |
|
|
23
|
+
| `defaultPlaybackRates` (attribute `default-playback-rates`) | `undefined \| null \| readonly number[] \| string` | `[0.5, 0.75, 1, 1.25, 1.5, 1.75, 2]` | Rates the player's controls offer, in the order they cycle through them, unless a control sets its own `rates`. HTML takes a space-separated list, such as `default-playback-rates="0.5 1 1.5 2"`. Missing or empty input restores the defaults. Rates outside the media's range are left out, so YouTube, which plays up to `2`, may offer fewer. |
|
|
24
|
+
|
|
17
25
|
### State
|
|
18
26
|
|
|
19
27
|
| Property | Type | Description |
|
|
20
28
|
| --- | --- | --- |
|
|
21
|
-
| `playbackRates` | `readonly number[]` | Available playback rates. |
|
|
22
29
|
| `playbackRate` | `number` | Current playback rate. |
|
|
30
|
+
| `playbackRateAvailability` | `'available' \| 'unavailable' \| 'unsupported'` | Whether the media can change its playback rate. `unsupported` when the attached media has no `playbackRate` at all, such as an embed whose provider takes no speed command. |
|
|
31
|
+
| `playbackRates` | `readonly number[]` | The default rates that fit the media's range. Set them through the player, not through the store. They are listed even when the media cannot change its rate, so check `playbackRateAvailability` before offering them. |
|
|
23
32
|
|
|
24
33
|
### Actions
|
|
25
34
|
|
|
26
35
|
| Action | Type | Description |
|
|
27
36
|
| --- | --- | --- |
|
|
28
|
-
| `setPlaybackRate` | `(rate: number) => void` | Set the playback rate. |
|
|
37
|
+
| `setPlaybackRate` | `(rate: number) => void` | Set the playback rate, clamped to the rates the media accepts. |
|
|
38
|
+
|
|
39
|
+
### Playback rates
|
|
40
|
+
|
|
41
|
+
The player offers `0.5` through `2` in steps of `0.25` unless you set your own list. The [playback rate button](../components/playback-rate-button.md), the [playback rate radio group](../components/playback-rate-radio-group.md), and the `speedUp` and `speedDown` [hotkeys](../../guides/keyboard-shortcuts.md) use this list unless you give one of them its own.
|
|
42
|
+
|
|
43
|
+
Set the `default-playback-rates` attribute on [`<video-player>`](../components/player.md) to a space-separated list:
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<video-player default-playback-rates="0.5 1 1.25 1.5 2">
|
|
47
|
+
<media-container>
|
|
48
|
+
<video src="/video.mp4"></video>
|
|
49
|
+
</media-container>
|
|
50
|
+
</video-player>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The `defaultPlaybackRates` property also takes an array, such as `player.defaultPlaybackRates = [1, 2]`. Removing the attribute restores the defaults.
|
|
54
|
+
|
|
55
|
+
The button cycles through the rates in the order you list them, and the menu shows them in that order. `speedUp` and `speedDown` move to the next faster or slower rate whatever the order, and do nothing at the fastest or slowest rate. The player ignores values that aren’t positive numbers, and repeated rates. If nothing usable is left, it falls back to the defaults.
|
|
56
|
+
|
|
57
|
+
### Rates for one control
|
|
58
|
+
|
|
59
|
+
To give one control a different list, set `rates` on it. The rest of the player keeps the default list. The control offers these rates as given, even ones outside the media’s range, which play at the nearest end of the range.
|
|
60
|
+
|
|
61
|
+
```html
|
|
62
|
+
<media-playback-rate-button rates="1 1.5 2"></media-playback-rate-button>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
To make the speed hotkeys change speed in fixed steps instead, give `speedUp` and `speedDown` a `value`. A `value` of `0.1` moves from `1` to `1.1`, then `1.2`, and so on.
|
|
66
|
+
|
|
67
|
+
### Rates outside the list
|
|
68
|
+
|
|
69
|
+
The media owns the current rate, so it can be one the menu doesn’t offer, such as `1.1` set through the media API or a stepped hotkey. The menu then shows that rate as an extra item, slotted before the next faster rate. Skins set it in italics, and its accessible name is “Custom, 1.1×”. The item goes away once the rate is back on the list. Normal speed (`1`) is added the same way when your list leaves it out, but isn’t marked custom.
|
|
70
|
+
|
|
71
|
+
### Media range
|
|
72
|
+
|
|
73
|
+
Each media accepts rates within a range. Browsers play `0.0625` through `16`, YouTube `0.25` through `2`, and Vimeo up to `2`. The player leaves out any `defaultPlaybackRates` outside that range and keeps the rest in your order. If none are left, it offers the defaults within the range and warns in development. `setPlaybackRate` clamps a rate outside the range to the nearest end, and warns in development. That includes `0`, which would stop the picture while the player still reports playback; call `pause()` instead.
|
|
74
|
+
|
|
75
|
+
`playbackRates` lists rates even for a media that can’t change its rate, so check `playbackRateAvailability` before offering them.
|
|
76
|
+
|
|
77
|
+
YouTube rounds rates down to a step of `0.05`, so asking for `1.13` plays at `1.1`.
|
|
29
78
|
|
|
30
79
|
### Selector
|
|
31
80
|
|
|
32
81
|
Pass `selectPlaybackRate` to [`PlayerController`](./player-controller.md) to subscribe to playback rate state. Returns `undefined` if the playback rate feature is not configured.
|
|
33
82
|
|
|
83
|
+
Check `playbackRateAvailability` before showing a playback rate control.
|
|
84
|
+
|
|
34
85
|
**rate-display.ts**
|
|
35
86
|
|
|
36
87
|
```ts
|
|
@@ -4,6 +4,8 @@ Play/pause state and actions for the player store
|
|
|
4
4
|
|
|
5
5
|
Controls play/pause state and tracks whether playback has started or is stalled.
|
|
6
6
|
|
|
7
|
+
When the media has `autoplay`, `autoplaying` is true from the moment a source loads until playback starts. It also turns false when the autoplay is refused: browsers don’t announce that, so it shows as the media being able to play through but staying paused, and embeds report it with a `pause` or `error` event. Treat it as playback about to begin: the play button shows pause and the buffering indicator shows while it’s true, and `pause()` cancels it.
|
|
8
|
+
|
|
7
9
|
## Import
|
|
8
10
|
|
|
9
11
|
```ts
|
|
@@ -22,13 +24,15 @@ The `audioFeatures`, `liveAudioFeatures`, `liveVideoFeatures`, and `videoFeature
|
|
|
22
24
|
| `ended` | `boolean` | Whether playback has reached the end. |
|
|
23
25
|
| `started` | `boolean` | Whether playback has started (played or seeked). |
|
|
24
26
|
| `waiting` | `boolean` | Whether playback is stalled waiting for data. |
|
|
27
|
+
| `autoplay` | `boolean` | Whether the media starts playing on its own once it can. |
|
|
28
|
+
| `autoplaying` | `boolean` | Whether the media is trying to autoplay: `autoplay` is set, and playback hasn't started yet. Clears when playback starts, when `pause()` cancels it, and when the autoplay is refused. Browsers don't announce a refusal, so it shows as the media being able to play through but staying paused; embeds report one with a `pause` or `error` event. Controls treat it as playback that's about to begin. |
|
|
25
29
|
|
|
26
30
|
### Actions
|
|
27
31
|
|
|
28
32
|
| Action | Type | Description |
|
|
29
33
|
| --- | --- | --- |
|
|
30
34
|
| `play` | `() => Promise<void>` | Start playback. Updates `paused` immediately when the media starts. |
|
|
31
|
-
| `pause` | `() => void` | Pause playback. Updates `paused` immediately. |
|
|
35
|
+
| `pause` | `() => void` | Pause playback. Updates `paused` immediately, and cancels a pending autoplay. |
|
|
32
36
|
|
|
33
37
|
### Selector
|
|
34
38
|
|
|
@@ -175,7 +175,7 @@ Creates a typed HTML player class and bound controller.
|
|
|
175
175
|
|
|
176
176
|
| Parameter | Type | Default | Description |
|
|
177
177
|
| --- | --- | --- | --- |
|
|
178
|
-
| `config` (required) | `{ features: [PlayerFeature<MediaPlaybackState>,
|
|
178
|
+
| `config` (required) | `{ features: [PlayerFeature<MediaPlaybackState>, typeof playbackRateFeature, PlayerFeature<MediaQualityState>, PlayerFeature<MediaAudioTrackState>, PlayerFeature<MediaVolumeState>, PlayerFeature<MediaTimeState>, PlayerFeature<MediaSourceState>, PlayerFeature<MediaBufferState>, PlayerFeature<MediaFullscreenState>, PlayerFeature<MediaPictureInPictureState>, PlayerFeature<MediaRemotePlaybackState>, PlayerFeature<MediaControlsState>, PlayerFeature<MediaTextTrackState>, PlayerFeature<MediaErrorState>, typeof metadataFeature] }` | — | Player configuration with features. |
|
|
179
179
|
|
|
180
180
|
#### Return Value
|
|
181
181
|
|
|
@@ -195,7 +195,7 @@ Creates a typed HTML audio player class and bound controller.
|
|
|
195
195
|
|
|
196
196
|
| Parameter | Type | Default | Description |
|
|
197
197
|
| --- | --- | --- | --- |
|
|
198
|
-
| `config` (required) | `{ features: [PlayerFeature<MediaPlaybackState>,
|
|
198
|
+
| `config` (required) | `{ features: [PlayerFeature<MediaPlaybackState>, typeof playbackRateFeature, PlayerFeature<MediaVolumeState>, PlayerFeature<MediaTimeState>, PlayerFeature<MediaSourceState>, PlayerFeature<MediaBufferState>, PlayerFeature<MediaErrorState>, typeof metadataFeature] }` | — | Player configuration with features. |
|
|
199
199
|
|
|
200
200
|
#### Return Value
|
|
201
201
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Video.js v10 — HTML API
|
|
2
2
|
|
|
3
|
-
> API reference for the player factory, presets, store controllers, features, translation tools, and utilities. Bundled with `@videojs/html` v10.
|
|
3
|
+
> API reference for the player factory, presets, store controllers, features, translation tools, and utilities. Bundled with `@videojs/html` v10.3.0. Links are relative paths to files in this directory.
|
|
4
4
|
|
|
5
5
|
## Player
|
|
6
6
|
|