@videojs/html 10.2.0 → 10.4.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 +161 -41
- package/dist/default/define/audio/compat-skin2.js +1 -1
- package/dist/default/define/audio/neutral-skin.css +73 -34
- package/dist/default/define/audio/neutral-skin2.js +1 -1
- package/dist/default/define/audio/scaffold-skin.css +166 -42
- package/dist/default/define/audio/scaffold-skin2.js +1 -1
- package/dist/default/define/audio/skin.css +72 -34
- 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 +143 -41
- package/dist/default/define/live-audio/compat-skin2.js +1 -1
- package/dist/default/define/live-audio/neutral-skin.css +56 -31
- package/dist/default/define/live-audio/neutral-skin2.js +1 -1
- package/dist/default/define/live-audio/scaffold-skin.css +148 -42
- package/dist/default/define/live-audio/scaffold-skin2.js +1 -1
- package/dist/default/define/live-audio/skin.css +55 -31
- package/dist/default/define/live-audio/skin2.js +1 -1
- package/dist/default/define/live-video/compat-skin.css +234 -51
- package/dist/default/define/live-video/compat-skin2.js +1 -1
- package/dist/default/define/live-video/neutral-skin.css +300 -46
- package/dist/default/define/live-video/neutral-skin2.js +1 -1
- package/dist/default/define/live-video/scaffold-skin.css +231 -53
- package/dist/default/define/live-video/scaffold-skin2.js +1 -1
- package/dist/default/define/live-video/skin.css +314 -49
- 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/ui/time-slider-markers.js +5 -0
- package/dist/default/define/video/compat-skin.css +242 -51
- package/dist/default/define/video/compat-skin2.js +1 -1
- package/dist/default/define/video/neutral-skin.css +382 -57
- package/dist/default/define/video/neutral-skin2.js +1 -1
- package/dist/default/define/video/scaffold-skin.css +240 -53
- package/dist/default/define/video/scaffold-skin2.js +1 -1
- package/dist/default/define/video/skin.css +415 -55
- 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/index.js +3 -1
- package/dist/default/internal/skins/compat-audio/skin.css +161 -41
- package/dist/default/internal/skins/compat-audio/template.js +1 -1
- package/dist/default/internal/skins/compat-live-audio/skin.css +143 -41
- package/dist/default/internal/skins/compat-live-video/skin.css +234 -51
- package/dist/default/internal/skins/compat-live-video/template.js +2 -0
- package/dist/default/internal/skins/compat-video/skin.css +242 -51
- package/dist/default/internal/skins/compat-video/template.js +2 -0
- package/dist/default/internal/skins/default-audio/skin.css +72 -34
- package/dist/default/internal/skins/default-live-audio/skin.css +55 -31
- package/dist/default/internal/skins/default-live-video/skin.css +314 -49
- package/dist/default/internal/skins/default-live-video/template.js +14 -0
- package/dist/default/internal/skins/default-video/register.js +3 -0
- package/dist/default/internal/skins/default-video/skin.css +415 -55
- package/dist/default/internal/skins/default-video/template.js +33 -5
- package/dist/default/internal/skins/neutral-audio/skin.css +73 -34
- package/dist/default/internal/skins/neutral-live-audio/skin.css +56 -31
- package/dist/default/internal/skins/neutral-live-video/skin.css +300 -46
- package/dist/default/internal/skins/neutral-live-video/template.js +14 -0
- package/dist/default/internal/skins/neutral-video/skin.css +382 -57
- package/dist/default/internal/skins/neutral-video/template.js +25 -11
- package/dist/default/internal/skins/scaffold-audio/skin.css +166 -42
- package/dist/default/internal/skins/scaffold-audio/template.js +1 -1
- package/dist/default/internal/skins/scaffold-live-audio/skin.css +148 -42
- package/dist/default/internal/skins/scaffold-live-video/skin.css +231 -53
- package/dist/default/internal/skins/scaffold-live-video/template.js +2 -0
- package/dist/default/internal/skins/scaffold-video/skin.css +240 -53
- package/dist/default/internal/skins/scaffold-video/template.js +3 -1
- package/dist/default/media/background-video/adapter.js +13 -35
- package/dist/default/media/background-video/base.js +95 -0
- package/dist/default/media/background-video/template.js +13 -20
- package/dist/default/media/dailymotion-video/adapter.js +31 -0
- package/dist/default/media/hls-background-video/adapter.js +23 -35
- 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/captions-radio-group/element.js +14 -1
- package/dist/default/ui/controls/element.js +6 -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/time-slider/markers.js +160 -0
- package/dist/default/version.js +1 -1
- package/dist/dev/define/audio/compat-skin.css +161 -41
- 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 +73 -34
- 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 +166 -42
- 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 +72 -34
- 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 +143 -41
- 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 +56 -31
- 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 +148 -42
- 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 +55 -31
- 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 +234 -51
- 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 +300 -46
- 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 +231 -53
- 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 +314 -49
- 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/ui/time-slider-markers.d.ts +8 -0
- package/dist/dev/define/ui/time-slider-markers.js +7 -0
- package/dist/dev/define/ui/time-slider-markers.js.map +1 -0
- package/dist/dev/define/video/compat-skin.css +242 -51
- 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 +382 -57
- 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 +240 -53
- 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 +415 -55
- 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 +5 -4
- package/dist/dev/index.js +3 -1
- package/dist/dev/internal/skins/compat-audio/skin.css +161 -41
- 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 +143 -41
- package/dist/dev/internal/skins/compat-live-video/skin.css +234 -51
- package/dist/dev/internal/skins/compat-live-video/template.js +2 -0
- package/dist/dev/internal/skins/compat-live-video/template.js.map +1 -1
- package/dist/dev/internal/skins/compat-video/skin.css +242 -51
- package/dist/dev/internal/skins/compat-video/template.js +2 -0
- package/dist/dev/internal/skins/compat-video/template.js.map +1 -1
- package/dist/dev/internal/skins/default-audio/skin.css +72 -34
- package/dist/dev/internal/skins/default-live-audio/skin.css +55 -31
- package/dist/dev/internal/skins/default-live-video/register.js.map +1 -1
- package/dist/dev/internal/skins/default-live-video/skin.css +314 -49
- package/dist/dev/internal/skins/default-live-video/template.js +14 -0
- package/dist/dev/internal/skins/default-live-video/template.js.map +1 -1
- package/dist/dev/internal/skins/default-video/register.d.ts +1 -0
- package/dist/dev/internal/skins/default-video/register.js +3 -0
- package/dist/dev/internal/skins/default-video/register.js.map +1 -1
- package/dist/dev/internal/skins/default-video/skin.css +415 -55
- package/dist/dev/internal/skins/default-video/template.js +33 -5
- package/dist/dev/internal/skins/default-video/template.js.map +1 -1
- package/dist/dev/internal/skins/neutral-audio/skin.css +73 -34
- package/dist/dev/internal/skins/neutral-live-audio/skin.css +56 -31
- package/dist/dev/internal/skins/neutral-live-video/register.js.map +1 -1
- package/dist/dev/internal/skins/neutral-live-video/skin.css +300 -46
- package/dist/dev/internal/skins/neutral-live-video/template.js +14 -0
- package/dist/dev/internal/skins/neutral-live-video/template.js.map +1 -1
- package/dist/dev/internal/skins/neutral-video/register.js.map +1 -1
- package/dist/dev/internal/skins/neutral-video/skin.css +382 -57
- package/dist/dev/internal/skins/neutral-video/template.js +25 -11
- package/dist/dev/internal/skins/neutral-video/template.js.map +1 -1
- package/dist/dev/internal/skins/scaffold-audio/skin.css +166 -42
- 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 +148 -42
- package/dist/dev/internal/skins/scaffold-live-video/skin.css +231 -53
- package/dist/dev/internal/skins/scaffold-live-video/template.js +2 -0
- package/dist/dev/internal/skins/scaffold-live-video/template.js.map +1 -1
- package/dist/dev/internal/skins/scaffold-video/skin.css +240 -53
- package/dist/dev/internal/skins/scaffold-video/template.js +3 -1
- package/dist/dev/internal/skins/scaffold-video/template.js.map +1 -1
- package/dist/dev/media/background-video/adapter.d.ts +7 -13
- package/dist/dev/media/background-video/adapter.js +13 -35
- package/dist/dev/media/background-video/adapter.js.map +1 -1
- package/dist/dev/media/background-video/base.d.ts +44 -0
- package/dist/dev/media/background-video/base.js +97 -0
- package/dist/dev/media/background-video/base.js.map +1 -0
- package/dist/dev/media/background-video/template.d.ts +3 -0
- package/dist/dev/media/background-video/template.js +13 -20
- package/dist/dev/media/background-video/template.js.map +1 -1
- 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 +14 -19
- package/dist/dev/media/hls-background-video/adapter.js +23 -35
- 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/captions-button/element.d.ts +2 -0
- package/dist/dev/ui/captions-radio-group/element.d.ts +2 -1
- package/dist/dev/ui/captions-radio-group/element.js +14 -1
- package/dist/dev/ui/captions-radio-group/element.js.map +1 -1
- package/dist/dev/ui/controls/element.d.ts +2 -2
- package/dist/dev/ui/controls/element.js +6 -3
- package/dist/dev/ui/controls/element.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/time-slider/markers.d.ts +48 -0
- package/dist/dev/ui/time-slider/markers.js +165 -0
- package/dist/dev/ui/time-slider/markers.js.map +1 -0
- package/dist/dev/version.js +1 -1
- package/docs/README.md +1 -1
- package/docs/guides/autoplay.md +2 -2
- package/docs/guides/background-video.md +2 -4
- package/docs/guides/browser-support.md +23 -15
- 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 +7 -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 +11 -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 +8 -9
- package/docs/guides/migrate-from-vidstack.md +10 -10
- package/docs/guides/mux-data.md +22 -0
- package/docs/guides/presets.md +5 -5
- package/docs/guides/self-hosting.md +5 -5
- package/docs/guides/skins.md +21 -5
- package/docs/guides/timed-metadata.md +318 -0
- package/docs/guides/ui-components.md +1 -1
- package/docs/llms.txt +25 -6
- package/docs/reference/api/chapters-track.md +71 -0
- package/docs/reference/api/define-text-track.md +113 -0
- package/docs/reference/api/feature-playback-rate.md +54 -3
- package/docs/reference/api/feature-playback.md +5 -1
- package/docs/reference/api/feature-text-cues.md +133 -0
- package/docs/reference/api/feature-text-tracks.md +11 -5
- package/docs/reference/api/get-active-text-cues.md +69 -0
- package/docs/reference/api/get-text-cues.md +69 -0
- package/docs/reference/api/get-text-tracks.md +41 -0
- package/docs/reference/api/hls-metadata-track.md +48 -0
- package/docs/reference/api/html-create-player.md +2 -2
- package/docs/reference/api/llms.txt +13 -1
- package/docs/reference/api/media-capabilities.md +4 -4
- package/docs/reference/api/player-store.md +15 -7
- package/docs/reference/api/preset-audio.md +15 -5
- package/docs/reference/api/preset-background.md +2 -2
- package/docs/reference/api/preset-live-audio.md +15 -5
- package/docs/reference/api/preset-live-video.md +14 -5
- package/docs/reference/api/preset-video.md +14 -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/audio.md +19 -1
- package/docs/reference/components/background-video-skin.md +1 -1
- package/docs/reference/components/background-video.md +26 -11
- package/docs/reference/components/buffering-indicator.md +2 -2
- package/docs/reference/components/captions-radio-group.md +3 -3
- package/docs/reference/components/cloudflare-video.md +1 -1
- package/docs/reference/components/controls.md +16 -3
- package/docs/reference/components/dailymotion-video.md +192 -0
- package/docs/reference/components/dash-video.md +20 -2
- 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 +56 -2
- package/docs/reference/components/hls-background-video.md +25 -5
- package/docs/reference/components/hls-video.md +99 -7
- package/docs/reference/components/hlsjs-video.md +53 -12
- 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 +12 -2
- package/docs/reference/components/live-video-neutral-skin.md +6 -2
- package/docs/reference/components/live-video-scaffold-skin.md +6 -2
- package/docs/reference/components/live-video-skin.md +6 -2
- package/docs/reference/components/llms.txt +10 -5
- package/docs/reference/components/mixcloud-audio.md +203 -0
- package/docs/reference/components/mux-audio.md +35 -2
- 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 +18 -2
- package/docs/reference/components/native-hls-video.md +32 -2
- 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 +2 -2
- package/docs/reference/components/quality-radio-group.md +2 -2
- package/docs/reference/components/shaka-video.md +2 -2
- package/docs/reference/components/soundcloud-audio.md +227 -0
- package/docs/reference/components/spotify-audio.md +3 -3
- package/docs/reference/components/tiktok-video.md +3 -3
- package/docs/reference/components/time-slider-markers.md +194 -0
- package/docs/reference/components/time-slider.md +14 -0
- package/docs/reference/components/twitch-video.md +2 -3
- package/docs/reference/components/video-compat-skin.md +12 -2
- package/docs/reference/components/video-neutral-skin.md +6 -2
- package/docs/reference/components/video-scaffold-skin.md +6 -2
- package/docs/reference/components/video-skin.md +6 -2
- package/docs/reference/components/video.md +19 -1
- package/docs/reference/components/vimeo-video.md +1 -1
- package/docs/reference/components/wistia-video.md +1 -1
- package/docs/reference/components/youtube-video.md +1 -1
- package/package.json +60 -40
|
@@ -70,4 +70,22 @@ This native audio element uses a child source and browser controls while providi
|
|
|
70
70
|
```ts
|
|
71
71
|
import '@videojs/html/audio/player';
|
|
72
72
|
import '@videojs/html/ui/container';
|
|
73
|
-
```
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## API Reference
|
|
76
|
+
|
|
77
|
+
### Attributes
|
|
78
|
+
|
|
79
|
+
Accepts the standard `<audio>` attributes. See the [MDN `<audio>` reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/audio): `autoplay`, `controls`, `controlslist`, `crossorigin`, `disableremoteplayback`, `loop`, `muted`, `preload`, `src`.
|
|
80
|
+
|
|
81
|
+
### Properties
|
|
82
|
+
|
|
83
|
+
Exposes the native media properties. See [`HTMLAudioElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement) for details: `autoplay`, `buffered`, `controls`, `crossOrigin`, `currentSrc`, `currentTime`, `defaultMuted`, `defaultPlaybackRate`, `disableRemotePlayback`, `duration`, `ended`, `error`, `loop`, `mediaKeys`, `muted`, `networkState`, `paused`, `playbackRate`, `played`, `preload`, `preservesPitch`, `readyState`, `remote`, `seekable`, `seeking`, `sinkId`, `src`, `srcObject`, `textTracks`, `volume`.
|
|
84
|
+
|
|
85
|
+
### Methods
|
|
86
|
+
|
|
87
|
+
Supports the native media methods. See [`HTMLAudioElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement) for details: `addTextTrack`, `canPlayType`, `fastSeek`, `load`, `pause`, `play`, `setMediaKeys`, `setSinkId`.
|
|
88
|
+
|
|
89
|
+
### Events
|
|
90
|
+
|
|
91
|
+
Fires the standard media events: `abort`, `canplay`, `canplaythrough`, `durationchange`, `emptied`, `encrypted`, `ended`, `error`, `loadeddata`, `loadedmetadata`, `loadstart`, `pause`, `play`, `playing`, `progress`, `ratechange`, `seeked`, `seeking`, `stalled`, `suspend`, `timeupdate`, `volumechange`, `waiting`, `waitingforkey`.
|
|
@@ -13,7 +13,7 @@ import '@videojs/html/background/skin';
|
|
|
13
13
|
The import registers the skin and every UI element it composes. The [CDN](../../guides/cdn.md) player bundle registers this skin together with its player:
|
|
14
14
|
|
|
15
15
|
```html
|
|
16
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
16
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/background.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Anatomy
|
|
@@ -4,7 +4,7 @@ Decorative background video element with automatic muting and looping
|
|
|
4
4
|
|
|
5
5
|
Decorative background video for a source the browser can play natively. By default it’s muted, looped, and autoplaying.
|
|
6
6
|
|
|
7
|
-
`<background-video>` renders a `<video>` inside shadow DOM and fills the box you give the component. Use the opt-out attributes in the [API
|
|
7
|
+
`<background-video>` renders a `<video>` inside shadow DOM and fills the box you give the component. Use the opt-out attributes in the [API](#api) to change its playback defaults.
|
|
8
8
|
|
|
9
9
|
An HLS URL only works where the browser has native HLS playback. See [Add a background video](../../guides/background-video.md) to choose a cross-browser HLS or Mux path and set up layout, poster, and decorative semantics.
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/media/background-video';
|
|
|
17
17
|
Or load it from the [CDN](../../guides/cdn.md):
|
|
18
18
|
|
|
19
19
|
```html
|
|
20
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
20
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/background-video.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Examples
|
|
@@ -48,20 +48,35 @@ Or load it from the [CDN](../../guides/cdn.md):
|
|
|
48
48
|
import '@videojs/html/media/background-video';
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
## API
|
|
51
|
+
## API
|
|
52
52
|
|
|
53
53
|
### Attributes
|
|
54
54
|
|
|
55
55
|
| Attribute | Description |
|
|
56
56
|
| --- | --- |
|
|
57
|
-
| `src` | URL of a video the browser can play directly, such as an MP4 or WebM file
|
|
58
|
-
| `nomuted` |
|
|
59
|
-
| `noloop` |
|
|
60
|
-
| `noautoplay` |
|
|
57
|
+
| `src` | URL of a video the browser can play directly, such as an MP4 or WebM file |
|
|
58
|
+
| `nomuted` | Turns off muting |
|
|
59
|
+
| `noloop` | Turns off looping |
|
|
60
|
+
| `noautoplay` | Turns off autoplay |
|
|
61
|
+
| `crossorigin`, `preload`, `controls`, `controlslist` | Passed through to the inner video |
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
An explicit `muted`, `loop`, or `autoplay` attribute wins over its opt-out. Opt-outs and passed-through attributes also apply when set or changed after the element is created.
|
|
63
64
|
|
|
64
|
-
|
|
65
|
+
### Properties
|
|
66
|
+
|
|
67
|
+
| Property | Description |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| `src` | URL of the video. Assigning a new one restarts playback |
|
|
70
|
+
| `error` | The inner video’s `MediaError`, or `null` |
|
|
71
|
+
| `target` | Inner native `<video>` element. Call `play()` and `pause()` on it |
|
|
72
|
+
|
|
73
|
+
The element also fires an `error` event when the inner video does.
|
|
74
|
+
|
|
75
|
+
## Styling
|
|
76
|
+
|
|
77
|
+
| Custom property | Default | Description |
|
|
65
78
|
| --- | --- | --- |
|
|
66
|
-
| `--media-object-fit` | `inherit` |
|
|
67
|
-
| `--media-object-position` | `50% 50%` |
|
|
79
|
+
| `--media-object-fit` | `inherit` | How the video fits its box |
|
|
80
|
+
| `--media-object-position` | `50% 50%` | Position of the video within its box |
|
|
81
|
+
|
|
82
|
+
Set an explicit size on the custom element or an author-owned wrapper.
|
|
@@ -16,7 +16,7 @@ import '@videojs/html/ui/buffering-indicator';
|
|
|
16
16
|
|
|
17
17
|
## Behavior
|
|
18
18
|
|
|
19
|
-
Shows a loading indicator when the media is waiting to buffer and not paused, but only after a configurable `delay` (default 500ms). This delay prevents the indicator from flickering during brief stalls. The indicator hides immediately when buffering ends.
|
|
19
|
+
Shows a loading indicator when the media is waiting to buffer and not paused, or while media with `autoplay` is trying to start, but only after a configurable `delay` (default 500ms). This delay prevents the indicator from flickering during brief stalls. The indicator hides immediately when buffering ends, or when the browser refuses the autoplay.
|
|
20
20
|
|
|
21
21
|
## Styling
|
|
22
22
|
|
|
@@ -102,7 +102,7 @@ State is reflected as data attributes for CSS styling.
|
|
|
102
102
|
|
|
103
103
|
| Property | Type | Description |
|
|
104
104
|
| --- | --- | --- |
|
|
105
|
-
| `visible` | `boolean` | Whether the indicator should be visible. True after the delay elapses while media is waiting and not paused. |
|
|
105
|
+
| `visible` | `boolean` | Whether the indicator should be visible. True after the delay elapses while media is waiting and not paused, or while it's trying to autoplay. |
|
|
106
106
|
|
|
107
107
|
### Data attributes
|
|
108
108
|
|
|
@@ -175,7 +175,7 @@ import '@videojs/html/ui/captions-radio-group';
|
|
|
175
175
|
|
|
176
176
|
### media-captions-radio-group
|
|
177
177
|
|
|
178
|
-
Menu radio group that generates an Off `<media-menu-radio-item>` plus one per captions and subtitles track, and shares the selected label and availability with an enclosing menu. An optional `<template>` holding one `<media-menu-radio-item>` customizes each generated item.
|
|
178
|
+
Menu radio group that generates an Off `<media-menu-radio-item>` plus one per captions and subtitles track, and shares the selected label and availability with an enclosing menu. An optional `<template>` holding one `<media-menu-radio-item>` customizes each generated item; its `data-part` `label` and `badge` descendants receive the track's text.
|
|
179
179
|
|
|
180
180
|
#### Props
|
|
181
181
|
|
|
@@ -197,7 +197,7 @@ State is reflected as data attributes for CSS styling.
|
|
|
197
197
|
| `options` | `readonly Option[]` | Ordered options displayed by platform adapters. |
|
|
198
198
|
| `disabled` | `boolean` | Whether the entire option group is disabled. |
|
|
199
199
|
| `hidden` | `boolean` | Whether the option group is hidden because no meaningful selection is available. |
|
|
200
|
-
| `availability` | `'available' \| 'unavailable'` | Whether the media exposes a meaningful selection. |
|
|
200
|
+
| `availability` | `'available' \| 'unavailable' \| 'unsupported'` | Whether the media exposes a meaningful selection. `unsupported` when the media has no such capability at all. |
|
|
201
201
|
|
|
202
202
|
#### Data attributes
|
|
203
203
|
|
|
@@ -206,7 +206,7 @@ State is reflected as data attributes for CSS styling.
|
|
|
206
206
|
| `data-active` | — | Present when captions are enabled. |
|
|
207
207
|
| `data-disabled` | — | Present when track selection is disabled. |
|
|
208
208
|
| `data-hidden` | — | Present when track selection is unavailable. |
|
|
209
|
-
| `data-availability` | `'available' \| 'unavailable'` | Indicates captions availability (`available` or `unavailable`). |
|
|
209
|
+
| `data-availability` | `'available' \| 'unavailable' \| 'unsupported'` | Indicates captions availability (`available` or `unavailable`). |
|
|
210
210
|
|
|
211
211
|
#### Events
|
|
212
212
|
|
|
@@ -17,7 +17,7 @@ import '@videojs/html/media/cloudflare-video';
|
|
|
17
17
|
Or load it from the [CDN](../../guides/cdn.md):
|
|
18
18
|
|
|
19
19
|
```html
|
|
20
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
20
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/cloudflare-video.js"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Load a source
|
|
@@ -30,6 +30,8 @@ If the user is active, or if the video is paused, this component will show contr
|
|
|
30
30
|
|
|
31
31
|
User activity is tracked via pointer movement, keyboard input, and focus events on the player container. On touch devices, a quick tap toggles visibility. `mouseleave` immediately sets the user as inactive.
|
|
32
32
|
|
|
33
|
+
The controls also report whether playback has started, with `data-started`. A pending autoplay counts as started, matching the play button. Pausing does not clear it.
|
|
34
|
+
|
|
33
35
|
`visibility` selects between the two modes. The default, `auto`, follows the player’s controls visibility state as described above. `always` keeps the controls visible and reports the user as active regardless of playback or idle state, and works without the controls feature. The idle delay itself is not configurable.
|
|
34
36
|
|
|
35
37
|
```html
|
|
@@ -44,7 +46,7 @@ User activity is tracked via pointer movement, keyboard input, and focus events
|
|
|
44
46
|
|
|
45
47
|
`<media-controls-backdrop>` is an optional presentational sibling of `<media-controls-content>`. It receives the same controls state data attributes, allowing its styling and transitions to be authored independently from the controls surface.
|
|
46
48
|
|
|
47
|
-
The controls parts ship no styles. These example rules provide click-through and fade behavior:
|
|
49
|
+
The controls parts ship no styles. These example rules provide click-through and fade behavior, and keep the controls hidden until playback starts. Use `visibility` rather than `opacity` for that last rule, so the hidden controls can’t receive focus:
|
|
48
50
|
|
|
49
51
|
```css
|
|
50
52
|
/* Click-through: clicks pass through controls to video beneath */
|
|
@@ -74,6 +76,12 @@ media-controls-content:not([data-visible]) {
|
|
|
74
76
|
media-controls-backdrop:not([data-visible]) {
|
|
75
77
|
opacity: 0;
|
|
76
78
|
}
|
|
79
|
+
|
|
80
|
+
/* Hide the controls until playback starts */
|
|
81
|
+
media-controls-content:not([data-started]),
|
|
82
|
+
media-controls-backdrop:not([data-started]) {
|
|
83
|
+
visibility: hidden;
|
|
84
|
+
}
|
|
77
85
|
```
|
|
78
86
|
|
|
79
87
|
## Accessibility
|
|
@@ -208,7 +216,7 @@ import '@videojs/html/ui/time';
|
|
|
208
216
|
|
|
209
217
|
### media-controls
|
|
210
218
|
|
|
211
|
-
Tracks controls visibility, reflects
|
|
219
|
+
Tracks controls visibility and whether playback has started, reflects them as data attributes, and shares them with its descendant controls parts. Hiding the controls closes any popup open inside it.
|
|
212
220
|
|
|
213
221
|
#### Props
|
|
214
222
|
|
|
@@ -224,6 +232,7 @@ State is reflected as data attributes for CSS styling.
|
|
|
224
232
|
| --- | --- | --- |
|
|
225
233
|
| `visible` | `boolean` | Whether the controls are visible. |
|
|
226
234
|
| `userActive` | `boolean` | Whether the user has recently interacted with the player. |
|
|
235
|
+
| `started` | `boolean` | Whether playback has started or the media is trying to autoplay. |
|
|
227
236
|
|
|
228
237
|
#### Data attributes
|
|
229
238
|
|
|
@@ -231,6 +240,7 @@ State is reflected as data attributes for CSS styling.
|
|
|
231
240
|
| --- | --- |
|
|
232
241
|
| `data-visible` | Present when controls are visible. |
|
|
233
242
|
| `data-user-active` | Present when the user has recently interacted. |
|
|
243
|
+
| `data-started` | Present when playback has started or the media is trying to autoplay. |
|
|
234
244
|
|
|
235
245
|
### media-controls-backdrop
|
|
236
246
|
|
|
@@ -242,6 +252,7 @@ Presentational backdrop that reflects its owning controls surface's state.
|
|
|
242
252
|
| --- | --- |
|
|
243
253
|
| `data-visible` | Present when controls are visible. |
|
|
244
254
|
| `data-user-active` | Present when the user has recently interacted. |
|
|
255
|
+
| `data-started` | Present when playback has started or the media is trying to autoplay. |
|
|
245
256
|
|
|
246
257
|
### media-controls-content
|
|
247
258
|
|
|
@@ -253,6 +264,7 @@ Interactive surface that reflects its owning controls state.
|
|
|
253
264
|
| --- | --- |
|
|
254
265
|
| `data-visible` | Present when controls are visible. |
|
|
255
266
|
| `data-user-active` | Present when the user has recently interacted. |
|
|
267
|
+
| `data-started` | Present when playback has started or the media is trying to autoplay. |
|
|
256
268
|
|
|
257
269
|
### media-controls-group
|
|
258
270
|
|
|
@@ -263,4 +275,5 @@ Layout group for related controls; sets `role="group"` when labeled.
|
|
|
263
275
|
| Attribute | Description |
|
|
264
276
|
| --- | --- |
|
|
265
277
|
| `data-visible` | Present when controls are visible. |
|
|
266
|
-
| `data-user-active` | Present when the user has recently interacted. |
|
|
278
|
+
| `data-user-active` | Present when the user has recently interacted. |
|
|
279
|
+
| `data-started` | Present when playback has started or the media is trying to autoplay. |
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# dailymotion-video
|
|
2
|
+
|
|
3
|
+
Video component that plays Dailymotion videos through a Dailymotion player configuration
|
|
4
|
+
|
|
5
|
+
The Dailymotion player plays videos inside a player configuration you create in [Dailymotion Studio](https://www.dailymotion.com/partner/embed/players), and this component drives it through the [Dailymotion Web SDK](https://developers.dailymotion.com/reference/web-sdk-player-methods). Dailymotion refuses any embed that doesn’t name a player configuration, so every source carries a Player ID. See [Create a Player](https://developers.dailymotion.com/docs/create-a-player) in the official Dailymotion documentation.
|
|
6
|
+
|
|
7
|
+
> **Caution: Works without a skin**
|
|
8
|
+
>
|
|
9
|
+
> Dailymotion’s terms don’t allow covering its player, so this component uses Dailymotion’s own controls instead of a Video.js skin (see [Use Dailymotion’s controls](#use-dailymotions-controls)). If you need it to work with a skin, [open an issue](https://github.com/videojs/video.js/issues) describing your use case.
|
|
10
|
+
|
|
11
|
+
## Import
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm add @videojs/dailymotion-video
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import '@videojs/html/media/dailymotion-video';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or load it from the [CDN](../../guides/cdn.md):
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/dailymotion-video.js"></script>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Load a source
|
|
28
|
+
|
|
29
|
+
The simplest `src` is the player embed URL Dailymotion Studio gives you, which names both the player configuration and the video:
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<dailymotion-video src="https://geo.dailymotion.com/player/x8lr5.html?video=x84sh87"></dailymotion-video>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Specify the Player ID
|
|
36
|
+
|
|
37
|
+
These URLs name a video but no player configuration, so pair them with `engine.dailymotion.player`:
|
|
38
|
+
|
|
39
|
+
- Video page URLs: `dailymotion.com/video/<id>`
|
|
40
|
+
- Legacy embed URLs: `dailymotion.com/embed/video/<id>`, or `geo.dailymotion.com/player.html?video=<id>`, where they now redirect
|
|
41
|
+
- Short links: `dai.ly/<id>`
|
|
42
|
+
|
|
43
|
+
`engine.dailymotion.player` also wins over the configuration a player embed URL names. [Configure the player in Dailymotion Studio](#configure-the-player-in-dailymotion-studio) covers where a Player ID comes from. Dailymotion’s [runtime parameters](https://developers.dailymotion.com/reference/web-sdk-player-runtime-parameters) go next to it:
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
const video = document.querySelector('dailymotion-video');
|
|
47
|
+
video.source = {
|
|
48
|
+
src: 'https://www.dailymotion.com/video/x84sh87',
|
|
49
|
+
engine: { dailymotion: { player: 'x8lr5', startTime: 10 } },
|
|
50
|
+
};
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The URL’s query can also carry Dailymotion’s `startTime` (or the older `start`), `scaleMode`, and `customConfig[key]=value`, as Dailymotion’s iframe embed reads them; `engine.dailymotion` wins over them. `loop`, `autoplay`, and mute come from the component’s own props.
|
|
54
|
+
|
|
55
|
+
Without a Player ID, the component reports a `MEDIA_ERR_SRC_NOT_SUPPORTED` error instead of creating a player Dailymotion would reject, and in development it logs a warning that points to `engine.dailymotion.player`. The SDK script is loaded from `geo.dailymotion.com` with the first player created on the page; under a [Content Security Policy](../../guides/content-security-policy.md), allow that origin.
|
|
56
|
+
|
|
57
|
+
## Use Dailymotion’s controls
|
|
58
|
+
|
|
59
|
+
Dailymotion’s [Terms of Use](https://legal.dailymotion.com/en/terms-of-use/) don’t allow blocking any part of its embedded player, including its links back to Dailymotion. So the component always lets the player take pointer input, and Dailymotion’s own controls, logo, and links stay usable.
|
|
60
|
+
|
|
61
|
+
A [skin](../../guides/skins.md) doesn’t work over the player, which takes the pointer input over the video before the skin can see it, so use the component without one, as in [Basic Usage](#basic-usage).
|
|
62
|
+
|
|
63
|
+
## Configure the player in Dailymotion Studio
|
|
64
|
+
|
|
65
|
+
Create a player configuration on the Players page in [Dailymotion Studio](https://www.dailymotion.com/partner/embed/players). Its Player ID is the part of the player embed URL Studio gives you after `/player/`: `x8lr5` in `geo.dailymotion.com/player/x8lr5.html`.
|
|
66
|
+
|
|
67
|
+
The player configuration decides what the embed can’t change at runtime:
|
|
68
|
+
|
|
69
|
+
| Setting | Effect |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| Controls | Which of Dailymotion’s controls show. `controls` has no effect. |
|
|
72
|
+
| Autostart | `autoplay` decides whether the video starts: with it off, the component pauses the configuration’s autostart as it starts. An ad that plays first is never paused, and the video after it is. Turning Autostart off avoids the pause. |
|
|
73
|
+
| Autonext | When the player moves on to the next video by itself, `src` still names the one you loaded. It also overrides `loop`: the video stops at the end, and the component reports `ended`. |
|
|
74
|
+
| Picture-in-picture | Dailymotion’s picture-in-picture moves the player out of the element. |
|
|
75
|
+
| Poster, preload, and inline playback | `poster`, `preload`, and `playsinline` are accepted for parity with `<video>` but have no effect. |
|
|
76
|
+
|
|
77
|
+
## Behavior
|
|
78
|
+
|
|
79
|
+
- Volume and mute both work, like a native `<video>`. Dailymotion has no separate mute, so muting sets its volume to `0` and unmuting restores the previous level.
|
|
80
|
+
- `playbackRate` takes Dailymotion’s rates, `0.25` to `2` in steps of `0.25`. Dailymotion rounds any other value up to the next one and caps it at `2`, and `playbackRate` then reports the rate it plays at.
|
|
81
|
+
- `loop` is passed to Dailymotion, which restarts the video itself.
|
|
82
|
+
- A new source loads into the same player while the Player ID and the runtime parameters other than `startTime` stay the same, whether they come from `engine.dailymotion` or the URL’s query. Any other change creates a new player, since Dailymotion only reads them when a player is created. So does `autoplay`, but only at the next load: call `load()` to apply a change right away. `muted` and `loop` change in place.
|
|
83
|
+
- Depending on the player configuration, Dailymotion may ignore a seek made before the video first plays, and playback then starts from the beginning. To start at a known position, set `startTime` on the source (under `engine.dailymotion`, or in the URL) instead: Dailymotion applies it on load.
|
|
84
|
+
- Seeking while paused stays paused, as on a native `<video>`. Dailymotion starts playback on a seek from its start or end screen, and the component pauses it again as it starts, unless an ad plays first.
|
|
85
|
+
- The SDK reports no buffered range, so `buffered` ends at the furthest point played.
|
|
86
|
+
- Ads play inside the embed, and the component never pauses one. `paused` follows the ad while it plays, but `currentTime` and `duration` always describe the video.
|
|
87
|
+
- When the browser refuses to start playback, as it does for unmuted autoplay, the component reports `pause` instead of playing.
|
|
88
|
+
- Fullscreen targets the element the player is built in.
|
|
89
|
+
|
|
90
|
+
## Examples
|
|
91
|
+
|
|
92
|
+
### Basic Usage
|
|
93
|
+
|
|
94
|
+
**index.html**
|
|
95
|
+
|
|
96
|
+
```html
|
|
97
|
+
<dailymotion-video muted src="https://geo.dailymotion.com/player/x8lr5.html?video=x84sh87" class="dailymotion-video"></dailymotion-video>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**index.css**
|
|
101
|
+
|
|
102
|
+
```css
|
|
103
|
+
.dailymotion-video {
|
|
104
|
+
width: 100%;
|
|
105
|
+
aspect-ratio: 16 / 9;
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**index.ts**
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
import '@videojs/html/media/dailymotion-video';
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## API Reference
|
|
116
|
+
|
|
117
|
+
### Attributes
|
|
118
|
+
|
|
119
|
+
These attributes configure the embedded media adapter:
|
|
120
|
+
|
|
121
|
+
| Attribute | Type | Default | Description |
|
|
122
|
+
| --- | --- | --- | --- |
|
|
123
|
+
| `autoplay` | `boolean` | `false` | Starts playback on each load, through Dailymotion's `autoplay` parameter and a play sent once the player is ready. When off, a player configuration whose Autostart is on is paused as it starts, unless an ad plays first. |
|
|
124
|
+
| `controls` | `boolean` | `false` | Has no effect: the player configuration decides whether Dailymotion's controls show, which the SDK can't change. |
|
|
125
|
+
| `loop` | `boolean` | `false` | |
|
|
126
|
+
| `muted` | `boolean` | `false` | |
|
|
127
|
+
| `playsinline` | `boolean` | `true` | |
|
|
128
|
+
| `poster` | `string` | `''` | |
|
|
129
|
+
| `preload` | `MediaPreloadType` | `'metadata'` | |
|
|
130
|
+
| `src` | `string` | `''` | |
|
|
131
|
+
|
|
132
|
+
### Properties
|
|
133
|
+
|
|
134
|
+
| Property | Type | Default | Description |
|
|
135
|
+
| --- | --- | --- | --- |
|
|
136
|
+
| `autoplay` | `boolean` | `false` | Starts playback on each load, through Dailymotion's `autoplay` parameter and a play sent once the player is ready. When off, a player configuration whose Autostart is on is paused as it starts, unless an ad plays first. |
|
|
137
|
+
| `buffered` | `TimeRangeLike` | — | Read-only. |
|
|
138
|
+
| `controls` | `boolean` | `false` | Has no effect: the player configuration decides whether Dailymotion's controls show, which the SDK can't change. |
|
|
139
|
+
| `currentSrc` | `string` | — | Read-only. |
|
|
140
|
+
| `currentTime` | `number` | — | |
|
|
141
|
+
| `defaultMuted` | `boolean` | `false` | |
|
|
142
|
+
| `duration` | `number` | — | Read-only. |
|
|
143
|
+
| `ended` | `boolean` | — | Read-only. |
|
|
144
|
+
| `engine` | `{ play(): void; pause(): void; seek(time: number): void; setVolume(volume: number): void; setPlaybackSpeed(speed: number): void; setLoop(loop: boolean): void; updateParams(params: Record<string, unknown>): void; loadContent(options: { video: string; startTime?: number }): void; getState(): Promise<DailymotionPlayerState>; getSettings(): { autostart?: string }; on(event: string, listener: ((state: DailymotionPlayerState) => void)): void; off(event: string, listener?: ((state: DailymotionPlayerState) => void)): void; destroy(): void } \| null` | — | Read-only. The SDK's player object, or null until the player is ready. |
|
|
145
|
+
| `error` | `MediaError \| null` | — | Read-only. |
|
|
146
|
+
| `isFullscreen` | `boolean` | — | Read-only. |
|
|
147
|
+
| `loop` | `boolean` | `false` | |
|
|
148
|
+
| `muted` | `boolean` | `false` | |
|
|
149
|
+
| `paused` | `boolean` | — | Read-only. |
|
|
150
|
+
| `playbackRate` | `number` | — | Dailymotion plays at a fixed set of rates (`0.25` to `2` in quarter steps): it rounds any other rate up to the next one, and caps it at `2`. |
|
|
151
|
+
| `played` | `{ length: number; start(index: number): number; end(index: number): number }` | — | Read-only. |
|
|
152
|
+
| `playsInline` | `boolean` | `true` | |
|
|
153
|
+
| `poster` | `string` | `''` | |
|
|
154
|
+
| `preload` | `MediaPreloadType` | `'metadata'` | |
|
|
155
|
+
| `readyState` | `number` | — | Read-only. |
|
|
156
|
+
| `seekable` | `TimeRangeLike` | — | Read-only. |
|
|
157
|
+
| `seeking` | `boolean` | — | Read-only. |
|
|
158
|
+
| `source` | `{ src?: string; engine?: DailymotionSourceEngineConfig } \| null` | `null` | Dailymotion video URL in `src`, player configuration and parameters under `engine.dailymotion`. |
|
|
159
|
+
| `src` | `string` | `''` | |
|
|
160
|
+
| `textTracks` | `TextTrackListLike` | — | Read-only. Unsupported: the player draws its own subtitles and reports no cues to render elsewhere. |
|
|
161
|
+
| `volume` | `number` | — | |
|
|
162
|
+
|
|
163
|
+
### Engine options
|
|
164
|
+
|
|
165
|
+
#### `source.engine.dailymotion`
|
|
166
|
+
|
|
167
|
+
Pass the Player ID as `player`, plus [Dailymotion runtime parameters](https://developers.dailymotion.com/reference/web-sdk-player-runtime-parameters) under `source.engine.dailymotion`, spelled exactly as Dailymotion spells them. [Media Sources](../../guides/media-sources.md) covers how engine options fit into a structured source.
|
|
168
|
+
|
|
169
|
+
The video comes from `src`, and `loop` and `autoplay` from the props of the same name, so none of them has an `engine.dailymotion` spelling. Mute isn’t a runtime parameter either: the component applies it through the SDK. [Configure the player in Dailymotion Studio](#configure-the-player-in-dailymotion-studio) lists what only the player configuration decides, such as controls.
|
|
170
|
+
|
|
171
|
+
| Option | Type | Description |
|
|
172
|
+
| --- | --- | --- |
|
|
173
|
+
| `customConfig` | `Record<string, string> \| undefined` | Advertising key-values ([https://developers.dailymotion.com/docs/custom-config](https://developers.dailymotion.com/docs/custom-config)). |
|
|
174
|
+
| `player` | `string \| undefined` | Player ID of a player configuration from Dailymotion Studio. Required unless `src` is a player embed URL, which names its own; this one wins over it. |
|
|
175
|
+
| `referrerPolicy` | `ReferrerPolicy \| undefined` | `referrerpolicy` for the iframe the SDK builds. |
|
|
176
|
+
| `scaleMode` | `'fit' \| 'fill' \| 'fillLeft' \| 'fillRight' \| 'fillTop' \| 'fillBottom' \| undefined` | How the video fills the player. Defaults to `'fit'`. |
|
|
177
|
+
| `startTime` | `number \| undefined` | Start position in seconds. |
|
|
178
|
+
|
|
179
|
+
### Methods
|
|
180
|
+
|
|
181
|
+
Supports these media methods: `exitFullscreen`, `load`, `pause`, `play`, `requestFullscreen`.
|
|
182
|
+
|
|
183
|
+
### Events
|
|
184
|
+
|
|
185
|
+
Implements these standard media events through the embedded player: `canplay`, `durationchange`, `emptied`, `ended`, `error`, `loadedmetadata`, `loadstart`, `pause`, `play`, `playing`, `ratechange`, `seeked`, `seeking`, `timeupdate`, `volumechange`, `waiting`.
|
|
186
|
+
|
|
187
|
+
Also emits these Video.js-specific events:
|
|
188
|
+
|
|
189
|
+
| Event | Description |
|
|
190
|
+
| --- | --- |
|
|
191
|
+
| `loadcomplete` | |
|
|
192
|
+
| `sourcechange` | Fired when `source` changes, either directly or by resolving a new `src`. Read `source` for the new value. |
|
|
@@ -21,7 +21,25 @@ import '@videojs/html/media/dash-video';
|
|
|
21
21
|
Or load it from the [CDN](../../guides/cdn.md):
|
|
22
22
|
|
|
23
23
|
```html
|
|
24
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
24
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/dash-video.js"></script>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Load a source
|
|
28
|
+
|
|
29
|
+
`src` takes a DASH manifest (MPD) URL.
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<dash-video src="https://example.com/manifest.mpd"></dash-video>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The structured `source` object pairs the URL with dash.js settings under `engine.dashJs`. Setting `source` derives `src`, and changing `engine.dashJs` applies the settings to the running player instead of recreating it.
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
const video = document.querySelector('dash-video')!;
|
|
39
|
+
video.source = {
|
|
40
|
+
src: 'https://example.com/manifest.mpd',
|
|
41
|
+
engine: { dashJs: { streaming: { buffer: { bufferTimeAtTopQuality: 30 } } } },
|
|
42
|
+
};
|
|
25
43
|
```
|
|
26
44
|
|
|
27
45
|
## Examples
|
|
@@ -87,7 +105,7 @@ Also exposes these properties from the native media API. See [HTMLVideoElement](
|
|
|
87
105
|
|
|
88
106
|
### Methods
|
|
89
107
|
|
|
90
|
-
Supports these media methods. See [HTMLVideoElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement) for details: `addTextTrack`, `canPlayType`, `exitFullscreen`, `exitPictureInPicture`, `load`, `pause`, `play`, `requestFullscreen`, `requestPictureInPicture`.
|
|
108
|
+
Supports these media methods. See [HTMLVideoElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement) for details: `addTextTrack`, `canPlayType`, `exitFullscreen`, `exitPictureInPicture`, `load`, `pause`, `play`, `removeTextTrack`, `requestFullscreen`, `requestPictureInPicture`.
|
|
91
109
|
|
|
92
110
|
### Events
|
|
93
111
|
|
|
@@ -35,6 +35,12 @@ Place a button immediately before `media-dialog`, or connect them explicitly wit
|
|
|
35
35
|
|
|
36
36
|
The close part and Escape close the dialog. Other buttons inside the dialog, including player controls, do not close it.
|
|
37
37
|
|
|
38
|
+
### Inside and outside a player
|
|
39
|
+
|
|
40
|
+
A dialog inside a player is confined to that player. The rest of the player becomes inert, but the page around it stays interactive and `aria-modal` is omitted. A dialog outside a player is modal for the whole page, with `aria-modal="true"` and everything outside the popup inert.
|
|
41
|
+
|
|
42
|
+
The backdrop and popup get `data-scope`: `player` inside a player and `document` outside one. The built-in skin styles use it to switch from `position: absolute` to `position: fixed`. In your own styles, give a dialog outside a player `position: fixed` so it covers the viewport, as with any headless dialog. Inside a skin, give the backdrop and popup a `z-index` above the controls; the built-in skins use `40` and `50`.
|
|
43
|
+
|
|
38
44
|
Your application decides what opening and closing mean for the media. The example starts playback after opening and pauses it as soon as the dialog closes. Handle the promise returned by `play()`, since browsers can reject autoplay when it is not allowed.
|
|
39
45
|
|
|
40
46
|
Use [`<media-alert-dialog>`](./alert-dialog.md) for urgent messages that require acknowledgement. [`<media-error-dialog>`](./error-dialog.md) is the player-error specialization. Both use the same dialog behavior.
|
|
@@ -48,8 +54,24 @@ Use the open and transition data attributes to style the modal and its animation
|
|
|
48
54
|
| `data-open` | Present while the dialog is open, including its closing transition |
|
|
49
55
|
| `data-starting-style` | Present at the start of the opening transition |
|
|
50
56
|
| `data-ending-style` | Present during the closing transition |
|
|
57
|
+
| `data-scope` | `player` inside a player, `document` outside one |
|
|
51
58
|
|
|
52
59
|
```css
|
|
60
|
+
media-dialog-backdrop {
|
|
61
|
+
position: absolute;
|
|
62
|
+
z-index: 40;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
media-dialog-popup {
|
|
66
|
+
position: absolute;
|
|
67
|
+
z-index: 50;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
media-dialog-backdrop[data-scope="document"],
|
|
71
|
+
media-dialog-popup[data-scope="document"] {
|
|
72
|
+
position: fixed;
|
|
73
|
+
}
|
|
74
|
+
|
|
53
75
|
media-dialog-backdrop:not([data-open]),
|
|
54
76
|
media-dialog-popup:not([data-open]) {
|
|
55
77
|
display: none;
|
|
@@ -65,9 +87,9 @@ media-dialog-popup[data-ending-style] {
|
|
|
65
87
|
|
|
66
88
|
## Accessibility
|
|
67
89
|
|
|
68
|
-
The popup uses `role="dialog"
|
|
90
|
+
The popup uses `role="dialog"`, plus `aria-modal="true"` outside a player. Include `<media-dialog-title>` so the dialog always has an accessible name. `<media-dialog-description>` is optional. These parts receive generated IDs connected through `aria-labelledby` and `aria-describedby`. The trigger receives `aria-haspopup`, `aria-controls`, and `aria-expanded`.
|
|
69
91
|
|
|
70
|
-
When the dialog opens, focus moves to an element with `autofocus`, the first focusable element, or the popup itself. Tab and Shift + Tab keep focus within the dialog, and content outside the dialog becomes inert. Closing restores focus to the trigger, or to the element that was focused before the dialog opened.
|
|
92
|
+
When the dialog opens, focus moves to an element with `autofocus`, the first focusable element, or the popup itself. Tab and Shift + Tab keep focus within the dialog, and content outside the dialog, within its player or the page, becomes inert. Closing restores focus to the trigger, or to the element that was focused before the dialog opened.
|
|
71
93
|
|
|
72
94
|
Dialogs inside the same player container share modal coordination. Opening one closes the current dialog and dismisses any open menu, tooltip, or popover before focus moves into the new popup.
|
|
73
95
|
|
|
@@ -276,14 +298,16 @@ State is reflected as data attributes for CSS styling.
|
|
|
276
298
|
| `status` | `'idle' \| 'starting' \| 'ending'` | Current phase of the transition lifecycle. |
|
|
277
299
|
| `titleId` | `string \| undefined` | Element ID of the dialog title, used for `aria-labelledby`. |
|
|
278
300
|
| `descriptionId` | `string \| undefined` | Element ID of the dialog description, used for `aria-describedby`. |
|
|
301
|
+
| `scope` | `'player' \| 'document'` | `player` when the dialog is rendered inside a player and confined to it, otherwise `document`. |
|
|
279
302
|
|
|
280
303
|
#### Data attributes
|
|
281
304
|
|
|
282
|
-
| Attribute | Description |
|
|
283
|
-
| --- | --- |
|
|
284
|
-
| `data-open` | Present when the dialog is open. |
|
|
285
|
-
| `data-starting-style` | Present during the open transition. |
|
|
286
|
-
| `data-ending-style` | Present during the close transition. |
|
|
305
|
+
| Attribute | Type | Description |
|
|
306
|
+
| --- | --- | --- |
|
|
307
|
+
| `data-open` | — | Present when the dialog is open. |
|
|
308
|
+
| `data-starting-style` | — | Present during the open transition. |
|
|
309
|
+
| `data-ending-style` | — | Present during the close transition. |
|
|
310
|
+
| `data-scope` | `'player' \| 'document'` | `player` when the dialog is confined to its player, otherwise `document`. |
|
|
287
311
|
|
|
288
312
|
#### Events
|
|
289
313
|
|
|
@@ -298,11 +322,12 @@ Presentational backdrop that reflects its owning dialog's state.
|
|
|
298
322
|
|
|
299
323
|
#### Data attributes
|
|
300
324
|
|
|
301
|
-
| Attribute | Description |
|
|
302
|
-
| --- | --- |
|
|
303
|
-
| `data-open` | Present when the dialog is open. |
|
|
304
|
-
| `data-starting-style` | Present during the open transition. |
|
|
305
|
-
| `data-ending-style` | Present during the close transition. |
|
|
325
|
+
| Attribute | Type | Description |
|
|
326
|
+
| --- | --- | --- |
|
|
327
|
+
| `data-open` | — | Present when the dialog is open. |
|
|
328
|
+
| `data-starting-style` | — | Present during the open transition. |
|
|
329
|
+
| `data-ending-style` | — | Present during the close transition. |
|
|
330
|
+
| `data-scope` | `'player' \| 'document'` | `player` when the dialog is confined to its player, otherwise `document`. |
|
|
306
331
|
|
|
307
332
|
### media-dialog-close
|
|
308
333
|
|
|
@@ -310,11 +335,12 @@ Button that closes its owning dialog; the element itself takes `role="button"` a
|
|
|
310
335
|
|
|
311
336
|
#### Data attributes
|
|
312
337
|
|
|
313
|
-
| Attribute | Description |
|
|
314
|
-
| --- | --- |
|
|
315
|
-
| `data-open` | Present when the dialog is open. |
|
|
316
|
-
| `data-starting-style` | Present during the open transition. |
|
|
317
|
-
| `data-ending-style` | Present during the close transition. |
|
|
338
|
+
| Attribute | Type | Description |
|
|
339
|
+
| --- | --- | --- |
|
|
340
|
+
| `data-open` | — | Present when the dialog is open. |
|
|
341
|
+
| `data-starting-style` | — | Present during the open transition. |
|
|
342
|
+
| `data-ending-style` | — | Present during the close transition. |
|
|
343
|
+
| `data-scope` | `'player' \| 'document'` | `player` when the dialog is confined to its player, otherwise `document`. |
|
|
318
344
|
|
|
319
345
|
### media-dialog-description
|
|
320
346
|
|
|
@@ -326,11 +352,12 @@ Semantic popup that owns focus management and dialog transition completion.
|
|
|
326
352
|
|
|
327
353
|
#### Data attributes
|
|
328
354
|
|
|
329
|
-
| Attribute | Description |
|
|
330
|
-
| --- | --- |
|
|
331
|
-
| `data-open` | Present when the dialog is open. |
|
|
332
|
-
| `data-starting-style` | Present during the open transition. |
|
|
333
|
-
| `data-ending-style` | Present during the close transition. |
|
|
355
|
+
| Attribute | Type | Description |
|
|
356
|
+
| --- | --- | --- |
|
|
357
|
+
| `data-open` | — | Present when the dialog is open. |
|
|
358
|
+
| `data-starting-style` | — | Present during the open transition. |
|
|
359
|
+
| `data-ending-style` | — | Present during the close transition. |
|
|
360
|
+
| `data-scope` | `'player' \| 'document'` | `player` when the dialog is confined to its player, otherwise `document`. |
|
|
334
361
|
|
|
335
362
|
### media-dialog-title
|
|
336
363
|
|
|
@@ -229,6 +229,7 @@ State is reflected as data attributes for CSS styling.
|
|
|
229
229
|
| `status` | `'idle' \| 'starting' \| 'ending'` | Current phase of the transition lifecycle. |
|
|
230
230
|
| `titleId` | `string \| undefined` | Element ID of the dialog title, used for `aria-labelledby`. |
|
|
231
231
|
| `descriptionId` | `string \| undefined` | Element ID of the dialog description, used for `aria-describedby`. |
|
|
232
|
+
| `scope` | `'player' \| 'document'` | `player` when the dialog is rendered inside a player and confined to it, otherwise `document`. |
|
|
232
233
|
|
|
233
234
|
### media-dialog-backdrop
|
|
234
235
|
|
|
@@ -236,11 +237,12 @@ Presentational backdrop that reflects its owning dialog's state.
|
|
|
236
237
|
|
|
237
238
|
#### Data attributes
|
|
238
239
|
|
|
239
|
-
| Attribute | Description |
|
|
240
|
-
| --- | --- |
|
|
241
|
-
| `data-open` | Present when the dialog is open. |
|
|
242
|
-
| `data-starting-style` | Present during the open transition. |
|
|
243
|
-
| `data-ending-style` | Present during the close transition. |
|
|
240
|
+
| Attribute | Type | Description |
|
|
241
|
+
| --- | --- | --- |
|
|
242
|
+
| `data-open` | — | Present when the dialog is open. |
|
|
243
|
+
| `data-starting-style` | — | Present during the open transition. |
|
|
244
|
+
| `data-ending-style` | — | Present during the close transition. |
|
|
245
|
+
| `data-scope` | `'player' \| 'document'` | `player` when the dialog is confined to its player, otherwise `document`. |
|
|
244
246
|
|
|
245
247
|
### media-dialog-popup
|
|
246
248
|
|
|
@@ -248,8 +250,9 @@ Semantic popup that owns focus management and dialog transition completion.
|
|
|
248
250
|
|
|
249
251
|
#### Data attributes
|
|
250
252
|
|
|
251
|
-
| Attribute | Description |
|
|
252
|
-
| --- | --- |
|
|
253
|
-
| `data-open` | Present when the dialog is open. |
|
|
254
|
-
| `data-starting-style` | Present during the open transition. |
|
|
255
|
-
| `data-ending-style` | Present during the close transition. |
|
|
253
|
+
| Attribute | Type | Description |
|
|
254
|
+
| --- | --- | --- |
|
|
255
|
+
| `data-open` | — | Present when the dialog is open. |
|
|
256
|
+
| `data-starting-style` | — | Present during the open transition. |
|
|
257
|
+
| `data-ending-style` | — | Present during the close transition. |
|
|
258
|
+
| `data-scope` | `'player' \| 'document'` | `player` when the dialog is confined to its player, otherwise `document`. |
|
|
@@ -35,7 +35,7 @@ Use `pointer` to accept only `mouse`, `touch`, or `pen` input. Use `region` to d
|
|
|
35
35
|
|
|
36
36
|
An unregional gesture acts as a fallback outside the active regions. When several registrations match the same gesture, the first registration wins.
|
|
37
37
|
|
|
38
|
-
Choose a built-in `action` from the API reference below, or use an application-defined name to call a same-named action on the player store. Pass `value` as seconds for `seekStep
|
|
38
|
+
Choose a built-in `action` from the API reference below, or use an application-defined name to call a same-named action on the player store. Pass `value` as seconds for `seekStep`, as a volume delta such as `0.05` or `-0.05` for `volumeStep`, or as a rate change such as `0.1` for `speedUp` and `speedDown`. When omitted, the seek and volume actions use the 10-second or five-percentage-point default, and the speed actions move to the next faster or slower of the player’s playback rates. A left-region seek gesture uses the negative step. Unknown action names do nothing and warn in development.
|
|
39
39
|
|
|
40
40
|
## Accessibility
|
|
41
41
|
|
|
@@ -135,4 +135,4 @@ import '@videojs/html/ui/play-button';
|
|
|
135
135
|
| `disabled` | `boolean` | — | Whether the gesture is disabled. |
|
|
136
136
|
| `pointer` | `'mouse' \| 'touch' \| 'pen'` | — | Pointer type that may activate the gesture. All pointer types are accepted when omitted. |
|
|
137
137
|
| `region` | `'left' \| 'center' \| 'right'` | — | Optional horizontal part of the container that may activate the gesture. |
|
|
138
|
-
| `value` | `number` | — | Numeric value passed to actions such as `seekStep` and `
|
|
138
|
+
| `value` | `number` | — | Numeric value passed to actions such as `seekStep`, `volumeStep`, `speedUp`, and `speedDown`. The seek and volume actions use their shared step when omitted, and the speed actions move through the player's playback rates. |
|