@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
@@ -17,7 +17,57 @@ import '@videojs/html/media/hlsjs-video';
17
17
  Or load it from the [CDN](../../guides/cdn.md):
18
18
 
19
19
  ```html
20
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/hlsjs-video.js"></script>
20
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/hlsjs-video.js"></script>
21
+ ```
22
+
23
+ ## Load a source
24
+
25
+ `src` takes an HLS manifest URL.
26
+
27
+ ```html
28
+ <hlsjs-video src="https://example.com/playlist.m3u8"></hlsjs-video>
29
+ ```
30
+
31
+ The structured `source` object says what to play and how to play it: `type` for a manifest URL without an `.m3u8` extension, `preferPlayback` to choose between hls.js (`'mse'`) and the browser’s own HLS (`'native'`), the adaptive resolution caps, `drm`, and engine options. Setting `source` derives `src`. [Media sources](../../guides/media-sources.md) explains each option.
32
+
33
+ ```ts
34
+ const video = document.querySelector('hlsjs-video')!;
35
+ video.source = {
36
+ src: 'https://example.com/manifest',
37
+ type: 'application/vnd.apple.mpegurl',
38
+ preferPlayback: 'mse',
39
+ maxAutoResolution: '1080p',
40
+ };
41
+ ```
42
+
43
+ ## Protected content
44
+
45
+ `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.
46
+
47
+ ```ts
48
+ const video = document.querySelector('hlsjs-video')!;
49
+ video.source = {
50
+ src: 'https://example.com/protected.m3u8',
51
+ drm: {
52
+ 'com.apple.fps': {
53
+ licenseUrl: 'https://example.com/fairplay',
54
+ serverCertificateUrl: 'https://example.com/fairplay.cer',
55
+ },
56
+ 'com.widevine.alpha': { licenseUrl: 'https://example.com/widevine' },
57
+ },
58
+ };
59
+ ```
60
+
61
+ hls.js receives every system named here. When the browser’s own HLS plays the stream, only the `com.apple.fps` entry applies. [Media sources](../../guides/media-sources.md#drm-protected-sources) covers what each path can license and how to configure hls.js’s DRM directly.
62
+
63
+ ## Cookie-gated streams
64
+
65
+ 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 hls.js sends them (`withCredentials` on its XHR loader, `credentials: 'include'` on its fetch loader), the same way the browser does under native playback. Any other value, or no attribute, leaves hls.js’s default and sends no cross-origin cookies. An `xhrSetup` or `fetchSetup` you pass through `source.engine.hlsJs` still runs, after this, on the same request.
66
+
67
+ 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.
68
+
69
+ ```html
70
+ <hlsjs-video src="https://cdn.example.com/stream.m3u8" crossorigin="use-credentials"></hlsjs-video>
21
71
  ```
22
72
 
23
73
  ## Examples
@@ -50,16 +100,6 @@ import '@videojs/html/ui/container';
50
100
  import '@videojs/html/media/hlsjs-video';
51
101
  ```
52
102
 
53
- ## Cookie-gated streams
54
-
55
- 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 hls.js sends them (`withCredentials` on its XHR loader, `credentials: 'include'` on its fetch loader), the same way the browser does under native playback. Any other value, or no attribute, leaves hls.js’s default and sends no cross-origin cookies. An `xhrSetup` or `fetchSetup` you pass through `source.engine.hlsJs` still runs, after this, on the same request.
56
-
57
- 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.
58
-
59
- ```html
60
- <hlsjs-video src="https://cdn.example.com/stream.m3u8" crossorigin="use-credentials"></hlsjs-video>
61
- ```
62
-
63
103
  ## API Reference
64
104
 
65
105
  ### Attributes
@@ -86,7 +126,6 @@ These Video.js-specific attributes configure media behavior:
86
126
  | `isFullscreen` | `boolean` | — | Read-only. |
87
127
  | `isPictureInPicture` | `boolean` | — | Read-only. |
88
128
  | `liveEdgeStart` | `number` | — | Read-only. Presentation time marking the start of the Live Edge Window. Derived from the delegate on every read; `NaN` when no delegate is attached or the stream is not live. |
