@mattebox/player 0.5.0 → 0.7.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 (264) hide show
  1. package/README.md +9 -6
  2. package/dist/cdn/mattebox-player.min.js +3 -444
  3. package/dist/controls/airplay.js +28 -44
  4. package/dist/controls/airplay.js.map +1 -1
  5. package/dist/controls/chapters.d.ts +22 -11
  6. package/dist/controls/chapters.d.ts.map +1 -1
  7. package/dist/controls/chapters.js +87 -73
  8. package/dist/controls/chapters.js.map +1 -1
  9. package/dist/controls/cues.d.ts +0 -22
  10. package/dist/controls/cues.d.ts.map +1 -1
  11. package/dist/controls/cues.js +161 -191
  12. package/dist/controls/cues.js.map +1 -1
  13. package/dist/controls/fullscreen.js +52 -70
  14. package/dist/controls/fullscreen.js.map +1 -1
  15. package/dist/controls/icons.d.ts +1 -1
  16. package/dist/controls/icons.d.ts.map +1 -1
  17. package/dist/controls/icons.js +46 -70
  18. package/dist/controls/icons.js.map +1 -1
  19. package/dist/controls/menu.d.ts +7 -4
  20. package/dist/controls/menu.d.ts.map +1 -1
  21. package/dist/controls/menu.js +241 -223
  22. package/dist/controls/menu.js.map +1 -1
  23. package/dist/controls/pip.js +35 -49
  24. package/dist/controls/pip.js.map +1 -1
  25. package/dist/controls/ranges.js +42 -37
  26. package/dist/controls/ranges.js.map +1 -1
  27. package/dist/controls/session.d.ts +6 -1
  28. package/dist/controls/session.d.ts.map +1 -1
  29. package/dist/controls/session.js +41 -26
  30. package/dist/controls/session.js.map +1 -1
  31. package/dist/controls/slider.d.ts +2 -2
  32. package/dist/controls/slider.d.ts.map +1 -1
  33. package/dist/controls/slider.js +151 -159
  34. package/dist/controls/slider.js.map +1 -1
  35. package/dist/controls/time.js +17 -17
  36. package/dist/controls/time.js.map +1 -1
  37. package/dist/dom.d.ts +6 -0
  38. package/dist/dom.d.ts.map +1 -1
  39. package/dist/dom.js +28 -19
  40. package/dist/dom.js.map +1 -1
  41. package/dist/element-entry.js +9 -6
  42. package/dist/element-entry.js.map +1 -1
  43. package/dist/element.d.ts +15 -24
  44. package/dist/element.d.ts.map +1 -1
  45. package/dist/element.js +385 -454
  46. package/dist/element.js.map +1 -1
  47. package/dist/elements/airplay-button.js +51 -53
  48. package/dist/elements/airplay-button.js.map +1 -1
  49. package/dist/elements/audio-menu.js +62 -63
  50. package/dist/elements/audio-menu.js.map +1 -1
  51. package/dist/elements/chapters-menu.d.ts.map +1 -1
  52. package/dist/elements/chapters-menu.js +75 -65
  53. package/dist/elements/chapters-menu.js.map +1 -1
  54. package/dist/elements/component.d.ts +1 -1
  55. package/dist/elements/component.d.ts.map +1 -1
  56. package/dist/elements/component.js +86 -89
  57. package/dist/elements/component.js.map +1 -1
  58. package/dist/elements/control-bar.d.ts +18 -5
  59. package/dist/elements/control-bar.d.ts.map +1 -1
  60. package/dist/elements/control-bar.js +282 -319
  61. package/dist/elements/control-bar.js.map +1 -1
  62. package/dist/elements/current-time.js +26 -25
  63. package/dist/elements/current-time.js.map +1 -1
  64. package/dist/elements/drm-badge.d.ts.map +1 -1
  65. package/dist/elements/drm-badge.js +107 -141
  66. package/dist/elements/drm-badge.js.map +1 -1
  67. package/dist/elements/duration.d.ts.map +1 -1
  68. package/dist/elements/duration.js +24 -21
  69. package/dist/elements/duration.js.map +1 -1
  70. package/dist/elements/error-screen.d.ts.map +1 -1
  71. package/dist/elements/error-screen.js +68 -102
  72. package/dist/elements/error-screen.js.map +1 -1
  73. package/dist/elements/fullscreen-button.js +48 -54
  74. package/dist/elements/fullscreen-button.js.map +1 -1
  75. package/dist/elements/live-button.d.ts.map +1 -1
  76. package/dist/elements/live-button.js +67 -94
  77. package/dist/elements/live-button.js.map +1 -1
  78. package/dist/elements/menu-element.js +31 -28
  79. package/dist/elements/menu-element.js.map +1 -1
  80. package/dist/elements/mute-button.js +58 -59
  81. package/dist/elements/mute-button.js.map +1 -1
  82. package/dist/elements/pip-button.js +54 -54
  83. package/dist/elements/pip-button.js.map +1 -1
  84. package/dist/elements/play-button.d.ts.map +1 -1
  85. package/dist/elements/play-button.js +73 -58
  86. package/dist/elements/play-button.js.map +1 -1
  87. package/dist/elements/quality-menu.js +66 -69
  88. package/dist/elements/quality-menu.js.map +1 -1
  89. package/dist/elements/remaining-time.d.ts.map +1 -1
  90. package/dist/elements/remaining-time.js +27 -24
  91. package/dist/elements/remaining-time.js.map +1 -1
  92. package/dist/elements/scan-button.d.ts +17 -0
  93. package/dist/elements/scan-button.d.ts.map +1 -0
  94. package/dist/elements/scan-button.js +117 -0
  95. package/dist/elements/scan-button.js.map +1 -0
  96. package/dist/elements/seek-bar.d.ts +93 -14
  97. package/dist/elements/seek-bar.d.ts.map +1 -1
  98. package/dist/elements/seek-bar.js +475 -335
  99. package/dist/elements/seek-bar.js.map +1 -1
  100. package/dist/elements/shared.d.ts +3 -11
  101. package/dist/elements/shared.d.ts.map +1 -1
  102. package/dist/elements/shared.js +44 -144
  103. package/dist/elements/shared.js.map +1 -1
  104. package/dist/elements/skip-button.d.ts.map +1 -1
  105. package/dist/elements/skip-button.js +54 -55
  106. package/dist/elements/skip-button.js.map +1 -1
  107. package/dist/elements/spacer.d.ts.map +1 -1
  108. package/dist/elements/spacer.js +12 -7
  109. package/dist/elements/spacer.js.map +1 -1
  110. package/dist/elements/speed-menu.js +60 -55
  111. package/dist/elements/speed-menu.js.map +1 -1
  112. package/dist/elements/spinner.d.ts.map +1 -1
  113. package/dist/elements/spinner.js +52 -78
  114. package/dist/elements/spinner.js.map +1 -1
  115. package/dist/elements/start-button.d.ts.map +1 -1
  116. package/dist/elements/start-button.js +107 -120
  117. package/dist/elements/start-button.js.map +1 -1
  118. package/dist/elements/subtitles-menu.js +95 -103
  119. package/dist/elements/subtitles-menu.js.map +1 -1
  120. package/dist/elements/time-element.d.ts.map +1 -1
  121. package/dist/elements/time-element.js +36 -28
  122. package/dist/elements/time-element.js.map +1 -1
  123. package/dist/elements/title.d.ts.map +1 -1
  124. package/dist/elements/title.js +105 -137
  125. package/dist/elements/title.js.map +1 -1
  126. package/dist/elements/volume-slider.d.ts.map +1 -1
  127. package/dist/elements/volume-slider.js +47 -45
  128. package/dist/elements/volume-slider.js.map +1 -1
  129. package/dist/elements/volume.d.ts.map +1 -1
  130. package/dist/elements/volume.js +42 -50
  131. package/dist/elements/volume.js.map +1 -1
  132. package/dist/entries/airplay-button.js +7 -7
  133. package/dist/entries/airplay-button.js.map +1 -1
  134. package/dist/entries/audio-menu.js +7 -6
  135. package/dist/entries/audio-menu.js.map +1 -1
  136. package/dist/entries/chapters-menu.js +7 -7
  137. package/dist/entries/chapters-menu.js.map +1 -1
  138. package/dist/entries/control-bar.js +7 -6
  139. package/dist/entries/control-bar.js.map +1 -1
  140. package/dist/entries/current-time.js +7 -6
  141. package/dist/entries/current-time.js.map +1 -1
  142. package/dist/entries/drm-badge.js +7 -6
  143. package/dist/entries/drm-badge.js.map +1 -1
  144. package/dist/entries/duration.js +7 -6
  145. package/dist/entries/duration.js.map +1 -1
  146. package/dist/entries/error-screen.js +7 -6
  147. package/dist/entries/error-screen.js.map +1 -1
  148. package/dist/entries/fullscreen-button.js +7 -6
  149. package/dist/entries/fullscreen-button.js.map +1 -1
  150. package/dist/entries/live-button.js +7 -6
  151. package/dist/entries/live-button.js.map +1 -1
  152. package/dist/entries/mute-button.js +7 -6
  153. package/dist/entries/mute-button.js.map +1 -1
  154. package/dist/entries/pip-button.js +7 -6
  155. package/dist/entries/pip-button.js.map +1 -1
  156. package/dist/entries/play-button.js +7 -6
  157. package/dist/entries/play-button.js.map +1 -1
  158. package/dist/entries/quality-menu.js +7 -6
  159. package/dist/entries/quality-menu.js.map +1 -1
  160. package/dist/entries/remaining-time.js +7 -7
  161. package/dist/entries/remaining-time.js.map +1 -1
  162. package/dist/entries/scan-button.d.ts +5 -0
  163. package/dist/entries/scan-button.d.ts.map +1 -0
  164. package/dist/entries/scan-button.js +9 -0
  165. package/dist/entries/scan-button.js.map +1 -0
  166. package/dist/entries/seek-bar.js +7 -6
  167. package/dist/entries/seek-bar.js.map +1 -1
  168. package/dist/entries/skip-button.js +7 -6
  169. package/dist/entries/skip-button.js.map +1 -1
  170. package/dist/entries/spacer.js +7 -6
  171. package/dist/entries/spacer.js.map +1 -1
  172. package/dist/entries/speed-menu.js +7 -6
  173. package/dist/entries/speed-menu.js.map +1 -1
  174. package/dist/entries/spinner.js +7 -7
  175. package/dist/entries/spinner.js.map +1 -1
  176. package/dist/entries/start-button.js +7 -6
  177. package/dist/entries/start-button.js.map +1 -1
  178. package/dist/entries/subtitles-menu.js +7 -6
  179. package/dist/entries/subtitles-menu.js.map +1 -1
  180. package/dist/entries/title.js +7 -7
  181. package/dist/entries/title.js.map +1 -1
  182. package/dist/entries/volume-slider.js +7 -6
  183. package/dist/entries/volume-slider.js.map +1 -1
  184. package/dist/entries/volume.js +9 -8
  185. package/dist/entries/volume.js.map +1 -1
  186. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.149.0 → _@oxc-project_runtime@0.150.0}/helpers/esm/asyncToGenerator.js +1 -1
  187. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.149.0 → _@oxc-project_runtime@0.150.0}/helpers/esm/defineProperty.js +1 -1
  188. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.149.0 → _@oxc-project_runtime@0.150.0}/helpers/esm/objectSpread2.js +1 -1
  189. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.149.0 → _@oxc-project_runtime@0.150.0}/helpers/esm/toPrimitive.js +1 -1
  190. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.149.0 → _@oxc-project_runtime@0.150.0}/helpers/esm/toPropertyKey.js +1 -1
  191. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.149.0 → _@oxc-project_runtime@0.150.0}/helpers/esm/typeof.js +1 -1
  192. package/dist/es2015/controls/chapters.js +40 -7
  193. package/dist/es2015/controls/cues.js +1 -8
  194. package/dist/es2015/controls/icons.js +3 -1
  195. package/dist/es2015/controls/menu.js +28 -9
  196. package/dist/es2015/controls/session.js +16 -4
  197. package/dist/es2015/controls/slider.js +5 -4
  198. package/dist/es2015/dom.js +10 -1
  199. package/dist/es2015/element.js +49 -40
  200. package/dist/es2015/elements/chapters-menu.js +18 -10
  201. package/dist/es2015/elements/control-bar.js +41 -35
  202. package/dist/es2015/elements/drm-badge.js +1 -25
  203. package/dist/es2015/elements/duration.js +2 -1
  204. package/dist/es2015/elements/error-screen.js +1 -30
  205. package/dist/es2015/elements/live-button.js +1 -29
  206. package/dist/es2015/elements/menu-element.js +2 -2
  207. package/dist/es2015/elements/play-button.js +10 -3
  208. package/dist/es2015/elements/remaining-time.js +2 -1
  209. package/dist/es2015/elements/scan-button.js +118 -0
  210. package/dist/es2015/elements/seek-bar.js +264 -71
  211. package/dist/es2015/elements/shared.js +5 -106
  212. package/dist/es2015/elements/skip-button.js +2 -1
  213. package/dist/es2015/elements/spacer.js +2 -1
  214. package/dist/es2015/elements/spinner.js +1 -32
  215. package/dist/es2015/elements/start-button.js +8 -26
  216. package/dist/es2015/elements/time-element.js +1 -4
  217. package/dist/es2015/elements/title.js +1 -45
  218. package/dist/es2015/elements/volume-slider.js +2 -1
  219. package/dist/es2015/elements/volume.js +1 -11
  220. package/dist/es2015/entries/scan-button.js +7 -0
  221. package/dist/es2015/index.js +3 -3
  222. package/dist/es2015/presets.js +1 -1
  223. package/dist/es2015/style.js +1 -98
  224. package/dist/es2015/tags.js +2 -2
  225. package/dist/host.js +19 -17
  226. package/dist/host.js.map +1 -1
  227. package/dist/index.d.ts +3 -3
  228. package/dist/index.d.ts.map +1 -1
  229. package/dist/index.js +55 -28
  230. package/dist/labels.js +13 -9
  231. package/dist/labels.js.map +1 -1
  232. package/dist/namespaces.d.ts +9 -26
  233. package/dist/namespaces.d.ts.map +1 -1
  234. package/dist/namespaces.js +6 -2
  235. package/dist/namespaces.js.map +1 -1
  236. package/dist/presets.js +33 -28
  237. package/dist/presets.js.map +1 -1
  238. package/dist/style.d.ts +1 -20
  239. package/dist/style.d.ts.map +1 -1
  240. package/dist/style.js +4 -97
  241. package/dist/style.js.map +1 -1
  242. package/dist/surface.js +25 -21
  243. package/dist/surface.js.map +1 -1
  244. package/dist/tags.d.ts +1 -1
  245. package/dist/tags.d.ts.map +1 -1
  246. package/dist/tags.js +31 -27
  247. package/dist/tags.js.map +1 -1
  248. package/package.json +4 -4
  249. package/dist/compose.d.ts +0 -5
  250. package/dist/compose.d.ts.map +0 -1
  251. package/dist/compose.js +0 -31
  252. package/dist/compose.js.map +0 -1
  253. package/dist/elements/panels.d.ts +0 -15
  254. package/dist/elements/panels.d.ts.map +0 -1
  255. package/dist/elements/panels.js +0 -55
  256. package/dist/elements/panels.js.map +0 -1
  257. package/dist/entries/panels.d.ts +0 -5
  258. package/dist/entries/panels.d.ts.map +0 -1
  259. package/dist/entries/panels.js +0 -8
  260. package/dist/entries/panels.js.map +0 -1
  261. package/dist/es2015/compose.js +0 -33
  262. package/dist/es2015/elements/panels.js +0 -52
  263. package/dist/es2015/entries/panels.js +0 -7
  264. package/dist/index.js.map +0 -1
