@mattebox/player 0.11.0 → 0.12.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 (334) hide show
  1. package/dist/announcer.d.ts +6 -3
  2. package/dist/announcer.d.ts.map +1 -1
  3. package/dist/announcer.js +17 -14
  4. package/dist/announcer.js.map +1 -1
  5. package/dist/cdn/mattebox-player.min.js +3 -3
  6. package/dist/controls/airplay.js +1 -2
  7. package/dist/controls/chapters.js +1 -2
  8. package/dist/controls/cues.js +1 -2
  9. package/dist/controls/fullscreen.js +1 -2
  10. package/dist/controls/icons.js +1 -2
  11. package/dist/controls/markers.d.ts +2 -15
  12. package/dist/controls/markers.d.ts.map +1 -1
  13. package/dist/controls/markers.js +1 -2
  14. package/dist/controls/markers.js.map +1 -1
  15. package/dist/controls/menu.js +1 -2
  16. package/dist/controls/native-tracks.js +1 -2
  17. package/dist/controls/pip.js +1 -2
  18. package/dist/controls/quality-names.js +1 -2
  19. package/dist/controls/ranges.js +1 -2
  20. package/dist/controls/session.js +1 -2
  21. package/dist/controls/slider.js +1 -2
  22. package/dist/controls/time.js +1 -2
  23. package/dist/controls/track-names.d.ts +3 -2
  24. package/dist/controls/track-names.d.ts.map +1 -1
  25. package/dist/controls/track-names.js +5 -5
  26. package/dist/controls/track-names.js.map +1 -1
  27. package/dist/dom.js +1 -2
  28. package/dist/element-entry.d.ts +4 -1
  29. package/dist/element-entry.d.ts.map +1 -1
  30. package/dist/element-entry.js +1 -2
  31. package/dist/element-entry.js.map +1 -1
  32. package/dist/element.d.ts +90 -6
  33. package/dist/element.d.ts.map +1 -1
  34. package/dist/element.js +212 -30
  35. package/dist/element.js.map +1 -1
  36. package/dist/elements/airplay-button.js +2 -3
  37. package/dist/elements/airplay-button.js.map +1 -1
  38. package/dist/elements/audio-menu.d.ts +3 -2
  39. package/dist/elements/audio-menu.d.ts.map +1 -1
  40. package/dist/elements/audio-menu.js +18 -12
  41. package/dist/elements/audio-menu.js.map +1 -1
  42. package/dist/elements/chapters-menu.d.ts +2 -1
  43. package/dist/elements/chapters-menu.d.ts.map +1 -1
  44. package/dist/elements/chapters-menu.js +2 -3
  45. package/dist/elements/chapters-menu.js.map +1 -1
  46. package/dist/elements/component.d.ts +9 -0
  47. package/dist/elements/component.d.ts.map +1 -1
  48. package/dist/elements/component.js +16 -2
  49. package/dist/elements/component.js.map +1 -1
  50. package/dist/elements/control-bar.js +1 -2
  51. package/dist/elements/current-time.js +1 -2
  52. package/dist/elements/drm-badge.js +4 -5
  53. package/dist/elements/drm-badge.js.map +1 -1
  54. package/dist/elements/duration.js +1 -2
  55. package/dist/elements/error-screen.d.ts +9 -0
  56. package/dist/elements/error-screen.d.ts.map +1 -1
  57. package/dist/elements/error-screen.js +54 -12
  58. package/dist/elements/error-screen.js.map +1 -1
  59. package/dist/elements/fullscreen-button.js +2 -3
  60. package/dist/elements/fullscreen-button.js.map +1 -1
  61. package/dist/elements/live-button.js +3 -4
  62. package/dist/elements/live-button.js.map +1 -1
  63. package/dist/elements/marker-button.d.ts.map +1 -1
  64. package/dist/elements/marker-button.js +7 -6
  65. package/dist/elements/marker-button.js.map +1 -1
  66. package/dist/elements/menu-element.d.ts +3 -2
  67. package/dist/elements/menu-element.d.ts.map +1 -1
  68. package/dist/elements/menu-element.js +3 -4
  69. package/dist/elements/menu-element.js.map +1 -1
  70. package/dist/elements/mute-button.js +2 -3
  71. package/dist/elements/mute-button.js.map +1 -1
  72. package/dist/elements/pip-button.js +2 -3
  73. package/dist/elements/pip-button.js.map +1 -1
  74. package/dist/elements/play-button.js +2 -3
  75. package/dist/elements/play-button.js.map +1 -1
  76. package/dist/elements/quality-menu.d.ts +2 -1
  77. package/dist/elements/quality-menu.d.ts.map +1 -1
  78. package/dist/elements/quality-menu.js +3 -4
  79. package/dist/elements/quality-menu.js.map +1 -1
  80. package/dist/elements/remaining-time.js +1 -2
  81. package/dist/elements/scan-button.d.ts.map +1 -1
  82. package/dist/elements/scan-button.js +2 -3
  83. package/dist/elements/scan-button.js.map +1 -1
  84. package/dist/elements/seek-bar.d.ts +2 -0
  85. package/dist/elements/seek-bar.d.ts.map +1 -1
  86. package/dist/elements/seek-bar.js +10 -7
  87. package/dist/elements/seek-bar.js.map +1 -1
  88. package/dist/elements/shared.js +1 -2
  89. package/dist/elements/skip-button.d.ts.map +1 -1
  90. package/dist/elements/skip-button.js +2 -3
  91. package/dist/elements/skip-button.js.map +1 -1
  92. package/dist/elements/spacer.js +1 -2
  93. package/dist/elements/speed-menu.d.ts +2 -1
  94. package/dist/elements/speed-menu.d.ts.map +1 -1
  95. package/dist/elements/speed-menu.js +3 -4
  96. package/dist/elements/speed-menu.js.map +1 -1
  97. package/dist/elements/spinner.d.ts +1 -1
  98. package/dist/elements/spinner.js +2 -4
  99. package/dist/elements/spinner.js.map +1 -1
  100. package/dist/elements/start-button.d.ts.map +1 -1
  101. package/dist/elements/start-button.js +2 -4
  102. package/dist/elements/start-button.js.map +1 -1
  103. package/dist/elements/subtitles-menu.d.ts +2 -1
  104. package/dist/elements/subtitles-menu.d.ts.map +1 -1
  105. package/dist/elements/subtitles-menu.js +51 -22
  106. package/dist/elements/subtitles-menu.js.map +1 -1
  107. package/dist/elements/time-element.js +1 -2
  108. package/dist/elements/title.d.ts.map +1 -1
  109. package/dist/elements/title.js +11 -5
  110. package/dist/elements/title.js.map +1 -1
  111. package/dist/elements/video-menu.d.ts +2 -1
  112. package/dist/elements/video-menu.d.ts.map +1 -1
  113. package/dist/elements/video-menu.js +12 -12
  114. package/dist/elements/video-menu.js.map +1 -1
  115. package/dist/elements/volume-slider.js +2 -3
  116. package/dist/elements/volume-slider.js.map +1 -1
  117. package/dist/elements/volume.js +1 -2
  118. package/dist/entries/airplay-button.js +1 -2
  119. package/dist/entries/audio-menu.js +1 -2
  120. package/dist/entries/chapters-menu.js +1 -2
  121. package/dist/entries/control-bar.js +1 -2
  122. package/dist/entries/current-time.js +1 -2
  123. package/dist/entries/drm-badge.js +1 -2
  124. package/dist/entries/duration.js +1 -2
  125. package/dist/entries/error-screen.js +1 -2
  126. package/dist/entries/fullscreen-button.js +1 -2
  127. package/dist/entries/live-button.js +1 -2
  128. package/dist/entries/marker-button.js +1 -2
  129. package/dist/entries/mute-button.js +1 -2
  130. package/dist/entries/pip-button.js +1 -2
  131. package/dist/entries/play-button.js +1 -2
  132. package/dist/entries/quality-menu.js +1 -2
  133. package/dist/entries/remaining-time.js +1 -2
  134. package/dist/entries/scan-button.js +1 -2
  135. package/dist/entries/seek-bar.js +1 -2
  136. package/dist/entries/skip-button.js +1 -2
  137. package/dist/entries/spacer.js +1 -2
  138. package/dist/entries/speed-menu.js +1 -2
  139. package/dist/entries/spinner.js +1 -2
  140. package/dist/entries/start-button.js +1 -2
  141. package/dist/entries/subtitles-menu.js +1 -2
  142. package/dist/entries/title.js +1 -2
  143. package/dist/entries/video-menu.js +1 -2
  144. package/dist/entries/volume-slider.js +1 -2
  145. package/dist/entries/volume.js +1 -2
  146. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/asyncToGenerator.js +1 -2
  147. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/defineProperty.js +1 -2
  148. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/objectSpread2.js +1 -2
  149. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/toPrimitive.js +1 -2
  150. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/toPropertyKey.js +1 -2
  151. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/typeof.js +1 -2
  152. package/dist/es2015/announcer.js +18 -15
  153. package/dist/es2015/controls/airplay.js +1 -2
  154. package/dist/es2015/controls/chapters.js +2 -3
  155. package/dist/es2015/controls/cues.js +1 -2
  156. package/dist/es2015/controls/fullscreen.js +1 -2
  157. package/dist/es2015/controls/icons.js +1 -2
  158. package/dist/es2015/controls/markers.js +1 -2
  159. package/dist/es2015/controls/menu.js +2 -3
  160. package/dist/es2015/controls/native-tracks.js +1 -2
  161. package/dist/es2015/controls/pip.js +1 -2
  162. package/dist/es2015/controls/quality-names.js +1 -2
  163. package/dist/es2015/controls/ranges.js +1 -2
  164. package/dist/es2015/controls/session.js +1 -2
  165. package/dist/es2015/controls/slider.js +1 -2
  166. package/dist/es2015/controls/time.js +1 -2
  167. package/dist/es2015/controls/track-names.js +5 -5
  168. package/dist/es2015/dom.js +1 -2
  169. package/dist/es2015/element-entry.js +1 -2
  170. package/dist/es2015/element.js +227 -37
  171. package/dist/es2015/elements/airplay-button.js +2 -4
  172. package/dist/es2015/elements/audio-menu.js +18 -16
  173. package/dist/es2015/elements/chapters-menu.js +2 -3
  174. package/dist/es2015/elements/component.js +18 -2
  175. package/dist/es2015/elements/control-bar.js +1 -2
  176. package/dist/es2015/elements/current-time.js +1 -2
  177. package/dist/es2015/elements/drm-badge.js +5 -7
  178. package/dist/es2015/elements/duration.js +1 -2
  179. package/dist/es2015/elements/error-screen.js +56 -13
  180. package/dist/es2015/elements/fullscreen-button.js +2 -4
  181. package/dist/es2015/elements/live-button.js +3 -5
  182. package/dist/es2015/elements/marker-button.js +8 -7
  183. package/dist/es2015/elements/menu-element.js +3 -8
  184. package/dist/es2015/elements/mute-button.js +3 -4
  185. package/dist/es2015/elements/pip-button.js +2 -4
  186. package/dist/es2015/elements/play-button.js +2 -4
  187. package/dist/es2015/elements/quality-menu.js +4 -5
  188. package/dist/es2015/elements/remaining-time.js +1 -2
  189. package/dist/es2015/elements/scan-button.js +3 -4
  190. package/dist/es2015/elements/seek-bar.js +12 -11
  191. package/dist/es2015/elements/shared.js +1 -2
  192. package/dist/es2015/elements/skip-button.js +2 -4
  193. package/dist/es2015/elements/spacer.js +1 -2
  194. package/dist/es2015/elements/speed-menu.js +4 -5
  195. package/dist/es2015/elements/spinner.js +2 -5
  196. package/dist/es2015/elements/start-button.js +3 -5
  197. package/dist/es2015/elements/subtitles-menu.js +53 -31
  198. package/dist/es2015/elements/time-element.js +1 -2
  199. package/dist/es2015/elements/title.js +12 -6
  200. package/dist/es2015/elements/video-menu.js +12 -12
  201. package/dist/es2015/elements/volume-slider.js +3 -4
  202. package/dist/es2015/elements/volume.js +1 -2
  203. package/dist/es2015/entries/airplay-button.js +1 -2
  204. package/dist/es2015/entries/audio-menu.js +1 -2
  205. package/dist/es2015/entries/chapters-menu.js +1 -2
  206. package/dist/es2015/entries/control-bar.js +1 -2
  207. package/dist/es2015/entries/current-time.js +1 -2
  208. package/dist/es2015/entries/drm-badge.js +1 -2
  209. package/dist/es2015/entries/duration.js +1 -2
  210. package/dist/es2015/entries/error-screen.js +1 -2
  211. package/dist/es2015/entries/fullscreen-button.js +1 -2
  212. package/dist/es2015/entries/live-button.js +1 -2
  213. package/dist/es2015/entries/marker-button.js +1 -2
  214. package/dist/es2015/entries/mute-button.js +1 -2
  215. package/dist/es2015/entries/pip-button.js +1 -2
  216. package/dist/es2015/entries/play-button.js +1 -2
  217. package/dist/es2015/entries/quality-menu.js +1 -2
  218. package/dist/es2015/entries/remaining-time.js +1 -2
  219. package/dist/es2015/entries/scan-button.js +1 -2
  220. package/dist/es2015/entries/seek-bar.js +1 -2
  221. package/dist/es2015/entries/skip-button.js +1 -2
  222. package/dist/es2015/entries/spacer.js +1 -2
  223. package/dist/es2015/entries/speed-menu.js +1 -2
  224. package/dist/es2015/entries/spinner.js +1 -2
  225. package/dist/es2015/entries/start-button.js +1 -2
  226. package/dist/es2015/entries/subtitles-menu.js +1 -2
  227. package/dist/es2015/entries/title.js +1 -2
  228. package/dist/es2015/entries/video-menu.js +1 -2
  229. package/dist/es2015/entries/volume-slider.js +1 -2
  230. package/dist/es2015/entries/volume.js +1 -2
  231. package/dist/es2015/host.js +1 -2
  232. package/dist/es2015/ids.js +33 -0
  233. package/dist/es2015/index.js +2 -1
  234. package/dist/es2015/labels.js +1 -2
  235. package/dist/es2015/locales/ar.js +75 -0
  236. package/dist/es2015/locales/ca.js +75 -0
  237. package/dist/es2015/locales/de.js +75 -0
  238. package/dist/es2015/locales/es.js +75 -0
  239. package/dist/es2015/locales/fr.js +75 -0
  240. package/dist/es2015/locales/hi.js +75 -0
  241. package/dist/es2015/locales/it.js +75 -0
  242. package/dist/es2015/locales/ja.js +75 -0
  243. package/dist/es2015/locales/ko.js +75 -0
  244. package/dist/es2015/locales/pt.js +75 -0
  245. package/dist/es2015/locales/zh.js +75 -0
  246. package/dist/es2015/locales.js +61 -0
  247. package/dist/es2015/namespaces.js +1 -2
  248. package/dist/es2015/presets.js +2 -3
  249. package/dist/es2015/style.js +1 -2
  250. package/dist/es2015/surface.js +12 -4
  251. package/dist/es2015/tags.js +1 -2
  252. package/dist/es2015/text.js +15 -0
  253. package/dist/es2015/trackers.js +43 -0
  254. package/dist/es2015/video-sources.js +2 -3
  255. package/dist/host.d.ts +40 -1
  256. package/dist/host.d.ts.map +1 -1
  257. package/dist/host.js +1 -2
  258. package/dist/host.js.map +1 -1
  259. package/dist/ids.d.ts +19 -0
  260. package/dist/ids.d.ts.map +1 -0
  261. package/dist/ids.js +34 -0
  262. package/dist/ids.js.map +1 -0
  263. package/dist/index.d.ts +8 -1
  264. package/dist/index.d.ts.map +1 -1
  265. package/dist/index.js +2 -1
  266. package/dist/labels.js +1 -2
  267. package/dist/locales/ar.d.ts +75 -0
  268. package/dist/locales/ar.d.ts.map +1 -0
  269. package/dist/locales/ar.js +77 -0
  270. package/dist/locales/ar.js.map +1 -0
  271. package/dist/locales/ca.d.ts +75 -0
  272. package/dist/locales/ca.d.ts.map +1 -0
  273. package/dist/locales/ca.js +77 -0
  274. package/dist/locales/ca.js.map +1 -0
  275. package/dist/locales/de.d.ts +75 -0
  276. package/dist/locales/de.d.ts.map +1 -0
  277. package/dist/locales/de.js +77 -0
  278. package/dist/locales/de.js.map +1 -0
  279. package/dist/locales/es.d.ts +75 -0
  280. package/dist/locales/es.d.ts.map +1 -0
  281. package/dist/locales/es.js +77 -0
  282. package/dist/locales/es.js.map +1 -0
  283. package/dist/locales/fr.d.ts +75 -0
  284. package/dist/locales/fr.d.ts.map +1 -0
  285. package/dist/locales/fr.js +77 -0
  286. package/dist/locales/fr.js.map +1 -0
  287. package/dist/locales/hi.d.ts +75 -0
  288. package/dist/locales/hi.d.ts.map +1 -0
  289. package/dist/locales/hi.js +77 -0
  290. package/dist/locales/hi.js.map +1 -0
  291. package/dist/locales/it.d.ts +75 -0
  292. package/dist/locales/it.d.ts.map +1 -0
  293. package/dist/locales/it.js +77 -0
  294. package/dist/locales/it.js.map +1 -0
  295. package/dist/locales/ja.d.ts +75 -0
  296. package/dist/locales/ja.d.ts.map +1 -0
  297. package/dist/locales/ja.js +77 -0
  298. package/dist/locales/ja.js.map +1 -0
  299. package/dist/locales/ko.d.ts +75 -0
  300. package/dist/locales/ko.d.ts.map +1 -0
  301. package/dist/locales/ko.js +77 -0
  302. package/dist/locales/ko.js.map +1 -0
  303. package/dist/locales/pt.d.ts +75 -0
  304. package/dist/locales/pt.d.ts.map +1 -0
  305. package/dist/locales/pt.js +77 -0
  306. package/dist/locales/pt.js.map +1 -0
  307. package/dist/locales/zh.d.ts +75 -0
  308. package/dist/locales/zh.d.ts.map +1 -0
  309. package/dist/locales/zh.js +77 -0
  310. package/dist/locales/zh.js.map +1 -0
  311. package/dist/locales.d.ts +27 -0
  312. package/dist/locales.d.ts.map +1 -0
  313. package/dist/locales.js +48 -0
  314. package/dist/locales.js.map +1 -0
  315. package/dist/messages.d.ts +167 -0
  316. package/dist/messages.d.ts.map +1 -0
  317. package/dist/namespaces.js +1 -2
  318. package/dist/presets.js +1 -2
  319. package/dist/style.js +1 -2
  320. package/dist/surface.d.ts +4 -1
  321. package/dist/surface.d.ts.map +1 -1
  322. package/dist/surface.js +12 -4
  323. package/dist/surface.js.map +1 -1
  324. package/dist/tags.js +1 -2
  325. package/dist/text.d.ts +14 -0
  326. package/dist/text.d.ts.map +1 -0
  327. package/dist/text.js +16 -0
  328. package/dist/text.js.map +1 -0
  329. package/dist/trackers.d.ts +18 -0
  330. package/dist/trackers.d.ts.map +1 -0
  331. package/dist/trackers.js +45 -0
  332. package/dist/trackers.js.map +1 -0
  333. package/dist/video-sources.js +1 -2
  334. package/package.json +11 -3
