@videojs/html 10.3.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.
Files changed (272) hide show
  1. package/dist/default/define/audio/compat-skin.css +91 -38
  2. package/dist/default/define/audio/compat-skin2.js +1 -1
  3. package/dist/default/define/audio/neutral-skin.css +52 -31
  4. package/dist/default/define/audio/neutral-skin2.js +1 -1
  5. package/dist/default/define/audio/scaffold-skin.css +105 -40
  6. package/dist/default/define/audio/scaffold-skin2.js +1 -1
  7. package/dist/default/define/audio/skin.css +53 -31
  8. package/dist/default/define/audio/skin2.js +1 -1
  9. package/dist/default/define/live-audio/compat-skin.css +91 -38
  10. package/dist/default/define/live-audio/compat-skin2.js +1 -1
  11. package/dist/default/define/live-audio/neutral-skin.css +50 -29
  12. package/dist/default/define/live-audio/neutral-skin2.js +1 -1
  13. package/dist/default/define/live-audio/scaffold-skin.css +105 -40
  14. package/dist/default/define/live-audio/scaffold-skin2.js +1 -1
  15. package/dist/default/define/live-audio/skin.css +51 -29
  16. package/dist/default/define/live-audio/skin2.js +1 -1
  17. package/dist/default/define/live-video/compat-skin.css +142 -61
  18. package/dist/default/define/live-video/compat-skin2.js +1 -1
  19. package/dist/default/define/live-video/neutral-skin.css +241 -55
  20. package/dist/default/define/live-video/neutral-skin2.js +1 -1
  21. package/dist/default/define/live-video/scaffold-skin.css +159 -63
  22. package/dist/default/define/live-video/scaffold-skin2.js +1 -1
  23. package/dist/default/define/live-video/skin.css +245 -60
  24. package/dist/default/define/live-video/skin2.js +1 -1
  25. package/dist/default/define/ui/time-slider-markers.js +5 -0
  26. package/dist/default/define/video/compat-skin.css +150 -61
  27. package/dist/default/define/video/compat-skin2.js +1 -1
  28. package/dist/default/define/video/neutral-skin.css +322 -66
  29. package/dist/default/define/video/neutral-skin2.js +1 -1
  30. package/dist/default/define/video/scaffold-skin.css +168 -63
  31. package/dist/default/define/video/scaffold-skin2.js +1 -1
  32. package/dist/default/define/video/skin.css +348 -66
  33. package/dist/default/define/video/skin2.js +1 -1
  34. package/dist/default/index.js +3 -1
  35. package/dist/default/internal/skins/compat-audio/skin.css +91 -38
  36. package/dist/default/internal/skins/compat-live-audio/skin.css +91 -38
  37. package/dist/default/internal/skins/compat-live-video/skin.css +142 -61
  38. package/dist/default/internal/skins/compat-live-video/template.js +2 -0
  39. package/dist/default/internal/skins/compat-video/skin.css +150 -61
  40. package/dist/default/internal/skins/compat-video/template.js +2 -0
  41. package/dist/default/internal/skins/default-audio/skin.css +53 -31
  42. package/dist/default/internal/skins/default-live-audio/skin.css +51 -29
  43. package/dist/default/internal/skins/default-live-video/skin.css +245 -60
  44. package/dist/default/internal/skins/default-live-video/template.js +14 -0
  45. package/dist/default/internal/skins/default-video/register.js +3 -0
  46. package/dist/default/internal/skins/default-video/skin.css +348 -66
  47. package/dist/default/internal/skins/default-video/template.js +33 -5
  48. package/dist/default/internal/skins/neutral-audio/skin.css +52 -31
  49. package/dist/default/internal/skins/neutral-live-audio/skin.css +50 -29
  50. package/dist/default/internal/skins/neutral-live-video/skin.css +241 -55
  51. package/dist/default/internal/skins/neutral-live-video/template.js +14 -0
  52. package/dist/default/internal/skins/neutral-video/skin.css +322 -66
  53. package/dist/default/internal/skins/neutral-video/template.js +25 -11
  54. package/dist/default/internal/skins/scaffold-audio/skin.css +105 -40
  55. package/dist/default/internal/skins/scaffold-live-audio/skin.css +105 -40
  56. package/dist/default/internal/skins/scaffold-live-video/skin.css +159 -63
  57. package/dist/default/internal/skins/scaffold-live-video/template.js +2 -0
  58. package/dist/default/internal/skins/scaffold-video/skin.css +168 -63
  59. package/dist/default/internal/skins/scaffold-video/template.js +3 -1
  60. package/dist/default/media/background-video/adapter.js +13 -35
  61. package/dist/default/media/background-video/base.js +95 -0
  62. package/dist/default/media/background-video/template.js +13 -20
  63. package/dist/default/media/hls-background-video/adapter.js +16 -35
  64. package/dist/default/ui/captions-radio-group/element.js +14 -1
  65. package/dist/default/ui/controls/element.js +6 -3
  66. package/dist/default/ui/time-slider/markers.js +160 -0
  67. package/dist/default/version.js +1 -1
  68. package/dist/dev/define/audio/compat-skin.css +91 -38
  69. package/dist/dev/define/audio/compat-skin2.js +1 -1
  70. package/dist/dev/define/audio/compat-skin2.js.map +1 -1
  71. package/dist/dev/define/audio/neutral-skin.css +52 -31
  72. package/dist/dev/define/audio/neutral-skin2.js +1 -1
  73. package/dist/dev/define/audio/neutral-skin2.js.map +1 -1
  74. package/dist/dev/define/audio/scaffold-skin.css +105 -40
  75. package/dist/dev/define/audio/scaffold-skin2.js +1 -1
  76. package/dist/dev/define/audio/scaffold-skin2.js.map +1 -1
  77. package/dist/dev/define/audio/skin.css +53 -31
  78. package/dist/dev/define/audio/skin2.js +1 -1
  79. package/dist/dev/define/audio/skin2.js.map +1 -1
  80. package/dist/dev/define/live-audio/compat-skin.css +91 -38
  81. package/dist/dev/define/live-audio/compat-skin2.js +1 -1
  82. package/dist/dev/define/live-audio/compat-skin2.js.map +1 -1
  83. package/dist/dev/define/live-audio/neutral-skin.css +50 -29
  84. package/dist/dev/define/live-audio/neutral-skin2.js +1 -1
  85. package/dist/dev/define/live-audio/neutral-skin2.js.map +1 -1
  86. package/dist/dev/define/live-audio/scaffold-skin.css +105 -40
  87. package/dist/dev/define/live-audio/scaffold-skin2.js +1 -1
  88. package/dist/dev/define/live-audio/scaffold-skin2.js.map +1 -1
  89. package/dist/dev/define/live-audio/skin.css +51 -29
  90. package/dist/dev/define/live-audio/skin2.js +1 -1
  91. package/dist/dev/define/live-audio/skin2.js.map +1 -1
  92. package/dist/dev/define/live-video/compat-skin.css +142 -61
  93. package/dist/dev/define/live-video/compat-skin2.js +1 -1
  94. package/dist/dev/define/live-video/compat-skin2.js.map +1 -1
  95. package/dist/dev/define/live-video/neutral-skin.css +241 -55
  96. package/dist/dev/define/live-video/neutral-skin2.js +1 -1
  97. package/dist/dev/define/live-video/neutral-skin2.js.map +1 -1
  98. package/dist/dev/define/live-video/scaffold-skin.css +159 -63
  99. package/dist/dev/define/live-video/scaffold-skin2.js +1 -1
  100. package/dist/dev/define/live-video/scaffold-skin2.js.map +1 -1
  101. package/dist/dev/define/live-video/skin.css +245 -60
  102. package/dist/dev/define/live-video/skin2.js +1 -1
  103. package/dist/dev/define/live-video/skin2.js.map +1 -1
  104. package/dist/dev/define/ui/time-slider-markers.d.ts +8 -0
  105. package/dist/dev/define/ui/time-slider-markers.js +7 -0
  106. package/dist/dev/define/ui/time-slider-markers.js.map +1 -0
  107. package/dist/dev/define/video/compat-skin.css +150 -61
  108. package/dist/dev/define/video/compat-skin2.js +1 -1
  109. package/dist/dev/define/video/compat-skin2.js.map +1 -1
  110. package/dist/dev/define/video/neutral-skin.css +322 -66
  111. package/dist/dev/define/video/neutral-skin2.js +1 -1
  112. package/dist/dev/define/video/neutral-skin2.js.map +1 -1
  113. package/dist/dev/define/video/scaffold-skin.css +168 -63
  114. package/dist/dev/define/video/scaffold-skin2.js +1 -1
  115. package/dist/dev/define/video/scaffold-skin2.js.map +1 -1
  116. package/dist/dev/define/video/skin.css +348 -66
  117. package/dist/dev/define/video/skin2.js +1 -1
  118. package/dist/dev/define/video/skin2.js.map +1 -1
  119. package/dist/dev/index.d.ts +5 -4
  120. package/dist/dev/index.js +3 -1
  121. package/dist/dev/internal/skins/compat-audio/skin.css +91 -38
  122. package/dist/dev/internal/skins/compat-live-audio/skin.css +91 -38
  123. package/dist/dev/internal/skins/compat-live-video/skin.css +142 -61
  124. package/dist/dev/internal/skins/compat-live-video/template.js +2 -0
  125. package/dist/dev/internal/skins/compat-live-video/template.js.map +1 -1
  126. package/dist/dev/internal/skins/compat-video/skin.css +150 -61
  127. package/dist/dev/internal/skins/compat-video/template.js +2 -0
  128. package/dist/dev/internal/skins/compat-video/template.js.map +1 -1
  129. package/dist/dev/internal/skins/default-audio/skin.css +53 -31
  130. package/dist/dev/internal/skins/default-live-audio/skin.css +51 -29
  131. package/dist/dev/internal/skins/default-live-video/register.js.map +1 -1
  132. package/dist/dev/internal/skins/default-live-video/skin.css +245 -60
  133. package/dist/dev/internal/skins/default-live-video/template.js +14 -0
  134. package/dist/dev/internal/skins/default-live-video/template.js.map +1 -1
  135. package/dist/dev/internal/skins/default-video/register.d.ts +1 -0
  136. package/dist/dev/internal/skins/default-video/register.js +3 -0
  137. package/dist/dev/internal/skins/default-video/register.js.map +1 -1
  138. package/dist/dev/internal/skins/default-video/skin.css +348 -66
  139. package/dist/dev/internal/skins/default-video/template.js +33 -5
  140. package/dist/dev/internal/skins/default-video/template.js.map +1 -1
  141. package/dist/dev/internal/skins/neutral-audio/skin.css +52 -31
  142. package/dist/dev/internal/skins/neutral-live-audio/skin.css +50 -29
  143. package/dist/dev/internal/skins/neutral-live-video/register.js.map +1 -1
  144. package/dist/dev/internal/skins/neutral-live-video/skin.css +241 -55
  145. package/dist/dev/internal/skins/neutral-live-video/template.js +14 -0
  146. package/dist/dev/internal/skins/neutral-live-video/template.js.map +1 -1
  147. package/dist/dev/internal/skins/neutral-video/register.js.map +1 -1
  148. package/dist/dev/internal/skins/neutral-video/skin.css +322 -66
  149. package/dist/dev/internal/skins/neutral-video/template.js +25 -11
  150. package/dist/dev/internal/skins/neutral-video/template.js.map +1 -1
  151. package/dist/dev/internal/skins/scaffold-audio/skin.css +105 -40
  152. package/dist/dev/internal/skins/scaffold-live-audio/skin.css +105 -40
  153. package/dist/dev/internal/skins/scaffold-live-video/skin.css +159 -63
  154. package/dist/dev/internal/skins/scaffold-live-video/template.js +2 -0
  155. package/dist/dev/internal/skins/scaffold-live-video/template.js.map +1 -1
  156. package/dist/dev/internal/skins/scaffold-video/skin.css +168 -63
  157. package/dist/dev/internal/skins/scaffold-video/template.js +3 -1
  158. package/dist/dev/internal/skins/scaffold-video/template.js.map +1 -1
  159. package/dist/dev/media/background-video/adapter.d.ts +7 -13
  160. package/dist/dev/media/background-video/adapter.js +13 -35
  161. package/dist/dev/media/background-video/adapter.js.map +1 -1
  162. package/dist/dev/media/background-video/base.d.ts +44 -0
  163. package/dist/dev/media/background-video/base.js +97 -0
  164. package/dist/dev/media/background-video/base.js.map +1 -0
  165. package/dist/dev/media/background-video/template.d.ts +3 -0
  166. package/dist/dev/media/background-video/template.js +13 -20
  167. package/dist/dev/media/background-video/template.js.map +1 -1
  168. package/dist/dev/media/hls-background-video/adapter.d.ts +8 -18
  169. package/dist/dev/media/hls-background-video/adapter.js +16 -35
  170. package/dist/dev/media/hls-background-video/adapter.js.map +1 -1
  171. package/dist/dev/ui/captions-button/element.d.ts +2 -0
  172. package/dist/dev/ui/captions-radio-group/element.d.ts +2 -1
  173. package/dist/dev/ui/captions-radio-group/element.js +14 -1
  174. package/dist/dev/ui/captions-radio-group/element.js.map +1 -1
  175. package/dist/dev/ui/controls/element.d.ts +2 -2
  176. package/dist/dev/ui/controls/element.js +6 -3
  177. package/dist/dev/ui/controls/element.js.map +1 -1
  178. package/dist/dev/ui/time-slider/markers.d.ts +48 -0
  179. package/dist/dev/ui/time-slider/markers.js +165 -0
  180. package/dist/dev/ui/time-slider/markers.js.map +1 -0
  181. package/dist/dev/version.js +1 -1
  182. package/docs/README.md +1 -1
  183. package/docs/guides/autoplay.md +1 -1
  184. package/docs/guides/background-video.md +2 -4
  185. package/docs/guides/browser-support.md +22 -16
  186. package/docs/guides/cdn.md +9 -9
  187. package/docs/guides/customize-skins.md +3 -0
  188. package/docs/guides/installation-cdn.md +2 -2
  189. package/docs/guides/installation-shadcn.md +1 -1
  190. package/docs/guides/installation-svelte.md +2 -2
  191. package/docs/guides/installation-vue.md +2 -2
  192. package/docs/guides/installation.md +2 -2
  193. package/docs/guides/internationalization.md +5 -5
  194. package/docs/guides/keyboard-shortcuts.md +10 -0
  195. package/docs/guides/llms.txt +2 -1
  196. package/docs/guides/migrate-from-media-chrome.md +4 -4
  197. package/docs/guides/migrate-from-mux-player.md +6 -6
  198. package/docs/guides/migrate-from-plyr.md +7 -7
  199. package/docs/guides/migrate-from-video-js-8.md +6 -6
  200. package/docs/guides/migrate-from-vidstack.md +4 -4
  201. package/docs/guides/presets.md +4 -4
  202. package/docs/guides/self-hosting.md +5 -5
  203. package/docs/guides/skins.md +8 -7
  204. package/docs/guides/timed-metadata.md +318 -0
  205. package/docs/llms.txt +16 -2
  206. package/docs/reference/api/chapters-track.md +71 -0
  207. package/docs/reference/api/define-text-track.md +113 -0
  208. package/docs/reference/api/feature-text-cues.md +133 -0
  209. package/docs/reference/api/feature-text-tracks.md +11 -5
  210. package/docs/reference/api/get-active-text-cues.md +69 -0
  211. package/docs/reference/api/get-text-cues.md +69 -0
  212. package/docs/reference/api/get-text-tracks.md +41 -0
  213. package/docs/reference/api/hls-metadata-track.md +48 -0
  214. package/docs/reference/api/html-create-player.md +2 -2
  215. package/docs/reference/api/llms.txt +13 -1
  216. package/docs/reference/api/media-capabilities.md +4 -4
  217. package/docs/reference/api/player-store.md +9 -4
  218. package/docs/reference/api/preset-audio.md +3 -1
  219. package/docs/reference/api/preset-background.md +1 -1
  220. package/docs/reference/api/preset-live-audio.md +3 -1
  221. package/docs/reference/api/preset-live-video.md +2 -1
  222. package/docs/reference/api/preset-video.md +2 -1
  223. package/docs/reference/components/audio-compat-skin.md +1 -1
  224. package/docs/reference/components/audio-neutral-skin.md +1 -1
  225. package/docs/reference/components/audio-scaffold-skin.md +1 -1
  226. package/docs/reference/components/audio-skin.md +1 -1
  227. package/docs/reference/components/audio.md +19 -1
  228. package/docs/reference/components/background-video-skin.md +1 -1
  229. package/docs/reference/components/background-video.md +26 -11
  230. package/docs/reference/components/captions-radio-group.md +1 -1
  231. package/docs/reference/components/cloudflare-video.md +1 -1
  232. package/docs/reference/components/controls.md +16 -3
  233. package/docs/reference/components/dailymotion-video.md +2 -2
  234. package/docs/reference/components/dash-video.md +20 -3
  235. package/docs/reference/components/google-analytics.md +1 -1
  236. package/docs/reference/components/google-cast.md +1 -1
  237. package/docs/reference/components/hls-audio.md +56 -2
  238. package/docs/reference/components/hls-background-video.md +22 -5
  239. package/docs/reference/components/hls-video.md +99 -7
  240. package/docs/reference/components/hlsjs-video.md +52 -13
  241. package/docs/reference/components/live-audio-compat-skin.md +1 -1
  242. package/docs/reference/components/live-audio-neutral-skin.md +1 -1
  243. package/docs/reference/components/live-audio-scaffold-skin.md +1 -1
  244. package/docs/reference/components/live-audio-skin.md +1 -1
  245. package/docs/reference/components/live-video-compat-skin.md +5 -1
  246. package/docs/reference/components/live-video-neutral-skin.md +5 -1
  247. package/docs/reference/components/live-video-scaffold-skin.md +5 -1
  248. package/docs/reference/components/live-video-skin.md +5 -1
  249. package/docs/reference/components/llms.txt +2 -1
  250. package/docs/reference/components/mixcloud-audio.md +2 -2
  251. package/docs/reference/components/mux-audio.md +34 -3
  252. package/docs/reference/components/mux-background-video.md +1 -1
  253. package/docs/reference/components/mux-data.md +1 -1
  254. package/docs/reference/components/mux-video.md +17 -3
  255. package/docs/reference/components/native-hls-video.md +32 -3
  256. package/docs/reference/components/playerjs-video.md +2 -2
  257. package/docs/reference/components/shaka-video.md +2 -3
  258. package/docs/reference/components/soundcloud-audio.md +2 -2
  259. package/docs/reference/components/spotify-audio.md +2 -2
  260. package/docs/reference/components/tiktok-video.md +2 -2
  261. package/docs/reference/components/time-slider-markers.md +194 -0
  262. package/docs/reference/components/time-slider.md +14 -0
  263. package/docs/reference/components/twitch-video.md +1 -1
  264. package/docs/reference/components/video-compat-skin.md +5 -1
  265. package/docs/reference/components/video-neutral-skin.md +5 -1
  266. package/docs/reference/components/video-scaffold-skin.md +5 -1
  267. package/docs/reference/components/video-skin.md +5 -1
  268. package/docs/reference/components/video.md +19 -1
  269. package/docs/reference/components/vimeo-video.md +1 -2
  270. package/docs/reference/components/wistia-video.md +1 -1
  271. package/docs/reference/components/youtube-video.md +1 -2
  272. package/package.json +48 -48