89
- | `playbackRateRange` | `{ min: number; max: number } \| undefined` | — | Read-only. The target's narrower rate range, when it reports one; native media accept the browser's range. |
90
129
  | `preload` | `MediaPreloadType` | `'metadata'` | Preload type (`'none'` / `'metadata'` / `'auto'`). |
91
130
  | `source` | `{ src?: string; type?: 'application/vnd.apple.mpegurl' \| 'video/mp4' \| string & {}; preferPlayback?: 'mse' \| 'native' \| string & {}; drm?: Partial<Record<KeySystem, DrmSystemConfig>>; maxAutoResolution?: '270p' \| '360p' \| '480p' \| '540p' \| '720p' \| '1080p' \| '1440p' \| '2160p'; capRenditionToPlayerSize?: boolean; minAutoResolution?: '270p' \| '360p' \| '480p' \| '540p' \| '720p' \| '1080p' \| '1440p' \| '2160p'; engine?: HlsEngineConfig } \| null` | `null` | Structured source: what to play (`src`, an optional `type`) plus how to play it (`preferPlayback`, `engine`). Assigning it derives `src`. Sources are compared structurally, so reassigning an equivalent object is a no-op. Only a change to the engine options (or to the resolved content type) recreates the playback engine. |
92
131
  | `src` | `string` | `''` | Media source URL. Assigning it replaces the identity half of `source` and leaves `type` and the engine options intact, so changing the URL never disturbs engine configuration. |
@@ -112,7 +151,7 @@ When playback falls back to the browser’s own HLS, hls.js isn’t involved and
112
151
 
113
152
  ### Methods
114
153
 
115
- 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`.
154
+ 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`.
116
155
 
117
156
  ### Events
118
157
 
@@ -13,7 +13,7 @@ import '@videojs/html/live-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/live-audio-compat.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/live-audio-compat.js"></script>
17
17
  ```
18
18
 
19
19
  ## Anatomy
@@ -13,7 +13,7 @@ import '@videojs/html/live-audio/neutral-skin';
13
13
  The import registers the skin and every UI element it composes. The [CDN](../../guides/cdn.md) player bundle registers this skin together with its player:
14
14
 
15
15
  ```html
16
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-audio-neutral.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/live-audio-neutral.js"></script>
17
17
  ```
18
18
 
19
19
  ## Anatomy
@@ -13,7 +13,7 @@ import '@videojs/html/live-audio/scaffold-skin';
13
13
  The import registers the skin and every UI element it composes. The [CDN](../../guides/cdn.md) player bundle registers this skin together with its player:
14
14
 
15
15
  ```html
16
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-audio-scaffold.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/live-audio-scaffold.js"></script>
17
17
  ```
18
18
 
19
19
  ## Usage
@@ -13,7 +13,7 @@ import '@videojs/html/live-audio/skin';
13
13
  The import registers the skin and every UI element it composes. The [CDN](../../guides/cdn.md) player bundle registers this skin together with its player:
14
14
 
15
15
  ```html
16
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-audio.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/live-audio.js"></script>
17
17
  ```
18
18
 
19
19
  ## Anatomy
@@ -13,7 +13,7 @@ import '@videojs/html/live-video/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/live-video-compat.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/live-video-compat.js"></script>
17
17
  ```
18
18
 
19
19
  ## Anatomy
@@ -36,6 +36,10 @@ The skin renders a poster image before playback starts. An element with `slot="p
36
36
 
37
37
  See [Add a poster and loading placeholder](../../guides/poster.md) for complete examples.
38
38
 
39
+ ## Controls before playback
40
+
41
+ Before playback starts, the skin shows only the large center play button. The other controls appear once playback starts or the media begins to autoplay. Set `--media-controls-before-start: visible` to show them from the start. See [Customize skins](../../guides/customize-skins.md#set-the-skins-styles).
42
+
39
43
  ## Styling
40
44
 
41
45
  Packaged skins style themselves and expose a small set of public CSS custom properties. Everything else inside the skin is private and may change between releases. [Customize skins](../../guides/customize-skins.md#style-a-packaged-skin) documents the properties. For deeper changes, the Video.js registry provides the skin files.
@@ -13,7 +13,7 @@ import '@videojs/html/live-video/neutral-skin';
13
13
  The import registers the skin and every UI element it composes. The [CDN](../../guides/cdn.md) player bundle registers this skin together with its player:
14
14
 
15
15
  ```html