@@ -1,4 +1,4 @@
1
- //#region src/controls/airplay.ts
1
+ // src/controls/airplay.ts
2
2
  const WIRELESS_CHANGED = "webkitcurrentplaybacktargetiswirelesschanged";
3
3
  function airplay(video) {
4
4
  const apple = video;
@@ -24,7 +24,6 @@ function airplay(video) {
24
24
  }
25
25
  };
26
26
  }
27
- //#endregion
28
27
  export { airplay };
29
28
 
30
29
  //# sourceMappingURL=airplay.js.map
@@ -1,5 +1,5 @@
1
1
  import { optional } from "./session.js";
2
- //#region src/controls/chapters.ts
2
+ // src/controls/chapters.ts
3
3
  /** The first chapters track on the video, or null. */
4
4
  function chapterTrack(video) {
5
5
  for (const track of video.textTracks) if (track.kind === "chapters") return track;
@@ -89,7 +89,6 @@ function followChapters(player, fn) {
89
89
  inner = [];
90
90
  };
91
91
  }
92
- //#endregion
93
92
  export { chapterAt, chapterTrack, chapters, followChapters };
94
93
 
95
94
  //# sourceMappingURL=chapters.js.map
@@ -1,4 +1,4 @@
1
- //#region src/controls/cues.ts
1
+ // src/controls/cues.ts
2
2
  /**
3
3
  * Subtitles and the bar. Two things.
4
4
  *
@@ -174,7 +174,6 @@ function cueLift(video, host, covered) {
174
174
  }
175
175
  };
176
176
  }
177
- //#endregion
178
177
  export { SCALES, cueLift, cueStyle };
179
178
 
180
179
  //# sourceMappingURL=cues.js.map
@@ -1,4 +1,4 @@
1
- //#region src/controls/fullscreen.ts
1
+ // src/controls/fullscreen.ts
2
2
  function watching(target, names) {
3
3
  return (fn) => {
4
4
  for (const name of names) target.addEventListener(name, fn);
@@ -50,7 +50,6 @@ function fullscreen(host, video) {
50
50
  watch: () => () => {}
51
51
  };
52
52
  }
53
- //#endregion
54
53
  export { fullscreen };
55
54
 
56
55
  //# sourceMappingURL=fullscreen.js.map
@@ -1,4 +1,4 @@
1
- //#region src/controls/icons.ts
1
+ // src/controls/icons.ts
2
2
  /**
3
3
  * Each glyph's subpaths joined into one `d`. The path is drawn even-odd:
4
4
  * a frame, a ring or a letter cuts its hole with a nested subpath, and no
@@ -56,7 +56,6 @@ function icon(name) {
56
56
  svg.append(path);
57
57
  return svg;
58
58
  }
59
- //#endregion
60
59
  export { icon };
61
60
 
62
61
  //# sourceMappingURL=icons.js.map
@@ -8,21 +8,8 @@
8
8
  * A blocked range is never played: entering it, by playback or by a seek,
9
9
  * moves the playhead to its end.
10
10
  */
