@mattebox/player 0.6.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 (241) hide show
  1. package/dist/cdn/mattebox-player.min.js +3 -435
  2. package/dist/controls/airplay.js +28 -44
  3. package/dist/controls/airplay.js.map +1 -1
  4. package/dist/controls/chapters.d.ts +22 -11
  5. package/dist/controls/chapters.d.ts.map +1 -1
  6. package/dist/controls/chapters.js +87 -73
  7. package/dist/controls/chapters.js.map +1 -1
  8. package/dist/controls/cues.d.ts +0 -22
  9. package/dist/controls/cues.d.ts.map +1 -1
  10. package/dist/controls/cues.js +161 -191
  11. package/dist/controls/cues.js.map +1 -1
  12. package/dist/controls/fullscreen.js +52 -70
  13. package/dist/controls/fullscreen.js.map +1 -1
  14. package/dist/controls/icons.d.ts +1 -1
  15. package/dist/controls/icons.d.ts.map +1 -1
  16. package/dist/controls/icons.js +46 -70
  17. package/dist/controls/icons.js.map +1 -1
  18. package/dist/controls/menu.d.ts +7 -4
  19. package/dist/controls/menu.d.ts.map +1 -1
  20. package/dist/controls/menu.js +241 -223
  21. package/dist/controls/menu.js.map +1 -1
  22. package/dist/controls/pip.js +35 -49
  23. package/dist/controls/pip.js.map +1 -1
  24. package/dist/controls/ranges.js +42 -37
  25. package/dist/controls/ranges.js.map +1 -1
  26. package/dist/controls/session.d.ts +6 -1
  27. package/dist/controls/session.d.ts.map +1 -1
  28. package/dist/controls/session.js +41 -26
  29. package/dist/controls/session.js.map +1 -1
  30. package/dist/controls/slider.d.ts +2 -2
  31. package/dist/controls/slider.d.ts.map +1 -1
  32. package/dist/controls/slider.js +151 -159
  33. package/dist/controls/slider.js.map +1 -1
  34. package/dist/controls/time.js +17 -17
  35. package/dist/controls/time.js.map +1 -1
  36. package/dist/dom.d.ts +6 -0
  37. package/dist/dom.d.ts.map +1 -1
  38. package/dist/dom.js +28 -19
  39. package/dist/dom.js.map +1 -1
  40. package/dist/element-entry.js +9 -6
  41. package/dist/element-entry.js.map +1 -1
  42. package/dist/element.d.ts +4 -2
  43. package/dist/element.d.ts.map +1 -1
  44. package/dist/element.js +384 -443
  45. package/dist/element.js.map +1 -1
  46. package/dist/elements/airplay-button.js +51 -53
  47. package/dist/elements/airplay-button.js.map +1 -1
  48. package/dist/elements/audio-menu.js +62 -63
  49. package/dist/elements/audio-menu.js.map +1 -1
  50. package/dist/elements/chapters-menu.d.ts.map +1 -1
  51. package/dist/elements/chapters-menu.js +75 -65
  52. package/dist/elements/chapters-menu.js.map +1 -1
  53. package/dist/elements/component.d.ts +1 -1
  54. package/dist/elements/component.d.ts.map +1 -1
  55. package/dist/elements/component.js +86 -89
  56. package/dist/elements/component.js.map +1 -1
  57. package/dist/elements/control-bar.d.ts +18 -5
  58. package/dist/elements/control-bar.d.ts.map +1 -1
  59. package/dist/elements/control-bar.js +282 -319
  60. package/dist/elements/control-bar.js.map +1 -1
  61. package/dist/elements/current-time.js +26 -25
  62. package/dist/elements/current-time.js.map +1 -1
  63. package/dist/elements/drm-badge.d.ts.map +1 -1
  64. package/dist/elements/drm-badge.js +107 -141
  65. package/dist/elements/drm-badge.js.map +1 -1
  66. package/dist/elements/duration.d.ts.map +1 -1
  67. package/dist/elements/duration.js +24 -21
  68. package/dist/elements/duration.js.map +1 -1
  69. package/dist/elements/error-screen.d.ts.map +1 -1
  70. package/dist/elements/error-screen.js +68 -102
  71. package/dist/elements/error-screen.js.map +1 -1
  72. package/dist/elements/fullscreen-button.js +48 -54
  73. package/dist/elements/fullscreen-button.js.map +1 -1
  74. package/dist/elements/live-button.d.ts.map +1 -1
  75. package/dist/elements/live-button.js +67 -94
  76. package/dist/elements/live-button.js.map +1 -1
  77. package/dist/elements/menu-element.js +31 -28
  78. package/dist/elements/menu-element.js.map +1 -1
  79. package/dist/elements/mute-button.js +58 -59
  80. package/dist/elements/mute-button.js.map +1 -1
  81. package/dist/elements/pip-button.js +54 -54
  82. package/dist/elements/pip-button.js.map +1 -1
  83. package/dist/elements/play-button.d.ts.map +1 -1
  84. package/dist/elements/play-button.js +73 -58
  85. package/dist/elements/play-button.js.map +1 -1
  86. package/dist/elements/quality-menu.js +66 -69
  87. package/dist/elements/quality-menu.js.map +1 -1
  88. package/dist/elements/remaining-time.d.ts.map +1 -1
  89. package/dist/elements/remaining-time.js +27 -24
  90. package/dist/elements/remaining-time.js.map +1 -1
  91. package/dist/elements/scan-button.d.ts +17 -0
  92. package/dist/elements/scan-button.d.ts.map +1 -0
  93. package/dist/elements/scan-button.js +117 -0
  94. package/dist/elements/scan-button.js.map +1 -0
  95. package/dist/elements/seek-bar.d.ts +93 -14
  96. package/dist/elements/seek-bar.d.ts.map +1 -1
  97. package/dist/elements/seek-bar.js +475 -335
  98. package/dist/elements/seek-bar.js.map +1 -1
  99. package/dist/elements/shared.d.ts +3 -11
  100. package/dist/elements/shared.d.ts.map +1 -1
  101. package/dist/elements/shared.js +44 -144
  102. package/dist/elements/shared.js.map +1 -1
  103. package/dist/elements/skip-button.d.ts.map +1 -1
  104. package/dist/elements/skip-button.js +54 -55
  105. package/dist/elements/skip-button.js.map +1 -1
  106. package/dist/elements/spacer.d.ts.map +1 -1
  107. package/dist/elements/spacer.js +12 -7
  108. package/dist/elements/spacer.js.map +1 -1
  109. package/dist/elements/speed-menu.js +60 -55
  110. package/dist/elements/speed-menu.js.map +1 -1
  111. package/dist/elements/spinner.d.ts.map +1 -1
  112. package/dist/elements/spinner.js +52 -78
  113. package/dist/elements/spinner.js.map +1 -1
  114. package/dist/elements/start-button.d.ts.map +1 -1
  115. package/dist/elements/start-button.js +107 -120
  116. package/dist/elements/start-button.js.map +1 -1
  117. package/dist/elements/subtitles-menu.js +95 -103
  118. package/dist/elements/subtitles-menu.js.map +1 -1
  119. package/dist/elements/time-element.d.ts.map +1 -1
  120. package/dist/elements/time-element.js +36 -28
  121. package/dist/elements/time-element.js.map +1 -1
  122. package/dist/elements/title.d.ts.map +1 -1
  123. package/dist/elements/title.js +105 -137
  124. package/dist/elements/title.js.map +1 -1
  125. package/dist/elements/volume-slider.d.ts.map +1 -1
  126. package/dist/elements/volume-slider.js +47 -45
  127. package/dist/elements/volume-slider.js.map +1 -1
  128. package/dist/elements/volume.d.ts.map +1 -1
  129. package/dist/elements/volume.js +42 -50
  130. package/dist/elements/volume.js.map +1 -1
  131. package/dist/entries/airplay-button.js +7 -7
  132. package/dist/entries/airplay-button.js.map +1 -1
  133. package/dist/entries/audio-menu.js +7 -6
  134. package/dist/entries/audio-menu.js.map +1 -1
  135. package/dist/entries/chapters-menu.js +7 -7
  136. package/dist/entries/chapters-menu.js.map +1 -1
  137. package/dist/entries/control-bar.js +7 -6
  138. package/dist/entries/control-bar.js.map +1 -1
  139. package/dist/entries/current-time.js +7 -6
  140. package/dist/entries/current-time.js.map +1 -1
  141. package/dist/entries/drm-badge.js +7 -6
  142. package/dist/entries/drm-badge.js.map +1 -1
  143. package/dist/entries/duration.js +7 -6
  144. package/dist/entries/duration.js.map +1 -1
  145. package/dist/entries/error-screen.js +7 -6
  146. package/dist/entries/error-screen.js.map +1 -1
  147. package/dist/entries/fullscreen-button.js +7 -6
  148. package/dist/entries/fullscreen-button.js.map +1 -1
  149. package/dist/entries/live-button.js +7 -6
  150. package/dist/entries/live-button.js.map +1 -1
  151. package/dist/entries/mute-button.js +7 -6
  152. package/dist/entries/mute-button.js.map +1 -1
  153. package/dist/entries/pip-button.js +7 -6
  154. package/dist/entries/pip-button.js.map +1 -1
  155. package/dist/entries/play-button.js +7 -6
  156. package/dist/entries/play-button.js.map +1 -1
  157. package/dist/entries/quality-menu.js +7 -6
  158. package/dist/entries/quality-menu.js.map +1 -1
  159. package/dist/entries/remaining-time.js +7 -7
  160. package/dist/entries/remaining-time.js.map +1 -1
  161. package/dist/entries/scan-button.d.ts +5 -0
  162. package/dist/entries/scan-button.d.ts.map +1 -0
  163. package/dist/entries/scan-button.js +9 -0
  164. package/dist/entries/scan-button.js.map +1 -0
  165. package/dist/entries/seek-bar.js +7 -6
  166. package/dist/entries/seek-bar.js.map +1 -1
  167. package/dist/entries/skip-button.js +7 -6
  168. package/dist/entries/skip-button.js.map +1 -1
  169. package/dist/entries/spacer.js +7 -6
  170. package/dist/entries/spacer.js.map +1 -1
  171. package/dist/entries/speed-menu.js +7 -6
  172. package/dist/entries/speed-menu.js.map +1 -1
  173. package/dist/entries/spinner.js +7 -7
  174. package/dist/entries/spinner.js.map +1 -1
  175. package/dist/entries/start-button.js +7 -6
  176. package/dist/entries/start-button.js.map +1 -1
  177. package/dist/entries/subtitles-menu.js +7 -6
  178. package/dist/entries/subtitles-menu.js.map +1 -1
  179. package/dist/entries/title.js +7 -7
  180. package/dist/entries/title.js.map +1 -1
  181. package/dist/entries/volume-slider.js +7 -6
  182. package/dist/entries/volume-slider.js.map +1 -1
  183. package/dist/entries/volume.js +9 -8
  184. package/dist/entries/volume.js.map +1 -1
  185. package/dist/es2015/controls/chapters.js +40 -7
  186. package/dist/es2015/controls/cues.js +1 -8
  187. package/dist/es2015/controls/icons.js +3 -1
  188. package/dist/es2015/controls/menu.js +27 -8
  189. package/dist/es2015/controls/session.js +16 -4
  190. package/dist/es2015/controls/slider.js +5 -4
  191. package/dist/es2015/dom.js +10 -1
  192. package/dist/es2015/element.js +23 -7
  193. package/dist/es2015/elements/chapters-menu.js +18 -10
  194. package/dist/es2015/elements/control-bar.js +41 -35
  195. package/dist/es2015/elements/drm-badge.js +1 -25
  196. package/dist/es2015/elements/duration.js +2 -1
  197. package/dist/es2015/elements/error-screen.js +1 -30
  198. package/dist/es2015/elements/live-button.js +1 -29
  199. package/dist/es2015/elements/menu-element.js +2 -2
  200. package/dist/es2015/elements/play-button.js +10 -3
  201. package/dist/es2015/elements/remaining-time.js +2 -1
  202. package/dist/es2015/elements/scan-button.js +118 -0
  203. package/dist/es2015/elements/seek-bar.js +264 -71
  204. package/dist/es2015/elements/shared.js +5 -106
  205. package/dist/es2015/elements/skip-button.js +2 -1
  206. package/dist/es2015/elements/spacer.js +2 -1
  207. package/dist/es2015/elements/spinner.js +1 -32
  208. package/dist/es2015/elements/start-button.js +8 -26
  209. package/dist/es2015/elements/time-element.js +1 -4
  210. package/dist/es2015/elements/title.js +1 -45
  211. package/dist/es2015/elements/volume-slider.js +2 -1
  212. package/dist/es2015/elements/volume.js +1 -11
  213. package/dist/es2015/entries/scan-button.js +7 -0
  214. package/dist/es2015/index.js +3 -1
  215. package/dist/es2015/style.js +1 -101
  216. package/dist/es2015/tags.js +2 -1
  217. package/dist/host.js +19 -17
  218. package/dist/host.js.map +1 -1
  219. package/dist/index.d.ts +3 -0
  220. package/dist/index.d.ts.map +1 -1
  221. package/dist/index.js +55 -27
  222. package/dist/labels.js +13 -9
  223. package/dist/labels.js.map +1 -1
  224. package/dist/namespaces.d.ts +9 -26
  225. package/dist/namespaces.d.ts.map +1 -1
  226. package/dist/namespaces.js +6 -2
  227. package/dist/namespaces.js.map +1 -1
  228. package/dist/presets.js +33 -28
  229. package/dist/presets.js.map +1 -1
  230. package/dist/style.d.ts +1 -20
  231. package/dist/style.d.ts.map +1 -1
  232. package/dist/style.js +4 -100
  233. package/dist/style.js.map +1 -1
  234. package/dist/surface.js +25 -21
  235. package/dist/surface.js.map +1 -1
  236. package/dist/tags.d.ts +1 -0
  237. package/dist/tags.d.ts.map +1 -1
  238. package/dist/tags.js +31 -26
  239. package/dist/tags.js.map +1 -1
  240. package/package.json +4 -4
  241. package/dist/index.js.map +0 -1