16
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-video-neutral.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/live-video-neutral.js"></script>
17
17
  ```
18
18
 
19
19
  ## Anatomy
@@ -36,6 +36,10 @@ The skin renders a poster image before playback starts. An element with `slot="p
36
36
 
37
37
  See [Add a poster and loading placeholder](../../guides/poster.md) for complete examples.
38
38
 
39
+ ## Controls before playback
40
+
41
+ Before playback starts, the skin shows only the large center play button. The other controls appear once playback starts or the media begins to autoplay. Set `--media-controls-before-start: visible` to show them from the start. See [Customize skins](../../guides/customize-skins.md#set-the-skins-styles).
42
+
39
43
  ## Styling
40
44
 
41
45
  Packaged skins style themselves and expose a small set of public CSS custom properties. Everything else inside the skin is private and may change between releases. [Customize skins](../../guides/customize-skins.md#style-a-packaged-skin) documents the properties. For deeper changes, the Video.js registry provides the skin files.
@@ -13,7 +13,7 @@ import '@videojs/html/live-video/scaffold-skin';
13
13
  The import registers the skin and every UI element it composes. The [CDN](../../guides/cdn.md) player bundle registers this skin together with its player:
14
14
 
15
15
  ```html
16
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-video-scaffold.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/live-video-scaffold.js"></script>
17
17
  ```
18
18
 
19
19
  ## Usage
@@ -36,6 +36,10 @@ The skin renders a poster image before playback starts. An element with `slot="p
36
36
 
37
37
  See [Add a poster and loading placeholder](../../guides/poster.md) for complete examples.
38
38
 
39
+ ## Controls before playback
40
+
41
+ Before playback starts, the skin shows only the large center play button. The other controls appear once playback starts or the media begins to autoplay. Set `--media-controls-before-start: visible` to show them from the start. See [Customize skins](../../guides/customize-skins.md#set-the-skins-styles).
42
+
39
43
  ## Styling
40
44
 
41
45
  Packaged skins style themselves and expose a small set of public CSS custom properties. Everything else inside the skin is private and may change between releases. [Customize skins](../../guides/customize-skins.md#style-a-packaged-skin) documents the properties. For deeper changes, the Video.js registry provides the skin files.
@@ -13,7 +13,7 @@ import '@videojs/html/live-video/skin';
13
13
  The import registers the skin and every UI element it composes. The [CDN](../../guides/cdn.md) player bundle registers this skin together with its player:
14
14
 
15
15
  ```html
16
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/live-video.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/live-video.js"></script>
17
17
  ```
18
18
 
19
19
  ## Anatomy
@@ -36,6 +36,10 @@ The skin renders a poster image before playback starts. An element with `slot="p
36
36
 
37
37
  See [Add a poster and loading placeholder](../../guides/poster.md) for complete examples.
38
38
 
39
+ ## Controls before playback
40
+
41
+ Before playback starts, the skin shows only the large center play button. The other controls appear once playback starts or the media begins to autoplay. Set `--media-controls-before-start: visible` to show them from the start. See [Customize skins](../../guides/customize-skins.md#set-the-skins-styles).
42
+
39
43
  ## Styling
40
44
 
41
45
  Packaged skins style themselves and expose a small set of public CSS custom properties. Everything else inside the skin is private and may change between releases. [Customize skins](../../guides/customize-skins.md#style-a-packaged-skin) documents the properties. For deeper changes, the Video.js registry provides the skin files.
@@ -1,6 +1,6 @@
1
1
  # Video.js v10 — HTML Components
2
2
 
3
- > API reference for skins, media components, extensions, and interface components. Bundled with `@videojs/html` v10.3.0. Links are relative paths to files in this directory.
3
+ > API reference for skins, media components, extensions, and interface components. Bundled with `@videojs/html` v10.4.0. Links are relative paths to files in this directory.
4
4
 
5
5
  ## Layout
6
6
 
@@ -90,6 +90,7 @@ API reference for the slider components that scrub time and adjust volume.
90
90
 
91
91
  - [media-slider](./slider.md): A composable slider component with track, fill, thumb, preview, and value parts
92
92
  - [media-time-slider](./time-slider.md): A slider component for seeking through media playback time
93
+ - [media-time-slider-markers](./time-slider-markers.md): Draws a marker on the time slider for each cue on the text tracks a filter matches, such as ad breaks
93
94
  - [media-volume-slider](./volume-slider.md): A slider component for controlling media playback volume
94
95
 
95
96
  ## Menus
@@ -17,7 +17,7 @@ import '@videojs/html/media/mixcloud-audio';
17
17
  Or load it from the [CDN](../../guides/cdn.md):
18
18
 
19
19
  ```html
20
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/mixcloud-audio.js"></script>
20
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/mixcloud-audio.js"></script>
21
21
  ```
22
22
 
23
23
  ## Load a source
@@ -166,7 +166,7 @@ These attributes configure the embedded media adapter:
166
166
  | `seeking` | `boolean` | — | Read-only. |
167
167
  | `source` | `{ src?: string; engine?: MixcloudSourceEngineConfig } \| null` | `null` | Mixcloud show URL in `src`, widget parameters under `engine.mixcloud`. Replacing it re-derives `src`. |
168
168
  | `src` | `string` | `''` | |
169
- | `textTracks` | `TextTrackListLike` | — | Read-only. Always empty: Mixcloud has no captions or other text tracks. |
169
+ | `textTracks` | `TextTrackListLike` | — | Read-only. Unsupported: Mixcloud has no captions or other text tracks. |
170
170
  | `volume` | `number` | — | |
171
171
 
172
172
  ### Engine options
@@ -17,7 +17,39 @@ import '@videojs/html/media/mux-audio';
17
17
  Or load it from the [CDN](../../guides/cdn.md):
18
18
 
19
19
  ```html
20
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/mux-audio.js"></script>
20
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/mux-audio.js"></script>
21
+ ```
22
+
23
+ ## Load a source
24
+
25
+ `<mux-audio>` takes Mux content two ways: a stream URL through `src`, or a structured `source` object.
26
+
27
+ ```html
28
+ <mux-audio src="https://stream.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM.m3u8"></mux-audio>
29
+ ```
30
+
31
+ The `source` object builds the URL for you from a playback ID, an optional custom domain, and `playback` params. Playback params are camelCased [Mux playback query params](https://www.mux.com/docs/api-reference/stream/streaming/get-hls-manifest?utm_source=videojs&utm_campaign=vjs10&utm_content=docs-content); for example, `max_resolution` becomes `maxResolution`.
32
+
33
+ ```ts
34
+ const audio = document.querySelector('mux-audio')!;
35
+ audio.source = {
36
+ playbackId: 'BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM',
37
+ customDomain: 'media.example.com',
38
+ };
39
+ ```
40
+
41
+ `<mux-audio>` ignores the same source object when it is assigned again. A new object fires `sourcechange` even when its values are equal, although an equivalent playback source does not reload.
42
+
43
+ ## Signed playback
44
+
45
+ For [signed playback](https://www.mux.com/docs/guides/secure-video-playback?utm_source=videojs&utm_campaign=vjs10&utm_content=docs-content), put the playback token on `source.playback.token`. The token replaces every other playback param, so bake modifiers like time bounds into the token when you sign it.
46
+
47
+ ```ts
48
+ const audio = document.querySelector('mux-audio')!;
49
+ audio.source = {
50
+ playbackId: 'BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM',
51
+ playback: { token: playbackToken },
52
+ };
21
53
  ```
22
54
 
23
55
  ## Analytics and casting
@@ -90,7 +122,6 @@ These Video.js-specific attributes configure media behavior:
90
122
  | `engineName` | `string \| undefined` | — | Read-only. Engine this media is playing through, reported to analytics such as Mux Data: `hlsjs` via MSE, `browser` for native HLS, or `undefined` until a source loads. Read from the instance because the engine is picked per source. |
91
123
  | `error` | `MediaError \| null` | — | Read-only. |
92
124
  | `liveEdgeStart` | `number` | — | Read-only. Presentation time marking the start of the Live Edge Window. Derived from the delegate on every read; `NaN` when no delegate is attached or the stream is not live. |
93
- | `playbackRateRange` | `{ min: number; max: number } \| undefined` | — | Read-only. The target's narrower rate range, when it reports one; native media accept the browser's range. |
94
125
  | `preload` | `MediaPreloadType` | `'metadata'` | Preload type (`'none'` / `'metadata'` / `'auto'`). |
95
126
  | `source` | `{ type?: 'application/vnd.apple.mpegurl' \| 'video/mp4' \| string & {}; preferPlayback?: 'mse' \| 'native' \| string & {}; maxAutoResolution?: '270p' \| '360p' \| '480p' \| '540p' \| '720p' \| '1080p' \| '1440p' \| '2160p'; capRenditionToPlayerSize?: boolean; minAutoResolution?: '270p' \| '360p' \| '480p' \| '540p' \| '720p' \| '1080p' \| '1440p' \| '2160p'; engine?: HlsEngineConfig; src?: string; playbackId?: string; customDomain?: string; playback?: MuxPlaybackParams; poster?: MuxPosterParams; storyboard?: MuxStoryboardParams; drm?: MuxDrmParams } \| null` | `null` | Structured Mux source. Setting it derives `src` from the playback ID, custom domain, and `playback` params (appended as `snake_case` query params). A `playback.token` replaces all other params — signed URLs bake them into the token. Engine options live under `engine`. A `drm.token` fills in `drm` itself: Mux's FairPlay, Widevine, and PlayReady license servers for this playback ID, so protected media plays whichever path the browser takes. License servers named alongside the token win, key by key, for content Mux does not license. `playback.maxResolution` and `playback.minResolution` are server-side: they decide which renditions Mux puts in the manifest at all. The inherited `maxAutoResolution` and `minAutoResolution` only look like their pair — those are client-side and bound which of the renditions that *do* arrive adaptive selection reaches for. The two halves are independent. |
96
127
  | `src` | `string` | `''` | Media source URL. Setting a Mux stream URL (`https://stream.mux.com/<playback-id>.m3u8?...`, with or without the `.m3u8` extension) extracts the playback ID and query params into `source`; other URLs are kept as a plain `source.src`. Only playback options carry over. Mux identity comes from the URL, and the signed `poster`, `storyboard`, and `drm` tokens are scoped to a playback ID, so carrying them onto a different source would build rejected URLs. |
@@ -113,7 +144,7 @@ Options passed under `source.engine.nativeHls`.
113
144
 
114
145
  ### Methods
115
146
 
116
- Supports these media methods. See [HTMLAudioElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement) for details: `addTextTrack`, `canPlayType`, `load`, `pause`, `play`.
147
+ Supports these media methods. See [HTMLAudioElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement) for details: `addTextTrack`, `canPlayType`, `load`, `pause`, `play`, `removeTextTrack`.
117
148
 
118
149
  ### Events
119
150
 
@@ -15,7 +15,7 @@ import '@videojs/html/media/mux-background-video';
15
15
  Or load it from the [CDN](../../guides/cdn.md):
16
16
 
17
17
  ```html
18
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/mux-background-video.js"></script>
18
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/mux-background-video.js"></script>
19
19
  ```
20
20
 
21
21
  ## Load a Mux source
@@ -17,7 +17,7 @@ import '@videojs/html/extensions/mux-data';
17
17
  Or load it from the [CDN](../../guides/cdn.md):
18
18
 
19
19
  ```html
20
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/extensions/mux-data.js"></script>
20
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/extensions/mux-data.js"></script>
21
21
  ```
22
22
 
23
23
  ## Anatomy
@@ -17,7 +17,7 @@ import '@videojs/html/media/mux-video';
17
17
  Or load it from the [CDN](../../guides/cdn.md):
18
18
 
19
19
  ```html
20
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/mux-video.js"></script>
20
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/mux-video.js"></script>
21
21
  ```
22
22
 
23
23
  ## Load a source
@@ -85,6 +85,21 @@ video.source = {
85
85
  };
86
86
  ```
87
87
 
88
+ ## Protected content
89
+
90
+ For [DRM-protected](https://www.mux.com/docs/guides/protect-videos-with-drm?utm_source=videojs&utm_campaign=vjs10&utm_content=docs-content) playback, put the DRM license token on `source.drm.token`. The Mux video component derives the FairPlay, Widevine, and PlayReady license servers from it. DRM playback is always signed, so a `playback.token` belongs alongside it.
91
+
92
+ ```ts
93
+ const video = document.querySelector('mux-video')!;
94
+ video.source = {
95
+ playbackId: 'BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM',
96
+ playback: { token: playbackToken },
97
+ drm: { token: drmToken },
98
+ };
99
+ ```
100
+
101
+ [Media sources](../../guides/media-sources.md#mux-signs-drm-with-a-token) covers mixing Mux’s license servers with your own.
102
+
88
103
  ## Analytics and casting
89
104
 
90
105
  The Mux video component plays Mux streams. It doesn’t monitor them or cast them — [Mux Data](../../guides/mux-data.md) and [Google Cast](../../guides/casting.md) are separate extensions you add to the player alongside it. Mux Data needs no environment key here, since Mux attributes the views to the environment that owns the playback ID:
@@ -169,7 +184,6 @@ These Video.js-specific attributes configure media behavior:
169
184
  | `isFullscreen` | `boolean` | — | Read-only. |
170
185
  | `isPictureInPicture` | `boolean` | — | Read-only. |
171
186
  | `liveEdgeStart` | `number` | — | Read-only. Presentation time marking the start of the Live Edge Window. Derived from the delegate on every read; `NaN` when no delegate is attached or the stream is not live. |
172
- | `playbackRateRange` | `{ min: number; max: number } \| undefined` | — | Read-only. The target's narrower rate range, when it reports one; native media accept the browser's range. |
173
187
  | `preload` | `MediaPreloadType` | `'metadata'` | Preload type (`'none'` / `'metadata'` / `'auto'`). |
174
188
  | `source` | `{ type?: 'application/vnd.apple.mpegurl' \| 'video/mp4' \| string & {}; preferPlayback?: 'mse' \| 'native' \| string & {}; maxAutoResolution?: '270p' \| '360p' \| '480p' \| '540p' \| '720p' \| '1080p' \| '1440p' \| '2160p'; capRenditionToPlayerSize?: boolean; minAutoResolution?: '270p' \| '360p' \| '480p' \| '540p' \| '720p' \| '1080p' \| '1440p' \| '2160p'; engine?: HlsEngineConfig; src?: string; playbackId?: string; customDomain?: string; playback?: MuxPlaybackParams; poster?: MuxPosterParams; storyboard?: MuxStoryboardParams; drm?: MuxDrmParams } \| null` | `null` | Structured Mux source. Setting it derives `src` from the playback ID, custom domain, and `playback` params (appended as `snake_case` query params). A `playback.token` replaces all other params — signed URLs bake them into the token. Engine options live under `engine`. A `drm.token` fills in `drm` itself: Mux's FairPlay, Widevine, and PlayReady license servers for this playback ID, so protected media plays whichever path the browser takes. License servers named alongside the token win, key by key, for content Mux does not license. `playback.maxResolution` and `playback.minResolution` are server-side: they decide which renditions Mux puts in the manifest at all. The inherited `maxAutoResolution` and `minAutoResolution` only look like their pair — those are client-side and bound which of the renditions that *do* arrive adaptive selection reaches for. The two halves are independent. |
175
189
  | `src` | `string` | `''` | Media source URL. Setting a Mux stream URL (`https://stream.mux.com/<playback-id>.m3u8?...`, with or without the `.m3u8` extension) extracts the playback ID and query params into `source`; other URLs are kept as a plain `source.src`. Only playback options carry over. Mux identity comes from the URL, and the signed `poster`, `storyboard`, and `drm` tokens are scoped to a playback ID, so carrying them onto a different source would build rejected URLs. |
@@ -195,7 +209,7 @@ Options passed under `source.engine.nativeHls`.
195
209
 
196
210
  ### Methods
197
211
 
198
- 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`.
212
+ 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`.
199
213
 
200
214
  ### Events
201
215
 
@@ -13,9 +13,39 @@ import '@videojs/html/media/native-hls-video';
13
13
  Or load it from the [CDN](../../guides/cdn.md):
14
14
 
15
15
  ```html
16
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/native-hls-video.js"></script>
16
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/native-hls-video.js"></script>
17
17
  ```
18
18
 
19
+ ## Load a source
20
+
21
+ `src` takes an HLS manifest URL, which the browser plays with its own HLS support.
22
+
23
+ ```html
24
+ <native-hls-video src="https://example.com/playlist.m3u8"></native-hls-video>
25
+ ```
26
+
27
+ The structured `source` object adds `drm` and engine options to the URL. 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).
32
+
33
+ ```ts
34
+ const video = document.querySelector('native-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
+ The browser’s own HLS licenses FairPlay only, so the `com.apple.fps` entry is the one this component uses. [Media sources](../../guides/media-sources.md#drm-protected-sources) covers DRM in more depth.
48
+
19
49
  ## Examples
20
50
 
21
51
  ### Basic Usage
@@ -68,7 +98,6 @@ These Video.js-specific attributes configure media behavior:
68
98
  | `isFullscreen` | `boolean` | — | Read-only. |
69
99
  | `isPictureInPicture` | `boolean` | — | Read-only. |
70
100
  | `liveEdgeStart` | `number` | — | Read-only. Playback time where the live edge begins. Calculated from the newest available time and the playlist's live-edge offset. `NaN` when the stream is not live or the offset is unavailable. |
71
- | `playbackRateRange` | `{ min: number; max: number } \| undefined` | — | Read-only. The target's narrower rate range, when it reports one; native media accept the browser's range. |
72
101
  | `preload` | `MediaPreloadType` | `'metadata'` | Preload type (`'none'` / `'metadata'` / `'auto'`). |
73
102
  | `source` | `{ src?: string; drm?: Partial<Record<KeySystem, DrmSystemConfig>>; engine?: NativeHlsEngineConfig } \| null` | `null` | Structured source: what to play (`src`) plus how to play it (`engine.nativeHls`). Assigning it derives `src`. Only a new URL reaches the element, so reassigning an equivalent source neither reloads nor disturbs key exchange. Use `src` or `load()` to reload what is already playing. Changing this source does not emit `sourcechange`. When the hls.js media component uses native HLS playback, it emits its own `sourcechange` and forwards the native playback events. |
74
103
  | `src` | `string` | `''` | Media source URL. Assigning it replaces the identity half of `source` and leaves `engine` intact, so changing the URL never disturbs key exchange. Like the element's own `src`, assigning it always loads — including the URL already playing. |
@@ -104,7 +133,7 @@ video.source = {
104
133
 
105
134
  ### Methods
106
135
 
107
- 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`.
136
+ 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`.
108
137
 
109
138
  ### Events
110
139
 
@@ -17,7 +17,7 @@ import '@videojs/html/media/playerjs-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/playerjs-video.js"></script>
20
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/playerjs-video.js"></script>
21
21
  ```
22
22
 
23
23
  ## Load a source
@@ -155,7 +155,7 @@ These attributes configure the embedded media adapter:
155
155
  | `seeking` | `boolean` | — | Read-only. |
156
156
  | `source` | `{ src?: string; engine?: PlayerJsSourceEngineConfig } \| null` | `null` | Embed URL in `src`, extra URL parameters under `engine.playerJs`. Re-derives `src`; equal sources skip reload. |
157
157
  | `src` | `string` | `''` | |
158
- | `textTracks` | `TextTrackListLike` | — | Read-only. Always empty: player.js has no text track surface. |
158
+ | `textTracks` | `TextTrackListLike` | — | Read-only. Unsupported: player.js has no text track surface. |
159
159
  | `volume` | `number` | — | |
160
160
 
161
161
  ### Engine options
@@ -21,7 +21,7 @@ import '@videojs/html/media/shaka-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/shaka-video.js"></script>
24
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/shaka-video.js"></script>
25
25
  ```
26
26
 
27
27
  ## Load a source
@@ -121,7 +121,6 @@ These Video.js-specific attributes configure media behavior:
121
121
  | `isFullscreen` | `boolean` | — | Read-only. |
122
122
  | `isPictureInPicture` | `boolean` | — | Read-only. |
123
123
  | `liveEdgeStart` | `number` | — | Read-only. |
124
- | `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. |
125
124
  | `preload` | `'' \| 'none' \| 'metadata' \| 'auto'` | `'metadata'` | How much to fetch before playback is asked for, mirroring the media element's own `preload`. Shaka has no split between "know the source" and "buffer it", so this maps onto when and how `engine.load()` runs:<br>- `'auto'` — load immediately with the configured buffering goals.<br>- `'metadata'` — load immediately, holding buffering to about a segment; the configured goals come back on the first play intent.<br>- `'none'` / `''` — hold the load entirely until the first play intent. A play intent is a `play` event, a target that is already playing, or `autoplay` — which the spec lets override `preload` for good reason: with nothing fetched there is nothing whose readiness could ever fire it. Widening (`none` → `auto`) takes effect immediately; narrowing after a load began cannot un-fetch and leaves it alone. |
126
125
  | `source` | `{ src?: string; type?: string; drm?: Partial<Record<KeySystem, DrmSystemConfig>>; engine?: ShakaEngineConfig } \| null` | `null` | Structured source: what to play (`src`, an optional `type`) plus how to play it (`drm`, `engine.shaka`). Replacing it re-derives `src`. Shaka takes configuration on a live player, so changing `engine.shaka` re-applies it in place instead of recreating the engine. |
127
126
  | `src` | `string` | `''` | |
@@ -135,7 +134,7 @@ Also exposes these properties from the native media API. See [HTMLVideoElement](
135
134
 
136
135
  ### Methods
137
136
 
138
- 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`.
137
+ 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`.
139
138
 
140
139
  ### Events
141
140
 
@@ -17,7 +17,7 @@ import '@videojs/html/media/soundcloud-audio';
17
17
  Or load it from the [CDN](../../guides/cdn.md):
18
18
 
19
19
  ```html
20
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/soundcloud-audio.js"></script>
20
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/soundcloud-audio.js"></script>
21
21
  ```
22
22
 
23
23
  ## Load a source
@@ -180,7 +180,7 @@ These attributes configure the embedded media adapter:
180
180
  | `seeking` | `boolean` | — | Read-only. |
181
181
  | `source` | `{ src?: string; engine?: SoundCloudSourceEngineConfig } \| null` | `null` | SoundCloud URL in `src`, widget parameters under `engine.soundcloud`. Replacing it re-derives `src`. |
182
182
  | `src` | `string` | `''` | |
183
- | `textTracks` | `TextTrackListLike` | — | Read-only. Always empty: SoundCloud has no captions or other text tracks. |
183
+ | `textTracks` | `TextTrackListLike` | — | Read-only. Unsupported: SoundCloud has no captions or other text tracks. |
184
184
  | `volume` | `number` | — | |
185
185
 
186
186
  ### Engine options
@@ -17,7 +17,7 @@ import '@videojs/html/media/spotify-audio';
17
17
  Or load it from the [CDN](../../guides/cdn.md):
18
18
 
19
19
  ```html
20
- <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/spotify-audio.js"></script>
20
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/spotify-audio.js"></script>
21
21
  ```
22
22
 
23
23
  ## Load a source
@@ -105,7 +105,7 @@ These attributes configure the embedded media adapter:
105
105
  | `seeking` | `boolean` | — | Read-only. |
106
106
  | `source` | `{ src?: string; engine?: SpotifySourceEngineConfig } \| null` | `null` | Spotify URL or URI in `src`, plus embed options under `engine.spotify`. Replacing it re-derives `src`. |
107
107
  | `src` | `string` | `''` | |
108
- | `textTracks` | `TextTrackListLike` | — | Read-only. Always empty: the embed exposes no captions or other text tracks. |
108
+ | `textTracks` | `TextTrackListLike` | — | Read-only. Unsupported: the embed exposes no captions or other text tracks. |
109
109
 
110
110
  ### Engine options
111
111
 
@@ -17,7 +17,7 @@ import '@videojs/html/media/tiktok-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/tiktok-video.js"></script>
20
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/media/tiktok-video.js"></script>
21
21
  ```
22
22
 
23
23
  ## Load a source
@@ -117,7 +117,7 @@ These attributes configure the embedded media adapter:
117
117
  | `seeking` | `boolean` | — | Read-only. |
118
118
  | `source` | `{ src?: string; engine?: TikTokSourceEngineConfig } \| null` | `null` | TikTok URL or id in `src`, player params under `engine.tiktok`. Re-derives `src`; equal sources skip reload. |
119
119
  | `src` | `string` | `''` | |
120
- | `textTracks` | `TextTrackListLike` | — | Read-only. Always empty: `closed_caption` is the embed's only say over captions. |
120
+ | `textTracks` | `TextTrackListLike` | — | Read-only. Unsupported: `closed_caption` is the embed's only say over captions. |
121
121
 
122
122
  ### Engine options
123
123