11
- /** One range, in seconds of the media. */
12
- export interface Marker {
13
- readonly start: number;
14
- readonly end: number;
15
- /**
16
- * What the range is: `opening-credits`, `closing-credits`, `blocked`, or
17
- * a page's own word.
18
- */
19
- readonly kind: string;
20
- /**
21
- * Words for the range: what a skip button names for a kind it does not
22
- * know, and what the seek bar's preview shows over a blocked range.
23
- */
24
- readonly label?: string;
25
- }
11
+ import type { Marker } from '@mattebox/player-core';
12
+ export type { Marker };
26
13
  export interface Markers {
27
14
  /** The markers of the current source, by start. */
28
15
  readonly list: readonly Marker[];
@@ -1 +1 @@
1
- {"version":3,"file":"markers.d.ts","sourceRoot":"","sources":["../../src/controls/markers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,0CAA0C;AAC1C,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,OAAO;IACtB,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,sDAAsD;IACtD,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IACnC,oCAAoC;IACpC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;CACzC;AASD;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,gBAAgB,EACvB,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,GAC5C,OAAO,CA0BT"}
1
+ {"version":3,"file":"markers.d.ts","sourceRoot":"","sources":["../../src/controls/markers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,YAAY,EAAE,MAAM,EAAE,CAAC;AAEvB,MAAM,WAAW,OAAO;IACtB,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,sDAAsD;IACtD,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IACnC,oCAAoC;IACpC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;CACzC;AASD;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,gBAAgB,EACvB,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,GAC5C,OAAO,CA0BT"}
@@ -1,4 +1,4 @@
1
- //#region src/controls/markers.ts
1
+ // src/controls/markers.ts
2
2
  /**
3
3
  * Past a blocked range's end by this much, so the playhead does not settle
4
4
  * on the end itself and enter the range again: Safari can report a time a
@@ -32,7 +32,6 @@ function createMarkers(video, emit) {
32
32
  within
33
33
  };
34
34
  }
35
- //#endregion
36
35
  export { createMarkers };
37
36
 
38
37
  //# sourceMappingURL=markers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"markers.js","names":[],"sources":["../../src/controls/markers.ts"],"sourcesContent":["/**\n * Markers: ranges of the media a page names, such as the opening and\n * closing credits, and ranges that must not play, such as a part blocked\n * for legal reasons. No stream format carries credits as a standard, so a\n * page sets them from its own content API. They work on the video, which\n * every session has, so an engine session and a native one behave alike.\n *\n * A blocked range is never played: entering it, by playback or by a seek,\n * moves the playhead to its end.\n */\n\n/** One range, in seconds of the media. */\nexport interface Marker {\n readonly start: number;\n readonly end: number;\n /**\n * What the range is: `opening-credits`, `closing-credits`, `blocked`, or\n * a page's own word.\n */\n readonly kind: string;\n /**\n * Words for the range: what a skip button names for a kind it does not\n * know, and what the seek bar's preview shows over a blocked range.\n */\n readonly label?: string;\n}\n\nexport interface Markers {\n /** The markers of the current source, by start. */\n readonly list: readonly Marker[];\n /** Replaces the markers. A new source clears them. */\n set(list: readonly Marker[]): void;\n /** The markers that hold `time`. */\n within(time: number): readonly Marker[];\n}\n\n/**\n * Past a blocked range's end by this much, so the playhead does not settle\n * on the end itself and enter the range again: Safari can report a time a\n * hair before the one it was given.\n */\nconst PAST = 0.1;\n\n/**\n * Markers over `video`. `emit` reports a change of the list as\n * `markerschange` and a jump over a blocked range as `blocked`.\n */\nexport function createMarkers(\n video: HTMLVideoElement,\n emit: (name: string, detail: unknown) => void,\n): Markers {\n let list: readonly Marker[] = [];\n\n const within = (time: number): readonly Marker[] =>\n list.filter((marker) => marker.start <= time && time < marker.end);\n\n const guard = (): void => {\n const blocked = within(video.currentTime).find((marker) => marker.kind === 'blocked');\n if (blocked === undefined) return;\n video.currentTime = Math.min(blocked.end + PAST, video.duration || Number.POSITIVE_INFINITY);\n emit('blocked', blocked);\n };\n video.addEventListener('seeking', guard);\n video.addEventListener('timeupdate', guard);\n\n return {\n get list() {\n return list;\n },\n set(next) {\n list = [...next].sort((a, b) => a.start - b.start);\n emit('markerschange', list);\n guard();\n },\n within,\n };\n}\n"],"mappings":";;;;;;AAyCA,MAAM,OAAO;;;;;AAMb,SAAgB,cACd,OACA,MACS;CACT,IAAI,OAA0B,CAAC;CAE/B,MAAM,UAAU,SACd,KAAK,QAAQ,WAAW,OAAO,SAAS,QAAQ,OAAO,OAAO,GAAG;CAEnE,MAAM,cAAoB;EACxB,MAAM,UAAU,OAAO,MAAM,WAAW,CAAC,CAAC,MAAM,WAAW,OAAO,SAAS,SAAS;EACpF,IAAI,YAAY,KAAA,GAAW;EAC3B,MAAM,cAAc,KAAK,IAAI,QAAQ,MAAM,MAAM,MAAM,YAAY,OAAO,iBAAiB;EAC3F,KAAK,WAAW,OAAO;CACzB;CACA,MAAM,iBAAiB,WAAW,KAAK;CACvC,MAAM,iBAAiB,cAAc,KAAK;CAE1C,OAAO;EACL,IAAI,OAAO;GACT,OAAO;EACT;EACA,IAAI,MAAM;GACR,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,KAAK;GACjD,KAAK,iBAAiB,IAAI;GAC1B,MAAM;EACR;EACA;CACF;AACF"}
1
+ {"version":3,"file":"markers.js","names":[],"sources":["../../src/controls/markers.ts"],"sourcesContent":["/**\n * Markers: ranges of the media a page names, such as the opening and\n * closing credits, and ranges that must not play, such as a part blocked\n * for legal reasons. No stream format carries credits as a standard, so a\n * page sets them from its own content API. They work on the video, which\n * every session has, so an engine session and a native one behave alike.\n *\n * A blocked range is never played: entering it, by playback or by a seek,\n * moves the playhead to its end.\n */\nimport type { Marker } from '@mattebox/player-core';\n\nexport type { Marker };\n\nexport interface Markers {\n /** The markers of the current source, by start. */\n readonly list: readonly Marker[];\n /** Replaces the markers. A new source clears them. */\n set(list: readonly Marker[]): void;\n /** The markers that hold `time`. */\n within(time: number): readonly Marker[];\n}\n\n/**\n * Past a blocked range's end by this much, so the playhead does not settle\n * on the end itself and enter the range again: Safari can report a time a\n * hair before the one it was given.\n */\nconst PAST = 0.1;\n\n/**\n * Markers over `video`. `emit` reports a change of the list as\n * `markerschange` and a jump over a blocked range as `blocked`.\n */\nexport function createMarkers(\n video: HTMLVideoElement,\n emit: (name: string, detail: unknown) => void,\n): Markers {\n let list: readonly Marker[] = [];\n\n const within = (time: number): readonly Marker[] =>\n list.filter((marker) => marker.start <= time && time < marker.end);\n\n const guard = (): void => {\n const blocked = within(video.currentTime).find((marker) => marker.kind === 'blocked');\n if (blocked === undefined) return;\n video.currentTime = Math.min(blocked.end + PAST, video.duration || Number.POSITIVE_INFINITY);\n emit('blocked', blocked);\n };\n video.addEventListener('seeking', guard);\n video.addEventListener('timeupdate', guard);\n\n return {\n get list() {\n return list;\n },\n set(next) {\n list = [...next].sort((a, b) => a.start - b.start);\n emit('markerschange', list);\n guard();\n },\n within,\n };\n}\n"],"mappings":";;;;;;AA4BA,MAAM,OAAO;;;;;AAMb,SAAgB,cACd,OACA,MACS;CACT,IAAI,OAA0B,CAAC;CAE/B,MAAM,UAAU,SACd,KAAK,QAAQ,WAAW,OAAO,SAAS,QAAQ,OAAO,OAAO,GAAG;CAEnE,MAAM,cAAoB;EACxB,MAAM,UAAU,OAAO,MAAM,WAAW,CAAC,CAAC,MAAM,WAAW,OAAO,SAAS,SAAS;EACpF,IAAI,YAAY,KAAA,GAAW;EAC3B,MAAM,cAAc,KAAK,IAAI,QAAQ,MAAM,MAAM,MAAM,YAAY,OAAO,iBAAiB;EAC3F,KAAK,WAAW,OAAO;CACzB;CACA,MAAM,iBAAiB,WAAW,KAAK;CACvC,MAAM,iBAAiB,cAAc,KAAK;CAE1C,OAAO;EACL,IAAI,OAAO;GACT,OAAO;EACT;EACA,IAAI,MAAM;GACR,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,KAAK;GACjD,KAAK,iBAAiB,IAAI;GAC1B,MAAM;EACR;EACA;CACF;AACF"}
@@ -1,5 +1,5 @@
1
1
  import { el, setChildren, state } from "../dom.js";
2
- //#region src/controls/menu.ts
2
+ // src/controls/menu.ts
3
3
  /**
4
4
  * The menu primitive the quality, audio, subtitles and speed menus share: a
5
5
  * button that opens a popup of radio items above it, in one or more groups
@@ -331,7 +331,6 @@ function menu(options) {
331
331
  }
332
332
  };
333
333
  }
334
- //#endregion
335
334
  export { menu };
336
335
 
337
336
  //# sourceMappingURL=menu.js.map
@@ -1,4 +1,4 @@
1
- //#region src/controls/native-tracks.ts
1
+ // src/controls/native-tracks.ts
2
2
  /**
3
3
  * The video's `audioTracks` or `textTracks` during a native session, or
4
4
  * undefined: an engine session has its own tracks, and Chromium has no
@@ -24,7 +24,6 @@ function onNativeTracks(video, name, tick) {
24
24
  for (const event of events) list.removeEventListener(event, tick);
25
25
  };
26
26
  }
27
- //#endregion
28
27
  export { nativeTracks, onNativeTracks };
29
28
 
30
29
  //# sourceMappingURL=native-tracks.js.map
@@ -1,4 +1,4 @@
1
- //#region src/controls/pip.ts
1
+ // src/controls/pip.ts
2
2
  function watching(target, names) {
3
3
  return (fn) => {
4
4
  for (const name of names) target.addEventListener(name, fn);
@@ -33,7 +33,6 @@ function pictureInPicture(video) {
33
33
  watch: () => () => {}
34
34
  };
35
35
  }
36
- //#endregion
37
36
  export { pictureInPicture };
38
37
 
39
38
  //# sourceMappingURL=pip.js.map
@@ -1,4 +1,4 @@
1
- //#region src/controls/quality-names.ts
1
+ // src/controls/quality-names.ts
2
2
  /** The codec families a viewer may recognise, by their RFC 6381 prefix. */
3
3
  const CODECS = [
4
4
  [/^av(c1|c3)/, "H.264"],
@@ -56,7 +56,6 @@ function qualityNames(renditions) {
56
56
  return true;
57
57
  });
58
58
  }
59
- //#endregion
60
59
  export { qualityLabels, qualityNames };
61
60
 
62
61
  //# sourceMappingURL=quality-names.js.map
@@ -1,4 +1,4 @@
1
- //#region src/controls/ranges.ts
1
+ // src/controls/ranges.ts
2
2
  const EMPTY = {
3
3
  start: 0,
4
4
  end: 0
@@ -47,7 +47,6 @@ function clip(ranges, span) {
47
47
  }
48
48
  return out;
49
49
  }
50
- //#endregion
51
50
  export { EMPTY, at, clip, fraction, spans, window };
52
51
 
53
52
  //# sourceMappingURL=ranges.js.map
@@ -1,7 +1,7 @@
1
1
  import { namespaces } from "../namespaces.js";
2
2
  import { spans, window } from "./ranges.js";
3
3
  import { clock } from "./time.js";
4
- //#region src/controls/session.ts
4
+ // src/controls/session.ts
5
5
  /** The optional namespaces of an engine, or none for a native session. */
6
6
  function optional(engine) {
7
7
  return engine === null ? {} : namespaces(engine);
@@ -45,7 +45,6 @@ function wall(engine, time) {
45
45
  const epoch = optional(engine).pdt?.toWallClock(time) ?? null;
46
46
  return epoch === null ? null : clock(epoch);
47
47
  }
48
- //#endregion
49
48
  export { bufferGoal, live, optional, span, wall };
50
49
 
51
50
  //# sourceMappingURL=session.js.map
@@ -1,5 +1,5 @@
1
1
  import { el } from "../dom.js";
2
- //#region src/controls/slider.ts
2
+ // src/controls/slider.ts
3
3
  /**
4
4
  * The slider primitive the seek bar and the volume share: a `div` with
5
5
  * `role="slider"`, pointer capture for the drag, and the arrow keys. It
@@ -150,7 +150,6 @@ function slider(options) {
150
150
  }
151
151
  };
152
152
  }
153
- //#endregion
154
153
  export { slider };
155
154
 
156
155
  //# sourceMappingURL=slider.js.map
@@ -1,4 +1,4 @@
1
- //#region src/controls/time.ts
1
+ // src/controls/time.ts
2
2
  /** Time as the bar shows it and as a screen reader hears it. Pure, node-tested. */
3
3
  function pad(n) {
4
4
  return n < 10 ? `0${n}` : `${n}`;
@@ -19,7 +19,6 @@ function clock(epochSeconds) {
19
19
  second: "2-digit"
20
20
  });
21
21
  }
22
- //#endregion
23
22
  export { clock, format };
24
23
 
25
24
  //# sourceMappingURL=time.js.map
@@ -26,9 +26,10 @@ export declare function languageName(lang: string, locale?: string): string | un
26
26
  /**
27
27
  * The audio layout of an HLS CHANNELS value (RFC 8216bis §4.4.6.1): "2"
28
28
  * reads Stereo, "6" reads 5.1, a "/JOC" suffix reads Dolby Atmos. Any
29
- * other count reads as written.
29
+ * other count reads as written. `words` names a count in the player's
30
+ * language, such as `{ 2: 'Stéréo' }`.
30
31
  */
31
- export declare function layout(channels: string | undefined): string | undefined;
32
+ export declare function layout(channels: string | undefined, words?: Readonly<Record<string, string>>): string | undefined;
32
33
  /**
33
34
  * The entries as menu items. Each reads as its name, else its language's
34
35
  * name, else its language code, else `word` ("Track") and its place. An
@@ -1 +1 @@
1
- {"version":3,"file":"track-names.d.ts","sourceRoot":"","sources":["../../src/controls/track-names.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS;IAChC,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,MAAM,GAAG,SAAS;IACxB,IAAI,EAAE,MAAM,GAAG,SAAS;IACxB,MAAM,EAAE,SAAS,MAAM,EAAE;IACzB,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAW9E;AAID;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAEvE;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,MAAM,GAAE,MAA4D,GACnE,SAAS,CAAC,OAAO,CAAC,CA2BpB"}
1
+ {"version":3,"file":"track-names.d.ts","sourceRoot":"","sources":["../../src/controls/track-names.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS;IAChC,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,MAAM,GAAG,SAAS;IACxB,IAAI,EAAE,MAAM,GAAG,SAAS;IACxB,MAAM,EAAE,SAAS,MAAM,EAAE;IACzB,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAW9E;AAID;;;;;GAKG;AACH,wBAAgB,MAAM,CACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,KAAK,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM,GAC3C,MAAM,GAAG,SAAS,CAKpB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,MAAM,GAAE,MAA4D,GACnE,SAAS,CAAC,OAAO,CAAC,CA2BpB"}
@@ -1,4 +1,4 @@
1
- //#region src/controls/track-names.ts
1
+ // src/controls/track-names.ts
2
2
  /**
3
3
  * The language's name in `locale`, with a capital first letter as the
4
4
  * browsers' own menus show it: French gives "anglais", the menu shows
@@ -26,10 +26,11 @@ const LAYOUTS = {
26
26
  /**
27
27
  * The audio layout of an HLS CHANNELS value (RFC 8216bis §4.4.6.1): "2"
28
28
  * reads Stereo, "6" reads 5.1, a "/JOC" suffix reads Dolby Atmos. Any
29
- * other count reads as written.
29
+ * other count reads as written. `words` names a count in the player's
30
+ * language, such as `{ 2: 'Stéréo' }`.
30
31
  */
31
- function layout(channels) {
32
- return channels && (/\/JOC$/.test(channels) ? "Dolby Atmos" : LAYOUTS[channels] || channels);
32
+ function layout(channels, words = {}) {
33
+ return channels && (/\/JOC$/.test(channels) ? "Dolby Atmos" : words[channels] || LAYOUTS[channels] || channels);
33
34
  }
34
35
  /**
35
36
  * The entries as menu items. Each reads as its name, else its language's
@@ -53,7 +54,6 @@ function trackNames(entries, word, locale = document.documentElement.lang || nav
53
54
  badges
54
55
  ]);
55
56
  }
56
- //#endregion
57
57
  export { languageName, layout, trackNames };
58
58
 
59
59
  //# sourceMappingURL=track-names.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"track-names.js","names":[],"sources":["../../src/controls/track-names.ts"],"sourcesContent":["/**\n * The words the audio and subtitles menus show for a track, for an engine\n * session and a native one alike. Pure, node-tested.\n */\nimport type { MenuGroup } from './menu.js';\n\n/**\n * One menu entry: its value, the stream's name for it, its language code,\n * its badges, and the hints that tell it from a twin, in the order they\n * are tried.\n */\nexport type TrackEntry = readonly [\n value: string,\n name: string | undefined,\n lang: string | undefined,\n badges: readonly string[],\n hints: ReadonlyArray<string | undefined>,\n];\n\n/**\n * The language's name in `locale`, with a capital first letter as the\n * browsers' own menus show it: French gives \"anglais\", the menu shows\n * \"Anglais\". Undefined without `Intl.DisplayNames` (Chromium 81, so not on\n * Tizen 6 or webOS 6), for a code it does not know, and for a locale or a\n * code it rejects.\n */\nexport function languageName(lang: string, locale?: string): string | undefined {\n try {\n // lib.dom types `Intl.DisplayNames` as always present.\n const name = new (Intl as { DisplayNames: typeof Intl.DisplayNames }).DisplayNames(locale, {\n type: 'language',\n fallback: 'none',\n }).of(lang) as string;\n return name.charAt(0).toUpperCase() + name.slice(1);\n } catch {\n return undefined;\n }\n}\n\nconst LAYOUTS: Readonly<Record<string, string>> = { 1: 'Mono', 2: 'Stereo', 6: '5.1', 8: '7.1' };\n\n/**\n * The audio layout of an HLS CHANNELS value (RFC 8216bis §4.4.6.1): \"2\"\n * reads Stereo, \"6\" reads 5.1, a \"/JOC\" suffix reads Dolby Atmos. Any\n * other count reads as written.\n */\nexport function layout(channels: string | undefined): string | undefined {\n return channels && (/\\/JOC$/.test(channels) ? 'Dolby Atmos' : LAYOUTS[channels] || channels);\n}\n\n/**\n * The entries as menu items. Each reads as its name, else its language's\n * name, else its language code, else `word` (\"Track\") and its place. An\n * entry that would read like another, badges included, takes in\n * parentheses its first hint that differs from the other's, and at last\n * its place.\n */\nexport function trackNames(\n entries: readonly TrackEntry[],\n word: string | null,\n locale: string = document.documentElement.lang || navigator.language,\n): MenuGroup['items'] {\n let texts = entries.map(\n ([, name, lang], index) =>\n name || (lang && (languageName(lang, locale) || lang)) || `${word || 'Track'} ${index + 1}`,\n );\n // Two rounds of hints at most (the audio menu's layout and role), then the place.\n for (let round = 0; round < 3; round++) {\n const keys = texts.map((text, index) => text + (entries[index] as TrackEntry)[3]);\n const hint = (index: number): string | undefined =>\n round < 2 ? (entries[index] as TrackEntry)[4][round] : String(index + 1);\n // A hint the twins share tells nothing apart, so the next round tries another.\n texts = texts.map((text, index) =>\n hint(index) &&\n keys.some(\n (key, other) => other !== index && key === keys[index] && hint(other) !== hint(index),\n )\n ? `${text} (${hint(index)})`\n : text,\n );\n }\n return entries.map(([value, , , badges], index) => [\n value,\n texts[index] as string,\n undefined,\n undefined,\n badges,\n ]);\n}\n"],"mappings":";;;;;;;;AA0BA,SAAgB,aAAa,MAAc,QAAqC;CAC9E,IAAI;EAEF,MAAM,OAAO,IAAK,KAAoD,aAAa,QAAQ;GACzF,MAAM;GACN,UAAU;EACZ,CAAC,CAAC,CAAC,GAAG,IAAI;EACV,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,KAAK,MAAM,CAAC;CACpD,QAAQ;EACN;CACF;AACF;AAEA,MAAM,UAA4C;CAAE,GAAG;CAAQ,GAAG;CAAU,GAAG;CAAO,GAAG;AAAM;;;;;;AAO/F,SAAgB,OAAO,UAAkD;CACvE,OAAO,aAAa,SAAS,KAAK,QAAQ,IAAI,gBAAgB,QAAQ,aAAa;AACrF;;;;;;;;AASA,SAAgB,WACd,SACA,MACA,SAAiB,SAAS,gBAAgB,QAAQ,UAAU,UACxC;CACpB,IAAI,QAAQ,QAAQ,KACjB,GAAG,MAAM,OAAO,UACf,QAAS,SAAS,aAAa,MAAM,MAAM,KAAK,SAAU,GAAG,QAAQ,QAAQ,GAAG,QAAQ,GAC5F;CAEA,KAAK,IAAI,QAAQ,GAAG,QAAQ,GAAG,SAAS;EACtC,MAAM,OAAO,MAAM,KAAK,MAAM,UAAU,OAAQ,QAAQ,MAAM,CAAgB,EAAE;EAChF,MAAM,QAAQ,UACZ,QAAQ,IAAK,QAAQ,MAAM,CAAgB,EAAE,CAAC,SAAS,OAAO,QAAQ,CAAC;EAEzE,QAAQ,MAAM,KAAK,MAAM,UACvB,KAAK,KAAK,KACV,KAAK,MACF,KAAK,UAAU,UAAU,SAAS,QAAQ,KAAK,UAAU,KAAK,KAAK,MAAM,KAAK,KAAK,CACtF,IACI,GAAG,KAAK,IAAI,KAAK,KAAK,EAAE,KACxB,IACN;CACF;CACA,OAAO,QAAQ,KAAK,CAAC,WAAW,SAAS,UAAU;EACjD;EACA,MAAM;EACN,KAAA;EACA,KAAA;EACA;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"track-names.js","names":[],"sources":["../../src/controls/track-names.ts"],"sourcesContent":["/**\n * The words the audio and subtitles menus show for a track, for an engine\n * session and a native one alike. Pure, node-tested.\n */\nimport type { MenuGroup } from './menu.js';\n\n/**\n * One menu entry: its value, the stream's name for it, its language code,\n * its badges, and the hints that tell it from a twin, in the order they\n * are tried.\n */\nexport type TrackEntry = readonly [\n value: string,\n name: string | undefined,\n lang: string | undefined,\n badges: readonly string[],\n hints: ReadonlyArray<string | undefined>,\n];\n\n/**\n * The language's name in `locale`, with a capital first letter as the\n * browsers' own menus show it: French gives \"anglais\", the menu shows\n * \"Anglais\". Undefined without `Intl.DisplayNames` (Chromium 81, so not on\n * Tizen 6 or webOS 6), for a code it does not know, and for a locale or a\n * code it rejects.\n */\nexport function languageName(lang: string, locale?: string): string | undefined {\n try {\n // lib.dom types `Intl.DisplayNames` as always present.\n const name = new (Intl as { DisplayNames: typeof Intl.DisplayNames }).DisplayNames(locale, {\n type: 'language',\n fallback: 'none',\n }).of(lang) as string;\n return name.charAt(0).toUpperCase() + name.slice(1);\n } catch {\n return undefined;\n }\n}\n\nconst LAYOUTS: Readonly<Record<string, string>> = { 1: 'Mono', 2: 'Stereo', 6: '5.1', 8: '7.1' };\n\n/**\n * The audio layout of an HLS CHANNELS value (RFC 8216bis §4.4.6.1): \"2\"\n * reads Stereo, \"6\" reads 5.1, a \"/JOC\" suffix reads Dolby Atmos. Any\n * other count reads as written. `words` names a count in the player's\n * language, such as `{ 2: 'Stéréo' }`.\n */\nexport function layout(\n channels: string | undefined,\n words: Readonly<Record<string, string>> = {},\n): string | undefined {\n return (\n channels &&\n (/\\/JOC$/.test(channels) ? 'Dolby Atmos' : words[channels] || LAYOUTS[channels] || channels)\n );\n}\n\n/**\n * The entries as menu items. Each reads as its name, else its language's\n * name, else its language code, else `word` (\"Track\") and its place. An\n * entry that would read like another, badges included, takes in\n * parentheses its first hint that differs from the other's, and at last\n * its place.\n */\nexport function trackNames(\n entries: readonly TrackEntry[],\n word: string | null,\n locale: string = document.documentElement.lang || navigator.language,\n): MenuGroup['items'] {\n let texts = entries.map(\n ([, name, lang], index) =>\n name || (lang && (languageName(lang, locale) || lang)) || `${word || 'Track'} ${index + 1}`,\n );\n // Two rounds of hints at most (the audio menu's layout and role), then the place.\n for (let round = 0; round < 3; round++) {\n const keys = texts.map((text, index) => text + (entries[index] as TrackEntry)[3]);\n const hint = (index: number): string | undefined =>\n round < 2 ? (entries[index] as TrackEntry)[4][round] : String(index + 1);\n // A hint the twins share tells nothing apart, so the next round tries another.\n texts = texts.map((text, index) =>\n hint(index) &&\n keys.some(\n (key, other) => other !== index && key === keys[index] && hint(other) !== hint(index),\n )\n ? `${text} (${hint(index)})`\n : text,\n );\n }\n return entries.map(([value, , , badges], index) => [\n value,\n texts[index] as string,\n undefined,\n undefined,\n badges,\n ]);\n}\n"],"mappings":";;;;;;;;AA0BA,SAAgB,aAAa,MAAc,QAAqC;CAC9E,IAAI;EAEF,MAAM,OAAO,IAAK,KAAoD,aAAa,QAA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-28,7 +28,6 @@ function state(node, base, on) {
28
28
  for (const key of Object.keys(on)) if (on[key] === true) names.push(key);
29
29
  node.setAttribute("part", names.join(" "));
30
30
  }
31
- //#endregion
32
31
  export { el, setChildren, state };
33
32
 
34
33
  //# sourceMappingURL=dom.js.map
@@ -1,4 +1,7 @@
1
+ export type { Connector, ConnectorSource, Programme, ProgrammeMetadata, ProgrammeSource, Resolution, Source, SourceDrm, } from '@mattebox/player-core';
1
2
  export type { MatteboxPlayerOptions } from './element.js';
2
3
  export { MatteboxPlayerElement } from './element.js';
3
- export type { PlayerHost } from './host.js';
4
+ export type { Block, PlayerHost } from './host.js';
5
+ export type { Text } from './text.js';
6
+ export type { Tracker, Trackers } from './trackers.js';
4
7
  //# sourceMappingURL=element-entry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element-entry.d.ts","sourceRoot":"","sources":["../src/element-entry.ts"],"names":[],"mappings":"AAOA,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"element-entry.d.ts","sourceRoot":"","sources":["../src/element-entry.ts"],"names":[],"mappings":"AAOA,YAAY,EACV,SAAS,EACT,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,MAAM,EACN,SAAS,GACV,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACnD,YAAY,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
@@ -1,12 +1,11 @@
1
1
  import { MatteboxPlayerElement } from "./element.js";
2
- //#region src/element-entry.ts
2
+ // src/element-entry.ts
3
3
  /**
4
4
  * `@mattebox/player/element`: registers <mattebox-player> and nothing else.
5
5
  * A page that takes this entry writes its own composition from the
6
6
  * `@mattebox/player/elements/*` entries it imports, and carries only those.
7
7
  */
8
8
  MatteboxPlayerElement.define();
9
- //#endregion
10
9
  export { MatteboxPlayerElement };
11
10
 
12
11
  //# sourceMappingURL=element-entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"element-entry.js","names":[],"sources":["../src/element-entry.ts"],"sourcesContent":["/**\n * `@mattebox/player/element`: registers <mattebox-player> and nothing else.\n * A page that takes this entry writes its own composition from the\n * `@mattebox/player/elements/*` entries it imports, and carries only those.\n */\nimport { MatteboxPlayerElement } from './element.js';\n\nexport type { MatteboxPlayerOptions } from './element.js';\nexport { MatteboxPlayerElement } from './element.js';\nexport type { PlayerHost } from './host.js';\n\nMatteboxPlayerElement.define();\n"],"mappings":";;;;;;;AAWA,sBAAsB,OAAO"}
1
+ {"version":3,"file":"element-entry.js","names":[],"sources":["../src/element-entry.ts"],"sourcesContent":["/**\n * `@mattebox/player/element`: registers <mattebox-player> and nothing else.\n * A page that takes this entry writes its own composition from the\n * `@mattebox/player/elements/*` entries it imports, and carries only those.\n */\nimport { MatteboxPlayerElement } from './element.js';\n\nexport type {\n Connector,\n ConnectorSource,\n Programme,\n ProgrammeMetadata,\n ProgrammeSource,\n Resolution,\n Source,\n SourceDrm,\n} from '@mattebox/player-core';\nexport type { MatteboxPlayerOptions } from './element.js';\nexport { MatteboxPlayerElement } from './element.js';\nexport type { Block, PlayerHost } from './host.js';\nexport type { Text } from './text.js';\nexport type { Tracker, Trackers } from './trackers.js';\n\nMatteboxPlayerElement.define();\n"],"mappings":";;;;;;;AAuBA,sBAAsB,OAAO"}
package/dist/element.d.ts CHANGED
@@ -17,11 +17,14 @@
17
17
  * them into runtime helpers, and the emit check bans helpers. Statics are
18
18
  * getters and instance state is declared, then assigned in the constructor.
19
19
  */
20
- import type { Handler, Player, PlayerError, Session, Source, SourceVideoTrack } from '@mattebox/player-core';
20
+ import type { Connector, Handler, Player, PlayerError, Programme, ProgrammeSource, Session, Source, SourceVideoTrack } from '@mattebox/player-core';
21
21
  import type { KernelConfig, Mattebox, Stage } from 'mattebox';
22
22
  import type { AttachEmeOptions } from 'mattebox/eme';
23
23
  import type { Marker, Markers } from './controls/markers.js';
24
- import type { PlayerHost } from './host.js';
24
+ import type { Block, PlayerHost } from './host.js';
25
+ import type { LocaleSource } from './locales.js';
26
+ import type { Messages } from './messages.js';
27
+ import type { Tracker, Trackers } from './trackers.js';
25
28
  /**
26
29
  * What the element dispatches. `error` is also a standard DOM event name, so
27
30
  * without these overloads a listener on it is typed as `ErrorEvent` and the
@@ -36,6 +39,12 @@ export interface MatteboxPlayerEventMap {
36
39
  markerschange: CustomEvent<readonly Marker[]>;
37
40
  /** Playback reached a blocked range and moved past it. */
38
41
  blocked: CustomEvent<Marker>;
42
+ /** The page called `block()` or `unblock()`, or a new source cleared the block: the block, or null. */
43
+ blockchange: CustomEvent<Block | null>;
44
+ /** A load resolved what it plays, before the session: the programme, or null at unload. */
45
+ programmechange: CustomEvent<Programme | null>;
46
+ /** A tracker was added, removed, started or stopped: the trackers. */
47
+ trackerschange: CustomEvent<readonly Tracker[]>;
39
48
  }
40
49
  export interface MatteboxPlayerElement {
41
50
  addEventListener<K extends keyof MatteboxPlayerEventMap>(type: K, listener: (this: MatteboxPlayerElement, event: MatteboxPlayerEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void;
@@ -63,6 +72,12 @@ export interface MatteboxPlayerOptions {
63
72
  * with `handlers`, which carry their own.
64
73
  */
65
74
  readonly drm?: AttachEmeOptions;
75
+ /**
76
+ * One per source type, such as `srgssr/urn`: a source of that type is a
77
+ * programme id, or data you give, which the connector resolves to what
78
+ * plays. Kept with `handlers`.
79
+ */
80
+ readonly connectors?: readonly Connector[];
66
81
  }
67
82
  /**
68
83
  * The interface above merges only `addEventListener` and `removeEventListener`
@@ -72,6 +87,14 @@ export interface MatteboxPlayerOptions {
72
87
  */
73
88
  export declare class MatteboxPlayerElement extends HTMLElement implements PlayerHost {
74
89
  static get observedAttributes(): readonly string[];
90
+ /**
91
+ * Registers the words of a language for every player on the page. Each
92
+ * source is a set of words or a function that loads one, which runs only
93
+ * when a player shows that language. Later sources go over earlier ones,
94
+ * so a page changes a shipped word by registering its own after it.
95
+ * Players that show the language take the new words at once.
96
+ */
97
+ static addLocale(language: string, ...sources: readonly LocaleSource[]): void;
75
98
  /**
76
99
  * Registers the element once, and records the stages markup-only pages
77
100
  * get. The controls register through their own entries, the package's
@@ -86,6 +109,14 @@ export declare class MatteboxPlayerElement extends HTMLElement implements Player
86
109
  private focusable;
87
110
  private readonly surface;
88
111
  private readonly voice;
112
+ /** The words of the language shown, empty for English. */
113
+ private words;
114
+ /** The language tag the player resolved, or empty without one. */
115
+ private shown;
116
+ /** Bumped on every resolution, so a slow loader does not win over a later choice. */
117
+ private wordsEpoch;
118
+ /** Ends the watch on registrations and on the page's `lang`. */
119
+ private unwatch;
89
120
  /** Runs out when the video has waited `LOADING_MS`. */
90
121
  private slow;
91
122
  /** The audio track the live region last saw, so it says only a change. Undefined before the first play. */
@@ -101,6 +132,7 @@ export declare class MatteboxPlayerElement extends HTMLElement implements Player
101
132
  private given;
102
133
  /** The sources the page set from script, or null. */
103
134
  private list;
135
+ private readonly tracking;
104
136
  /** The sources of the last run, as text: what tells a new `<source>` child from the ones already tried. */
105
137
  private tried;
106
138
  /** The options this element was constructed with, or null for the ones `define()` recorded. */
@@ -108,6 +140,8 @@ export declare class MatteboxPlayerElement extends HTMLElement implements Player
108
140
  private core;
109
141
  private current;
110
142
  private failure;
143
+ /** What `block()` set, or null. */
144
+ private stop;
111
145
  /** Whether an attribute change is the element's own reflection, which must not write back to the video. */
112
146
  private reflecting;
113
147
  /** Watches the element's box for `layout`, while connected. */
@@ -116,7 +150,7 @@ export declare class MatteboxPlayerElement extends HTMLElement implements Player
116
150
  private fixed;
117
151
  /** The video has played once since its source was set: `started`, which tells a first play from a pause. */
118
152
  private started;
119
- /** The video waits for data: `waiting`, set on `waiting` and `stalled`, cleared once it can play. */
153
+ /** The video waits for data: `waiting`, set on `waiting`, cleared once it can play. */
120
154
  private waiting;
121
155
  private offs;
122
156
  /** Everything the element does to the player runs here, so it runs in order. */
@@ -124,7 +158,7 @@ export declare class MatteboxPlayerElement extends HTMLElement implements Player
124
158
  /** Whether a run is queued and not yet started, so a burst of changes loads once. */
125
159
  private pending;
126
160
  /** The source the versions of `videoSources` belong to: the one that played before a switch. */
127
- private programme;
161
+ private original;
128
162
  /** The version that plays, or null for the programme itself. */
129
163
  private version;
130
164
  /** True while a version loads, so its `sourcechange` keeps the programme. */
@@ -143,8 +177,23 @@ export declare class MatteboxPlayerElement extends HTMLElement implements Player
143
177
  * over them, and they win over the `<source>` children. Setting them
144
178
  * loads, and null returns to the children.
145
179
  */
146
- get sources(): readonly Source[] | null;
147
- set sources(value: readonly Source[] | null);
180
+ get sources(): readonly ProgrammeSource[] | null;
181
+ set sources(value: readonly ProgrammeSource[] | null);
182
+ /**
183
+ * The language the page chose for this player, which wins over the
184
+ * nearest `lang` attribute. Empty follows `lang`. Setting it changes the
185
+ * words of every control at once.
186
+ */
187
+ get language(): string;
188
+ set language(value: string);
189
+ /** The language tag the words come from: `language`, else the nearest `lang`. Empty without either. */
190
+ get locale(): string;
191
+ /** The word of `id` in the player's language, or undefined, where the control's English applies. */
192
+ message(id: keyof Messages): string | undefined;
193
+ /** Follows registrations and the document's `lang` until disconnect. */
194
+ private watchLanguage;
195
+ /** Resolves the language, takes its words, and tells the controls with `localechange`. */
196
+ private relocale;
148
197
  /**
149
198
  * Loads the sources again, in the order a load reads them: the `src`
150
199
  * attribute, the `sources` property, then the `<source>` children. The
@@ -191,6 +240,41 @@ export declare class MatteboxPlayerElement extends HTMLElement implements Player
191
240
  * after a source that failed while the page was still loading.
192
241
  */
193
242
  get error(): PlayerError | null;
243
+ /**
244
+ * Shows why the programme does not play, in place of the video, and
245
+ * stops the load: the reason the page's content API gave, such as a
246
+ * geographic or an age restriction. The error screen shows the title,
247
+ * else "Not available", and the message, with no retry. Each text can
248
+ * be given by language tag, and follows the player's language. A new
249
+ * `src` or `sources` clears it. Fires `blockchange`.
250
+ */
251
+ block(block: Block): void;
252
+ /** Shows the block, for `block()` and for a programme a connector blocked, which loaded nothing. */
253
+ private refuse;
254
+ /** Removes the block. Nothing plays until a source loads: set one, or call `retry()`. */
255
+ unblock(): void;
256
+ /** What `block()` set, or null. */
257
+ get blocked(): Block | null;
258
+ /**
259
+ * What the current load resolved to: the sources, and what a connector
260
+ * said of the programme. Null before a load and after an unload.
261
+ */
262
+ get programme(): Programme | null;
263
+ /**
264
+ * The page's trackers. Each starts at every programme and stops at its
265
+ * end; one added or removed during a programme starts or stops at once.
266
+ */
267
+ get trackers(): Trackers;
268
+ /**
269
+ * Applies what the load resolved, before any session: the markers, the
270
+ * poster, the block. The page's own `poster` and markers set after the
271
+ * source win. Then the trackers start on the programme.
272
+ */
273
+ private programmed;
274
+ /** A block's title and message in the player's language: the title defaults to the `blocked` word. */
275
+ private blockWords;
276
+ /** Puts the block on the row under the video, under native controls. */
277
+ private showBlock;
194
278
  connectedCallback(): void;
195
279
  /** Sets `layout` from the element's box, unless the page fixed it. */
196
280
  private measure;
@@ -1 +1 @@
1
- {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EACV,OAAO,EACP,MAAM,EACN,WAAW,EACX,OAAO,EACP,MAAM,EACN,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrD,OAAO,KAAK,EAAE,MA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