@@ -13,7 +13,7 @@ import '@videojs/html/audio/compat-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.3.0/audio-compat.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/audio-compat.js"></script>
17
17
  ```
18
18
 
19
19
  ## Anatomy
@@ -13,7 +13,7 @@ import '@videojs/html/audio/neutral-skin';
13
13
  The import registers the skin and every UI element it composes. The [CDN](../../guides/cdn.md) player bundle registers this skin together with its player:
14
14
 
15
15
  ```html
16
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/audio-neutral.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/audio-neutral.js"></script>
17
17
  ```
18
18
 
19
19
  ## Anatomy
@@ -13,7 +13,7 @@ import '@videojs/html/audio/scaffold-skin';
13
13
  The import registers the skin and every UI element it composes. The [CDN](../../guides/cdn.md) player bundle registers this skin together with its player:
14
14
 
15
15
  ```html
16
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/audio-scaffold.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/audio-scaffold.js"></script>
17
17
  ```
18
18
 
19
19
  ## Usage
@@ -13,7 +13,7 @@ import '@videojs/html/audio/skin';
13
13
  The import registers the skin and every UI element it composes. The [CDN](../../guides/cdn.md) player bundle registers this skin together with its player:
14
14
 
15
15
  ```html
16
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/audio.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/audio.js"></script>
17
17
  ```
18
18
 
19
19
  ## Anatomy
@@ -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.3.0/background.js"></script>
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 reference](#api-reference) to change its playback defaults.
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.3.0/media/background-video.js"></script>
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 Reference
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` | Opt out of muted playback. By default the video is muted. |
59
- | `noloop` | Opt out of looped playback. By default the video loops. |
60
- | `noautoplay` | Opt out of autoplay. By default the video autoplays. |
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
- ### CSS Custom Properties
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
- | Variable | Default | Description |
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` | Controls how the video fits its container. |
67
- | `--media-object-position` | `50% 50%` | Controls the position of the video within its container. |
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.
@@ -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
 
@@ -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.3.0/media/cloudflare-video.js"></script>
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 it as data attributes, and shares it with its descendant controls parts. Hiding the controls closes any popup open inside it.
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. |
@@ -21,7 +21,7 @@ import '@videojs/html/media/dailymotion-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.3.0/media/dailymotion-video.js"></script>
24
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/dailymotion-video.js"></script>
25
25
  ```