@@ -4,41 +4,24 @@
4
4
  * `'live' in engine` is the documented feature test, but it does not narrow,
5
5
  * because the properties are not on the type. A namespace reaches the type
6
6
  * only through a `declare module` merge in the stage that contributes it,
7
- * and of the three a player shows, one merge is unreachable and one does not
8
- * exist. So the casts live here, once, and the
9
- * panels read a plain optional shape.
7
+ * and only when that stage's types are loaded. So the casts live here,
8
+ * once, and the controls read a plain optional shape.
10
9
  */
11
10
  import type { Mattebox } from 'mattebox';
11
+ import type { LiveApi } from 'mattebox/protocols/hls-live';
12
+ import type { ChaptersApi } from 'mattebox/stages/chapters';
12
13
  import type { DrmApi } from 'mattebox/stages/eme-core';
14
+ import type { PdtApi } from 'mattebox/stages/pdt';
13
15
  import type { ThumbnailsApi } from 'mattebox/stages/thumbnails';
14
- /**
15
- * Declared here because it cannot be imported: `LiveApi` lives in
16
- * `dist/protocols/live-shared.d.ts`, which neither the package's `exports`
17
- * nor its `typesVersions` reaches. This is a copy, and it will drift.
18
- */
19
- export interface LiveApi {
20
- /** Where seekToEdge lands, in presentation time, or null before the first window. */
21
- readonly edge: number | null;
22
- /** Seconds between the availability end and the playhead, or null. */
23
- readonly latency: number | null;
24
- readonly atEdge: boolean;
25
- seekToEdge(): void;
26
- }
27
- /**
28
- * Declared here for the same reason: the `pdt` stage is not among the
29
- * package's `exports`, so its `PdtApi` cannot be imported either. A copy.
30
- */
31
- export interface PdtApi {
32
- /** Presentation time to epoch seconds, or null without an anchor. */
33
- toWallClock(presentationTime: number): number | null;
34
- /** Epoch seconds to presentation time, or null without an anchor. */
35
- toPresentationTime(wallClock: number): number | null;
36
- }
16
+ import type { TrickApi } from 'mattebox/stages/trick-play';
17
+ export type { LiveApi, PdtApi };
37
18
  export interface Namespaces {
38
19
  readonly live?: LiveApi;
39
20
  readonly drm?: DrmApi;
40
21
  readonly thumbnails?: ThumbnailsApi;
41
22
  readonly pdt?: PdtApi;
23
+ readonly chapters?: ChaptersApi;
24
+ readonly trick?: TrickApi;
42
25
  }
