@mattebox/player 0.1.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 (164) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +24 -0
  3. package/README.md +22 -0
  4. package/dist/cdn/mattebox-player.min.js +340 -0
  5. package/dist/controls/bar.d.ts +56 -0
  6. package/dist/controls/bar.d.ts.map +1 -0
  7. package/dist/controls/bar.js +245 -0
  8. package/dist/controls/bar.js.map +1 -0
  9. package/dist/controls/buttons.d.ts +13 -0
  10. package/dist/controls/buttons.d.ts.map +1 -0
  11. package/dist/controls/buttons.js +157 -0
  12. package/dist/controls/buttons.js.map +1 -0
  13. package/dist/controls/control.d.ts +12 -0
  14. package/dist/controls/control.d.ts.map +1 -0
  15. package/dist/controls/control.js +2 -0
  16. package/dist/controls/control.js.map +1 -0
  17. package/dist/controls/cues.d.ts +33 -0
  18. package/dist/controls/cues.d.ts.map +1 -0
  19. package/dist/controls/cues.js +170 -0
  20. package/dist/controls/cues.js.map +1 -0
  21. package/dist/controls/fullscreen.d.ts +21 -0
  22. package/dist/controls/fullscreen.d.ts.map +1 -0
  23. package/dist/controls/fullscreen.js +78 -0
  24. package/dist/controls/fullscreen.js.map +1 -0
  25. package/dist/controls/icons.d.ts +35 -0
  26. package/dist/controls/icons.d.ts.map +1 -0
  27. package/dist/controls/icons.js +76 -0
  28. package/dist/controls/icons.js.map +1 -0
  29. package/dist/controls/keys.d.ts +26 -0
  30. package/dist/controls/keys.d.ts.map +1 -0
  31. package/dist/controls/keys.js +66 -0
  32. package/dist/controls/keys.js.map +1 -0
  33. package/dist/controls/live.d.ts +10 -0
  34. package/dist/controls/live.d.ts.map +1 -0
  35. package/dist/controls/live.js +59 -0
  36. package/dist/controls/live.js.map +1 -0
  37. package/dist/controls/menu.d.ts +34 -0
  38. package/dist/controls/menu.d.ts.map +1 -0
  39. package/dist/controls/menu.js +225 -0
  40. package/dist/controls/menu.js.map +1 -0
  41. package/dist/controls/menus.d.ts +43 -0
  42. package/dist/controls/menus.d.ts.map +1 -0
  43. package/dist/controls/menus.js +262 -0
  44. package/dist/controls/menus.js.map +1 -0
  45. package/dist/controls/options.d.ts +44 -0
  46. package/dist/controls/options.d.ts.map +1 -0
  47. package/dist/controls/options.js +54 -0
  48. package/dist/controls/options.js.map +1 -0
  49. package/dist/controls/pip.d.ts +16 -0
  50. package/dist/controls/pip.d.ts.map +1 -0
  51. package/dist/controls/pip.js +53 -0
  52. package/dist/controls/pip.js.map +1 -0
  53. package/dist/controls/ranges.d.ts +24 -0
  54. package/dist/controls/ranges.d.ts.map +1 -0
  55. package/dist/controls/ranges.js +48 -0
  56. package/dist/controls/ranges.js.map +1 -0
  57. package/dist/controls/screens.d.ts +22 -0
  58. package/dist/controls/screens.d.ts.map +1 -0
  59. package/dist/controls/screens.js +69 -0
  60. package/dist/controls/screens.js.map +1 -0
  61. package/dist/controls/seek.d.ts +52 -0
  62. package/dist/controls/seek.d.ts.map +1 -0
  63. package/dist/controls/seek.js +215 -0
  64. package/dist/controls/seek.js.map +1 -0
  65. package/dist/controls/slider.d.ts +28 -0
  66. package/dist/controls/slider.d.ts.map +1 -0
  67. package/dist/controls/slider.js +145 -0
  68. package/dist/controls/slider.js.map +1 -0
  69. package/dist/controls/speed.d.ts +8 -0
  70. package/dist/controls/speed.d.ts.map +1 -0
  71. package/dist/controls/speed.js +34 -0
  72. package/dist/controls/speed.js.map +1 -0
  73. package/dist/controls/time.d.ts +8 -0
  74. package/dist/controls/time.d.ts.map +1 -0
  75. package/dist/controls/time.js +25 -0
  76. package/dist/controls/time.js.map +1 -0
  77. package/dist/controls/volume.d.ts +8 -0
  78. package/dist/controls/volume.d.ts.map +1 -0
  79. package/dist/controls/volume.js +29 -0
  80. package/dist/controls/volume.js.map +1 -0
  81. package/dist/dom.d.ts +18 -0
  82. package/dist/dom.d.ts.map +1 -0
  83. package/dist/dom.js +45 -0
  84. package/dist/dom.js.map +1 -0
  85. package/dist/element.d.ts +101 -0
  86. package/dist/element.d.ts.map +1 -0
  87. package/dist/element.js +327 -0
  88. package/dist/element.js.map +1 -0
  89. package/dist/es2015/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/asyncToGenerator.js +27 -0
  90. package/dist/es2015/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/defineProperty.js +12 -0
  91. package/dist/es2015/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/objectSpread2.js +25 -0
  92. package/dist/es2015/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/toPrimitive.js +14 -0
  93. package/dist/es2015/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/toPropertyKey.js +9 -0
  94. package/dist/es2015/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/typeof.js +11 -0
  95. package/dist/es2015/controls/bar.js +227 -0
  96. package/dist/es2015/controls/buttons.js +146 -0
  97. package/dist/es2015/controls/cues.js +153 -0
  98. package/dist/es2015/controls/fullscreen.js +54 -0
  99. package/dist/es2015/controls/icons.js +50 -0
  100. package/dist/es2015/controls/keys.js +60 -0
  101. package/dist/es2015/controls/live.js +60 -0
  102. package/dist/es2015/controls/menu.js +226 -0
  103. package/dist/es2015/controls/menus.js +258 -0
  104. package/dist/es2015/controls/options.js +46 -0
  105. package/dist/es2015/controls/pip.js +39 -0
  106. package/dist/es2015/controls/ranges.js +51 -0
  107. package/dist/es2015/controls/screens.js +74 -0
  108. package/dist/es2015/controls/seek.js +203 -0
  109. package/dist/es2015/controls/slider.js +136 -0
  110. package/dist/es2015/controls/speed.js +41 -0
  111. package/dist/es2015/controls/time.js +27 -0
  112. package/dist/es2015/controls/volume.js +30 -0
  113. package/dist/es2015/dom.js +43 -0
  114. package/dist/es2015/element.js +311 -0
  115. package/dist/es2015/index.js +10 -0
  116. package/dist/es2015/namespaces.js +7 -0
  117. package/dist/es2015/panels/drm.js +29 -0
  118. package/dist/es2015/panels/error.js +25 -0
  119. package/dist/es2015/panels/live.js +48 -0
  120. package/dist/es2015/panels/quality.js +52 -0
  121. package/dist/es2015/panels/tracks.js +47 -0
  122. package/dist/es2015/presets.js +46 -0
  123. package/dist/es2015/style.js +347 -0
  124. package/dist/index.d.ts +4 -0
  125. package/dist/index.d.ts.map +1 -0
  126. package/dist/index.js +9 -0
  127. package/dist/index.js.map +1 -0
  128. package/dist/namespaces.d.ts +45 -0
  129. package/dist/namespaces.d.ts.map +1 -0
  130. package/dist/namespaces.js +5 -0
  131. package/dist/namespaces.js.map +1 -0
  132. package/dist/panels/drm.d.ts +8 -0
  133. package/dist/panels/drm.d.ts.map +1 -0
  134. package/dist/panels/drm.js +36 -0
  135. package/dist/panels/drm.js.map +1 -0
  136. package/dist/panels/error.d.ts +13 -0
  137. package/dist/panels/error.d.ts.map +1 -0
  138. package/dist/panels/error.js +23 -0
  139. package/dist/panels/error.js.map +1 -0
  140. package/dist/panels/live.d.ts +3 -0
  141. package/dist/panels/live.d.ts.map +1 -0
  142. package/dist/panels/live.js +56 -0
  143. package/dist/panels/live.js.map +1 -0
  144. package/dist/panels/panel.d.ts +13 -0
  145. package/dist/panels/panel.d.ts.map +1 -0
  146. package/dist/panels/panel.js +2 -0
  147. package/dist/panels/panel.js.map +1 -0
  148. package/dist/panels/quality.d.ts +3 -0
  149. package/dist/panels/quality.d.ts.map +1 -0
  150. package/dist/panels/quality.js +59 -0
  151. package/dist/panels/quality.js.map +1 -0
  152. package/dist/panels/tracks.d.ts +3 -0
  153. package/dist/panels/tracks.d.ts.map +1 -0
  154. package/dist/panels/tracks.js +49 -0
  155. package/dist/panels/tracks.js.map +1 -0
  156. package/dist/presets.d.ts +23 -0
  157. package/dist/presets.d.ts.map +1 -0
  158. package/dist/presets.js +36 -0
  159. package/dist/presets.js.map +1 -0
  160. package/dist/style.d.ts +13 -0
  161. package/dist/style.d.ts.map +1 -0
  162. package/dist/style.js +345 -0
  163. package/dist/style.js.map +1 -0
  164. package/package.json +58 -0