26
26
 
27
27
  ## Load a source
@@ -157,7 +157,7 @@ These attributes configure the embedded media adapter:
157
157
  | `seeking` | `boolean` | — | Read-only. |
158
158
  | `source` | `{ src?: string; engine?: DailymotionSourceEngineConfig } \| null` | `null` | Dailymotion video URL in `src`, player configuration and parameters under `engine.dailymotion`. |
159
159
  | `src` | `string` | `''` | |
160
- | `textTracks` | `TextTrackListLike` | — | Read-only. Always empty: the player draws its own subtitles and reports no cues to render elsewhere. |
160
+ | `textTracks` | `TextTrackListLike` | — | Read-only. Unsupported: the player draws its own subtitles and reports no cues to render elsewhere. |
161
161
  | `volume` | `number` | — | |
162
162
 
163
163
  ### Engine options
@@ -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.3.0/media/dash-video.js"></script>
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
@@ -75,7 +93,6 @@ These Video.js-specific attributes configure media behavior:
75
93
  | `isFullscreen` | `boolean` | — | Read-only. |
76
94
  | `isPictureInPicture` | `boolean` | — | Read-only. |
77
95
  | `liveEdgeStart` | `number` | — | Read-only. |
78
- | `playbackRateRange` | `{ min: number; max: number } \| undefined` | — | Read-only. The target's narrower rate range, when it reports one; native media accept the browser's range. |
79
96
  | `source` | `{ src?: string; engine?: DashEngineConfig } \| null` | `null` | Structured source: the MPD URL in `src`, plus dash.js settings in `engine.dashJs`. Replacing it re-derives `src`. Dash.js takes settings on a live player, so changing `engine.dashJs` re-applies them in place instead of recreating the engine. |