@@ -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. 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/* controls=\"none\" hides every child but the video, so a page keeps its\n composition in place and turns it off with one attribute. A normal rule\n from the page still wins over this one, the way it does over any rule\n here. */\n:host([controls=\"none\"]) ::slotted(:not(video)) { 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 all of it. The error surface, which sits\n under the stage in the page, goes over its foot 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,0lGAgFjB,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,101 +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. The height comes from the
39
- page, or from the browser in fullscreen, and not from a display on the
40
- host: a page's own "mattebox-player { display: block }" beats a :host()
41
- rule, so nothing here may depend on one. */
42
- [part~="stage"] {
43
- position: relative;
44
- display: flex;
45
- flex-direction: column;
46
- justify-content: center;
47
- height: 100%;
48
- }
49
- /* 16:9 until the media says otherwise: a bare video measures 300 by 150 and
50
- would jump to its size on metadata. Auto first, so the natural ratio wins
51
- once it is known. Capped at the stage, and contained, so a box shorter
52
- than the picture letterboxes it and a narrower one pillarboxes it. */
53
- ::slotted(video) {
54
- display: block;
55
- width: 100%;
56
- min-height: 0;
57
- max-height: 100%;
58
- object-fit: contain;
59
- aspect-ratio: auto 16 / 9;
60
- }
61
- /* The casting attribute is set by @mattebox/player-cast while a receiver
62
- plays: its screen has the controls, and the bar and the start button
63
- would drive a paused video nobody watches. The attribute is the whole
64
- coupling. */
65
- :host([casting]) ::slotted(mbx-control-bar), :host([casting]) ::slotted(mbx-start-button) { display: none; }
66
- /* controls="none" hides every child but the video, so a page keeps its
67
- composition in place and turns it off with one attribute. A normal rule
68
- from the page still wins over this one, the way it does over any rule
69
- here. */
70
- :host([controls="none"]) ::slotted(:not(video)) { display: none; }
71
- :host(:focus-visible) [part~="stage"] { outline: 2px solid var(--mbx-accent); outline-offset: -2px; }
72
- /* Fullscreen goes on the host, so every control the page placed inside
73
- comes along. The browser gives the host the whole screen with
74
- !important; the picture takes all of it. The error surface, which sits
75
- under the stage in the page, goes over its foot instead. */
76
- :host(:fullscreen) ::slotted(video) { flex: 1; }
77
- :host(:fullscreen) [part~="error"] { position: absolute; left: 0; right: 0; bottom: 0; }
78
- :host(:-webkit-full-screen) ::slotted(video) { flex: 1; }
79
- :host(:-webkit-full-screen) [part~="error"] { position: absolute; left: 0; right: 0; bottom: 0; }
80
- [part~="error"] {
81
- display: flex;
82
- flex-wrap: wrap;
83
- align-items: center;
84
- gap: var(--mbx-gap);
85
- padding: var(--mbx-pad);
86
- background: var(--mbx-surface);
87
- color: var(--mbx-error);
88
- font: 400 13px/1.4 var(--mbx-font);
89
- }
90
- [part~="value"] { color: var(--mbx-accent); }
91
- [part~="button"] {
92
- font: inherit;
93
- color: inherit;
94
- background: transparent;
95
- border: 1px solid currentColor;
96
- border-radius: var(--mbx-radius);
97
- padding: 2px 6px;
98
- }
99
- [hidden] { display: none; }
100
- `;
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
+
101
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFpB,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";
@@ -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,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,28 +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 VOLUME = 'mbx-volume';
27
- 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
+
28
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,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.6.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/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC"}