@@ -0,0 +1,347 @@
1
+ //#region src/style.ts
2
+ /**
3
+ * The default styles. Two rules govern them.
4
+ *
5
+ * Nothing carries `!important`. For normal declarations the outer tree wins
6
+ * over the shadow tree, so any `::part()` rule the page writes beats these
7
+ * whatever its specificity; an `!important` here would invert that and make
8
+ * a part unstylable.
9
+ *
10
+ * Selectors stay at one attribute, and every element is reached through its
11
+ * `part`, so the names in the stylesheet are the names the page uses.
12
+ */
13
+ const STYLE = `
14
+ :host {
15
+ display: block;
16
+ position: relative;
17
+ outline: none;
18
+ --mbx-surface: #101114;
19
+ --mbx-text: #f2f3f5;
20
+ --mbx-muted: #9aa0a6;
21
+ --mbx-accent: #5b8cff;
22
+ --mbx-error: #ffb4ab;
23
+ --mbx-live: #ff4d4d;
24
+ --mbx-radius: 4px;
25
+ --mbx-gap: 10px;
26
+ --mbx-pad: 8px;
27
+ --mbx-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
28
+ }
29
+ [part~="stage"] { position: relative; }
30
+ /* 16:9 until the media says otherwise: a bare video measures 300 by 150 and
31
+ would jump to its size on metadata. Auto first, so the natural ratio wins
32
+ once it is known. */
33
+ ::slotted(video) { display: block; width: 100%; aspect-ratio: auto 16 / 9; }
34
+ [part~="controls"] {
35
+ position: absolute;
36
+ inset: auto 0 0 0;
37
+ display: flex;
38
+ flex-direction: column;
39
+ gap: 4px;
40
+ padding: 40px 16px 12px;
41
+ color: var(--mbx-text);
42
+ background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
43
+ font: 500 16px/1.2 var(--mbx-font);
44
+ transition: opacity 0.2s;
45
+ }
46
+ [part~="idle"] { opacity: 0; pointer-events: none; }
47
+ [part~="error-screen"] {
48
+ position: absolute;
49
+ inset: 0;
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: center;
53
+ padding: 16px;
54
+ background: rgba(0, 0, 0, 0.75);
55
+ color: var(--mbx-text);
56
+ font: 400 15px/1.4 var(--mbx-font);
57
+ text-align: center;
58
+ }
59
+ [part~="error-box"] { display: flex; flex-direction: column; align-items: center; gap: 8px; }
60
+ [part~="error-title"] { font-size: 18px; font-weight: 600; }
61
+ [part~="error-detail"] { font-family: monospace; font-size: 13px; color: var(--mbx-error); }
62
+ [part~="error-retry"] { width: auto; height: 36px; padding: 0 16px; border: 1px solid currentColor; font-weight: 600; }
63
+ [part~="row"] { display: flex; align-items: center; gap: 8px; }
64
+ [part~="seek-row"] { gap: 16px; }
65
+ [part~="current-time"], [part~="duration"] { min-width: 3ch; font-variant-numeric: tabular-nums; white-space: nowrap; }
66
+ [part~="duration"] { text-align: right; }
67
+ [part~="control"] {
68
+ display: inline-flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ flex: none;
72
+ width: 40px;
73
+ height: 40px;
74
+ padding: 0;
75
+ font: inherit;
76
+ color: inherit;
77
+ background: transparent;
78
+ border: 0;
79
+ border-radius: var(--mbx-radius);
80
+ cursor: pointer;
81
+ opacity: 0.9;
82
+ }
83
+ [part~="control"]:hover { opacity: 1; }
84
+ [part~="start-button"] {
85
+ position: absolute;
86
+ top: 50%;
87
+ left: 50%;
88
+ width: 96px;
89
+ height: 96px;
90
+ margin: -48px 0 0 -48px;
91
+ color: var(--mbx-text);
92
+ opacity: 0.92;
93
+ filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6));
94
+ transition: opacity 0.15s;
95
+ }
96
+ [part~="start-button"]:hover { opacity: 1; }
97
+ [part~="start-button"] [part~="icon"] { width: 72px; height: 72px; }
98
+ [part~="error-screen"] {
99
+ position: absolute;
100
+ inset: 0;
101
+ display: flex;
102
+ align-items: center;
103
+ justify-content: center;
104
+ padding: 16px;
105
+ background: rgba(0, 0, 0, 0.75);
106
+ color: var(--mbx-text);
107
+ font: 400 15px/1.4 var(--mbx-font);
108
+ text-align: center;
109
+ }
110
+ [part~="error-box"] { display: flex; flex-direction: column; align-items: center; gap: 8px; }
111
+ [part~="error-title"] { font-size: 18px; font-weight: 600; }
112
+ [part~="error-detail"] { font-family: monospace; font-size: 13px; color: var(--mbx-error); }
113
+ [part~="error-retry"] { width: auto; height: 36px; padding: 0 16px; border: 1px solid currentColor; font-weight: 600; }
114
+ [part~="row"] { display: flex; align-items: center; gap: 8px; }
115
+ [part~="seek-row"] { gap: 16px; }
116
+ [part~="current-time"], [part~="duration"] { min-width: 3ch; font-variant-numeric: tabular-nums; white-space: nowrap; }
117
+ [part~="duration"] { text-align: right; }
118
+ [part~="control"] {
119
+ display: inline-flex;
120
+ align-items: center;
121
+ justify-content: center;
122
+ flex: none;
123
+ width: 40px;
124
+ height: 40px;
125
+ padding: 0;
126
+ font: inherit;
127
+ color: inherit;
128
+ background: transparent;
129
+ border: 0;
130
+ border-radius: var(--mbx-radius);
131
+ cursor: pointer;
132
+ opacity: 0.9;
133
+ }
134
+ [part~="control"]:hover { opacity: 1; }
135
+ [part~="start-button"] {
136
+ position: absolute;
137
+ top: 50%;
138
+ left: 50%;
139
+ width: 104px;
140
+ height: 64px;
141
+ margin: -32px 0 0 -52px;
142
+ border: 1px solid rgba(255, 255, 255, 0.18);
143
+ border-radius: var(--mbx-radius);
144
+ background: rgba(0, 0, 0, 0.45);
145
+ color: var(--mbx-text);
146
+ opacity: 0.9;
147
+ transition: opacity 0.15s, background 0.15s;
148
+ }
149
+ [part~="start-button"]:hover { opacity: 1; background: rgba(0, 0, 0, 0.6); }
150
+ [part~="start-button"] [part~="icon"] { width: 40px; height: 40px; margin-left: 2px; }
151
+ [part~="icon"] { width: 1.75em; height: 1.75em; fill: currentColor; }
152
+ [part~="slider"] {
153
+ position: relative;
154
+ flex: none;
155
+ height: 40px;
156
+ border-radius: var(--mbx-radius);
157
+ cursor: pointer;
158
+ touch-action: none;
159
+ }
160
+ [part~="rail"] { position: absolute; top: 0; bottom: 0; left: 8px; right: 8px; }
161
+ [part~="seek"] { flex: 1; }
162
+ [part~="track"] {
163
+ position: absolute;
164
+ top: 50%;
165
+ left: 0;
166
+ right: 0;
167
+ height: 4px;
168
+ transform: translateY(-50%);
169
+ background: rgba(255, 255, 255, 0.35);
170
+ border-radius: 2px;
171
+ overflow: hidden;
172
+ }
173
+ [part~="fill"] { position: absolute; top: 0; bottom: 0; left: 0; background: var(--mbx-accent); }
174
+ [part~="thumb"] {
175
+ position: absolute;
176
+ top: 50%;
177
+ width: 16px;
178
+ height: 16px;
179
+ margin: -8px 0 0 -8px;
180
+ border-radius: 50%;
181
+ background: var(--mbx-text);
182
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
183
+ pointer-events: none;
184
+ }
185
+ [part~="buffered"] { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
186
+ [part~="buffered-range"] { position: absolute; top: 0; bottom: 0; background: rgba(255, 255, 255, 0.3); }
187
+ [part~="hover"] { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--mbx-text); }
188
+ [part~="edge"] { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--mbx-live); }
189
+ [part~="preview"] {
190
+ position: absolute;
191
+ bottom: 100%;
192
+ margin-bottom: 4px;
193
+ transform: translateX(-50%);
194
+ display: flex;
195
+ flex-direction: column;
196
+ align-items: center;
197
+ gap: 2px;
198
+ padding: 2px;
199
+ background: var(--mbx-surface);
200
+ border-radius: var(--mbx-radius);
201
+ font-size: 13px;
202
+ font-variant-numeric: tabular-nums;
203
+ white-space: nowrap;
204
+ pointer-events: none;
205
+ }
206
+ [part~="preview-image"] { position: relative; overflow: hidden; border-radius: 2px; }
207
+ [part~="preview-tile"] { position: absolute; top: 0; left: 0; transform-origin: top left; background-repeat: no-repeat; }
208
+ [part~="preview-time"] { padding: 0 4px; }
209
+ [part~="volume-group"] { display: flex; align-items: center; }
210
+ [part~="volume"] { width: 0; opacity: 0; transition: width 0.2s ease, opacity 0.2s ease; }
211
+ /* Two attributes in one selector, the one place: the slider unfolds from
212
+ its group under the pointer or focus, and a page reaches it through
213
+ ::part(volume) all the same. */
214
+ [part~="volume-group"]:hover [part~="volume"] { width: 80px; opacity: 1; }
215
+ [part~="volume-group"]:focus-within [part~="volume"] { width: 80px; opacity: 1; }
216
+ [part~="cluster"] { display: flex; align-items: center; gap: 4px; margin-left: auto; }
217
+ [part~="live-button"] { width: auto; gap: 6px; padding: 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; }
218
+ [part~="live-button"]:disabled { cursor: default; opacity: 1; }
219
+ [part~="live-dot"] { width: 10px; height: 10px; border-radius: 50%; background: var(--mbx-muted); transition: background 0.2s; }
220
+ /* Two attributes, as with the volume: the dot reads the button's state. */
221
+ [part~="live-dot"][part~="at-edge"] { background: var(--mbx-live); box-shadow: 0 0 6px var(--mbx-live); }
222
+ [part~="slot"] { display: contents; }
223
+ [part~="menu"] { position: relative; }
224
+ [part~="popup"] {
225
+ position: absolute;
226
+ right: 0;
227
+ bottom: 100%;
228
+ margin-bottom: 8px;
229
+ min-width: 160px;
230
+ padding: 6px;
231
+ display: flex;
232
+ flex-direction: column;
233
+ overflow-y: auto;
234
+ overscroll-behavior: contain;
235
+ background: rgba(16, 17, 20, 0.95);
236
+ border-radius: var(--mbx-radius);
237
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
238
+ font-size: 14px;
239
+ }
240
+ [part~="section"] { display: flex; flex-direction: column; }
241
+ [part~="section"] + [part~="section"] { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
242
+ [part~="section-label"] { padding: 4px 12px 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mbx-muted); }
243
+ [part~="item"] {
244
+ display: block;
245
+ width: 100%;
246
+ padding: 8px 12px 8px 28px;
247
+ font: inherit;
248
+ color: inherit;
249
+ text-align: left;
250
+ white-space: nowrap;
251
+ background: transparent;
252
+ border: 0;
253
+ border-radius: var(--mbx-radius);
254
+ cursor: pointer;
255
+ }
256
+ [part~="item"]:hover { background: rgba(255, 255, 255, 0.12); }
257
+ [part~="item"]:focus-visible { outline: 2px solid var(--mbx-accent); outline-offset: -2px; }
258
+ [part~="page-item"] { position: relative; padding-right: 28px; }
259
+ [part~="page-item"]::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; margin-top: -4px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); opacity: 0.7; }
260
+ [part~="back-item"] { position: relative; font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0; margin-bottom: 6px; }
261
+ [part~="back-item"]::before { content: ""; position: absolute; left: 12px; top: 50%; width: 7px; height: 7px; margin-top: -4px; border: solid currentColor; border-width: 1.5px 0 0 1.5px; transform: rotate(-45deg); opacity: 0.7; }
262
+ [part~="checked"] { position: relative; }
263
+ [part~="checked"]::before { content: ""; position: absolute; left: 12px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--mbx-accent); }
264
+ [part~="drm-badge"] { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--mbx-muted); border-radius: var(--mbx-radius); cursor: default; }
265
+ [part~="drm-badge"]:focus-visible { outline: 2px solid var(--mbx-accent); outline-offset: -2px; }
266
+ [part~="tooltip"] {
267
+ position: absolute;
268
+ right: 0;
269
+ bottom: 100%;
270
+ margin-bottom: 8px;
271
+ padding: 8px 10px;
272
+ background: rgba(16, 17, 20, 0.95);
273
+ border-radius: var(--mbx-radius);
274
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
275
+ color: var(--mbx-text);
276
+ font-size: 13px;
277
+ line-height: 1.4;
278
+ text-align: left;
279
+ white-space: nowrap;
280
+ pointer-events: none;
281
+ }
282
+ [part~="tooltip-title"] { font-weight: 600; }
283
+ [part~="tooltip-text"] { color: var(--mbx-muted); }
284
+ [part~="track"] {
285
+ position: absolute;
286
+ top: 50%;
287
+ left: 0;
288
+ right: 0;
289
+ height: 4px;
290
+ transform: translateY(-50%);
291
+ background: rgba(255, 255, 255, 0.3);
292
+ border-radius: 2px;
293
+ overflow: hidden;
294
+ }
295
+ [part~="fill"] { position: absolute; top: 0; bottom: 0; left: 0; background: var(--mbx-accent); }
296
+ [part~="thumb"] {
297
+ position: absolute;
298
+ top: 50%;
299
+ width: 12px;
300
+ height: 12px;
301
+ margin: -6px 0 0 -6px;
302
+ border-radius: 50%;
303
+ background: var(--mbx-text);
304
+ pointer-events: none;
305
+ }
306
+ :host(:focus-visible) [part~="stage"] { outline: 2px solid var(--mbx-accent); outline-offset: -2px; }
307
+ [part~="control"]:focus-visible { outline: 2px solid var(--mbx-accent); outline-offset: -2px; }
308
+ [part~="slider"]:focus-visible { outline: 2px solid var(--mbx-accent); outline-offset: -2px; }
309
+ [part~="stage"]:fullscreen { display: flex; background: #000; }
310
+ [part~="stage"]:fullscreen ::slotted(video) { height: 100%; object-fit: contain; }
311
+ [part~="stage"]:-webkit-full-screen { display: flex; background: #000; }
312
+ [part~="stage"]:-webkit-full-screen ::slotted(video) { height: 100%; object-fit: contain; }
313
+ @media (prefers-reduced-motion: reduce) {
314
+ [part~="controls"] { transition: none; }
315
+ [part~="volume"] { transition: none; }
316
+ [part~="live-dot"] { transition: none; }
317
+ [part~="start-button"] { transition: none; }
318
+ }
319
+ [part~="panels"], [part~="error"] {
320
+ display: flex;
321
+ flex-wrap: wrap;
322
+ align-items: center;
323
+ gap: var(--mbx-gap);
324
+ padding: var(--mbx-pad);
325
+ background: var(--mbx-surface);
326
+ color: var(--mbx-text);
327
+ font: 400 13px/1.4 var(--mbx-font);
328
+ }
329
+ [part~="panels"]:empty { display: none; }
330
+ [part~="panel"] { display: flex; align-items: center; gap: 6px; }
331
+ [part~="label"] { display: flex; align-items: center; gap: 6px; }
332
+ [part~="text"] { color: var(--mbx-muted); }
333
+ [part~="value"] { color: var(--mbx-accent); }
334
+ [part~="select"], [part~="button"] {
335
+ font: inherit;
336
+ color: inherit;
337
+ background: transparent;
338
+ border: 1px solid currentColor;
339
+ border-radius: var(--mbx-radius);
340
+ padding: 2px 6px;
341
+ }
342
+ [part~="button"][disabled] { opacity: 0.5; }
343
+ [part~="error"] { color: var(--mbx-error); }
344
+ [hidden] { display: none; }
345
+ `;
346
+ //#endregion
347
+ export { STYLE };
@@ -0,0 +1,4 @@
1
+ export type { ControlsOptions } from './controls/options.js';
2
+ export { LAYOUT } from './controls/options.js';
3
+ export { MatteboxPlayerElement } from './element.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @mattebox/player: the <mattebox-player> custom element. Importing this
3
+ * module registers the element; that is the package's one side effect.
4
+ */
5
+ import { MatteboxPlayerElement } from './element.js';
6
+ export { LAYOUT } from './controls/options.js';
7
+ export { MatteboxPlayerElement } from './element.js';
8
+ MatteboxPlayerElement.define();
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAGrD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,qBAAqB,CAAC,MAAM,EAAE,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * The optional namespaces, and the one place the player reaches for them.
3
+ *
4
+ * `'live' in engine` is the documented feature test, but it does not narrow,
5
+ * because the properties are not on the type. A namespace reaches the type
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.
10
+ */
11
+ import type { Mattebox } from 'mattebox';
12
+ import type { DrmApi } from 'mattebox/stages/eme-core';
13
+ 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
+ }
37
+ export interface Namespaces {
38
+ readonly live?: LiveApi;
39
+ readonly drm?: DrmApi;
40
+ readonly thumbnails?: ThumbnailsApi;
41
+ readonly pdt?: PdtApi;
42
+ }
43
+ /** The optional namespaces on an engine, each present exactly when its stage was composed. */
44
+ export declare function namespaces(engine: Mattebox): Namespaces;
45
+ //# sourceMappingURL=namespaces.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,5 @@
1
+ /** The optional namespaces on an engine, each present exactly when its stage was composed. */
2
+ export function namespaces(engine) {
3
+ return engine;
4
+ }
5
+ //# sourceMappingURL=namespaces.js.map
@@ -0,0 +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"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The DRM indicator over `engine.drm`. Present only when the EME stages are
3
+ * composed. It shows the key system in use and nothing else: sessions and key
4
+ * statuses are diagnostics, and the element is not a diagnostics surface.
5
+ */
6
+ import type { PanelFactory } from './panel.js';
7
+ export declare const drmPanel: PanelFactory;
8
+ //# sourceMappingURL=drm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drm.d.ts","sourceRoot":"","sources":["../../src/panels/drm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAS,YAAY,EAAE,MAAM,YAAY,CAAC;AAEtD,eAAO,MAAM,QAAQ,EAAE,YA6BtB,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The DRM indicator over `engine.drm`. Present only when the EME stages are
3
+ * composed. It shows the key system in use and nothing else: sessions and key
4
+ * statuses are diagnostics, and the element is not a diagnostics surface.
5
+ */
6
+ import { el } from '../dom.js';
7
+ import { namespaces } from '../namespaces.js';
8
+ export const drmPanel = (session) => {
9
+ const engine = session.engine;
10
+ if (engine === null)
11
+ return null;
12
+ const found = namespaces(engine).drm;
13
+ if (found === undefined)
14
+ return null;
15
+ const drm = found;
16
+ const root = el('div', 'panel drm');
17
+ root.append(el('span', 'text drm-text', 'DRM'));
18
+ const keySystem = el('span', 'value drm-key-system');
19
+ root.append(keySystem);
20
+ function render() {
21
+ const name = drm.keySystem;
22
+ keySystem.textContent = name ?? '';
23
+ // Nothing to show until a key session opens, and an empty indicator is
24
+ // worse than none.
25
+ root.hidden = name === null;
26
+ }
27
+ const off = engine.on('drm:keysystem', render);
28
+ render();
29
+ return {
30
+ root,
31
+ dispose() {
32
+ off();
33
+ },
34
+ };
35
+ };
36
+ //# sourceMappingURL=drm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drm.js","sourceRoot":"","sources":["../../src/panels/drm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,MAAM,CAAC,MAAM,QAAQ,GAAiB,CAAC,OAAO,EAAgB,EAAE;IAC9D,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACjC,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC;IACrC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,GAAG,GAAW,KAAK,CAAC;IAE1B,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IACpC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,EAAE,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;IACrD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAEvB,SAAS,MAAM;QACb,MAAM,IAAI,GAAG,GAAG,CAAC,SAAS,CAAC;QAC3B,SAAS,CAAC,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC;QACnC,uEAAuE;QACvE,mBAAmB;QACnB,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9B,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC/C,MAAM,EAAE,CAAC;IAET,OAAO;QACL,IAAI;QACJ,OAAO;YACL,GAAG,EAAE,CAAC;QACR,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The error surface. It is not a panel: it outlives a session, because the
3
+ * core reports "no handler claimed this source" when there is no session to
4
+ * hang it on. It stays hidden until a fatal error arrives.
5
+ */
6
+ import type { PlayerError } from '@mattebox/player-core';
7
+ export interface ErrorSurface {
8
+ readonly root: HTMLElement;
9
+ show(error: PlayerError): void;
10
+ clear(): void;
11
+ }
12
+ export declare function errorSurface(retry: () => void): ErrorSurface;
13
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/panels/error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,KAAK,IAAI,IAAI,CAAC;CACf;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,IAAI,GAAG,YAAY,CAqB5D"}
@@ -0,0 +1,23 @@
1
+ import { el } from '../dom.js';
2
+ export function errorSurface(retry) {
3
+ const root = el('div', 'panel 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
+ };
22
+ }
23
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/panels/error.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAQ/B,MAAM,UAAU,YAAY,CAAC,KAAiB;IAC5C,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACtC,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"}
@@ -0,0 +1,3 @@
1
+ import type { PanelFactory } from './panel.js';
2
+ export declare const livePanel: PanelFactory;
3
+ //# sourceMappingURL=live.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../../src/panels/live.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAS,YAAY,EAAE,MAAM,YAAY,CAAC;AAEtD,eAAO,MAAM,SAAS,EAAE,YA8CvB,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * The live badge over `engine.live`. Present only when a live stage is
3
+ * composed, so the factory answers null for VOD-only engines and for native.
4
+ *
5
+ * Latency has no event; it moves with the playhead. The video's `timeupdate`
6
+ * is the clock the browser already runs, so the badge reads on that.
7
+ */
8
+ import { el, state } from '../dom.js';
9
+ import { namespaces } from '../namespaces.js';
10
+ export const livePanel = (session, video) => {
11
+ const engine = session.engine;
12
+ if (engine === null)
13
+ return null;
14
+ const found = namespaces(engine).live;
15
+ if (found === undefined)
16
+ return null;
17
+ // Annotated, not narrowed: a hoisted function declaration below reads it.
18
+ const live = found;
19
+ const root = el('div', 'panel live');
20
+ const badge = el('span', 'badge live-badge', 'Live');
21
+ const latency = el('span', 'value live-latency');
22
+ const button = el('button', 'button live-edge-button', 'Go to live');
23
+ button.type = 'button';
24
+ root.append(badge, latency, button);
25
+ let shown = '';
26
+ function tick() {
27
+ // The namespace is present whenever a live stage was composed, which says
28
+ // nothing about the stream: `full` carries both live adapters, so a VOD
29
+ // presentation has `engine.live` too. A window that never opened leaves
30
+ // `edge` null, and that is what makes a stream live.
31
+ root.hidden = live.edge === null;
32
+ const atEdge = live.atEdge;
33
+ // State rides the part name: `::part()` takes no attribute selector, so
34
+ // `::part(at-edge)` is the only way a page can style the edge state.
35
+ state(root, 'panel live', { 'at-edge': atEdge });
36
+ button.disabled = atEdge;
37
+ const seconds = live.latency;
38
+ const text = seconds === null ? '' : `${seconds.toFixed(1)}s behind`;
39
+ if (text === shown)
40
+ return;
41
+ shown = text;
42
+ latency.textContent = text;
43
+ }
44
+ button.addEventListener('click', () => {
45
+ live.seekToEdge();
46
+ });
47
+ video.addEventListener('timeupdate', tick);
48
+ tick();
49
+ return {
50
+ root,
51
+ dispose() {
52
+ video.removeEventListener('timeupdate', tick);
53
+ },
54
+ };
55
+ };
56
+ //# sourceMappingURL=live.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live.js","sourceRoot":"","sources":["../../src/panels/live.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,MAAM,CAAC,MAAM,SAAS,GAAiB,CAAC,OAAO,EAAE,KAAK,EAAgB,EAAE;IACtE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACjC,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;IACtC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACrC,0EAA0E;IAC1E,MAAM,IAAI,GAAY,KAAK,CAAC;IAE5B,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IACrC,MAAM,KAAK,GAAG,EAAE,CAAC,MAAM,EAAE,kBAAkB,EAAE,MAAM,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,EAAE,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,EAAE,CAAC,QAAQ,EAAE,yBAAyB,EAAE,YAAY,CAAC,CAAC;IACrE,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAEpC,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,SAAS,IAAI;QACX,0EAA0E;QAC1E,wEAAwE;QACxE,wEAAwE;QACxE,qDAAqD;QACrD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC;QACjC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,wEAAwE;QACxE,qEAAqE;QACrE,KAAK,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;QACjD,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC;QACzB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,MAAM,IAAI,GAAG,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC;QACrE,IAAI,IAAI,KAAK,KAAK;YAAE,OAAO;QAC3B,KAAK,GAAG,IAAI,CAAC;QACb,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;QACpC,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAC3C,IAAI,EAAE,CAAC;IAEP,OAAO;QACL,IAAI;QACJ,OAAO;YACL,KAAK,CAAC,mBAAmB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;QAChD,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * What a panel is. A panel reads one engine namespace, subscribes to what it
3
+ * needs, and hands back a root and a teardown. It renders nothing for a
4
+ * native session, and nothing for an engine whose stage was not composed:
5
+ * the factory answers null and the element never inserts it.
6
+ */
7
+ import type { Session } from '@mattebox/player-core';
8
+ export interface Panel {
9
+ readonly root: HTMLElement;
10
+ dispose(): void;
11
+ }
12
+ export type PanelFactory = (session: Session, video: HTMLVideoElement) => Panel | null;
13
+ //# sourceMappingURL=panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/panels/panel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,gBAAgB,KAAK,KAAK,GAAG,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel.js","sourceRoot":"","sources":["../../src/panels/panel.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { PanelFactory } from './panel.js';
2
+ export declare const qualityPanel: PanelFactory;
3
+ //# sourceMappingURL=quality.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality.d.ts","sourceRoot":"","sources":["../../src/panels/quality.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAS,YAAY,EAAE,MAAM,YAAY,CAAC;AAUtD,eAAO,MAAM,YAAY,EAAE,YAiD1B,CAAC"}