80
97
  | `src` | `string` | `''` | |
81
98
  | `streamType` | `MediaStreamType` | — | Current stream type (`'on-demand'`, `'live'`, or `'unknown'`). Defaults to `'unknown'`; detecting hosts update it automatically, and consumers can set it to override detection. |
@@ -88,7 +105,7 @@ Also exposes these properties from the native media API. See [HTMLVideoElement](
88
105
 
89
106
  ### Methods
90
107
 
91
- 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`.
92
109
 
93
110
  ### Events
94
111
 
@@ -17,7 +17,7 @@ import '@videojs/html/extensions/google-analytics';
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.3.0/extensions/google-analytics.js"></script>
20
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/extensions/google-analytics.js"></script>
21
21
  ```
22
22
 
23
23
  ## Anatomy
@@ -17,7 +17,7 @@ import '@videojs/html/extensions/google-cast';
17
17
  Or load it from the [CDN](../../guides/cdn.md):
18
18
 
19
19
  ```html
20
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/extensions/google-cast.js"></script>
20
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/extensions/google-cast.js"></script>
21
21
  ```
22
22
 
23
23
  ## Anatomy
@@ -13,9 +13,19 @@ import '@videojs/html/media/hls-audio';
13
13
  Or load it from the [CDN](../../guides/cdn.md):
14
14
 
15
15
  ```html
16
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/hls-audio.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/hls-audio.js"></script>
17
17
  ```
18
18
 
19
+ ## Load a source
20
+
21
+ `src` takes an HLS manifest URL. A mixed audio/video manifest works too: the audio component loads only the audio rendition.
22
+
23
+ ```html
24
+ <hls-audio src="https://example.com/playlist.m3u8"></hls-audio>
25
+ ```
26
+
27
+ The structured `source` object takes the same shape as the [HLS video component](./hls-video.md)’s, so one object can serve either. `source.drm` is accepted but unused, because this component composes no EME.
28
+
19
29
  ## Examples
20
30
 
21
31
  ### Basic Usage
@@ -39,4 +49,48 @@ Or load it from the [CDN](../../guides/cdn.md):
39
49
 
40
50
  ```ts
41
51
  import '@videojs/html/media/hls-audio';
42
- ```
52
+ ```
53
+
54
+ ## API Reference
55
+
56
+ ### Attributes
57
+
58
+ Forwards these standard media attributes to the internal `<audio>`. See the [MDN media element reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio): `autopictureinpicture`, `autoplay`, `controls`, `controlslist`, `crossorigin`, `disablepictureinpicture`, `disableremoteplayback`, `loading`, `loop`, `muted`, `playsinline`, `poster`, `preload`, `src`.
59
+
60
+ These Video.js-specific attributes configure media behavior:
61
+
62
+ | Attribute | Type | Default | Description |
63
+ | --- | --- | --- | --- |
64
+ | `stream-type` | `MediaStreamType` | — | Current stream type (`'on-demand'`, `'live'`, or `'unknown'`). Defaults to `'unknown'`; detecting hosts update it automatically, and consumers can set it to override detection. |
65
+
66
+ ### Properties
67
+
68
+ | Property | Type | Default | Description |
69
+ | --- | --- | --- | --- |
70
+ | `contentData` | `MediaContentData \| undefined` | — | Read-only. |
71
+ | `crossOrigin` | `'anonymous' \| 'use-credentials' \| null` | `null` | |
72
+ | `disableRemotePlayback` | `boolean` | `false` | |
73
+ | `error` | `{ code: number; message: string; data?: unknown } \| null` | — | Read-only. The current fatal error, or `null`. Only *fatal* conditions appear here — the engine reports non-fatal ones too, which stay in `engine.state.errors`. Resets per source. Fires `'error'` when set. |
74
+ | `liveEdgeStart` | `number` | — | Read-only. |
75
+ | `preload` | `'' \| 'none' \| 'metadata' \| 'auto'` | `''` | Preload type (`'none'` / `'metadata'` / `'auto'`). |
76
+ | `source` | `{ src?: string; type?: string; drm?: Partial<Record<string, DrmSystemConfig>> } \| null` | `null` | Structured source, the same shape the video flavor takes so one object serves either. `drm` is accepted and inert: this engine composes no EME. It is kept in the shape rather than removed so a source can be handed to both flavors — and because Mux encrypts video renditions and leaves audio clear, so a protected playback ID plays here regardless. |
77
+ | `src` | `string` | `''` | |
78
+ | `streamType` | `MediaStreamType` | — | Current stream type (`'on-demand'`, `'live'`, or `'unknown'`). Defaults to `'unknown'`; detecting hosts update it automatically, and consumers can set it to override detection. |
79
+ | `targetLiveWindow` | `number` | — | Read-only. |
80
+
81
+ Also exposes these properties from the native media API. See [HTMLAudioElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement) for details: `autoplay`, `buffered`, `controls`, `currentSrc`, `currentTime`, `defaultMuted`, `defaultPlaybackRate`, `duration`, `ended`, `loop`, `muted`, `paused`, `playbackRate`, `played`, `readyState`, `remote`, `seekable`, `seeking`, `textTracks`, `title`, `volume`.
82
+
83
+ ### Methods
84
+
85
+ Supports these media methods. See [HTMLAudioElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement) for details: `addTextTrack`, `canPlayType`, `load`, `pause`, `play`, `removeTextTrack`.
86
+
87
+ ### Events
88
+
89
+ Re-dispatches these standard media events from the internal media element: `abort`, `addtrack`, `canplay`, `canplaythrough`, `change`, `contentdatachange`, `durationchange`, `emptied`, `ended`, `loadeddata`, `loadedmetadata`, `loadstart`, `pause`, `play`, `playing`, `progress`, `ratechange`, `removetrack`, `seeked`, `seeking`, `stalled`, `suspend`, `timeupdate`, `volumechange`, `waiting`.
90
+
91
+ Also emits these Video.js-specific events:
92
+
93
+ | Event | Description |
94
+ | --- | --- |
95
+ | `error` | Fired when a fatal condition is reported. Read `error` for it. |
96
+ | `sourcechange` | Fired when `source` changes. Read `source` for the new value. |
@@ -2,7 +2,7 @@
2
2
 
3
3
  HLS background video without controls, audio, captions, or adaptive quality
4
4
 
5
- `<hls-background-video>` plays an HLS source through the SPF background engine. It is fixed to muted, autoplaying, inline, looped playback and omits controls, audio, text, DRM, and adaptive rendition switching.
5
+ `<hls-background-video>` plays an HLS source through the SPF background engine. It is fixed to muted, inline playback, loops and autoplays unless you set `noloop` or `noautoplay`, and omits controls, audio, text, DRM, and adaptive rendition switching.
6
6
 
7
7
  See [Add a background video](../../guides/background-video.md) for layout, poster, accessibility, and source-choice guidance.
8
8
 
@@ -15,7 +15,7 @@ import '@videojs/html/media/hls-background-video';
15
15
  Or load it from the [CDN](../../guides/cdn.md):
16
16
 
17
17
  ```html
18
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/hls-background-video.js"></script>
18
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/hls-background-video.js"></script>
19
19
  ```
20
20
 
21
21
  ## Source behavior
@@ -29,15 +29,32 @@ Or load it from the [CDN](../../guides/cdn.md):
29
29
  ></hls-background-video>
30
30
  ```
31
31
 
32
- There is no `source` object, `preload` mode, or opt-out for muted, autoplay, and loop. Assigning a new `src` restarts playback from scratch.
32
+ There is no `source` object, `preload` mode, or opt-out for muted. Assigning a new `src` restarts playback from scratch.
33
+
34
+ Set `noautoplay` to hold playback until your script calls `target.play()`, for example after checking `prefers-reduced-motion`, and `noloop` to play the video once. Without `noautoplay`, calling `pause()` before the stream attaches has no effect: autoplay starts the video once the stream loads.
33
35
 
34
36
  ## API
35
37
 
36
- | Member | Description |
38
+ ### Attributes
39
+
40
+ | Attribute | Description |
37
41
  | --- | --- |
38
42
  | `src` | HLS manifest URL |
43
+ | `noloop` | Turns off looping |
44
+ | `noautoplay` | Turns off autoplay |
45
+ | `crossorigin`, `controls`, `controlslist` | Passed through to the inner video |
46
+ | `keep-alive` | Keeps the engine running after the element is removed |
47
+
48
+ An explicit `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. Muted can’t be turned off, and `preload` isn’t passed through: the engine loads as soon as it has a source.
49
+
50
+ ### Properties
51
+
52
+ | Property | Description |
53
+ | --- | --- |
54
+ | `src` | HLS manifest URL. Assigning a new one restarts playback from scratch |
39
55
  | `error` | Fatal SPF media error for the current source, or `null` |
40
- | `video` | Inner native `<video>` element |
56
+ | `target` | Inner native `<video>` element. Call `play()` and `pause()` on it |
57
+ | `video` | Same element as `target` |
41
58
  | `adapter` | The `HlsBackgroundVideoAdapter` driving the inner video, including its SPF `engine` |
42
59
 
43
60
  The element also fires an `error` event when `error` becomes fatal. The inner video’s own `error` can remain `null` because SPF, rather than the browser, rejected the source.
@@ -13,7 +13,47 @@ import '@videojs/html/media/hls-video';
13
13
  Or load it from the [CDN](../../guides/cdn.md):
14
14
 
15
15
  ```html
16
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/hls-video.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/hls-video.js"></script>
17
+ ```
18
+
19
+ ## Load a source
20
+
21
+ `src` takes an HLS manifest URL.
22
+
23
+ ```html
24
+ <hls-video src="https://example.com/playlist.m3u8"></hls-video>
25
+ ```
26
+
27
+ The structured `source` object carries what a URL can’t: `drm` for protected content. Setting `source` derives `src`.
28
+
29
+ ## Protected content
30
+
31
+ `source.drm` names your license servers, keyed by [EME key system id](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/requestMediaKeySystemAccess). Name every system you hold a license server for: which one gets negotiated is the browser’s choice.
32
+
33
+ ```ts
34
+ const video = document.querySelector('hls-video')!;
35
+ video.source = {
36
+ src: 'https://example.com/protected.m3u8',
37
+ drm: {
38
+ 'com.apple.fps': {
39
+ licenseUrl: 'https://example.com/fairplay',
40
+ serverCertificateUrl: 'https://example.com/fairplay.cer',
41
+ },
42
+ 'com.widevine.alpha': { licenseUrl: 'https://example.com/widevine' },
43
+ },
44
+ };
45
+ ```
46
+
47
+ FairPlay needs a `serverCertificateUrl` unless its CDM is pre-provisioned; Widevine and PlayReady ignore it. [Media sources](../../guides/media-sources.md#drm-protected-sources) covers DRM in more depth.
48
+
49
+ ## Cookie-gated streams
50
+
51
+ A stream on another origin that is gated by cookies — CloudFront signed cookies, for example — needs those cookies on every manifest and segment request, or the CDN answers 403. Set the standard `crossorigin="use-credentials"` on the element and the engine sends them, the same way the browser does under native playback. Any other value, or no attribute, leaves requests at the platform default and sends no cross-origin cookies.
52
+
53
+ The CDN must answer with `Access-Control-Allow-Credentials: true` and a specific `Access-Control-Allow-Origin`, not `*`, or the browser refuses the credentialed response.
54
+
55
+ ```html
56
+ <hls-video src="https://cdn.example.com/stream.m3u8" crossorigin="use-credentials"></hls-video>
17
57
  ```
18
58
 
19
59
  ## Examples
@@ -46,12 +86,64 @@ import '@videojs/html/ui/container';
46
86
  import '@videojs/html/media/hls-video';
47
87
  ```
48
88
 
49
- ## Cookie-gated streams
89
+ ## API Reference
50
90
 
51
- A stream on another origin that is gated by cookies — CloudFront signed cookies, for example — needs those cookies on every manifest and segment request, or the CDN answers 403. Set the standard `crossorigin="use-credentials"` on the element and the engine sends them, the same way the browser does under native playback. Any other value, or no attribute, leaves requests at the platform default and sends no cross-origin cookies.
91
+ ### Attributes
52
92
 
53
- The CDN must answer with `Access-Control-Allow-Credentials: true` and a specific `Access-Control-Allow-Origin`, not `*`, or the browser refuses the credentialed response.
93
+ Forwards these standard media attributes to the internal `<video>`. See the [MDN media element reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video): `autopictureinpicture`, `autoplay`, `controls`, `controlslist`, `crossorigin`, `disablepictureinpicture`, `disableremoteplayback`, `loading`, `loop`, `muted`, `playsinline`, `poster`, `preload`, `src`.
54
94
 
55
- ```html
56
- <hls-video src="https://cdn.example.com/stream.m3u8" crossorigin="use-credentials"></hls-video>
57
- ```
95
+ These Video.js-specific attributes configure media behavior:
96
+
97
+ | Attribute | Type | Default | Description |
98
+ | --- | --- | --- | --- |
99
+ | `stream-type` | `'on-demand' \| 'live' \| 'unknown'` | `'unknown'` | The source's stream type — `'live'`, `'on-demand'`, or `'unknown'` until a media playlist has been parsed. Setting a non-`'unknown'` value pins a user override (detection stops updating it); setting `'unknown'` reverts to the engine's detected value. |
100
+
101
+ ### Properties
102
+
103
+ | Property | Type | Default | Description |
104
+ | --- | --- | --- | --- |
105
+ | `contentData` | `MediaContentData \| undefined` | — | Read-only. |
106
+ | `crossOrigin` | `'anonymous' \| 'use-credentials' \| null` | `null` | |
107
+ | `disableRemotePlayback` | `boolean` | `false` | |
108
+ | `error` | `{ code: number; message: string; data?: unknown } \| null` | — | Read-only. The current fatal error, or `null`. Only *fatal* conditions appear here — the engine reports non-fatal ones too (they stay in `engine.state.errors`), and promoting them would tell a consumer playback had failed when it hadn't. Resets per source. Fires `'error'` when set. |
109
+ | `isFullscreen` | `boolean` | — | Read-only. |
110
+ | `isPictureInPicture` | `boolean` | — | Read-only. |
111
+ | `liveEdgeStart` | `number` | — | Read-only. Presentation time marking the start of the live-edge window. Playback at `currentTime >= liveEdgeStart` counts as "at the live edge", and seeking to live lands here. `NaN` when the stream isn't live or nothing has loaded yet. No change event fires; re-read it on `timeupdate` or `progress`. |
112
+ | `preload` | `'' \| 'none' \| 'metadata' \| 'auto'` | `''` | Preload type (`'none'` / `'metadata'` / `'auto'`). |
113
+ | `source` | `{ src?: string; type?: string; drm?: Partial<Record<string, DrmSystemConfig>> } \| null` | `null` | Structured source: the manifest URL plus what a URL cannot carry, which today is the license servers for protected content. Setting it derives `src`. Assigning the same object back costs nothing — changing anything takes a new one. |
114
+ | `src` | `string` | `''` | |
115
+ | `streamType` | `'on-demand' \| 'live' \| 'unknown'` | `'unknown'` | The source's stream type — `'live'`, `'on-demand'`, or `'unknown'` until a media playlist has been parsed. Setting a non-`'unknown'` value pins a user override (detection stops updating it); setting `'unknown'` reverts to the engine's detected value. |
116
+ | `targetLiveWindow` | `number` | — | Read-only. The target live window: `NaN` for on-demand (or unknown), `0` for standard sliding-window live, `Infinity` for DVR (`#EXT-X-PLAYLIST-TYPE:EVENT`). Fires `targetlivewindowchange` on change. |
117
+ | `webkitCurrentPlaybackTargetIsWireless` | `boolean \| undefined` | — | Read-only. |
118
+ | `webkitPresentationMode` | `WebKitPresentationMode \| undefined` | — | Read-only. |
119
+ | `webkitSetPresentationMode` | `((mode: WebKitPresentationMode) => void) \| undefined` | — | Read-only. |
120
+
121
+ Also exposes these properties from the native media API. See [HTMLVideoElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement) for details: `autoplay`, `buffered`, `controls`, `currentSrc`, `currentTime`, `defaultMuted`, `defaultPlaybackRate`, `disablePictureInPicture`, `duration`, `ended`, `loop`, `muted`, `paused`, `playbackRate`, `played`, `playsInline`, `poster`, `readyState`, `remote`, `seekable`, `seeking`, `textTracks`, `title`, `videoHeight`, `videoWidth`, `volume`.
122
+
123
+ ### Methods
124
+
125
+ 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`.
126
+
127
+ ### Events
128
+
129
+ Re-dispatches these standard media events from the internal media element: `abort`, `addtrack`, `canplay`, `canplaythrough`, `change`, `contentdatachange`, `durationchange`, `emptied`, `ended`, `enterpictureinpicture`, `leavepictureinpicture`, `loadeddata`, `loadedmetadata`, `loadstart`, `pause`, `play`, `playing`, `progress`, `ratechange`, `removetrack`, `resize`, `seeked`, `seeking`, `stalled`, `suspend`, `timeupdate`, `volumechange`, `waiting`.
130
+
131
+ Also emits these Video.js-specific events:
132
+
133
+ | Event | Description |
134
+ | --- | --- |
135
+ | `error` | Fired when a fatal condition is reported. Read `error` for it. |
136
+ | `sourcechange` | Fired when `source` changes. Read `source` for the new value. |
137
+ | `streamtypechange` | Fired when the detected stream type changes. Read `streamType` for the new value. |
138
+ | `targetlivewindowchange` | Fired when the target live window changes. Read `targetLiveWindow` for the new value. |
139
+
140
+ ### CSS custom properties
141
+
142
+ | Variable | Description |
143
+ | --- | --- |
144
+ | `--media-video-border-radius` | Border radius of the video element. |
145
+ | `--media-object-fit` | Object fit for the video. |
146
+ | `--media-object-position` | Object position for the video. |
147
+ | `--media-caption-track-duration` | Duration of the caption track transition. |
148
+ | `--media-caption-track-delay` | Delay before the caption track transition. |
149
+ | `--media-caption-track-y` | Vertical offset of the caption track. |