43
26
  /** The optional namespaces on an engine, each present exactly when its stage was composed. */
44
27
  export declare function namespaces(engine: Mattebox): Namespaces;
@@ -1 +1 @@
1
- {"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../src/namespaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACtB,qFAAqF;IACrF,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,sEAAsE;IACtE,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,UAAU,IAAI,IAAI,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,qEAAqE;IACrE,WAAW,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACrD,qEAAqE;IACrE,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACtD;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;IACpC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,8FAA8F;AAC9F,wBAAgB,UAAU,CAAC,MAAM,EAAE,QAAQ,GAAG,UAAU,CAEvD"}
1
+ {"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../src/namespaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AAEhC,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;IACpC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAED,8FAA8F;AAC9F,wBAAgB,UAAU,CAAC,MAAM,EAAE,QAAQ,GAAG,UAAU,CAEvD"}
@@ -1,5 +1,9 @@
1
+ //#region src/namespaces.ts
1
2
  /** The optional namespaces on an engine, each present exactly when its stage was composed. */
2
- export function namespaces(engine) {
3
- return engine;
3
+ function namespaces(engine) {
4
+ return engine;
4
5
  }
6
+ //#endregion
7
+ export { namespaces };
8
+
5
9
  //# sourceMappingURL=namespaces.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"namespaces.js","sourceRoot":"","sources":["../src/namespaces.ts"],"names":[],"mappings":"AA8CA,8FAA8F;AAC9F,MAAM,UAAU,UAAU,CAAC,MAAgB;IACzC,OAAO,MAAoB,CAAC;AAC9B,CAAC"}
1
+ {"version":3,"file":"namespaces.js","names":[],"sources":["../src/namespaces.ts"],"sourcesContent":["/**\n * The optional namespaces, and the one place the player reaches for them.\n *\n * `'live' in engine` is the documented feature test, but it does not narrow,\n * because the properties are not on the type. A namespace reaches the type\n * only through a `declare module` merge in the stage that contributes it,\n * and only when that stage's types are loaded. So the casts live here,\n * once, and the controls read a plain optional shape.\n */\nimport type { Mattebox } from 'mattebox';\nimport type { LiveApi } from 'mattebox/protocols/hls-live';\nimport type { ChaptersApi } from 'mattebox/stages/chapters';\nimport type { DrmApi } from 'mattebox/stages/eme-core';\nimport type { PdtApi } from 'mattebox/stages/pdt';\nimport type { ThumbnailsApi } from 'mattebox/stages/thumbnails';\nimport type { TrickApi } from 'mattebox/stages/trick-play';\n\nexport type { LiveApi, PdtApi };\n\nexport interface Namespaces {\n readonly live?: LiveApi;\n readonly drm?: DrmApi;\n readonly thumbnails?: ThumbnailsApi;\n readonly pdt?: PdtApi;\n readonly chapters?: ChaptersApi;\n readonly trick?: TrickApi;\n}\n\n/** The optional namespaces on an engine, each present exactly when its stage was composed. */\nexport function namespaces(engine: Mattebox): Namespaces {\n return engine as Namespaces;\n}\n"],"mappings":";;AA6BA,SAAgB,WAAW,QAA8B;CACvD,OAAO;AACT"}
package/dist/presets.js CHANGED
@@ -1,36 +1,41 @@
1
+ //#region src/presets.ts
1
2
  /** eme-core's teardown calls `element.setMediaKeys(null)` unguarded, so a build without EME throws out of `detach`. */
2
- const DRM_STAGES = ['eme-core', 'eme-cenc', 'eme-fairplay'];
3
+ const DRM_STAGES = [
4
+ "eme-core",
5
+ "eme-cenc",
6
+ "eme-fairplay"
7
+ ];
3
8
  /** The engine's preset matrix: a protocol line, a `-ts` tier, a `-drm` tier, plus `full` and `kernel`. */
4
9
  const PRESETS = {
5
- dash: () => import('mattebox/presets/dash'),
6
- 'dash-drm': () => import('mattebox/presets/dash-drm'),
7
- dual: () => import('mattebox/presets/dual'),
8
- 'dual-drm': () => import('mattebox/presets/dual-drm'),
9
- 'dual-ts': () => import('mattebox/presets/dual-ts'),
10
- 'dual-ts-drm': () => import('mattebox/presets/dual-ts-drm'),
11
- full: () => import('mattebox/presets/full'),
12
- hls: () => import('mattebox/presets/hls'),
13
- 'hls-drm': () => import('mattebox/presets/hls-drm'),
14
- 'hls-ts': () => import('mattebox/presets/hls-ts'),
15
- 'hls-ts-drm': () => import('mattebox/presets/hls-ts-drm'),
16
- kernel: () => import('mattebox/presets/kernel'),
10
+ dash: () => import("mattebox/presets/dash"),
11
+ "dash-drm": () => import("mattebox/presets/dash-drm"),
12
+ dual: () => import("mattebox/presets/dual"),
13
+ "dual-drm": () => import("mattebox/presets/dual-drm"),
14
+ "dual-ts": () => import("mattebox/presets/dual-ts"),
15
+ "dual-ts-drm": () => import("mattebox/presets/dual-ts-drm"),
16
+ full: () => import("mattebox/presets/full"),
17
+ hls: () => import("mattebox/presets/hls"),
18
+ "hls-drm": () => import("mattebox/presets/hls-drm"),
19
+ "hls-ts": () => import("mattebox/presets/hls-ts"),
20
+ "hls-ts-drm": () => import("mattebox/presets/hls-ts-drm"),
21
+ kernel: () => import("mattebox/presets/kernel")
17
22
  };
18
- export async function resolvePreset(name) {
19
- const engine = globalThis.mattebox;
20
- if (engine?.preset !== undefined)
21
- return engine.preset;
22
- const load = PRESETS[name];
23
- if (load === undefined)
24
- return null;
25
- try {
26
- return (await load()).default;
27
- }
28
- catch {
29
- return null;
30
- }
23
+ async function resolvePreset(name) {
24
+ const engine = globalThis.mattebox;
25
+ if (engine?.preset !== void 0) return engine.preset;
26
+ const load = PRESETS[name];
27
+ if (load === void 0) return null;
28
+ try {
29
+ return (await load()).default;
30
+ } catch {
31
+ return null;
32
+ }
31
33
  }
32
34
  /** The DRM stages to leave out of a preset on a browser that cannot use them. */
33
- export function drmGuard() {
34
- return 'setMediaKeys' in HTMLMediaElement.prototype ? {} : { without: DRM_STAGES };
35
+ function drmGuard() {
36
+ return "setMediaKeys" in HTMLMediaElement.prototype ? {} : { without: DRM_STAGES };
35
37
  }
38
+ //#endregion
39
+ export { drmGuard, resolvePreset };
40
+
36
41
  //# sourceMappingURL=presets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"presets.js","sourceRoot":"","sources":["../src/presets.ts"],"names":[],"mappings":"AAuBA,uHAAuH;AACvH,MAAM,UAAU,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;AAI5D,0GAA0G;AAC1G,MAAM,OAAO,GAAmC;IAC9C,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC;IAC3C,UAAU,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,2BAA2B,CAAC;IACrD,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC;IAC3C,UAAU,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,2BAA2B,CAAC;IACrD,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC;IACnD,aAAa,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,8BAA8B,CAAC;IAC3D,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC;IAC3C,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,sBAAsB,CAAC;IACzC,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC;IACnD,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,yBAAyB,CAAC;IACjD,YAAY,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,6BAA6B,CAAC;IACzD,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,yBAAyB,CAAC;CAChD,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAAY;IAC9C,MAAM,MAAM,GAAI,UAA0C,CAAC,QAAQ,CAAC;IACpE,IAAI,MAAM,EAAE,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC,MAAM,CAAC;IACvD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACpC,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,QAAQ;IACtB,OAAO,cAAc,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACrF,CAAC"}
1
+ {"version":3,"file":"presets.js","names":[],"sources":["../src/presets.ts"],"sourcesContent":["/**\n * Resolving the `preset` attribute to a preset factory without bundling one.\n * The size story is the engine's, and an element that statically imported a\n * preset would undo it.\n *\n * Two routes, in order. A page on the CDN path has no module resolver, and\n * its engine bundle carries exactly one preset behind `mattebox.preset`.\n * Everywhere else the table below answers.\n *\n * The table is explicit because a computed specifier is not a portable\n * dynamic import: no bundler can analyze `import('mattebox/presets/' + name)`,\n * so it survives the build as a bare specifier the browser cannot resolve.\n * Twelve literal imports are twelve chunks a bundler can split, and the page\n * downloads only the one it names. An unknown name is an error the element\n * reports, not a failed request.\n */\nimport type { Preset } from 'mattebox/presets/full';\n\n/** The shape the engine's CDN bundle puts on `globalThis`. */\ninterface EngineGlobal {\n readonly preset?: Preset;\n}\n\n/** eme-core's teardown calls `element.setMediaKeys(null)` unguarded, so a build without EME throws out of `detach`. */\nconst DRM_STAGES = ['eme-core', 'eme-cenc', 'eme-fairplay'];\n\ntype Load = () => Promise<{ readonly default: Preset }>;\n\n/** The engine's preset matrix: a protocol line, a `-ts` tier, a `-drm` tier, plus `full` and `kernel`. */\nconst PRESETS: Readonly<Record<string, Load>> = {\n dash: () => import('mattebox/presets/dash'),\n 'dash-drm': () => import('mattebox/presets/dash-drm'),\n dual: () => import('mattebox/presets/dual'),\n 'dual-drm': () => import('mattebox/presets/dual-drm'),\n 'dual-ts': () => import('mattebox/presets/dual-ts'),\n 'dual-ts-drm': () => import('mattebox/presets/dual-ts-drm'),\n full: () => import('mattebox/presets/full'),\n hls: () => import('mattebox/presets/hls'),\n 'hls-drm': () => import('mattebox/presets/hls-drm'),\n 'hls-ts': () => import('mattebox/presets/hls-ts'),\n 'hls-ts-drm': () => import('mattebox/presets/hls-ts-drm'),\n kernel: () => import('mattebox/presets/kernel'),\n};\n\nexport async function resolvePreset(name: string): Promise<Preset | null> {\n const engine = (globalThis as { mattebox?: EngineGlobal }).mattebox;\n if (engine?.preset !== undefined) return engine.preset;\n const load = PRESETS[name];\n if (load === undefined) return null;\n try {\n return (await load()).default;\n } catch {\n return null;\n }\n}\n\n/** The DRM stages to leave out of a preset on a browser that cannot use them. */\nexport function drmGuard(): { without?: readonly string[] } {\n return 'setMediaKeys' in HTMLMediaElement.prototype ? {} : { without: DRM_STAGES };\n}\n"],"mappings":";;AAwBA,MAAM,aAAa;CAAC;CAAY;CAAY;AAAc;;AAK1D,MAAM,UAA0C;CAC9C,YAAY,OAAO;CACnB,kBAAkB,OAAO;CACzB,YAAY,OAAO;CACnB,kBAAkB,OAAO;CACzB,iBAAiB,OAAO;CACxB,qBAAqB,OAAO;CAC5B,YAAY,OAAO;CACnB,WAAW,OAAO;CAClB,iBAAiB,OAAO;CACxB,gBAAgB,OAAO;CACvB,oBAAoB,OAAO;CAC3B,cAAc,OAAO;AACvB;AAEA,eAAsB,cAAc,MAAsC;CACxE,MAAM,SAAU,WAA2C;CAC3D,IAAI,QAAQ,WAAW,KAAA,GAAW,OAAO,OAAO;CAChD,MAAM,OAAO,QAAQ;CACrB,IAAI,SAAS,KAAA,GAAW,OAAO;CAC/B,IAAI;EACF,QAAQ,MAAM,KAAK,EAAA,CAAG;CACxB,QAAQ;EACN,OAAO;CACT;AACF;;AAGA,SAAgB,WAA4C;CAC1D,OAAO,kBAAkB,iBAAiB,YAAY,CAAC,IAAI,EAAE,SAAS,WAAW;AACnF"}
package/dist/style.d.ts CHANGED
@@ -1,21 +1,2 @@
1
- /**
2
- * The default styles of the element itself: the stage, fullscreen, and the
3
- * error surface under native controls. Every control carries its own sheet.
4
- * Two rules govern them.
5
- *
6
- * The box is black and the picture is centred in it, letterboxed or
7
- * pillarboxed by `object-fit: contain`, whatever height or ratio the page
8
- * gives the element: what fullscreen always did, now the default. With no
9
- * height from the page the stage is as tall as the picture and none of it
10
- * shows.
11
- *
12
- * Nothing carries `!important`. For normal declarations the outer tree wins
13
- * over the shadow tree, so any `::part()` rule the page writes beats these
14
- * whatever its specificity; an `!important` here would invert that and make
15
- * a part unstylable.
16
- *
17
- * Selectors stay at one attribute, and every element is reached through its
18
- * `part`, so the names in the stylesheet are the names the page uses.
19
- */
20
- export declare const STYLE = "\n:host {\n display: block;\n position: relative;\n outline: none;\n background: #000;\n --mbx-surface: #101114;\n --mbx-text: #f2f3f5;\n --mbx-muted: #9aa0a6;\n --mbx-accent: #5b8cff;\n --mbx-error: #ffb4ab;\n --mbx-live: #ff4d4d;\n --mbx-radius: 4px;\n --mbx-gap: 10px;\n --mbx-pad: 8px;\n --mbx-font: system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;\n}\n/* The stage is a column as tall as the host, so the picture is centred\n in whatever height the page gives, and the panels row under native\n controls keeps its place below the picture. The height comes from the\n page, or from the browser in fullscreen, and not from a display on the\n host: a page's own \"mattebox-player { display: block }\" beats a :host()\n rule, so nothing here may depend on one. */\n[part~=\"stage\"] {\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100%;\n}\n/* 16:9 until the media says otherwise: a bare video measures 300 by 150 and\n would jump to its size on metadata. Auto first, so the natural ratio wins\n once it is known. Capped at the stage, and contained, so a box shorter\n than the picture letterboxes it and a narrower one pillarboxes it. */\n::slotted(video) {\n display: block;\n width: 100%;\n min-height: 0;\n max-height: 100%;\n object-fit: contain;\n aspect-ratio: auto 16 / 9;\n}\n/* The casting attribute is set by @mattebox/player-cast while a receiver\n plays: its screen has the controls, and the bar and the start button\n would drive a paused video nobody watches. The attribute is the whole\n coupling. */\n:host([casting]) ::slotted(mbx-control-bar), :host([casting]) ::slotted(mbx-start-button) { display: none; }\n:host(:focus-visible) [part~=\"stage\"] { outline: 2px solid var(--mbx-accent); outline-offset: -2px; }\n/* Fullscreen goes on the host, so every control the page placed inside\n comes along. The browser gives the host the whole screen with\n !important; the picture takes what the panels row leaves. The error\n surface, which sits under the stage in the page, goes over its foot\n instead. */\n:host(:fullscreen) ::slotted(video) { flex: 1; }\n:host(:fullscreen) [part~=\"error\"] { position: absolute; left: 0; right: 0; bottom: 0; }\n:host(:-webkit-full-screen) ::slotted(video) { flex: 1; }\n:host(:-webkit-full-screen) [part~=\"error\"] { position: absolute; left: 0; right: 0; bottom: 0; }\n[part~=\"error\"] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--mbx-gap);\n padding: var(--mbx-pad);\n background: var(--mbx-surface);\n color: var(--mbx-error);\n font: 400 13px/1.4 var(--mbx-font);\n}\n[part~=\"value\"] { color: var(--mbx-accent); }\n[part~=\"button\"] {\n font: inherit;\n color: inherit;\n background: transparent;\n border: 1px solid currentColor;\n border-radius: var(--mbx-radius);\n padding: 2px 6px;\n}\n[hidden] { display: none; }\n";
1
+ export declare const STYLE: string;
21
2
  //# sourceMappingURL=style.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,KAAK,24FA6EjB,CAAC"}
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,KAAK,QAAY,CAAC"}
package/dist/style.js CHANGED
@@ -1,98 +1,5 @@
1
- /**
2
- * The default styles of the element itself: the stage, fullscreen, and the
3
- * error surface under native controls. Every control carries its own sheet.
4
- * Two rules govern them.
5
- *
6
- * The box is black and the picture is centred in it, letterboxed or
7
- * pillarboxed by `object-fit: contain`, whatever height or ratio the page
8
- * gives the element: what fullscreen always did, now the default. With no
9
- * height from the page the stage is as tall as the picture and none of it
10
- * shows.
11
- *
12
- * Nothing carries `!important`. For normal declarations the outer tree wins
13
- * over the shadow tree, so any `::part()` rule the page writes beats these
14
- * whatever its specificity; an `!important` here would invert that and make
15
- * a part unstylable.
16
- *
17
- * Selectors stay at one attribute, and every element is reached through its
18
- * `part`, so the names in the stylesheet are the names the page uses.
19
- */
20
- export const STYLE = `
21
- :host {
22
- display: block;
23
- position: relative;
24
- outline: none;
25
- background: #000;
26
- --mbx-surface: #101114;
27
- --mbx-text: #f2f3f5;
28
- --mbx-muted: #9aa0a6;
29
- --mbx-accent: #5b8cff;
30
- --mbx-error: #ffb4ab;
31
- --mbx-live: #ff4d4d;
32
- --mbx-radius: 4px;
33
- --mbx-gap: 10px;
34
- --mbx-pad: 8px;
35
- --mbx-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
36
- }
37
- /* The stage is a column as tall as the host, so the picture is centred
38
- in whatever height the page gives, and the panels row under native
39
- controls keeps its place below the picture. The height comes from the
40
- page, or from the browser in fullscreen, and not from a display on the
41
- host: a page's own "mattebox-player { display: block }" beats a :host()
42
- rule, so nothing here may depend on one. */
43
- [part~="stage"] {
44
- position: relative;
45
- display: flex;
46
- flex-direction: column;
47
- justify-content: center;
48
- height: 100%;
49
- }
50
- /* 16:9 until the media says otherwise: a bare video measures 300 by 150 and
51
- would jump to its size on metadata. Auto first, so the natural ratio wins
52
- once it is known. Capped at the stage, and contained, so a box shorter
53
- than the picture letterboxes it and a narrower one pillarboxes it. */
54
- ::slotted(video) {
55
- display: block;
56
- width: 100%;
57
- min-height: 0;
58
- max-height: 100%;
59
- object-fit: contain;
60
- aspect-ratio: auto 16 / 9;
61
- }
62
- /* The casting attribute is set by @mattebox/player-cast while a receiver
63
- plays: its screen has the controls, and the bar and the start button
64
- would drive a paused video nobody watches. The attribute is the whole
65
- coupling. */
66
- :host([casting]) ::slotted(mbx-control-bar), :host([casting]) ::slotted(mbx-start-button) { display: none; }
67
- :host(:focus-visible) [part~="stage"] { outline: 2px solid var(--mbx-accent); outline-offset: -2px; }
68
- /* Fullscreen goes on the host, so every control the page placed inside
69
- comes along. The browser gives the host the whole screen with
70
- !important; the picture takes what the panels row leaves. The error
71
- surface, which sits under the stage in the page, goes over its foot
72
- instead. */
73
- :host(:fullscreen) ::slotted(video) { flex: 1; }
74
- :host(:fullscreen) [part~="error"] { position: absolute; left: 0; right: 0; bottom: 0; }
75
- :host(:-webkit-full-screen) ::slotted(video) { flex: 1; }
76
- :host(:-webkit-full-screen) [part~="error"] { position: absolute; left: 0; right: 0; bottom: 0; }
77
- [part~="error"] {
78
- display: flex;
79
- flex-wrap: wrap;
80
- align-items: center;
81
- gap: var(--mbx-gap);
82
- padding: var(--mbx-pad);
83
- background: var(--mbx-surface);
84
- color: var(--mbx-error);
85
- font: 400 13px/1.4 var(--mbx-font);
86
- }
87
- [part~="value"] { color: var(--mbx-accent); }
88
- [part~="button"] {
89
- font: inherit;
90
- color: inherit;
91
- background: transparent;
92
- border: 1px solid currentColor;
93
- border-radius: var(--mbx-radius);
94
- padding: 2px 6px;
95
- }
96
- [hidden] { display: none; }
97
- `;
1
+ const STYLE = ":host{--mbx-surface:#101114;--mbx-text:#f2f3f5;--mbx-muted:#9aa0a6;--mbx-accent:#5b8cff;--mbx-error:#ffb4ab;--mbx-live:#ff4d4d;--mbx-radius:4px;--mbx-gap:10px;--mbx-pad:8px;--mbx-font:system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;background:#000;outline:none;display:block;position:relative}[part~=stage]{flex-direction:column;justify-content:center;height:100%;display:flex;position:relative}::slotted(video){object-fit:contain;width:100%;min-height:0;max-height:100%;display:block}@supports (aspect-ratio:1){::slotted(video){aspect-ratio:auto 16/9}}:host([casting]) ::slotted(mbx-control-bar),:host([casting]) ::slotted(mbx-start-button),:host([controls=none]) ::slotted(:not(video)){display:none}:host(:focus) [part~=stage]{outline:2px solid var(--mbx-accent);outline-offset:-2px}:host(:focus:not(:focus-visible)) [part~=stage]{outline:none}[part~=error]{padding:calc(var(--mbx-pad) - var(--mbx-gap) / 2);background:var(--mbx-surface);color:var(--mbx-error);font:400 13px / 1.4 var(--mbx-font);flex-wrap:wrap;align-items:center;display:flex}:host(:fullscreen) ::slotted(video){flex:1}:host(:fullscreen) [part~=error]{position:absolute;bottom:0;left:0;right:0}:host(:-webkit-full-screen) ::slotted(video){flex:1}:host(:-webkit-full-screen) [part~=error]{position:absolute;bottom:0;left:0;right:0}[part~=error]>*{margin:calc(var(--mbx-gap) / 2)}[part~=value]{color:var(--mbx-accent)}[part~=button]{font:inherit;color:inherit;border-radius:var(--mbx-radius);background:0 0;border:1px solid;padding:2px 6px}[hidden]{display:none}";
2
+ //#endregion
3
+ export { STYLE };
4
+
98
5
  //# sourceMappingURL=style.js.map
package/dist/style.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EpB,CAAC"}
1
+ {"version":3,"file":"style.js","names":[],"sources":["../src/style.ts"],"sourcesContent":["/**\n * The default styles of the element itself: the stage, fullscreen, and the\n * error surface under native controls. Every control carries its own sheet.\n * Two rules govern them.\n *\n * The box is black and the picture is centred in it, letterboxed or\n * pillarboxed by `object-fit: contain`, whatever height or ratio the page\n * gives the element: what fullscreen always did, now the default. With no\n * height from the page the stage is as tall as the picture and none of it\n * shows.\n *\n * Nothing carries `!important`. For normal declarations the outer tree wins\n * over the shadow tree, so any `::part()` rule the page writes beats these\n * whatever its specificity; an `!important` here would invert that and make\n * a part unstylable.\n *\n * Selectors stay at one attribute, and every element is reached through its\n * `part`, so the names in the stylesheet are the names the page uses.\n */\nimport STYLE_CSS from './player.css?inline';\nexport const STYLE = STYLE_CSS;\n"],"mappings":"AAoBA,MAAA,QAAA"}
package/dist/surface.js CHANGED
@@ -1,23 +1,27 @@
1
- import { el } from './dom.js';
2
- export function errorSurface(retry) {
3
- const root = el('div', 'error');
4
- const category = el('span', 'value error-category');
5
- const code = el('span', 'value error-code');
6
- const button = el('button', 'button error-retry', 'Retry');
7
- button.type = 'button';
8
- button.addEventListener('click', retry);
9
- root.append(category, code, button);
10
- root.hidden = true;
11
- return {
12
- root,
13
- show(error) {
14
- category.textContent = error.category;
15
- code.textContent = error.code;
16
- root.hidden = false;
17
- },
18
- clear() {
19
- root.hidden = true;
20
- },
21
- };
1
+ import { el } from "./dom.js";
2
+ //#region src/surface.ts
3
+ function errorSurface(retry) {
4
+ const root = el("div", "error");
5
+ const category = el("span", "value error-category");
6
+ const code = el("span", "value error-code");
7
+ const button = el("button", "button error-retry", "Retry");
8
+ button.type = "button";
9
+ button.addEventListener("click", retry);
10
+ root.append(category, code, button);
11
+ root.hidden = true;
12
+ return {
13
+ root,
14
+ show(error) {
15
+ category.textContent = error.category;
16
+ code.textContent = error.code;
17
+ root.hidden = false;
18
+ },
19
+ clear() {
20
+ root.hidden = true;
21
+ }
22
+ };
22
23
  }
24
+ //#endregion
25
+ export { errorSurface };
26
+
23
27
  //# sourceMappingURL=surface.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"surface.js","sourceRoot":"","sources":["../src/surface.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAQ9B,MAAM,UAAU,YAAY,CAAC,KAAiB;IAC5C,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAChC,MAAM,QAAQ,GAAG,EAAE,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,EAAE,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,EAAE,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAC3D,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACxC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IAEnB,OAAO;QACL,IAAI;QACJ,IAAI,CAAC,KAAkB;YACrB,QAAQ,CAAC,WAAW,GAAG,KAAK,CAAC,QAAQ,CAAC;YACtC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC;YAC9B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACtB,CAAC;QACD,KAAK;YACH,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACrB,CAAC;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"surface.js","names":[],"sources":["../src/surface.ts"],"sourcesContent":["/**\n * The error surface under native controls: a row under the video with the\n * category, the code and a retry. It outlives a session, because the core\n * reports \"no handler claimed this source\" when there is no session to\n * hang it on. It stays hidden until a fatal error arrives, and under\n * custom controls the error screen element carries the error instead.\n */\nimport type { PlayerError } from '@mattebox/player-core';\nimport { el } from './dom.js';\n\nexport interface ErrorSurface {\n readonly root: HTMLElement;\n show(error: PlayerError): void;\n clear(): void;\n}\n\nexport function errorSurface(retry: () => void): ErrorSurface {\n const root = el('div', 'error');\n const category = el('span', 'value error-category');\n const code = el('span', 'value error-code');\n const button = el('button', 'button error-retry', 'Retry');\n button.type = 'button';\n button.addEventListener('click', retry);\n root.append(category, code, button);\n root.hidden = true;\n\n return {\n root,\n show(error: PlayerError): void {\n category.textContent = error.category;\n code.textContent = error.code;\n root.hidden = false;\n },\n clear(): void {\n root.hidden = true;\n },\n };\n}\n"],"mappings":";;AAgBA,SAAgB,aAAa,OAAiC;CAC5D,MAAM,OAAO,GAAG,OAAO,OAAO;CAC9B,MAAM,WAAW,GAAG,QAAQ,sBAAsB;CAClD,MAAM,OAAO,GAAG,QAAQ,kBAAkB;CAC1C,MAAM,SAAS,GAAG,UAAU,sBAAsB,OAAO;CACzD,OAAO,OAAO;CACd,OAAO,iBAAiB,SAAS,KAAK;CACtC,KAAK,OAAO,UAAU,MAAM,MAAM;CAClC,KAAK,SAAS;CAEd,OAAO;EACL;EACA,KAAK,OAA0B;GAC7B,SAAS,cAAc,MAAM;GAC7B,KAAK,cAAc,MAAM;GACzB,KAAK,SAAS;EAChB;EACA,QAAc;GACZ,KAAK,SAAS;EAChB;CACF;AACF"}
package/dist/tags.d.ts CHANGED
@@ -6,6 +6,7 @@ export declare const PLAY_BUTTON = "mbx-play-button";
6
6
  export declare const MUTE_BUTTON = "mbx-mute-button";
7
7
  export declare const VOLUME_SLIDER = "mbx-volume-slider";
8
8
  export declare const SKIP_BUTTON = "mbx-skip-button";
9
+ export declare const SCAN_BUTTON = "mbx-scan-button";
9
10
  export declare const PIP_BUTTON = "mbx-pip-button";
10
11
  export declare const AIRPLAY_BUTTON = "mbx-airplay-button";
11
12
  export declare const FULLSCREEN_BUTTON = "mbx-fullscreen-button";
@@ -23,7 +24,6 @@ export declare const QUALITY_MENU = "mbx-quality-menu";
23
24
  export declare const AUDIO_MENU = "mbx-audio-menu";
24
25
  export declare const SUBTITLES_MENU = "mbx-subtitles-menu";
25
26
  export declare const DRM_BADGE = "mbx-drm-badge";
26
- export declare const PANELS = "mbx-panels";
27
27
  export declare const VOLUME = "mbx-volume";
28
28
  export declare const CHAPTERS_MENU = "mbx-chapters-menu";
29
29
  //# sourceMappingURL=tags.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../src/tags.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,eAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,MAAM,eAAe,CAAC;AACnC,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,aAAa,sBAAsB,CAAC;AACjD,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAC3C,eAAO,MAAM,cAAc,uBAAuB,CAAC;AACnD,eAAO,MAAM,iBAAiB,0BAA0B,CAAC;AACzD,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAC/C,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAC/C,eAAO,MAAM,OAAO,gBAAgB,CAAC;AACrC,eAAO,MAAM,KAAK,cAAc,CAAC;AACjC,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAC/C,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AACvC,eAAO,MAAM,cAAc,uBAAuB,CAAC;AACnD,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AACvC,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAC3C,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAC/C,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAC3C,eAAO,MAAM,cAAc,uBAAuB,CAAC;AACnD,eAAO,MAAM,SAAS,kBAAkB,CAAC;AACzC,eAAO,MAAM,MAAM,eAAe,CAAC;AACnC,eAAO,MAAM,MAAM,eAAe,CAAC;AACnC,eAAO,MAAM,aAAa,sBAAsB,CAAC"}
1
+ {"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../src/tags.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,eAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,MAAM,eAAe,CAAC;AACnC,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,aAAa,sBAAsB,CAAC;AACjD,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAC3C,eAAO,MAAM,cAAc,uBAAuB,CAAC;AACnD,eAAO,MAAM,iBAAiB,0BAA0B,CAAC;AACzD,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAC/C,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAC/C,eAAO,MAAM,OAAO,gBAAgB,CAAC;AACrC,eAAO,MAAM,KAAK,cAAc,CAAC;AACjC,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAC/C,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AACvC,eAAO,MAAM,cAAc,uBAAuB,CAAC;AACnD,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AACvC,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAC3C,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAC/C,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAC3C,eAAO,MAAM,cAAc,uBAAuB,CAAC;AACnD,eAAO,MAAM,SAAS,kBAAkB,CAAC;AACzC,eAAO,MAAM,MAAM,eAAe,CAAC;AACnC,eAAO,MAAM,aAAa,sBAAsB,CAAC"}
package/dist/tags.js CHANGED
@@ -1,29 +1,33 @@
1
+ //#region src/tags.ts
1
2
  /** The tag names, in one place, so the composition and the lookup agree with the registration. */
2
- export const PLAYER = 'mattebox-player';
3
- export const CONTROL_BAR = 'mbx-control-bar';
4
- export const SPACER = 'mbx-spacer';
5
- export const PLAY_BUTTON = 'mbx-play-button';
6
- export const MUTE_BUTTON = 'mbx-mute-button';
7
- export const VOLUME_SLIDER = 'mbx-volume-slider';
8
- export const SKIP_BUTTON = 'mbx-skip-button';
9
- export const PIP_BUTTON = 'mbx-pip-button';
10
- export const AIRPLAY_BUTTON = 'mbx-airplay-button';
11
- export const FULLSCREEN_BUTTON = 'mbx-fullscreen-button';
12
- export const START_BUTTON = 'mbx-start-button';
13
- export const ERROR_SCREEN = 'mbx-error-screen';
14
- export const SPINNER = 'mbx-spinner';
15
- export const TITLE = 'mbx-title';
16
- export const CURRENT_TIME = 'mbx-current-time';
17
- export const DURATION = 'mbx-duration';
18
- export const REMAINING_TIME = 'mbx-remaining-time';
19
- export const SEEK_BAR = 'mbx-seek-bar';
20
- export const LIVE_BUTTON = 'mbx-live-button';
21
- export const SPEED_MENU = 'mbx-speed-menu';
22
- export const QUALITY_MENU = 'mbx-quality-menu';
23
- export const AUDIO_MENU = 'mbx-audio-menu';
24
- export const SUBTITLES_MENU = 'mbx-subtitles-menu';
25
- export const DRM_BADGE = 'mbx-drm-badge';
26
- export const PANELS = 'mbx-panels';
27
- export const VOLUME = 'mbx-volume';
28
- export const CHAPTERS_MENU = 'mbx-chapters-menu';
3
+ const PLAYER = "mattebox-player";
4
+ const CONTROL_BAR = "mbx-control-bar";
5
+ const SPACER = "mbx-spacer";
6
+ const PLAY_BUTTON = "mbx-play-button";
7
+ const MUTE_BUTTON = "mbx-mute-button";
8
+ const VOLUME_SLIDER = "mbx-volume-slider";
9
+ const SKIP_BUTTON = "mbx-skip-button";
10
+ const SCAN_BUTTON = "mbx-scan-button";
11
+ const PIP_BUTTON = "mbx-pip-button";
12
+ const AIRPLAY_BUTTON = "mbx-airplay-button";
13
+ const FULLSCREEN_BUTTON = "mbx-fullscreen-button";
14
+ const START_BUTTON = "mbx-start-button";
15
+ const ERROR_SCREEN = "mbx-error-screen";
16
+ const SPINNER = "mbx-spinner";
17
+ const TITLE = "mbx-title";
18
+ const CURRENT_TIME = "mbx-current-time";
19
+ const DURATION = "mbx-duration";
20
+ const REMAINING_TIME = "mbx-remaining-time";
21
+ const SEEK_BAR = "mbx-seek-bar";
22
+ const LIVE_BUTTON = "mbx-live-button";
23
+ const SPEED_MENU = "mbx-speed-menu";
24
+ const QUALITY_MENU = "mbx-quality-menu";
25
+ const AUDIO_MENU = "mbx-audio-menu";
26
+ const SUBTITLES_MENU = "mbx-subtitles-menu";
27
+ const DRM_BADGE = "mbx-drm-badge";
28
+ const VOLUME = "mbx-volume";
29
+ const CHAPTERS_MENU = "mbx-chapters-menu";
30
+ //#endregion
31
+ export { AIRPLAY_BUTTON, AUDIO_MENU, CHAPTERS_MENU, CONTROL_BAR, CURRENT_TIME, DRM_BADGE, DURATION, ERROR_SCREEN, FULLSCREEN_BUTTON, LIVE_BUTTON, MUTE_BUTTON, PIP_BUTTON, PLAYER, PLAY_BUTTON, QUALITY_MENU, REMAINING_TIME, SCAN_BUTTON, SEEK_BAR, SKIP_BUTTON, SPACER, SPEED_MENU, SPINNER, START_BUTTON, SUBTITLES_MENU, TITLE, VOLUME, VOLUME_SLIDER };
32
+
29
33
  //# sourceMappingURL=tags.js.map
package/dist/tags.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tags.js","sourceRoot":"","sources":["../src/tags.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,MAAM,CAAC,MAAM,MAAM,GAAG,iBAAiB,CAAC;AACxC,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAC7C,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAC7C,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;AACjD,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAC7C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAC3C,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAC;AACnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;AACzD,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAC/C,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAC/C,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC;AACrC,MAAM,CAAC,MAAM,KAAK,GAAG,WAAW,CAAC;AACjC,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAC/C,MAAM,CAAC,MAAM,QAAQ,GAAG,cAAc,CAAC;AACvC,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAC;AACnD,MAAM,CAAC,MAAM,QAAQ,GAAG,cAAc,CAAC;AACvC,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAC7C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAC3C,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAC/C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAC3C,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAC;AACnD,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAC;AACzC,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC;AACnC,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC;AACnC,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC"}
1
+ {"version":3,"file":"tags.js","names":[],"sources":["../src/tags.ts"],"sourcesContent":["/** The tag names, in one place, so the composition and the lookup agree with the registration. */\nexport const PLAYER = 'mattebox-player';\nexport const CONTROL_BAR = 'mbx-control-bar';\nexport const SPACER = 'mbx-spacer';\nexport const PLAY_BUTTON = 'mbx-play-button';\nexport const MUTE_BUTTON = 'mbx-mute-button';\nexport const VOLUME_SLIDER = 'mbx-volume-slider';\nexport const SKIP_BUTTON = 'mbx-skip-button';\nexport const SCAN_BUTTON = 'mbx-scan-button';\nexport const PIP_BUTTON = 'mbx-pip-button';\nexport const AIRPLAY_BUTTON = 'mbx-airplay-button';\nexport const FULLSCREEN_BUTTON = 'mbx-fullscreen-button';\nexport const START_BUTTON = 'mbx-start-button';\nexport const ERROR_SCREEN = 'mbx-error-screen';\nexport const SPINNER = 'mbx-spinner';\nexport const TITLE = 'mbx-title';\nexport const CURRENT_TIME = 'mbx-current-time';\nexport const DURATION = 'mbx-duration';\nexport const REMAINING_TIME = 'mbx-remaining-time';\nexport const SEEK_BAR = 'mbx-seek-bar';\nexport const LIVE_BUTTON = 'mbx-live-button';\nexport const SPEED_MENU = 'mbx-speed-menu';\nexport const QUALITY_MENU = 'mbx-quality-menu';\nexport const AUDIO_MENU = 'mbx-audio-menu';\nexport const SUBTITLES_MENU = 'mbx-subtitles-menu';\nexport const DRM_BADGE = 'mbx-drm-badge';\nexport const VOLUME = 'mbx-volume';\nexport const CHAPTERS_MENU = 'mbx-chapters-menu';\n"],"mappings":";;AACA,MAAa,SAAS;AACtB,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,gBAAgB;AAC7B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,iBAAiB;AAC9B,MAAa,oBAAoB;AACjC,MAAa,eAAe;AAC5B,MAAa,eAAe;AAC5B,MAAa,UAAU;AACvB,MAAa,QAAQ;AACrB,MAAa,eAAe;AAC5B,MAAa,WAAW;AACxB,MAAa,iBAAiB;AAC9B,MAAa,WAAW;AACxB,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,eAAe;AAC5B,MAAa,aAAa;AAC1B,MAAa,iBAAiB;AAC9B,MAAa,YAAY;AACzB,MAAa,SAAS;AACtB,MAAa,gBAAgB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattebox/player",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "A <mattebox-player> custom element over @mattebox/player-core.",
5
5
  "author": "Josep Boix Requesens",
6
6
  "repository": {
@@ -63,16 +63,16 @@
63
63
  "scripts": {
64
64
  "clean": "rm -rf dist",
65
65
  "build": "npm run clean && npm run build:modern && npm run build:es2015 && npm run build:cdn",
66
- "build:modern": "tsc -p tsconfig.build.json",
66
+ "build:modern": "tsc -p tsconfig.build.json --emitDeclarationOnly && rolldown -c rolldown.modern.config.mjs",
67
67
  "build:es2015": "rolldown -c rolldown.dist.config.mjs",
68
68
  "build:cdn": "rolldown -c rolldown.cdn.config.mjs",
69
69
  "check:package": "publint && attw --pack . --format table --no-emoji",
70
70
  "release:ci": "semantic-release"
71
71
  },
72
72
  "dependencies": {
73
- "@mattebox/player-core": "^0.3.0"
73
+ "@mattebox/player-core": "^0.4.0"
74
74
  },
75
75
  "peerDependencies": {
76
- "mattebox": "^0.6.0"
76
+ "mattebox": "^0.8.2"
77
77
  }
78
78
  }
package/dist/compose.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /** The screens and the bar. */
2
- export declare function composeBar(): HTMLElement[];
3
- /** The row under the video. */
4
- export declare function composePanels(): HTMLElement[];
5
- //# sourceMappingURL=compose.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../src/compose.ts"],"names":[],"mappings":"AA6CA,+BAA+B;AAC/B,wBAAgB,UAAU,IAAI,WAAW,EAAE,CAW1C;AAED,+BAA+B;AAC/B,wBAAgB,aAAa,IAAI,WAAW,EAAE,CAM7C"}
package/dist/compose.js DELETED
@@ -1,31 +0,0 @@
1
- /**
2
- * The default compositions: what a player gets when the page wrote none of
3
- * its own. Under `controls="custom"` the screens and the bar, appended
4
- * when there is no `<mbx-control-bar>` child; under `native` and `none`
5
- * the panels row under the video, appended when there is no
6
- * `<mbx-panels>` child. Built by tag, so this module needs no element
7
- * class, and appended to the player's light DOM, where the page can see
8
- * it and style it the way it would its own.
9
- */
10
- import { AIRPLAY_BUTTON, AUDIO_MENU, CHAPTERS_MENU, CONTROL_BAR, CURRENT_TIME, DRM_BADGE, DURATION, ERROR_SCREEN, FULLSCREEN_BUTTON, LIVE_BUTTON, PANELS, PIP_BUTTON, PLAY_BUTTON, QUALITY_MENU, SEEK_BAR, SKIP_BUTTON, SPACER, SPEED_MENU, SPINNER, START_BUTTON, SUBTITLES_MENU, TITLE, VOLUME, } from './tags.js';
11
- function skip(seconds) {
12
- const node = document.createElement(SKIP_BUTTON);
13
- node.setAttribute('seconds', String(seconds));
14
- return node;
15
- }
16
- function each(...tags) {
17
- return tags.map((tag) => document.createElement(tag));
18
- }
19
- /** The screens and the bar. */
20
- export function composeBar() {
21
- const bar = document.createElement(CONTROL_BAR);
22
- bar.append(...each(CURRENT_TIME, SEEK_BAR, DURATION, LIVE_BUTTON), skip(-10), document.createElement(PLAY_BUTTON), skip(10), ...each(VOLUME, SPACER, SPEED_MENU, CHAPTERS_MENU, SUBTITLES_MENU, AUDIO_MENU), ...each(QUALITY_MENU, AIRPLAY_BUTTON, PIP_BUTTON, FULLSCREEN_BUTTON));
23
- return [...each(TITLE, START_BUTTON, ERROR_SCREEN, SPINNER), bar];
24
- }
25
- /** The row under the video. */
26
- export function composePanels() {
27
- const row = document.createElement(PANELS);
28
- row.append(...each(QUALITY_MENU, AUDIO_MENU, SUBTITLES_MENU, CHAPTERS_MENU, LIVE_BUTTON, DRM_BADGE));
29
- return [row];
30
- }
31
- //# sourceMappingURL=compose.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compose.js","sourceRoot":"","sources":["../src/compose.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,cAAc,EACd,UAAU,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,MAAM,EACN,UAAU,EACV,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,MAAM,EACN,UAAU,EACV,OAAO,EACP,YAAY,EACZ,cAAc,EACd,KAAK,EACL,MAAM,GACP,MAAM,WAAW,CAAC;AAEnB,SAAS,IAAI,CAAC,OAAe;IAC3B,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IACjD,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9C,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,IAAI,CAAC,GAAG,IAAc;IAC7B,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,+BAA+B;AAC/B,MAAM,UAAU,UAAU;IACxB,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAChD,GAAG,CAAC,MAAM,CACR,GAAG,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,EACtD,IAAI,CAAC,CAAC,EAAE,CAAC,EACT,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,EACnC,IAAI,CAAC,EAAE,CAAC,EACR,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,CAAC,EAC9E,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,iBAAiB,CAAC,CACrE,CAAC;IACF,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC;AACpE,CAAC;AAED,+BAA+B;AAC/B,MAAM,UAAU,aAAa;IAC3B,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC3C,GAAG,CAAC,MAAM,CACR,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,CAAC,CACzF,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * <mbx-panels>: the row under the video for what native controls cannot
3
- * show. It sits in the player beside the video, in flow, so it lands
4
- * under the picture, and lays its children out in a row: the quality,
5
- * audio and subtitles menus, the live button, the lock. Each child hides
6
- * itself when its session has nothing for it, and the row hides when
7
- * every child has, so a native session shows no strip at all.
8
- */
9
- import { Component } from './component.js';
10
- export declare class MbxPanels extends Component {
11
- constructor();
12
- private empty;
13
- protected attach(): void;
14
- }
15
- //# sourceMappingURL=panels.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"panels.d.ts","sourceRoot":"","sources":["../../src/elements/panels.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAiB3C,qBAAa,SAAU,SAAQ,SAAS;;IAOtC,OAAO,CAAC,KAAK;cAIM,MAAM,IAAI,IAAI;CAoBlC"}