@vindral/web-sdk 4.2.0 → 4.2.1-1-gf6c6f2fd
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.
- package/B7hT-BKr.js +32 -0
- package/B9WEkxkT.js +268 -0
- package/BdFcdkj1.js +143 -0
- package/BsfwXDui.js +65 -0
- package/Bt-ONXfO.js +59 -0
- package/C01DcfYu.js +118 -0
- package/CL0_JU7W.js +1761 -0
- package/CYgjrKff.js +11538 -0
- package/CrDL5rng.js +223 -0
- package/Cug44nXk.js +149 -0
- package/DDbXsjIU.js +4361 -0
- package/Ddby8xU_.js +18624 -0
- package/DeYmk5AL.js +210 -0
- package/DrWNJwZx.js +35 -0
- package/DtpcQ7ay.js +166 -0
- package/FYiEDBC4.js +50 -0
- package/RxoWWyzp.js +25 -0
- package/api-client.d.ts +3 -3
- package/api-client.js +2 -4
- package/cast-sender.d.ts +7 -7
- package/cast-sender.js +2 -230
- package/core.d.ts +35 -24
- package/core.js +3 -13
- package/legacy.d.ts +44 -33
- package/legacy.es.js +13703 -15261
- package/legacy.umd.js +1188 -15
- package/package.json +1 -1
- package/player.d.ts +60 -41
- package/player.js +4 -5476
- package/react.d.ts +53 -42
- package/react.js +0 -1
- package/vindral-player-component.js +5 -2
- package/BQEuFJLn.js +0 -206
- package/BoKiM5eL.js +0 -232
- package/CuhQLT-7.js +0 -254
- package/DBHv5ggB.js +0 -13182
- package/DGo74EDo.js +0 -59
- package/HT5RB929.js +0 -312
- package/h5LA1Y1W.js +0 -21750
package/CL0_JU7W.js
ADDED
|
@@ -0,0 +1,1761 @@
|
|
|
1
|
+
import { n as e, t } from "./BsfwXDui.js";
|
|
2
|
+
import { a as n, i as r, n as i, r as a, t as o } from "./B7hT-BKr.js";
|
|
3
|
+
import { g as s, h as c, n as l, r as ee, t as u, v as te, y as ne } from "./CrDL5rng.js";
|
|
4
|
+
import { t as d } from "./RxoWWyzp.js";
|
|
5
|
+
//#region \0rolldown/runtime.js
|
|
6
|
+
var f = Object.defineProperty, p = (e, t) => {
|
|
7
|
+
let n = {};
|
|
8
|
+
for (var r in e) f(n, r, {
|
|
9
|
+
get: e[r],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
return t || f(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
13
|
+
}, m, re = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m8 2 1.88 1.88\"/>\n <path d=\"M14.12 3.88 16 2\"/>\n <path d=\"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1\"/>\n <path d=\"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6\"/>\n <path d=\"M12 20v-9\"/>\n <path d=\"M6.53 9C4.6 8.8 3 7.1 3 5\"/>\n <path d=\"M6 13H2\"/>\n <path d=\"M3 21c0-2.1 1.7-3.9 3.8-4\"/>\n <path d=\"M20.97 5c0 2.1-1.6 3.8-3.5 4\"/>\n <path d=\"M22 13h-4\"/>\n <path d=\"M17.2 17c2.1.1 3.8 1.9 3.8 4\"/>\n</svg>\n", h = document.createElement("template");
|
|
14
|
+
h.innerHTML = `
|
|
15
|
+
<style>
|
|
16
|
+
:host {
|
|
17
|
+
display: var(--debug-button-display);
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host([${s.DEBUG_PANEL_OPEN}]) {
|
|
23
|
+
background: rgba(255, 255, 255, 0.15);
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
26
|
+
|
|
27
|
+
<span id="icon">
|
|
28
|
+
<slot name="icon">${re}</slot>
|
|
29
|
+
</span>
|
|
30
|
+
`;
|
|
31
|
+
var ie = class extends ee {
|
|
32
|
+
constructor() {
|
|
33
|
+
var e;
|
|
34
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(h.content.cloneNode(!0));
|
|
35
|
+
}
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
super.connectedCallback(), this.setAttribute("aria-label", "Toggle debug panel");
|
|
38
|
+
}
|
|
39
|
+
attributeChangedCallback(e, t, n) {
|
|
40
|
+
t !== n && e === "disabled" && (n === null ? this.enable() : this.disable());
|
|
41
|
+
}
|
|
42
|
+
handleClick(e) {
|
|
43
|
+
this.dispatchEvent(new CustomEvent(c.TOGGLE_DEBUG_PANEL, {
|
|
44
|
+
bubbles: !0,
|
|
45
|
+
composed: !0
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
m = ie, e(ie, "observedAttributes", [...l(m, "observedAttributes", m), s.DEBUG_PANEL_OPEN]);
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region ../../libs/player-next/src/components/DebugPanel.constants.ts
|
|
52
|
+
var ae = "Adaptive around current target", g = [
|
|
53
|
+
{
|
|
54
|
+
label: "Ultra-Low",
|
|
55
|
+
value: 200,
|
|
56
|
+
description: "Minimal delay, jitter sensitive"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
label: "Low",
|
|
60
|
+
value: 500,
|
|
61
|
+
description: "Low delay, may buffer"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
label: "Standard",
|
|
65
|
+
value: 1500,
|
|
66
|
+
description: "Balanced delay & stability"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: "High",
|
|
70
|
+
value: 3e3,
|
|
71
|
+
description: "Maximum stability"
|
|
72
|
+
}
|
|
73
|
+
], oe = (e) => e <= 350 ? g[0] : e <= 800 ? g[1] : e <= 2e3 ? g[2] : g[3], se = "vindral:debug-panel-layout:v1", _ = [
|
|
74
|
+
"latency-section",
|
|
75
|
+
"quality-section",
|
|
76
|
+
"playback-section",
|
|
77
|
+
"network-section",
|
|
78
|
+
"stats-section",
|
|
79
|
+
"events-section"
|
|
80
|
+
], ce = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M18 6 6 18\"/>\n <path d=\"m6 6 12 12\"/>\n</svg>\n", le = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m9 18 6-6-6-6\"/>\n</svg>\n", ue = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m15 18-6-6 6-6\"/>\n</svg>\n", de = document.createElement("template");
|
|
81
|
+
de.innerHTML = `
|
|
82
|
+
<style>
|
|
83
|
+
:host {
|
|
84
|
+
--debug-overlay-controls-reserved-space: var(
|
|
85
|
+
--vindral-debug-overlay-controls-reserved-space,
|
|
86
|
+
calc(
|
|
87
|
+
var(--button-icon-size) + (2 * var(--button-padding)) + (2 * var(--control-padding)) + var(--padding-2) +
|
|
88
|
+
env(safe-area-inset-bottom)
|
|
89
|
+
)
|
|
90
|
+
);
|
|
91
|
+
display: none;
|
|
92
|
+
position: absolute;
|
|
93
|
+
top: var(--padding-2);
|
|
94
|
+
right: var(--padding-2);
|
|
95
|
+
width: min(360px, 95cqw);
|
|
96
|
+
max-height: calc(100% - var(--padding-2) - var(--debug-overlay-controls-reserved-space));
|
|
97
|
+
overflow: auto;
|
|
98
|
+
overscroll-behavior: contain;
|
|
99
|
+
z-index: 20;
|
|
100
|
+
box-sizing: border-box;
|
|
101
|
+
font-family: var(--ui-font);
|
|
102
|
+
font-size: 12px;
|
|
103
|
+
color: var(--fg-strong);
|
|
104
|
+
pointer-events: auto;
|
|
105
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:host([${s.DEBUG_PANEL_OPEN}]) {
|
|
109
|
+
display: block;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:host([data-density="compact"]) {
|
|
113
|
+
font-size: 11px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host([data-density="compact"]) .overlay-header {
|
|
117
|
+
padding: 4px 6px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:host([data-density="compact"]) .section-content {
|
|
121
|
+
padding: 0 4px;
|
|
122
|
+
margin-bottom: 4px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:host([data-density="compact"]) .stat-row {
|
|
126
|
+
padding: 4px 6px;
|
|
127
|
+
font-size: 11px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:host([data-density="compact"]) .latency-control,
|
|
131
|
+
:host([data-density="compact"]) .quality-item,
|
|
132
|
+
:host([data-density="compact"]) .copy-btn {
|
|
133
|
+
padding: 6px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:host([data-density="compact"]) .preset-btn {
|
|
137
|
+
min-height: 48px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@container (max-width: 500px) {
|
|
141
|
+
:host {
|
|
142
|
+
top: auto;
|
|
143
|
+
bottom: var(--debug-overlay-controls-reserved-space);
|
|
144
|
+
left: 0;
|
|
145
|
+
right: 0;
|
|
146
|
+
width: 100%;
|
|
147
|
+
max-height: calc(100% - var(--debug-overlay-controls-reserved-space));
|
|
148
|
+
border-radius: 10px 10px 0 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
:host([data-collapsed]) {
|
|
152
|
+
top: var(--padding-2);
|
|
153
|
+
bottom: auto;
|
|
154
|
+
left: auto;
|
|
155
|
+
right: var(--padding-2);
|
|
156
|
+
width: min(360px, 95cqw);
|
|
157
|
+
border-radius: 4px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.close-btn,
|
|
161
|
+
.latency-btn {
|
|
162
|
+
min-width: 36px;
|
|
163
|
+
min-height: 36px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.mode-btn,
|
|
167
|
+
.preset-btn,
|
|
168
|
+
.copy-btn,
|
|
169
|
+
.quality-item,
|
|
170
|
+
.section-tab {
|
|
171
|
+
min-height: 36px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.section-tab .label-full {
|
|
175
|
+
display: none;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.section-tab .label-short {
|
|
179
|
+
display: inline;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.section-badge {
|
|
183
|
+
display: none;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:host::-webkit-scrollbar {
|
|
188
|
+
width: 5px;
|
|
189
|
+
padding-right: 5px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:host::-webkit-scrollbar-thumb {
|
|
193
|
+
background-color: var(--fg-extra-subtle);
|
|
194
|
+
border-radius: 10px;
|
|
195
|
+
border: 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
:host::-webkit-scrollbar-track {
|
|
199
|
+
border-radius: 10px;
|
|
200
|
+
background-color: transparent;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.close-btn {
|
|
204
|
+
min-width: 28px;
|
|
205
|
+
min-height: 28px;
|
|
206
|
+
border: none;
|
|
207
|
+
background: transparent;
|
|
208
|
+
color: var(--fg-subtle);
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
padding: 2px;
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
justify-content: center;
|
|
214
|
+
border-radius: 4px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.close-btn:hover {
|
|
218
|
+
background: rgba(255, 255, 255, 0.15);
|
|
219
|
+
color: var(--fg-strong);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.overlay-header {
|
|
223
|
+
display: flex;
|
|
224
|
+
align-items: center;
|
|
225
|
+
flex-wrap: nowrap;
|
|
226
|
+
gap: var(--padding-1);
|
|
227
|
+
margin-bottom: var(--padding-1);
|
|
228
|
+
background: rgba(0, 0, 0, 0.9);
|
|
229
|
+
border-radius: 4px;
|
|
230
|
+
padding: var(--padding-1);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.overlay-header .close-btn {
|
|
234
|
+
margin-left: auto;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.scroll-tabs-btn {
|
|
238
|
+
display: none;
|
|
239
|
+
min-width: 20px;
|
|
240
|
+
min-height: 20px;
|
|
241
|
+
border: none;
|
|
242
|
+
background: transparent;
|
|
243
|
+
color: var(--fg-extra-subtle);
|
|
244
|
+
cursor: pointer;
|
|
245
|
+
padding: 0;
|
|
246
|
+
align-items: center;
|
|
247
|
+
justify-content: center;
|
|
248
|
+
border-radius: 4px;
|
|
249
|
+
flex-shrink: 0;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.scroll-tabs-btn[data-visible="true"] {
|
|
253
|
+
display: flex;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.scroll-tabs-btn:hover {
|
|
257
|
+
color: var(--fg-strong);
|
|
258
|
+
background: rgba(255, 255, 255, 0.1);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.section-tabs-wrap {
|
|
262
|
+
position: relative;
|
|
263
|
+
min-width: 0;
|
|
264
|
+
flex: 1;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.section-tabs-wrap[data-can-scroll-right]::after {
|
|
268
|
+
content: "";
|
|
269
|
+
position: absolute;
|
|
270
|
+
top: 0;
|
|
271
|
+
right: 0;
|
|
272
|
+
width: 24px;
|
|
273
|
+
height: 100%;
|
|
274
|
+
pointer-events: none;
|
|
275
|
+
background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.9));
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.section-tabs {
|
|
279
|
+
display: flex;
|
|
280
|
+
align-items: center;
|
|
281
|
+
gap: var(--padding-1);
|
|
282
|
+
overflow-x: auto;
|
|
283
|
+
scrollbar-width: none;
|
|
284
|
+
padding-right: 12px;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.section-tabs::-webkit-scrollbar {
|
|
288
|
+
display: none;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.section-tab {
|
|
292
|
+
flex: 0 0 auto;
|
|
293
|
+
display: inline-flex;
|
|
294
|
+
align-items: center;
|
|
295
|
+
gap: 6px;
|
|
296
|
+
border: none;
|
|
297
|
+
border-radius: 4px;
|
|
298
|
+
background: rgba(0, 0, 0, 0.9);
|
|
299
|
+
color: var(--fg-subtle);
|
|
300
|
+
padding: var(--padding-1) var(--padding-2);
|
|
301
|
+
font-size: 10px;
|
|
302
|
+
font-weight: 600;
|
|
303
|
+
letter-spacing: 0.05em;
|
|
304
|
+
text-transform: uppercase;
|
|
305
|
+
cursor: pointer;
|
|
306
|
+
white-space: nowrap;
|
|
307
|
+
min-height: 28px;
|
|
308
|
+
flex: 0 0 auto;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.section-label {
|
|
312
|
+
display: inline-flex;
|
|
313
|
+
align-items: center;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.section-tab .label-full {
|
|
317
|
+
display: inline;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.section-tab .label-short {
|
|
321
|
+
display: none;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.section-badge {
|
|
325
|
+
font-size: 9px;
|
|
326
|
+
font-weight: 500;
|
|
327
|
+
letter-spacing: 0;
|
|
328
|
+
text-transform: none;
|
|
329
|
+
font-variant-numeric: tabular-nums;
|
|
330
|
+
color: var(--fg-extra-subtle);
|
|
331
|
+
max-width: 88px;
|
|
332
|
+
overflow: hidden;
|
|
333
|
+
text-overflow: ellipsis;
|
|
334
|
+
white-space: nowrap;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.section-tab[data-active="true"] .section-badge {
|
|
338
|
+
color: rgba(255, 255, 255, 0.9);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.section-tab:hover {
|
|
342
|
+
background: rgba(255, 255, 255, 0.15);
|
|
343
|
+
color: var(--fg-strong);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.section-tab[data-active="true"] {
|
|
347
|
+
background: #549ce0;
|
|
348
|
+
color: #ffffff;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.section-tab:focus-visible,
|
|
352
|
+
.quality-item:focus-visible,
|
|
353
|
+
.mode-btn:focus-visible,
|
|
354
|
+
.preset-btn:focus-visible,
|
|
355
|
+
.latency-btn:focus-visible,
|
|
356
|
+
.copy-btn:focus-visible,
|
|
357
|
+
.events-btn:focus-visible,
|
|
358
|
+
.close-btn:focus-visible {
|
|
359
|
+
outline: 2px solid var(--fg-strong);
|
|
360
|
+
outline-offset: -2px;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.section {
|
|
364
|
+
margin-bottom: var(--padding-1);
|
|
365
|
+
background: rgba(0, 0, 0, 0.9);
|
|
366
|
+
border-radius: 4px;
|
|
367
|
+
overflow: hidden;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.section:last-child {
|
|
371
|
+
margin-bottom: 0;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.section-content {
|
|
375
|
+
padding: 0 var(--padding-1);
|
|
376
|
+
margin-bottom: var(--padding-1);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.section-content[hidden] {
|
|
380
|
+
display: none;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.stat-row {
|
|
384
|
+
display: flex;
|
|
385
|
+
justify-content: space-between;
|
|
386
|
+
align-items: flex-start;
|
|
387
|
+
gap: var(--padding-2);
|
|
388
|
+
padding: var(--padding-1) var(--padding-2);
|
|
389
|
+
font-size: 12px;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.stat-label {
|
|
393
|
+
color: var(--fg-subtle);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.stat-value {
|
|
397
|
+
font-weight: 500;
|
|
398
|
+
font-variant-numeric: tabular-nums;
|
|
399
|
+
color: var(--fg-strong);
|
|
400
|
+
text-align: right;
|
|
401
|
+
max-width: 64%;
|
|
402
|
+
overflow-wrap: anywhere;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.stat-value[data-status="good"] {
|
|
406
|
+
color: #549ce0;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.stat-value[data-status="warning"] {
|
|
410
|
+
color: #ff9800;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.stat-value[data-status="error"] {
|
|
414
|
+
color: #f44336;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.latency-control {
|
|
418
|
+
display: flex;
|
|
419
|
+
align-items: center;
|
|
420
|
+
gap: var(--padding-2);
|
|
421
|
+
padding: var(--padding-2);
|
|
422
|
+
border-radius: 4px;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.latency-btn {
|
|
426
|
+
min-width: 32px;
|
|
427
|
+
min-height: 32px;
|
|
428
|
+
border: none;
|
|
429
|
+
border-radius: 4px;
|
|
430
|
+
background: rgba(255, 255, 255, 0.15);
|
|
431
|
+
color: var(--fg-strong);
|
|
432
|
+
font-size: 16px;
|
|
433
|
+
font-weight: bold;
|
|
434
|
+
cursor: pointer;
|
|
435
|
+
display: flex;
|
|
436
|
+
align-items: center;
|
|
437
|
+
justify-content: center;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.latency-btn:hover {
|
|
441
|
+
background: rgba(255, 255, 255, 0.1);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.latency-btn:disabled {
|
|
445
|
+
opacity: 0.3;
|
|
446
|
+
cursor: not-allowed;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.latency-value-container {
|
|
450
|
+
flex: 1;
|
|
451
|
+
display: flex;
|
|
452
|
+
flex-direction: column;
|
|
453
|
+
align-items: center;
|
|
454
|
+
gap: 2px;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.latency-label {
|
|
458
|
+
font-size: 9px;
|
|
459
|
+
text-transform: uppercase;
|
|
460
|
+
opacity: 0.6;
|
|
461
|
+
letter-spacing: 0.05em;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.latency-value {
|
|
465
|
+
font-variant-numeric: tabular-nums;
|
|
466
|
+
font-weight: 600;
|
|
467
|
+
font-size: 16px;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.preset-grid {
|
|
471
|
+
display: grid;
|
|
472
|
+
grid-template-columns: repeat(2, 1fr);
|
|
473
|
+
gap: var(--padding-1);
|
|
474
|
+
margin-top: var(--padding-2);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.preset-btn {
|
|
478
|
+
position: relative;
|
|
479
|
+
display: flex;
|
|
480
|
+
flex-direction: column;
|
|
481
|
+
justify-content: center;
|
|
482
|
+
gap: 2px;
|
|
483
|
+
min-height: 54px;
|
|
484
|
+
padding: var(--padding-1) var(--padding-2);
|
|
485
|
+
border: 1px solid transparent;
|
|
486
|
+
border-radius: 4px;
|
|
487
|
+
font-size: 11px;
|
|
488
|
+
text-align: left;
|
|
489
|
+
cursor: pointer;
|
|
490
|
+
background: rgba(0, 0, 0, 0.9);
|
|
491
|
+
color: var(--fg-strong);
|
|
492
|
+
transition: background 0.15s;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.preset-btn:hover {
|
|
496
|
+
background: rgba(255, 255, 255, 0.15);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.preset-btn[data-active="true"] {
|
|
500
|
+
background: rgba(255, 255, 255, 0.1);
|
|
501
|
+
border-color: var(--fg-extra-subtle);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.preset-title {
|
|
505
|
+
font-size: 12px;
|
|
506
|
+
font-weight: 500;
|
|
507
|
+
line-height: 1.2;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.preset-subtitle {
|
|
511
|
+
font-size: 10px;
|
|
512
|
+
opacity: 0.65;
|
|
513
|
+
line-height: 1.2;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.preset-value {
|
|
517
|
+
font-size: 10px;
|
|
518
|
+
opacity: 0.55;
|
|
519
|
+
font-variant-numeric: tabular-nums;
|
|
520
|
+
margin-top: 2px;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.preset-btn.dynamic-btn {
|
|
524
|
+
min-height: 48px;
|
|
525
|
+
grid-column: 1 / -1;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.preset-btn.dynamic-btn .preset-title {
|
|
529
|
+
text-transform: uppercase;
|
|
530
|
+
font-size: 10px;
|
|
531
|
+
letter-spacing: 0.05em;
|
|
532
|
+
opacity: 0.75;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.preset-btn.dynamic-btn .preset-value {
|
|
536
|
+
opacity: 0.65;
|
|
537
|
+
margin-top: 0;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.preset-btn.dynamic-btn[data-active="true"] {
|
|
541
|
+
border-style: dashed;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.mode-toggle {
|
|
545
|
+
display: flex;
|
|
546
|
+
gap: var(--padding-1);
|
|
547
|
+
margin-bottom: var(--padding-2);
|
|
548
|
+
margin-top: var(--padding-2);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.mode-btn {
|
|
552
|
+
flex: 1;
|
|
553
|
+
padding: var(--padding-1) var(--padding-2);
|
|
554
|
+
border: none;
|
|
555
|
+
border-radius: 4px;
|
|
556
|
+
font-size: 11px;
|
|
557
|
+
font-weight: 500;
|
|
558
|
+
cursor: pointer;
|
|
559
|
+
background: rgba(0, 0, 0, 0.9);
|
|
560
|
+
color: var(--fg-strong);
|
|
561
|
+
transition: background 0.15s;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.mode-btn:hover {
|
|
565
|
+
background: rgba(255, 255, 255, 0.15);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.mode-btn[data-active="true"] {
|
|
569
|
+
background: #549ce0;
|
|
570
|
+
color: #ffffff;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.mode-btn:disabled {
|
|
574
|
+
opacity: 0.35;
|
|
575
|
+
cursor: not-allowed;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.mode-btn:disabled:hover {
|
|
579
|
+
background: rgba(0, 0, 0, 0.9);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.setting-row {
|
|
583
|
+
display: flex;
|
|
584
|
+
align-items: center;
|
|
585
|
+
justify-content: space-between;
|
|
586
|
+
margin-bottom: var(--padding-2);
|
|
587
|
+
padding: 0 var(--padding-1);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.setting-row .mode-btn {
|
|
591
|
+
flex: 0 0 auto;
|
|
592
|
+
min-width: 40px;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.setting-row:has(.mode-btn:disabled) .stat-label {
|
|
596
|
+
opacity: 0.35;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.quality-status-text {
|
|
600
|
+
font-size: 10px;
|
|
601
|
+
color: var(--fg-subtle);
|
|
602
|
+
margin-bottom: var(--padding-2);
|
|
603
|
+
padding: 0 var(--padding-1);
|
|
604
|
+
font-style: italic;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.quality-menu {
|
|
608
|
+
display: grid;
|
|
609
|
+
gap: var(--padding-1);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.quality-item {
|
|
613
|
+
display: flex;
|
|
614
|
+
align-items: center;
|
|
615
|
+
gap: var(--padding-2);
|
|
616
|
+
padding: var(--padding-2);
|
|
617
|
+
width: 100%;
|
|
618
|
+
border: 1px solid transparent;
|
|
619
|
+
border-radius: 4px;
|
|
620
|
+
text-align: left;
|
|
621
|
+
cursor: pointer;
|
|
622
|
+
font-size: 13px;
|
|
623
|
+
background: transparent;
|
|
624
|
+
color: var(--fg-strong);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
.quality-item:hover {
|
|
628
|
+
background: rgba(255, 255, 255, 0.15);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
.quality-item[data-selected="true"] {
|
|
632
|
+
background: rgba(255, 255, 255, 0.1);
|
|
633
|
+
border: 1px solid var(--fg-extra-subtle);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
.quality-item[data-capped="true"] {
|
|
637
|
+
opacity: 0.5;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
.quality-current-label {
|
|
641
|
+
font-size: 10px;
|
|
642
|
+
font-weight: 600;
|
|
643
|
+
text-transform: uppercase;
|
|
644
|
+
color: #549ce0;
|
|
645
|
+
margin-left: auto;
|
|
646
|
+
display: none;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.quality-item[data-playing="true"] .quality-current-label {
|
|
650
|
+
display: block;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.quality-item-info {
|
|
654
|
+
display: flex;
|
|
655
|
+
flex-direction: column;
|
|
656
|
+
gap: 2px;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
.quality-item-title {
|
|
660
|
+
font-weight: 500;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.quality-item-subtitle {
|
|
664
|
+
font-size: 10px;
|
|
665
|
+
opacity: 0.6;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.copy-btn {
|
|
669
|
+
width: 100%;
|
|
670
|
+
padding: var(--padding-2);
|
|
671
|
+
border: none;
|
|
672
|
+
border-radius: 4px;
|
|
673
|
+
font-size: 12px;
|
|
674
|
+
cursor: pointer;
|
|
675
|
+
background: rgba(0, 0, 0, 0.9);
|
|
676
|
+
color: var(--fg-strong);
|
|
677
|
+
transition: background 0.15s;
|
|
678
|
+
margin-top: var(--padding-2);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.copy-btn:hover {
|
|
682
|
+
background: rgba(255, 255, 255, 0.15);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.copy-btn[data-copied="true"] {
|
|
686
|
+
background: #549ce0;
|
|
687
|
+
color: white;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.events-toolbar {
|
|
691
|
+
display: flex;
|
|
692
|
+
align-items: center;
|
|
693
|
+
gap: var(--padding-1);
|
|
694
|
+
margin-top: var(--padding-2);
|
|
695
|
+
margin-bottom: var(--padding-1);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.events-count {
|
|
699
|
+
margin-right: auto;
|
|
700
|
+
font-size: 10px;
|
|
701
|
+
color: var(--fg-subtle);
|
|
702
|
+
text-transform: uppercase;
|
|
703
|
+
letter-spacing: 0.05em;
|
|
704
|
+
white-space: nowrap;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.events-btn {
|
|
708
|
+
border: none;
|
|
709
|
+
border-radius: 4px;
|
|
710
|
+
background: rgba(255, 255, 255, 0.1);
|
|
711
|
+
color: var(--fg-strong);
|
|
712
|
+
cursor: pointer;
|
|
713
|
+
padding: 4px 8px;
|
|
714
|
+
font-size: 10px;
|
|
715
|
+
text-transform: uppercase;
|
|
716
|
+
letter-spacing: 0.05em;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.events-btn:hover {
|
|
720
|
+
background: rgba(255, 255, 255, 0.15);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
.events-list {
|
|
724
|
+
display: flex;
|
|
725
|
+
flex-direction: column;
|
|
726
|
+
gap: var(--padding-1);
|
|
727
|
+
max-height: 220px;
|
|
728
|
+
overflow: auto;
|
|
729
|
+
padding-right: 2px;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.events-list::-webkit-scrollbar {
|
|
733
|
+
width: 5px;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.events-list::-webkit-scrollbar-thumb {
|
|
737
|
+
background-color: var(--fg-extra-subtle);
|
|
738
|
+
border-radius: 10px;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.events-list::-webkit-scrollbar-track {
|
|
742
|
+
background-color: transparent;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
.events-empty {
|
|
746
|
+
color: var(--fg-subtle);
|
|
747
|
+
font-size: 11px;
|
|
748
|
+
padding: var(--padding-2) 0;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.event-row {
|
|
752
|
+
display: grid;
|
|
753
|
+
grid-template-columns: auto auto 1fr;
|
|
754
|
+
align-items: start;
|
|
755
|
+
gap: var(--padding-1);
|
|
756
|
+
background: rgba(255, 255, 255, 0.04);
|
|
757
|
+
border-radius: 4px;
|
|
758
|
+
padding: 4px 6px;
|
|
759
|
+
font-size: 11px;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.event-time {
|
|
763
|
+
color: var(--fg-extra-subtle);
|
|
764
|
+
font-variant-numeric: tabular-nums;
|
|
765
|
+
white-space: nowrap;
|
|
766
|
+
font-size: 10px;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
.event-category {
|
|
770
|
+
color: var(--fg-subtle);
|
|
771
|
+
text-transform: uppercase;
|
|
772
|
+
letter-spacing: 0.04em;
|
|
773
|
+
font-size: 10px;
|
|
774
|
+
white-space: nowrap;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.event-message {
|
|
778
|
+
color: var(--fg-strong);
|
|
779
|
+
overflow-wrap: anywhere;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.event-row[data-level="warn"] .event-message {
|
|
783
|
+
color: #ffb300;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
.event-row[data-level="error"] .event-message {
|
|
787
|
+
color: #ef5350;
|
|
788
|
+
}
|
|
789
|
+
</style>
|
|
790
|
+
|
|
791
|
+
<div class="overlay-header" role="toolbar" aria-label="Debug sections">
|
|
792
|
+
<div class="section-tabs-wrap">
|
|
793
|
+
<div class="section-tabs">
|
|
794
|
+
<button class="section-tab" data-target="latency-section" type="button" aria-pressed="true" data-active="true" aria-label="Latency section" title="Latency">
|
|
795
|
+
<span class="label-full">Latency</span>
|
|
796
|
+
<span class="label-short">Sync</span>
|
|
797
|
+
</button>
|
|
798
|
+
<button class="section-tab" data-target="quality-section" type="button" aria-pressed="false" aria-label="Quality section" title="Quality">
|
|
799
|
+
<span class="label-full">Quality</span>
|
|
800
|
+
<span class="label-short">Qual</span>
|
|
801
|
+
</button>
|
|
802
|
+
<button class="section-tab" data-target="playback-section" type="button" aria-pressed="false" aria-label="Playback section" title="Playback">
|
|
803
|
+
<span class="label-full">Playback</span>
|
|
804
|
+
<span class="label-short">Play</span>
|
|
805
|
+
</button>
|
|
806
|
+
<button class="section-tab" data-target="network-section" type="button" aria-pressed="false" aria-label="Network section" title="Network">
|
|
807
|
+
<span class="label-full">Network</span>
|
|
808
|
+
<span class="label-short">Net</span>
|
|
809
|
+
</button>
|
|
810
|
+
<button class="section-tab" data-target="stats-section" type="button" aria-pressed="false" aria-label="Statistics section" title="Statistics">
|
|
811
|
+
<span class="label-full">Statistics</span>
|
|
812
|
+
<span class="label-short">Stats</span>
|
|
813
|
+
</button>
|
|
814
|
+
<button class="section-tab" data-target="events-section" type="button" aria-pressed="false" aria-label="Events section" title="Events">
|
|
815
|
+
<span class="label-full">Events</span>
|
|
816
|
+
<span class="label-short">Log</span>
|
|
817
|
+
</button>
|
|
818
|
+
</div>
|
|
819
|
+
</div>
|
|
820
|
+
<button class="scroll-tabs-btn" type="button" aria-label="Scroll tabs">${le}</button>
|
|
821
|
+
<button class="close-btn" type="button" aria-label="Close debug panel">${ce}</button>
|
|
822
|
+
</div>
|
|
823
|
+
|
|
824
|
+
<!-- Latency Section -->
|
|
825
|
+
<div class="section" id="latency-section">
|
|
826
|
+
<div class="section-content" id="latency-content">
|
|
827
|
+
<div class="stat-row">
|
|
828
|
+
<span class="stat-label">Current Drift</span>
|
|
829
|
+
<span class="stat-value" id="current-drift">-</span>
|
|
830
|
+
</div>
|
|
831
|
+
<div class="stat-row">
|
|
832
|
+
<span class="stat-label">Playback Latency</span>
|
|
833
|
+
<span class="stat-value" id="playback-latency">-</span>
|
|
834
|
+
</div>
|
|
835
|
+
<div class="stat-row">
|
|
836
|
+
<span class="stat-label">Average Drift</span>
|
|
837
|
+
<span class="stat-value" id="average-drift">-</span>
|
|
838
|
+
</div>
|
|
839
|
+
<div class="latency-control">
|
|
840
|
+
<button class="latency-btn" id="latency-strip-decrease" type="button" aria-label="Decrease target buffer time">-</button>
|
|
841
|
+
<div class="latency-value-container">
|
|
842
|
+
<span class="latency-label">Target</span>
|
|
843
|
+
<span class="latency-value" id="latency-strip-target">1500ms</span>
|
|
844
|
+
</div>
|
|
845
|
+
<button class="latency-btn" id="latency-strip-increase" type="button" aria-label="Increase target buffer time">+</button>
|
|
846
|
+
</div>
|
|
847
|
+
<div class="preset-grid" id="latency-presets"></div>
|
|
848
|
+
</div>
|
|
849
|
+
</div>
|
|
850
|
+
|
|
851
|
+
<!-- Quality Section -->
|
|
852
|
+
<div class="section" id="quality-section" hidden>
|
|
853
|
+
<div class="section-content" id="quality-content">
|
|
854
|
+
<div class="mode-toggle">
|
|
855
|
+
<button class="mode-btn" id="abr-auto-btn" type="button" data-active="true">Auto (ABR)</button>
|
|
856
|
+
<button class="mode-btn" id="abr-fixed-btn" type="button">Fixed</button>
|
|
857
|
+
</div>
|
|
858
|
+
<div class="setting-row">
|
|
859
|
+
<span class="stat-label">Size cap</span>
|
|
860
|
+
<button class="mode-btn" id="size-cap-toggle" type="button" data-active="true">On</button>
|
|
861
|
+
</div>
|
|
862
|
+
<div class="quality-status-text" id="quality-status-text">Select maximum allowed quality</div>
|
|
863
|
+
<div class="quality-menu" id="quality-menu"></div>
|
|
864
|
+
</div>
|
|
865
|
+
</div>
|
|
866
|
+
|
|
867
|
+
<!-- Playback Section -->
|
|
868
|
+
<div class="section" id="playback-section" hidden>
|
|
869
|
+
<div class="section-content" id="playback-content">
|
|
870
|
+
<div class="stat-row">
|
|
871
|
+
<span class="stat-label">Buffer Fullness</span>
|
|
872
|
+
<span class="stat-value" id="playback-buffer-fullness">-</span>
|
|
873
|
+
</div>
|
|
874
|
+
<div class="stat-row">
|
|
875
|
+
<span class="stat-label">Last Buffer Event</span>
|
|
876
|
+
<span class="stat-value" id="playback-last-buffer-event">-</span>
|
|
877
|
+
</div>
|
|
878
|
+
<div class="stat-row">
|
|
879
|
+
<span class="stat-label">Buffering Events</span>
|
|
880
|
+
<span class="stat-value" id="playback-buffering-events">-</span>
|
|
881
|
+
</div>
|
|
882
|
+
<div class="stat-row">
|
|
883
|
+
<span class="stat-label">Buffering Ratio</span>
|
|
884
|
+
<span class="stat-value" id="playback-buffering-ratio">-</span>
|
|
885
|
+
</div>
|
|
886
|
+
<div class="stat-row">
|
|
887
|
+
<span class="stat-label">Time Spent Buffering</span>
|
|
888
|
+
<span class="stat-value" id="playback-time-spent-buffering">-</span>
|
|
889
|
+
</div>
|
|
890
|
+
<div class="stat-row">
|
|
891
|
+
<span class="stat-label">Rendition Changes</span>
|
|
892
|
+
<span class="stat-value" id="playback-rendition-changes">-</span>
|
|
893
|
+
</div>
|
|
894
|
+
<div class="stat-row">
|
|
895
|
+
<span class="stat-label">Seek Adj/min</span>
|
|
896
|
+
<span class="stat-value" id="playback-seek-adjustments-rate">-</span>
|
|
897
|
+
</div>
|
|
898
|
+
<div class="stat-row">
|
|
899
|
+
<span class="stat-label">Timeshift Adj/min</span>
|
|
900
|
+
<span class="stat-value" id="playback-timeshift-adjustments-rate">-</span>
|
|
901
|
+
</div>
|
|
902
|
+
<div class="stat-row">
|
|
903
|
+
<span class="stat-label">Current Rendition</span>
|
|
904
|
+
<span class="stat-value" id="playback-current-rendition">-</span>
|
|
905
|
+
</div>
|
|
906
|
+
<div class="stat-row">
|
|
907
|
+
<span class="stat-label">Codecs</span>
|
|
908
|
+
<span class="stat-value" id="playback-codecs">-</span>
|
|
909
|
+
</div>
|
|
910
|
+
<div class="stat-row">
|
|
911
|
+
<span class="stat-label">Frame Drops</span>
|
|
912
|
+
<span class="stat-value" id="playback-frame-drops">-</span>
|
|
913
|
+
</div>
|
|
914
|
+
</div>
|
|
915
|
+
</div>
|
|
916
|
+
|
|
917
|
+
<!-- Network Section -->
|
|
918
|
+
<div class="section" id="network-section" hidden>
|
|
919
|
+
<div class="section-content" id="network-content">
|
|
920
|
+
<div class="stat-row">
|
|
921
|
+
<span class="stat-label">Edge URL</span>
|
|
922
|
+
<span class="stat-value" id="network-edge-url">-</span>
|
|
923
|
+
</div>
|
|
924
|
+
<div class="stat-row">
|
|
925
|
+
<span class="stat-label">Protocol</span>
|
|
926
|
+
<span class="stat-value" id="network-protocol">-</span>
|
|
927
|
+
</div>
|
|
928
|
+
<div class="stat-row">
|
|
929
|
+
<span class="stat-label">RTT</span>
|
|
930
|
+
<span class="stat-value" id="network-rtt">-</span>
|
|
931
|
+
</div>
|
|
932
|
+
<div class="stat-row">
|
|
933
|
+
<span class="stat-label">Estimated Bandwidth</span>
|
|
934
|
+
<span class="stat-value" id="network-estimated-bandwidth">-</span>
|
|
935
|
+
</div>
|
|
936
|
+
<div class="stat-row">
|
|
937
|
+
<span class="stat-label">Video Bit Rate</span>
|
|
938
|
+
<span class="stat-value" id="network-video-bitrate">-</span>
|
|
939
|
+
</div>
|
|
940
|
+
<div class="stat-row">
|
|
941
|
+
<span class="stat-label">Audio Bit Rate</span>
|
|
942
|
+
<span class="stat-value" id="network-audio-bitrate">-</span>
|
|
943
|
+
</div>
|
|
944
|
+
<div class="stat-row">
|
|
945
|
+
<span class="stat-label">Average Bit Rate</span>
|
|
946
|
+
<span class="stat-value" id="network-bitrate">-</span>
|
|
947
|
+
</div>
|
|
948
|
+
<div class="stat-row">
|
|
949
|
+
<span class="stat-label">Audio Jitter</span>
|
|
950
|
+
<span class="stat-value" id="network-audio-jitter">-</span>
|
|
951
|
+
</div>
|
|
952
|
+
<div class="stat-row">
|
|
953
|
+
<span class="stat-label">Video Jitter</span>
|
|
954
|
+
<span class="stat-value" id="network-video-jitter">-</span>
|
|
955
|
+
</div>
|
|
956
|
+
<div class="stat-row">
|
|
957
|
+
<span class="stat-label">Connect Success</span>
|
|
958
|
+
<span class="stat-value" id="network-connect-success">-</span>
|
|
959
|
+
</div>
|
|
960
|
+
<div class="stat-row">
|
|
961
|
+
<span class="stat-label">Reconnects/h</span>
|
|
962
|
+
<span class="stat-value" id="network-reconnects-per-hour">-</span>
|
|
963
|
+
</div>
|
|
964
|
+
</div>
|
|
965
|
+
</div>
|
|
966
|
+
|
|
967
|
+
<!-- Statistics Section -->
|
|
968
|
+
<div class="section" id="stats-section" hidden>
|
|
969
|
+
<div class="section-content" id="stats-content">
|
|
970
|
+
<div class="stat-row">
|
|
971
|
+
<span class="stat-label">SDK Version</span>
|
|
972
|
+
<span class="stat-value" id="sdk-version">-</span>
|
|
973
|
+
</div>
|
|
974
|
+
<div class="stat-row">
|
|
975
|
+
<span class="stat-label">Session ID</span>
|
|
976
|
+
<span class="stat-value" id="session-id">-</span>
|
|
977
|
+
</div>
|
|
978
|
+
<div class="stat-row">
|
|
979
|
+
<span class="stat-label">Client ID</span>
|
|
980
|
+
<span class="stat-value" id="client-id">-</span>
|
|
981
|
+
</div>
|
|
982
|
+
<div class="stat-row">
|
|
983
|
+
<span class="stat-label">Channel ID</span>
|
|
984
|
+
<span class="stat-value" id="channel-id">-</span>
|
|
985
|
+
</div>
|
|
986
|
+
<div class="stat-row">
|
|
987
|
+
<span class="stat-label">Channel Group ID</span>
|
|
988
|
+
<span class="stat-value" id="channel-group-id">-</span>
|
|
989
|
+
</div>
|
|
990
|
+
<div class="stat-row">
|
|
991
|
+
<span class="stat-label">Uptime</span>
|
|
992
|
+
<span class="stat-value" id="uptime">-</span>
|
|
993
|
+
</div>
|
|
994
|
+
<div class="stat-row">
|
|
995
|
+
<span class="stat-label">Time to First Frame</span>
|
|
996
|
+
<span class="stat-value" id="ttff">-</span>
|
|
997
|
+
</div>
|
|
998
|
+
<div class="stat-row">
|
|
999
|
+
<span class="stat-label">Connection State</span>
|
|
1000
|
+
<span class="stat-value" id="connection-state">-</span>
|
|
1001
|
+
</div>
|
|
1002
|
+
<div class="stat-row">
|
|
1003
|
+
<span class="stat-label">Playback State</span>
|
|
1004
|
+
<span class="stat-value" id="playback-state">-</span>
|
|
1005
|
+
</div>
|
|
1006
|
+
<button class="copy-btn" id="copy-stats" type="button">Copy Stats to Clipboard</button>
|
|
1007
|
+
</div>
|
|
1008
|
+
</div>
|
|
1009
|
+
|
|
1010
|
+
<!-- Events Section -->
|
|
1011
|
+
<div class="section" id="events-section" hidden>
|
|
1012
|
+
<div class="section-content" id="events-content">
|
|
1013
|
+
<div class="events-toolbar">
|
|
1014
|
+
<span class="events-count" id="events-count">0 events</span>
|
|
1015
|
+
<button class="events-btn" id="events-clear" type="button">Clear</button>
|
|
1016
|
+
<button class="events-btn" id="copy-events" type="button">Copy</button>
|
|
1017
|
+
</div>
|
|
1018
|
+
<div class="events-list" id="events-list" role="log" aria-live="polite" aria-relevant="additions text"></div>
|
|
1019
|
+
</div>
|
|
1020
|
+
</div>
|
|
1021
|
+
`;
|
|
1022
|
+
var fe = de, v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakSet(), pe = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), be = class extends HTMLElement {
|
|
1023
|
+
constructor() {
|
|
1024
|
+
super(), o(this, K), n(this, v, null), n(this, y, []), n(this, b, 2 ** 53 - 1), n(this, x, !0), n(this, S, !0), n(this, C, null), n(this, w, 1500), n(this, T, 0), n(this, E, null), n(this, D, !1), n(this, O, []), n(this, k, 0), n(this, A, !1), n(this, j, null), n(this, M, /* @__PURE__ */ new Map()), n(this, N, []), n(this, P, []), n(this, F, []), n(this, I, []), n(this, L, null), n(this, R, null), n(this, z, null), n(this, B, null), n(this, V, null), n(this, H, !1), n(this, U, null), n(this, W, null), n(this, G, null), n(this, pe, (e) => {
|
|
1025
|
+
let t = e === "disconnected" ? "warn" : "info";
|
|
1026
|
+
r(K, this, $).call(this, "Connection", `State: ${e}`, t);
|
|
1027
|
+
}), n(this, me, (e) => {
|
|
1028
|
+
r(K, this, $).call(this, "Playback", `State: ${e}`);
|
|
1029
|
+
}), n(this, he, (e) => {
|
|
1030
|
+
r(K, this, $).call(this, "Buffer", `${e}`, "warn");
|
|
1031
|
+
}), n(this, ge, (e) => {
|
|
1032
|
+
let t = e.isFatal() ? "Fatal" : "Non-fatal";
|
|
1033
|
+
r(K, this, $).call(this, "Error", `${t}: ${e.message} (${e.code()})`, e.isFatal() ? "error" : "warn");
|
|
1034
|
+
}), n(this, _e, (e) => {
|
|
1035
|
+
let t = e.video;
|
|
1036
|
+
if (t != null && t.width && t.height) {
|
|
1037
|
+
let e = r(K, this, et).call(this, t.frameRate), n = e ? ` @ ${e}fps` : "";
|
|
1038
|
+
r(K, this, $).call(this, "Quality", `Rendition: ${t.width}x${t.height}${n}`);
|
|
1039
|
+
}
|
|
1040
|
+
}), n(this, ve, (e) => {
|
|
1041
|
+
r(K, this, $).call(this, "Connection", `Channel ${e ? "live" : "offline"}`);
|
|
1042
|
+
}), n(this, ye, (e) => {
|
|
1043
|
+
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
1044
|
+
n || r || i || t === "Escape" && (e.preventDefault(), e.stopPropagation(), this.dispatchEvent(new CustomEvent(c.TOGGLE_DEBUG_PANEL, {
|
|
1045
|
+
bubbles: !0,
|
|
1046
|
+
composed: !0
|
|
1047
|
+
})));
|
|
1048
|
+
}), this.attachShadow({ mode: "open" }).appendChild(fe.content.cloneNode(!0));
|
|
1049
|
+
}
|
|
1050
|
+
connectedCallback() {
|
|
1051
|
+
var e;
|
|
1052
|
+
a(v, this, this.closest("vindral-controller")), (e = i(v, this)) == null || e.connectListener(this), this.tabIndex = -1, r(K, this, we).call(this), r(K, this, Te).call(this), r(K, this, Ee).call(this), r(K, this, Re).call(this), r(K, this, Ye).call(this), r(K, this, Ot).call(this), r(K, this, St).call(this), r(K, this, qe).call(this), this.setAttribute("data-density", "compact"), r(K, this, je).call(this), r(K, this, Ie).call(this), r(K, this, Le).call(this), r(K, this, Et).call(this), r(K, this, ot).call(this), this.addEventListener("keydown", i(ye, this)), this.addEventListener("dblclick", (e) => e.stopPropagation());
|
|
1053
|
+
}
|
|
1054
|
+
disconnectedCallback() {
|
|
1055
|
+
var e;
|
|
1056
|
+
(e = i(v, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", i(ye, this)), r(K, this, it).call(this), r(K, this, st).call(this), r(K, this, Fe).call(this), i(M, this).clear();
|
|
1057
|
+
}
|
|
1058
|
+
attributeChangedCallback(e, t, n) {
|
|
1059
|
+
if (t !== n) switch (e) {
|
|
1060
|
+
case s.DEBUG_PANEL_OPEN:
|
|
1061
|
+
n === null ? r(K, this, it).call(this) : (r(K, this, rt).call(this), this.focus({ preventScroll: !0 }));
|
|
1062
|
+
break;
|
|
1063
|
+
case s.TARGET_BUFFER_TIME:
|
|
1064
|
+
if (n) {
|
|
1065
|
+
let e = parseInt(n, 10);
|
|
1066
|
+
Number.isNaN(e) || (e !== i(w, this) && r(K, this, $).call(this, "Latency", `Target buffer set to ${e}ms`), a(w, this, e), r(K, this, Z).call(this));
|
|
1067
|
+
}
|
|
1068
|
+
break;
|
|
1069
|
+
case s.DRIFT:
|
|
1070
|
+
if (n) {
|
|
1071
|
+
let e = parseFloat(n);
|
|
1072
|
+
Number.isNaN(e) || (a(T, this, e), r(K, this, Je).call(this));
|
|
1073
|
+
}
|
|
1074
|
+
break;
|
|
1075
|
+
case s.RENDITION_LEVELS:
|
|
1076
|
+
if (n) try {
|
|
1077
|
+
let e = JSON.parse(n);
|
|
1078
|
+
Array.isArray(e) && (a(y, this, e), r(K, this, $e).call(this));
|
|
1079
|
+
} catch (e) {}
|
|
1080
|
+
break;
|
|
1081
|
+
case s.MAX_VIDEO_BITRATE:
|
|
1082
|
+
a(b, this, n ? parseInt(n, 10) : 2 ** 53 - 1), Number.isNaN(i(b, this)) && a(b, this, 2 ** 53 - 1), r(K, this, tt).call(this);
|
|
1083
|
+
break;
|
|
1084
|
+
case s.ABR_ENABLED:
|
|
1085
|
+
a(x, this, n !== null && n !== "false"), r(K, this, Ze).call(this), r(K, this, Qe).call(this);
|
|
1086
|
+
break;
|
|
1087
|
+
case s.SIZE_BASED_RESOLUTION_CAP_ENABLED:
|
|
1088
|
+
a(S, this, n !== null && n !== "false"), r(K, this, Qe).call(this);
|
|
1089
|
+
break;
|
|
1090
|
+
case s.RENDITION_LEVEL:
|
|
1091
|
+
if (n) try {
|
|
1092
|
+
var o;
|
|
1093
|
+
let e = JSON.parse(n), t = i(C, this);
|
|
1094
|
+
if (a(C, this, e), r(K, this, tt).call(this), t && (o = e.video) != null && o.width && e.video.height) {
|
|
1095
|
+
let n = t.video ? `${t.video.width}x${t.video.height}` : "?", i = `${e.video.width}x${e.video.height}`;
|
|
1096
|
+
n !== i && r(K, this, $).call(this, "Quality", `Switched: ${n} → ${i}`);
|
|
1097
|
+
}
|
|
1098
|
+
} catch (e) {}
|
|
1099
|
+
break;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
};
|
|
1103
|
+
function q(e) {
|
|
1104
|
+
if (!this.shadowRoot) return null;
|
|
1105
|
+
if (i(M, this).has(e)) return i(M, this).get(e);
|
|
1106
|
+
let t = this.shadowRoot.querySelector(e);
|
|
1107
|
+
return i(M, this).set(e, t), t;
|
|
1108
|
+
}
|
|
1109
|
+
function J(e, t) {
|
|
1110
|
+
!e || e.textContent === t || (e.textContent = t);
|
|
1111
|
+
}
|
|
1112
|
+
function xe() {
|
|
1113
|
+
var e, t, n, r, o, s, c;
|
|
1114
|
+
a(N, this, Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll("#latency-strip-target")) || [])), a(P, this, Array.from(((t = this.shadowRoot) == null ? void 0 : t.querySelectorAll("#latency-strip-decrease")) || [])), a(F, this, Array.from(((n = this.shadowRoot) == null ? void 0 : n.querySelectorAll("#latency-strip-increase")) || [])), a(I, this, Array.from(((r = this.shadowRoot) == null ? void 0 : r.querySelectorAll(".preset-btn[data-value]")) || [])), a(L, this, ((o = this.shadowRoot) == null ? void 0 : o.querySelector(".preset-btn[data-mode=\"dynamic\"]")) || null), a(R, this, ((s = i(L, this)) == null ? void 0 : s.querySelector(".dynamic-subtitle")) || null), a(z, this, ((c = i(L, this)) == null ? void 0 : c.querySelector(".dynamic-value")) || null);
|
|
1115
|
+
}
|
|
1116
|
+
function Se(e) {
|
|
1117
|
+
var t;
|
|
1118
|
+
let n = (t = this.shadowRoot) == null ? void 0 : t.querySelector(`.section#${e}`);
|
|
1119
|
+
return !!n && !n.hidden;
|
|
1120
|
+
}
|
|
1121
|
+
function Ce() {
|
|
1122
|
+
let e = `${i(O, this).length} event${i(O, this).length === 1 ? "" : "s"}`;
|
|
1123
|
+
r(K, this, J).call(this, i(V, this), e), r(K, this, Y).call(this, "events-section", String(i(O, this).length));
|
|
1124
|
+
}
|
|
1125
|
+
function we() {
|
|
1126
|
+
let e = r(K, this, q).call(this, ".close-btn");
|
|
1127
|
+
e == null || e.addEventListener("click", (e) => {
|
|
1128
|
+
e.stopPropagation(), this.dispatchEvent(new CustomEvent(c.TOGGLE_DEBUG_PANEL, {
|
|
1129
|
+
bubbles: !0,
|
|
1130
|
+
composed: !0
|
|
1131
|
+
}));
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
function Te() {
|
|
1135
|
+
var e;
|
|
1136
|
+
let t = Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section-tab[data-target]")) || []);
|
|
1137
|
+
t.length !== 0 && t.forEach((e) => {
|
|
1138
|
+
e.addEventListener("click", (t) => {
|
|
1139
|
+
t.stopPropagation();
|
|
1140
|
+
let n = e.getAttribute("data-target");
|
|
1141
|
+
n && r(K, this, X).call(this, n) && r(K, this, Oe).call(this, n);
|
|
1142
|
+
});
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
function Ee() {
|
|
1146
|
+
a(U, this, r(K, this, q).call(this, ".scroll-tabs-btn")), a(W, this, r(K, this, q).call(this, ".section-tabs-wrap")), a(G, this, r(K, this, q).call(this, ".section-tabs")), !(!i(U, this) || !i(G, this) || !i(W, this)) && (i(G, this).addEventListener("scroll", () => r(K, this, De).call(this), { passive: !0 }), i(U, this).addEventListener("click", (e) => {
|
|
1147
|
+
if (e.stopPropagation(), !i(G, this)) return;
|
|
1148
|
+
let { scrollLeft: t, scrollWidth: n, clientWidth: r } = i(G, this), a = t + r >= n - 4;
|
|
1149
|
+
i(G, this).scrollTo({
|
|
1150
|
+
left: a ? 0 : n,
|
|
1151
|
+
behavior: "smooth"
|
|
1152
|
+
});
|
|
1153
|
+
}), r(K, this, De).call(this));
|
|
1154
|
+
}
|
|
1155
|
+
function De() {
|
|
1156
|
+
if (!i(U, this) || !i(G, this) || !i(W, this)) return;
|
|
1157
|
+
let { scrollLeft: e, scrollWidth: t, clientWidth: n } = i(G, this), r = t > n + 4, a = e + n >= t - 4;
|
|
1158
|
+
i(U, this).setAttribute("data-visible", String(r)), i(U, this).innerHTML = a ? ue : le, i(W, this).toggleAttribute("data-can-scroll-right", r && !a);
|
|
1159
|
+
}
|
|
1160
|
+
function Oe(e) {
|
|
1161
|
+
let t = r(K, this, q).call(this, `.section#${e}`);
|
|
1162
|
+
t && r(K, this, ke).call(this, e, t.hidden);
|
|
1163
|
+
}
|
|
1164
|
+
function ke(e, t) {
|
|
1165
|
+
let n = r(K, this, q).call(this, `.section#${e}`);
|
|
1166
|
+
if (!n) return;
|
|
1167
|
+
let a = !n.hidden;
|
|
1168
|
+
n.hidden = !t;
|
|
1169
|
+
let o = r(K, this, q).call(this, `.section-tab[data-target="${e}"]`);
|
|
1170
|
+
o && (o.setAttribute("data-active", String(t)), o.setAttribute("aria-pressed", String(t)), !i(D, this) && a !== t && r(K, this, Fe).call(this), e === "events-section" && t && i(H, this) && r(K, this, Et).call(this, !0), r(K, this, Ae).call(this));
|
|
1171
|
+
}
|
|
1172
|
+
function Ae() {
|
|
1173
|
+
this.toggleAttribute("data-collapsed", r(K, this, Me).call(this).length === 0);
|
|
1174
|
+
}
|
|
1175
|
+
function je() {
|
|
1176
|
+
var e;
|
|
1177
|
+
Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section[id]")) || []).forEach((e) => {
|
|
1178
|
+
r(K, this, X).call(this, e.id) && r(K, this, ke).call(this, e.id, !e.hidden);
|
|
1179
|
+
});
|
|
1180
|
+
}
|
|
1181
|
+
function Y(e, t) {
|
|
1182
|
+
let n = r(K, this, q).call(this, `.section-badge[data-badge-for="${e}"]`);
|
|
1183
|
+
if (!n) return;
|
|
1184
|
+
r(K, this, J).call(this, n, t);
|
|
1185
|
+
let i = r(K, this, q).call(this, `.section-tab[data-target="${e}"]`);
|
|
1186
|
+
if (!i) return;
|
|
1187
|
+
let a = `${i.getAttribute("title") || e} section (${t})`;
|
|
1188
|
+
i.getAttribute("aria-label") !== a && i.setAttribute("aria-label", a);
|
|
1189
|
+
}
|
|
1190
|
+
function X(e) {
|
|
1191
|
+
return _.includes(e);
|
|
1192
|
+
}
|
|
1193
|
+
function Me() {
|
|
1194
|
+
var e;
|
|
1195
|
+
return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section[id]")) || []).filter((e) => r(K, this, X).call(this, e.id) && !e.hidden).map((e) => e.id);
|
|
1196
|
+
}
|
|
1197
|
+
function Ne() {
|
|
1198
|
+
var e;
|
|
1199
|
+
return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section-tab[data-target]")) || []).map((e) => e.getAttribute("data-target")).filter((e) => typeof e == "string" && r(K, this, X).call(this, e));
|
|
1200
|
+
}
|
|
1201
|
+
function Pe(e) {
|
|
1202
|
+
var t;
|
|
1203
|
+
let n = (t = this.shadowRoot) == null ? void 0 : t.querySelector(".section-tabs");
|
|
1204
|
+
if (!n || !this.shadowRoot) return;
|
|
1205
|
+
let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
1206
|
+
Array.from(n.querySelectorAll(".section-tab[data-target]")).forEach((e) => {
|
|
1207
|
+
let t = e.getAttribute("data-target");
|
|
1208
|
+
t && r(K, this, X).call(this, t) && i.set(t, e);
|
|
1209
|
+
}), _.forEach((e) => {
|
|
1210
|
+
var t;
|
|
1211
|
+
let n = (t = this.shadowRoot) == null ? void 0 : t.querySelector(`.section#${e}`);
|
|
1212
|
+
n && a.set(e, n);
|
|
1213
|
+
});
|
|
1214
|
+
let o = [...e, ..._.filter((t) => !e.includes(t))];
|
|
1215
|
+
o.forEach((e) => {
|
|
1216
|
+
let t = i.get(e);
|
|
1217
|
+
t && n.appendChild(t);
|
|
1218
|
+
}), o.forEach((e) => {
|
|
1219
|
+
let t = a.get(e);
|
|
1220
|
+
if (t) {
|
|
1221
|
+
var n;
|
|
1222
|
+
(n = this.shadowRoot) == null || n.appendChild(t);
|
|
1223
|
+
}
|
|
1224
|
+
});
|
|
1225
|
+
}
|
|
1226
|
+
function Fe() {
|
|
1227
|
+
if (!this.shadowRoot) return;
|
|
1228
|
+
let e = {
|
|
1229
|
+
version: 1,
|
|
1230
|
+
openSections: r(K, this, Me).call(this),
|
|
1231
|
+
sectionOrder: r(K, this, Ne).call(this)
|
|
1232
|
+
};
|
|
1233
|
+
try {
|
|
1234
|
+
sessionStorage.setItem(se, JSON.stringify(e));
|
|
1235
|
+
} catch (e) {}
|
|
1236
|
+
}
|
|
1237
|
+
function Ie() {
|
|
1238
|
+
let e = null;
|
|
1239
|
+
try {
|
|
1240
|
+
e = sessionStorage.getItem(se);
|
|
1241
|
+
} catch (e) {
|
|
1242
|
+
return;
|
|
1243
|
+
}
|
|
1244
|
+
if (!e) return;
|
|
1245
|
+
let t = null;
|
|
1246
|
+
try {
|
|
1247
|
+
t = JSON.parse(e);
|
|
1248
|
+
} catch (e) {
|
|
1249
|
+
return;
|
|
1250
|
+
}
|
|
1251
|
+
if (!t || typeof t != "object") return;
|
|
1252
|
+
let n = Array.isArray(t.openSections) ? t.openSections.filter((e) => typeof e == "string" && r(K, this, X).call(this, e)) : [], i = Array.isArray(t.sectionOrder) ? t.sectionOrder.filter((e) => typeof e == "string" && r(K, this, X).call(this, e)) : [];
|
|
1253
|
+
a(D, this, !0);
|
|
1254
|
+
try {
|
|
1255
|
+
if (i.length > 0 && r(K, this, Pe).call(this, i), Array.isArray(t.openSections)) {
|
|
1256
|
+
let e = new Set(n);
|
|
1257
|
+
_.forEach((t) => {
|
|
1258
|
+
r(K, this, ke).call(this, t, e.has(t));
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
r(K, this, je).call(this);
|
|
1262
|
+
} finally {
|
|
1263
|
+
a(D, this, !1);
|
|
1264
|
+
}
|
|
1265
|
+
r(K, this, Fe).call(this);
|
|
1266
|
+
}
|
|
1267
|
+
function Le() {
|
|
1268
|
+
r(K, this, Y).call(this, "latency-section", "Drift -"), r(K, this, Y).call(this, "quality-section", "Auto"), r(K, this, Y).call(this, "playback-section", "Buffer -"), r(K, this, Y).call(this, "network-section", "RTT -"), r(K, this, Y).call(this, "stats-section", "Up -"), r(K, this, Y).call(this, "events-section", `${i(O, this).length}`);
|
|
1269
|
+
}
|
|
1270
|
+
function Re() {
|
|
1271
|
+
r(K, this, xe).call(this), i(P, this).forEach((e) => {
|
|
1272
|
+
e.addEventListener("click", (e) => {
|
|
1273
|
+
e.stopPropagation(), r(K, this, Be).call(this, -r(K, this, ze).call(this, !1));
|
|
1274
|
+
});
|
|
1275
|
+
}), i(F, this).forEach((e) => {
|
|
1276
|
+
e.addEventListener("click", (e) => {
|
|
1277
|
+
e.stopPropagation(), r(K, this, Be).call(this, r(K, this, ze).call(this, !0));
|
|
1278
|
+
});
|
|
1279
|
+
});
|
|
1280
|
+
}
|
|
1281
|
+
function ze(e) {
|
|
1282
|
+
let t = i(w, this);
|
|
1283
|
+
return e ? t >= 1e3 ? 250 : t >= 500 ? 100 : 50 : t > 1e3 ? 250 : t > 500 ? 100 : 50;
|
|
1284
|
+
}
|
|
1285
|
+
function Be(e) {
|
|
1286
|
+
let t = Math.max(50, Math.min(u, i(w, this) + e));
|
|
1287
|
+
t !== i(w, this) && (a(w, this, t), r(K, this, Ve).call(this, t), r(K, this, Ue).call(this), r(K, this, Z).call(this));
|
|
1288
|
+
}
|
|
1289
|
+
function Ve(e) {
|
|
1290
|
+
if (!i(v, this)) return;
|
|
1291
|
+
let { isDynamic: t, minBuffer: n, maxBuffer: a } = r(K, this, He).call(this);
|
|
1292
|
+
t && (e < n ? i(v, this).setAttribute("min-buffer-time", String(e)) : e > a && i(v, this).setAttribute("max-buffer-time", String(e)));
|
|
1293
|
+
}
|
|
1294
|
+
function He() {
|
|
1295
|
+
var e, t;
|
|
1296
|
+
let n = (e = i(v, this)) == null ? void 0 : e.getAttribute("min-buffer-time"), r = (t = i(v, this)) == null ? void 0 : t.getAttribute("max-buffer-time");
|
|
1297
|
+
if (!n || !r) return {
|
|
1298
|
+
isDynamic: !1,
|
|
1299
|
+
minBuffer: 0,
|
|
1300
|
+
maxBuffer: 0
|
|
1301
|
+
};
|
|
1302
|
+
let a = Number(n), o = Number(r);
|
|
1303
|
+
return Number.isNaN(a) || Number.isNaN(o) ? {
|
|
1304
|
+
isDynamic: !1,
|
|
1305
|
+
minBuffer: 0,
|
|
1306
|
+
maxBuffer: 0
|
|
1307
|
+
} : {
|
|
1308
|
+
isDynamic: a !== o,
|
|
1309
|
+
minBuffer: a,
|
|
1310
|
+
maxBuffer: o
|
|
1311
|
+
};
|
|
1312
|
+
}
|
|
1313
|
+
function Ue() {
|
|
1314
|
+
this.dispatchEvent(new CustomEvent(c.SET_TARGET_BUFFER_TIME, {
|
|
1315
|
+
bubbles: !0,
|
|
1316
|
+
composed: !0,
|
|
1317
|
+
detail: i(w, this)
|
|
1318
|
+
}));
|
|
1319
|
+
}
|
|
1320
|
+
function We(e) {
|
|
1321
|
+
if (r(K, this, He).call(this).isDynamic) {
|
|
1322
|
+
r(K, this, Ke).call(this, e), r(K, this, Z).call(this);
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1325
|
+
a(w, this, e), r(K, this, Ue).call(this), r(K, this, Z).call(this);
|
|
1326
|
+
}
|
|
1327
|
+
function Ge() {
|
|
1328
|
+
if (r(K, this, He).call(this).isDynamic || !i(v, this)) return;
|
|
1329
|
+
let e = Math.max(50, Math.min(u, i(w, this))), t = Math.max(50, e - 100), n = Math.min(u, e + 100);
|
|
1330
|
+
t === n && n < 5e3 ? n = Math.min(u, n + 100) : t === n && t > 50 && (t = Math.max(50, t - 100)), i(v, this).setAttribute("min-buffer-time", String(t)), i(v, this).setAttribute("max-buffer-time", String(n)), r(K, this, Ue).call(this), r(K, this, Z).call(this);
|
|
1331
|
+
}
|
|
1332
|
+
function Ke(e) {
|
|
1333
|
+
if (!i(v, this)) return;
|
|
1334
|
+
let t = Math.max(50, Math.min(u, e));
|
|
1335
|
+
a(w, this, t);
|
|
1336
|
+
let n = String(t);
|
|
1337
|
+
i(v, this).setAttribute("min-buffer-time", n), i(v, this).setAttribute("max-buffer-time", n), r(K, this, Ue).call(this);
|
|
1338
|
+
}
|
|
1339
|
+
function qe() {
|
|
1340
|
+
let e = r(K, this, q).call(this, "#latency-presets");
|
|
1341
|
+
if (!e) return;
|
|
1342
|
+
e.innerHTML = "", g.forEach((t) => {
|
|
1343
|
+
let n = document.createElement("button");
|
|
1344
|
+
n.className = "preset-btn", n.type = "button", n.setAttribute("data-value", String(t.value)), n.setAttribute("aria-label", `${t.label} preset (${t.value}ms)`);
|
|
1345
|
+
let i = document.createElement("span");
|
|
1346
|
+
i.className = "preset-title", i.textContent = t.label, n.appendChild(i);
|
|
1347
|
+
let a = document.createElement("span");
|
|
1348
|
+
a.className = "preset-subtitle", a.textContent = t.description, n.appendChild(a);
|
|
1349
|
+
let o = document.createElement("span");
|
|
1350
|
+
o.className = "preset-value", o.textContent = `${t.value}ms`, n.appendChild(o), n.addEventListener("click", (e) => {
|
|
1351
|
+
e.stopPropagation(), r(K, this, We).call(this, t.value);
|
|
1352
|
+
}), e.appendChild(n);
|
|
1353
|
+
});
|
|
1354
|
+
let t = document.createElement("button");
|
|
1355
|
+
t.type = "button", t.className = "preset-btn dynamic-btn", t.setAttribute("data-mode", "dynamic"), t.setAttribute("aria-label", "Enable dynamic buffer mode");
|
|
1356
|
+
let n = document.createElement("span");
|
|
1357
|
+
n.className = "preset-title", n.textContent = "Dynamic", t.appendChild(n);
|
|
1358
|
+
let i = document.createElement("span");
|
|
1359
|
+
i.className = "preset-subtitle dynamic-subtitle", t.appendChild(i);
|
|
1360
|
+
let a = document.createElement("span");
|
|
1361
|
+
a.className = "preset-value dynamic-value", t.appendChild(a), t.addEventListener("click", (e) => {
|
|
1362
|
+
e.stopPropagation(), r(K, this, Ge).call(this);
|
|
1363
|
+
}), e.appendChild(t), r(K, this, xe).call(this), r(K, this, Z).call(this);
|
|
1364
|
+
}
|
|
1365
|
+
function Z() {
|
|
1366
|
+
i(N, this).length === 0 && r(K, this, xe).call(this);
|
|
1367
|
+
let { isDynamic: e, minBuffer: t, maxBuffer: n } = r(K, this, He).call(this);
|
|
1368
|
+
if (i(N, this).forEach((e) => {
|
|
1369
|
+
r(K, this, J).call(this, e, `${i(w, this)}ms`);
|
|
1370
|
+
}), i(P, this).forEach((e) => {
|
|
1371
|
+
e.disabled = i(w, this) <= 50;
|
|
1372
|
+
}), i(F, this).forEach((e) => {
|
|
1373
|
+
e.disabled = i(w, this) >= u;
|
|
1374
|
+
}), i(L, this) && i(L, this).setAttribute("data-active", String(e)), i(R, this) && r(K, this, J).call(this, i(R, this), e ? `${t}ms - ${n}ms` : ae), i(z, this) && r(K, this, J).call(this, i(z, this), e ? "range" : ""), i(I, this).length === 0) return;
|
|
1375
|
+
let a = null;
|
|
1376
|
+
if (!e) {
|
|
1377
|
+
let e = g.find((e) => e.value === i(w, this)), t = oe(i(w, this)), n = g.reduce((e, t) => Math.abs(t.value - i(w, this)) < Math.abs(e.value - i(w, this)) ? t : e);
|
|
1378
|
+
a = e || t || n;
|
|
1379
|
+
}
|
|
1380
|
+
i(I, this).forEach((t) => {
|
|
1381
|
+
let n = parseInt(t.getAttribute("data-value") || "0", 10), r = !e && (a == null ? void 0 : a.value) === n;
|
|
1382
|
+
t.setAttribute("data-active", String(r));
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
function Je() {
|
|
1386
|
+
let e = r(K, this, q).call(this, "#current-drift"), t = `${i(T, this).toFixed(1)}ms`;
|
|
1387
|
+
if (e) {
|
|
1388
|
+
r(K, this, J).call(this, e, t);
|
|
1389
|
+
let n = Math.abs(i(T, this));
|
|
1390
|
+
n > 200 ? e.setAttribute("data-status", "error") : n > 100 ? e.setAttribute("data-status", "warning") : e.setAttribute("data-status", "good");
|
|
1391
|
+
}
|
|
1392
|
+
let n = i(T, this) > 0 ? `+${t}` : t;
|
|
1393
|
+
r(K, this, Y).call(this, "latency-section", `Drift ${n}`);
|
|
1394
|
+
}
|
|
1395
|
+
function Ye() {
|
|
1396
|
+
let e = r(K, this, q).call(this, "#abr-auto-btn"), t = r(K, this, q).call(this, "#abr-fixed-btn");
|
|
1397
|
+
e == null || e.addEventListener("click", (e) => {
|
|
1398
|
+
e.stopPropagation(), a(x, this, !0), r(K, this, Ze).call(this), this.dispatchEvent(new CustomEvent(c.SET_ABR_MODE, {
|
|
1399
|
+
bubbles: !0,
|
|
1400
|
+
composed: !0,
|
|
1401
|
+
detail: !0
|
|
1402
|
+
})), r(K, this, $).call(this, "Quality", "ABR mode: Auto");
|
|
1403
|
+
}), t == null || t.addEventListener("click", (e) => {
|
|
1404
|
+
e.stopPropagation();
|
|
1405
|
+
let t = r(K, this, Xe).call(this);
|
|
1406
|
+
t && this.dispatchEvent(new CustomEvent(c.SET_RENDITION, {
|
|
1407
|
+
bubbles: !0,
|
|
1408
|
+
composed: !0,
|
|
1409
|
+
detail: t
|
|
1410
|
+
})), a(x, this, !1), r(K, this, Ze).call(this), this.dispatchEvent(new CustomEvent(c.SET_ABR_MODE, {
|
|
1411
|
+
bubbles: !0,
|
|
1412
|
+
composed: !0,
|
|
1413
|
+
detail: !1
|
|
1414
|
+
})), r(K, this, $).call(this, "Quality", "ABR mode: Fixed");
|
|
1415
|
+
});
|
|
1416
|
+
let n = r(K, this, q).call(this, "#size-cap-toggle");
|
|
1417
|
+
n == null || n.addEventListener("click", (e) => {
|
|
1418
|
+
e.stopPropagation(), a(S, this, !i(S, this)), r(K, this, Qe).call(this), this.dispatchEvent(new CustomEvent(c.SET_SIZE_BASED_RESOLUTION_CAP_MODE, {
|
|
1419
|
+
bubbles: !0,
|
|
1420
|
+
composed: !0,
|
|
1421
|
+
detail: i(S, this)
|
|
1422
|
+
})), r(K, this, $).call(this, "Quality", `Size cap: ${i(S, this) ? "On" : "Off"}`);
|
|
1423
|
+
});
|
|
1424
|
+
}
|
|
1425
|
+
function Xe() {
|
|
1426
|
+
let e = [...i(y, this)].sort((e, t) => {
|
|
1427
|
+
var n, r;
|
|
1428
|
+
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
1429
|
+
});
|
|
1430
|
+
return e.find((e) => {
|
|
1431
|
+
var t;
|
|
1432
|
+
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= i(b, this);
|
|
1433
|
+
}) || e[e.length - 1] || null;
|
|
1434
|
+
}
|
|
1435
|
+
function Ze() {
|
|
1436
|
+
let e = r(K, this, q).call(this, "#abr-auto-btn"), t = r(K, this, q).call(this, "#abr-fixed-btn"), n = r(K, this, q).call(this, "#quality-status-text");
|
|
1437
|
+
e == null || e.setAttribute("data-active", String(i(x, this))), t == null || t.setAttribute("data-active", String(!i(x, this))), n && r(K, this, J).call(this, n, i(x, this) ? "Select maximum allowed quality" : "Select specific quality (may cause buffering)"), r(K, this, tt).call(this);
|
|
1438
|
+
}
|
|
1439
|
+
function Qe() {
|
|
1440
|
+
let e = r(K, this, q).call(this, "#size-cap-toggle");
|
|
1441
|
+
e && (e.textContent = i(S, this) ? "On" : "Off", e.setAttribute("data-active", String(i(S, this))), e.disabled = !i(x, this));
|
|
1442
|
+
}
|
|
1443
|
+
function $e() {
|
|
1444
|
+
var e;
|
|
1445
|
+
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#quality-menu");
|
|
1446
|
+
t && (t.innerHTML = "", i(y, this).sort((e, t) => {
|
|
1447
|
+
var n, r;
|
|
1448
|
+
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
1449
|
+
}).forEach((e) => {
|
|
1450
|
+
var n, i, a, o, s, l, ee;
|
|
1451
|
+
let u = document.createElement("button");
|
|
1452
|
+
u.className = "quality-item", u.type = "button", u.setAttribute("data-id", String(((n = e.video) == null ? void 0 : n.id) || 0)), u.setAttribute("data-bitrate", String(((i = e.video) == null ? void 0 : i.bitRate) || 0)), u.setAttribute("aria-label", e.video ? `Set quality to ${ne(e.video)}` : "Set quality");
|
|
1453
|
+
let d = document.createElement("div");
|
|
1454
|
+
d.className = "quality-item-info";
|
|
1455
|
+
let f = document.createElement("span");
|
|
1456
|
+
f.className = "quality-item-title", f.textContent = e.video ? ne(e.video) : "";
|
|
1457
|
+
let p = document.createElement("span");
|
|
1458
|
+
p.className = "quality-item-subtitle";
|
|
1459
|
+
let m = r(K, this, et).call(this, (a = e.video) == null ? void 0 : a.frameRate), re = m ? `, ${m}fps` : "";
|
|
1460
|
+
p.textContent = `${te(((o = (s = e.video) == null ? void 0 : s.bitRate) == null ? 0 : o) + ((l = (ee = e.audio) == null ? void 0 : ee.bitRate) == null ? 0 : l))}${re}`, d.appendChild(f), d.appendChild(p), u.appendChild(d);
|
|
1461
|
+
let h = document.createElement("span");
|
|
1462
|
+
h.className = "quality-current-label", h.textContent = "Current", u.appendChild(h), u.addEventListener("click", (t) => {
|
|
1463
|
+
t.stopPropagation(), this.dispatchEvent(new CustomEvent(c.SET_RENDITION, {
|
|
1464
|
+
bubbles: !0,
|
|
1465
|
+
composed: !0,
|
|
1466
|
+
detail: e
|
|
1467
|
+
}));
|
|
1468
|
+
let n = e.video ? ne(e.video) : "unknown";
|
|
1469
|
+
r(K, this, $).call(this, "Quality", `Selected: ${n}`);
|
|
1470
|
+
}), t.appendChild(u);
|
|
1471
|
+
}), r(K, this, tt).call(this));
|
|
1472
|
+
}
|
|
1473
|
+
function et(e) {
|
|
1474
|
+
return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
|
|
1475
|
+
}
|
|
1476
|
+
function tt() {
|
|
1477
|
+
var e, t, n;
|
|
1478
|
+
let a = (e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".quality-item"), o = (t = i(C, this)) == null || (t = t.video) == null ? void 0 : t.id, s = i(b, this), c = r(K, this, nt).call(this, a, s);
|
|
1479
|
+
a == null || a.forEach((e) => {
|
|
1480
|
+
let t = parseInt(e.getAttribute("data-id") || "0", 10), n = parseInt(e.getAttribute("data-bitrate") || "0", 10);
|
|
1481
|
+
e.setAttribute("data-playing", String(t === o));
|
|
1482
|
+
let r = c !== null && n === c;
|
|
1483
|
+
e.setAttribute("data-selected", String(r)), e.setAttribute("aria-pressed", String(r)), i(x, this) ? e.setAttribute("data-capped", String(n > s)) : e.removeAttribute("data-capped");
|
|
1484
|
+
});
|
|
1485
|
+
let l = (n = i(C, this)) == null ? void 0 : n.video;
|
|
1486
|
+
if (l != null && l.width && l.height) {
|
|
1487
|
+
r(K, this, Y).call(this, "quality-section", `${l.width}x${l.height}`);
|
|
1488
|
+
return;
|
|
1489
|
+
}
|
|
1490
|
+
if (typeof c == "number" && c > 0) {
|
|
1491
|
+
r(K, this, Y).call(this, "quality-section", te(c, 1));
|
|
1492
|
+
return;
|
|
1493
|
+
}
|
|
1494
|
+
r(K, this, Y).call(this, "quality-section", i(x, this) ? "Auto" : "Fixed");
|
|
1495
|
+
}
|
|
1496
|
+
function nt(e, t) {
|
|
1497
|
+
var n;
|
|
1498
|
+
if (!(e != null && e.length)) return null;
|
|
1499
|
+
let r = null, i = null;
|
|
1500
|
+
return e.forEach((e) => {
|
|
1501
|
+
let n = parseInt(e.getAttribute("data-bitrate") || "0", 10);
|
|
1502
|
+
Number.isNaN(n) || ((i === null || n < i) && (i = n), n <= t && (r === null || n > r) && (r = n));
|
|
1503
|
+
}), (n = r) == null ? i : n;
|
|
1504
|
+
}
|
|
1505
|
+
function rt() {
|
|
1506
|
+
r(K, this, it).call(this), r(K, this, ot).call(this), r(K, this, at).call(this), a(E, this, window.setInterval(() => r(K, this, at).call(this), 1e3));
|
|
1507
|
+
}
|
|
1508
|
+
function it() {
|
|
1509
|
+
i(E, this) !== null && (clearInterval(i(E, this)), a(E, this, null));
|
|
1510
|
+
}
|
|
1511
|
+
function at() {
|
|
1512
|
+
var e;
|
|
1513
|
+
let t = (e = i(v, this)) == null ? void 0 : e.instance;
|
|
1514
|
+
if (t) try {
|
|
1515
|
+
let e = t.getStatistics();
|
|
1516
|
+
r(K, this, Z).call(this), r(K, this, Q).call(this, "#sdk-version", e.version || "-"), r(K, this, Q).call(this, "#session-id", e.sessionId || "-"), r(K, this, Q).call(this, "#client-id", e.clientId || "-"), r(K, this, Q).call(this, "#channel-id", e.channelId || "-"), r(K, this, Q).call(this, "#channel-group-id", e.channelGroupId || "-"), r(K, this, Q).call(this, "#uptime", r(K, this, ct).call(this, e.uptime)), r(K, this, Q).call(this, "#ttff", e.timeToFirstFrame ? `${e.timeToFirstFrame}ms` : "-"), r(K, this, Q).call(this, "#connection-state", t.connectionState || "-"), r(K, this, Q).call(this, "#playback-state", t.playbackState || "-");
|
|
1517
|
+
let n = typeof t.playbackLatency == "number" ? `${Math.round(t.playbackLatency)}ms` : "-";
|
|
1518
|
+
r(K, this, Q).call(this, "#playback-latency", n), r(K, this, Q).call(this, "#average-drift", r(K, this, lt).call(this, e.averageDrift, 1));
|
|
1519
|
+
let o = `${Math.max(0, t.bufferFullness * 100).toFixed(0)}%`;
|
|
1520
|
+
if (r(K, this, Q).call(this, "#playback-buffer-fullness", o), r(K, this, Y).call(this, "playback-section", `Buffer ${o}`), r(K, this, Q).call(this, "#playback-last-buffer-event", t.lastBufferEvent || "-"), r(K, this, Q).call(this, "#playback-buffering-events", typeof e.bufferingEventsCount == "number" ? e.bufferingEventsCount.toString() : "-"), r(K, this, Q).call(this, "#playback-buffering-ratio", r(K, this, ut).call(this, e.bufferingRatio)), r(K, this, Q).call(this, "#playback-time-spent-buffering", r(K, this, ct).call(this, t.timeSpentBuffering)), r(K, this, Q).call(this, "#playback-rendition-changes", r(K, this, pt).call(this, e.renditionLevelChangeCount, e.renditionChangesPerMinute)), r(K, this, Q).call(this, "#playback-seek-adjustments-rate", r(K, this, ft).call(this, e.seekAdjustmentsPerMinute, "min")), r(K, this, Q).call(this, "#playback-timeshift-adjustments-rate", r(K, this, ft).call(this, e.timeshiftAdjustmentsPerMinute, "min")), r(K, this, Q).call(this, "#playback-current-rendition", r(K, this, yt).call(this, e)), r(K, this, Q).call(this, "#playback-codecs", r(K, this, bt).call(this, e)), r(K, this, Q).call(this, "#playback-frame-drops", r(K, this, xt).call(this, e)), e.edgeUrl) try {
|
|
1521
|
+
r(K, this, Q).call(this, "#network-edge-url", new URL(e.edgeUrl).hostname);
|
|
1522
|
+
} catch (t) {
|
|
1523
|
+
r(K, this, Q).call(this, "#network-edge-url", e.edgeUrl);
|
|
1524
|
+
}
|
|
1525
|
+
else r(K, this, Q).call(this, "#network-edge-url", "-");
|
|
1526
|
+
r(K, this, Q).call(this, "#network-protocol", r(K, this, mt).call(this, e.connectionProtocol));
|
|
1527
|
+
let s = r(K, this, ht).call(this, e.rtt);
|
|
1528
|
+
r(K, this, Q).call(this, "#network-rtt", s), r(K, this, Q).call(this, "#network-estimated-bandwidth", r(K, this, dt).call(this, e.estimatedBandwidth)), r(K, this, Q).call(this, "#network-video-bitrate", r(K, this, dt).call(this, e.videoBitRate)), r(K, this, Q).call(this, "#network-audio-bitrate", r(K, this, dt).call(this, e.audioBitRate)), r(K, this, Q).call(this, "#network-bitrate", r(K, this, dt).call(this, e.averageBitRate)), r(K, this, Q).call(this, "#network-audio-jitter", r(K, this, _t).call(this, e.audioJitter)), r(K, this, Q).call(this, "#network-video-jitter", r(K, this, _t).call(this, e.videoJitter)), r(K, this, Q).call(this, "#network-connect-success", r(K, this, vt).call(this, e.connectCount, e.connectionAttemptCount, e.connectionSuccessRatio)), r(K, this, Q).call(this, "#network-reconnects-per-hour", r(K, this, ft).call(this, e.reconnectsPerHour, "h")), r(K, this, Y).call(this, "network-section", r(K, this, gt).call(this, e.rtt));
|
|
1529
|
+
let c = r(K, this, ct).call(this, e.uptime);
|
|
1530
|
+
r(K, this, Y).call(this, "stats-section", c === "-" ? "Up -" : `Up ${c}`), i(A, this) && (a(A, this, !1), r(K, this, $).call(this, "System", "Statistics stream recovered"));
|
|
1531
|
+
} catch (e) {
|
|
1532
|
+
i(A, this) || (a(A, this, !0), r(K, this, $).call(this, "System", "Failed to read statistics", "error"));
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
function ot() {
|
|
1536
|
+
var e;
|
|
1537
|
+
let t = (e = i(v, this)) == null ? void 0 : e.instance;
|
|
1538
|
+
!t || i(j, this) === t || (r(K, this, st).call(this), a(j, this, t), t.on("connection state", i(pe, this)), t.on("playback state", i(me, this)), t.on("buffer state event", i(he, this)), t.on("error", i(ge, this)), t.on("rendition level", i(_e, this)), t.on("is live", i(ve, this)));
|
|
1539
|
+
}
|
|
1540
|
+
function st() {
|
|
1541
|
+
let e = i(j, this);
|
|
1542
|
+
e && (e.off("connection state", i(pe, this)), e.off("playback state", i(me, this)), e.off("buffer state event", i(he, this)), e.off("error", i(ge, this)), e.off("rendition level", i(_e, this)), e.off("is live", i(ve, this)), a(j, this, null));
|
|
1543
|
+
}
|
|
1544
|
+
function Q(e, t) {
|
|
1545
|
+
r(K, this, J).call(this, r(K, this, q).call(this, e), t);
|
|
1546
|
+
}
|
|
1547
|
+
function ct(e) {
|
|
1548
|
+
if (!e) return "-";
|
|
1549
|
+
let t = Math.floor(e / 1e3), n = Math.floor(t / 60), r = Math.floor(n / 60);
|
|
1550
|
+
return r > 0 ? `${r}h ${n % 60}m ${t % 60}s` : n > 0 ? `${n}m ${t % 60}s` : `${t}s`;
|
|
1551
|
+
}
|
|
1552
|
+
function lt(e, t = 0) {
|
|
1553
|
+
return typeof e != "number" || Number.isNaN(e) ? "-" : `${e.toFixed(t)}ms`;
|
|
1554
|
+
}
|
|
1555
|
+
function ut(e, t = 1) {
|
|
1556
|
+
return typeof e != "number" || Number.isNaN(e) ? "-" : `${(e * 100).toFixed(t)}%`;
|
|
1557
|
+
}
|
|
1558
|
+
function dt(e) {
|
|
1559
|
+
return typeof e != "number" || e <= 0 || Number.isNaN(e) ? "-" : te(e, 2);
|
|
1560
|
+
}
|
|
1561
|
+
function ft(e, t) {
|
|
1562
|
+
return typeof e != "number" || Number.isNaN(e) ? "-" : `${e.toFixed(2)}/${t}`;
|
|
1563
|
+
}
|
|
1564
|
+
function pt(e, t) {
|
|
1565
|
+
return typeof e == "number" ? typeof t != "number" || Number.isNaN(t) ? e.toString() : `${e} (${t.toFixed(2)}/min)` : "-";
|
|
1566
|
+
}
|
|
1567
|
+
function mt(e) {
|
|
1568
|
+
switch (e) {
|
|
1569
|
+
case "moq": return "MoQ (WebTransport)";
|
|
1570
|
+
case "moq_ws": return "MoQ (WebSocket)";
|
|
1571
|
+
case "vindral_ws": return "Vindral WS";
|
|
1572
|
+
default: return "-";
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
function ht(e) {
|
|
1576
|
+
return e ? `${e.last.toFixed(1)}ms (avg ${e.average.toFixed(1)})` : "-";
|
|
1577
|
+
}
|
|
1578
|
+
function gt(e) {
|
|
1579
|
+
return !e || typeof e.last != "number" ? "RTT -" : `RTT ${Math.round(e.last)}ms`;
|
|
1580
|
+
}
|
|
1581
|
+
function _t(e) {
|
|
1582
|
+
return e ? `${e.last}ms (avg ${e.average}, max ${e.max})` : "-";
|
|
1583
|
+
}
|
|
1584
|
+
function vt(e, t, n) {
|
|
1585
|
+
return typeof t != "number" || t <= 0 ? "-" : `${typeof e == "number" ? e : 0}/${t} (${typeof n == "number" ? `${(n * 100).toFixed(0)}%` : "-"})`;
|
|
1586
|
+
}
|
|
1587
|
+
function yt(e) {
|
|
1588
|
+
if (!(typeof e.videoWidth == "number" && typeof e.videoHeight == "number")) return e.audioCodec ? "Audio only" : "-";
|
|
1589
|
+
let t = r(K, this, et).call(this, e.frameRate), n = t ? ` @ ${t}fps` : "";
|
|
1590
|
+
return `${e.videoWidth}x${e.videoHeight}${n}`;
|
|
1591
|
+
}
|
|
1592
|
+
function bt(e) {
|
|
1593
|
+
return [e.videoCodec ? `V: ${e.videoCodec}` : "", e.audioCodec ? `A: ${e.audioCodec}` : ""].filter(Boolean).join(" / ") || "-";
|
|
1594
|
+
}
|
|
1595
|
+
function xt(e) {
|
|
1596
|
+
let t = typeof e.droppedVideoFrames == "number" ? e.droppedVideoFrames : typeof e.rendererDroppedFrameCount == "number" ? e.rendererDroppedFrameCount : void 0, n = typeof e.totalVideoFrames == "number" ? e.totalVideoFrames : typeof e.renderedFrameCount == "number" && typeof e.rendererDroppedFrameCount == "number" ? e.renderedFrameCount + e.rendererDroppedFrameCount : void 0;
|
|
1597
|
+
return typeof t != "number" || typeof n != "number" || n <= 0 ? "-" : `${t}/${n} (${(t / n * 100).toFixed(1)}%)`;
|
|
1598
|
+
}
|
|
1599
|
+
function St() {
|
|
1600
|
+
var e = this;
|
|
1601
|
+
let n = r(K, this, q).call(this, "#events-clear"), o = r(K, this, q).call(this, "#copy-events");
|
|
1602
|
+
a(B, this, r(K, this, q).call(this, "#events-list")), a(V, this, r(K, this, q).call(this, "#events-count")), n == null || n.addEventListener("click", (e) => {
|
|
1603
|
+
e.stopPropagation(), a(O, this, []), r(K, this, Et).call(this, !0);
|
|
1604
|
+
}), o == null || o.addEventListener("click", function() {
|
|
1605
|
+
var n = t(function* (t) {
|
|
1606
|
+
t.stopPropagation();
|
|
1607
|
+
let n = JSON.stringify(i(O, e).map((e) => d(d({}, e), {}, { isoTimestamp: new Date(e.timestamp).toISOString() })), null, 2);
|
|
1608
|
+
try {
|
|
1609
|
+
yield navigator.clipboard.writeText(n), o.textContent = "Copied", setTimeout(() => {
|
|
1610
|
+
o.textContent = "Copy";
|
|
1611
|
+
}, 2e3);
|
|
1612
|
+
} catch (e) {
|
|
1613
|
+
o.textContent = "Copy unavailable", setTimeout(() => {
|
|
1614
|
+
o.textContent = "Copy";
|
|
1615
|
+
}, 2e3);
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
return function(e) {
|
|
1619
|
+
return n.apply(this, arguments);
|
|
1620
|
+
};
|
|
1621
|
+
}());
|
|
1622
|
+
}
|
|
1623
|
+
function $(e, t, n = "info") {
|
|
1624
|
+
a(k, this, i(k, this) + 1);
|
|
1625
|
+
let o = {
|
|
1626
|
+
id: i(k, this),
|
|
1627
|
+
timestamp: Date.now(),
|
|
1628
|
+
category: e,
|
|
1629
|
+
message: t,
|
|
1630
|
+
level: n
|
|
1631
|
+
};
|
|
1632
|
+
if (i(O, this).push(o), i(O, this).length > 250 && i(O, this).splice(0, i(O, this).length - 250), r(K, this, Ce).call(this), r(K, this, Se).call(this, "events-section")) {
|
|
1633
|
+
r(K, this, wt).call(this, o), r(K, this, Tt).call(this);
|
|
1634
|
+
return;
|
|
1635
|
+
}
|
|
1636
|
+
a(H, this, !0);
|
|
1637
|
+
}
|
|
1638
|
+
function Ct(e) {
|
|
1639
|
+
let t = document.createElement("div");
|
|
1640
|
+
t.className = "event-row", t.setAttribute("data-level", e.level);
|
|
1641
|
+
let n = document.createElement("span");
|
|
1642
|
+
n.className = "event-time", n.textContent = r(K, this, Dt).call(this, e.timestamp);
|
|
1643
|
+
let i = document.createElement("span");
|
|
1644
|
+
i.className = "event-category", i.textContent = e.category;
|
|
1645
|
+
let a = document.createElement("span");
|
|
1646
|
+
return a.className = "event-message", a.textContent = e.message, t.appendChild(n), t.appendChild(i), t.appendChild(a), t;
|
|
1647
|
+
}
|
|
1648
|
+
function wt(e) {
|
|
1649
|
+
if (!i(B, this)) return;
|
|
1650
|
+
let t = i(B, this).querySelector(".events-empty");
|
|
1651
|
+
t && t.remove();
|
|
1652
|
+
let n = r(K, this, Ct).call(this, e);
|
|
1653
|
+
i(B, this).prepend(n);
|
|
1654
|
+
}
|
|
1655
|
+
function Tt() {
|
|
1656
|
+
if (!i(B, this)) return;
|
|
1657
|
+
let e = i(B, this).querySelectorAll(".event-row");
|
|
1658
|
+
for (let n = e.length - 1; n >= 250; n--) {
|
|
1659
|
+
var t;
|
|
1660
|
+
(t = e[n]) == null || t.remove();
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
function Et(e = !1) {
|
|
1664
|
+
if (!i(B, this) || !i(V, this)) return;
|
|
1665
|
+
if (r(K, this, Ce).call(this), !e && !r(K, this, Se).call(this, "events-section")) {
|
|
1666
|
+
a(H, this, !0);
|
|
1667
|
+
return;
|
|
1668
|
+
}
|
|
1669
|
+
if (a(H, this, !1), i(O, this).length === 0) {
|
|
1670
|
+
i(B, this).innerHTML = "<div class=\"events-empty\">No events yet</div>";
|
|
1671
|
+
return;
|
|
1672
|
+
}
|
|
1673
|
+
i(B, this).innerHTML = "";
|
|
1674
|
+
let t = document.createDocumentFragment();
|
|
1675
|
+
for (let e = i(O, this).length - 1; e >= 0; e--) {
|
|
1676
|
+
let n = i(O, this)[e];
|
|
1677
|
+
n && t.appendChild(r(K, this, Ct).call(this, n));
|
|
1678
|
+
}
|
|
1679
|
+
i(B, this).appendChild(t);
|
|
1680
|
+
}
|
|
1681
|
+
function Dt(e) {
|
|
1682
|
+
return new Date(e).toLocaleTimeString([], {
|
|
1683
|
+
hour12: !1,
|
|
1684
|
+
hour: "2-digit",
|
|
1685
|
+
minute: "2-digit",
|
|
1686
|
+
second: "2-digit"
|
|
1687
|
+
});
|
|
1688
|
+
}
|
|
1689
|
+
function Ot() {
|
|
1690
|
+
var e = this;
|
|
1691
|
+
let n = r(K, this, q).call(this, "#copy-stats");
|
|
1692
|
+
n == null || n.addEventListener("click", function() {
|
|
1693
|
+
var i = t(function* (t) {
|
|
1694
|
+
t.stopPropagation();
|
|
1695
|
+
let i = r(K, e, kt).call(e);
|
|
1696
|
+
try {
|
|
1697
|
+
yield navigator.clipboard.writeText(JSON.stringify(i, null, 2)), n.setAttribute("data-copied", "true"), n.textContent = "Copied!", setTimeout(() => {
|
|
1698
|
+
n.setAttribute("data-copied", "false"), n.textContent = "Copy Stats to Clipboard";
|
|
1699
|
+
}, 2e3);
|
|
1700
|
+
} catch (e) {
|
|
1701
|
+
n.textContent = "Copy unavailable", setTimeout(() => {
|
|
1702
|
+
n.textContent = "Copy Stats to Clipboard";
|
|
1703
|
+
}, 2e3);
|
|
1704
|
+
}
|
|
1705
|
+
});
|
|
1706
|
+
return function(e) {
|
|
1707
|
+
return i.apply(this, arguments);
|
|
1708
|
+
};
|
|
1709
|
+
}());
|
|
1710
|
+
}
|
|
1711
|
+
function kt() {
|
|
1712
|
+
var e;
|
|
1713
|
+
let t = (e = i(v, this)) == null ? void 0 : e.instance;
|
|
1714
|
+
if (!t) return {
|
|
1715
|
+
error: "Vindral instance not available",
|
|
1716
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1717
|
+
};
|
|
1718
|
+
try {
|
|
1719
|
+
return d(d({}, t.getStatistics()), {}, {
|
|
1720
|
+
connectionState: t.connectionState,
|
|
1721
|
+
playbackState: t.playbackState,
|
|
1722
|
+
playbackLatency: t.playbackLatency,
|
|
1723
|
+
bufferFullness: t.bufferFullness,
|
|
1724
|
+
lastBufferEvent: t.lastBufferEvent,
|
|
1725
|
+
timeSpentBuffering: t.timeSpentBuffering,
|
|
1726
|
+
currentRendition: i(C, this),
|
|
1727
|
+
targetBufferTime: i(w, this),
|
|
1728
|
+
drift: i(T, this),
|
|
1729
|
+
abrEnabled: i(x, this),
|
|
1730
|
+
debugLayout: {
|
|
1731
|
+
openSections: r(K, this, Me).call(this),
|
|
1732
|
+
sectionOrder: r(K, this, Ne).call(this)
|
|
1733
|
+
},
|
|
1734
|
+
debugEvents: i(O, this).map((e) => d(d({}, e), {}, { isoTimestamp: new Date(e.timestamp).toISOString() })),
|
|
1735
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1736
|
+
});
|
|
1737
|
+
} catch (e) {
|
|
1738
|
+
return {
|
|
1739
|
+
error: "Failed to get statistics",
|
|
1740
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1741
|
+
};
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
e(be, "observedAttributes", [
|
|
1745
|
+
s.DEBUG_PANEL_OPEN,
|
|
1746
|
+
s.TARGET_BUFFER_TIME,
|
|
1747
|
+
s.DRIFT,
|
|
1748
|
+
s.RENDITION_LEVELS,
|
|
1749
|
+
s.MAX_VIDEO_BITRATE,
|
|
1750
|
+
s.ABR_ENABLED,
|
|
1751
|
+
s.SIZE_BASED_RESOLUTION_CAP_ENABLED,
|
|
1752
|
+
s.RENDITION_LEVEL
|
|
1753
|
+
]);
|
|
1754
|
+
//#endregion
|
|
1755
|
+
//#region ../../libs/player-next/src/registerDebugComponents.ts
|
|
1756
|
+
var At = /* @__PURE__ */ p({ registerDebugComponents: () => jt });
|
|
1757
|
+
function jt() {
|
|
1758
|
+
customElements.get("vindral-debug-button") || customElements.define("vindral-debug-button", ie), customElements.get("vindral-debug-panel") || customElements.define("vindral-debug-panel", be);
|
|
1759
|
+
}
|
|
1760
|
+
//#endregion
|
|
1761
|
+
export { At as n, jt as t };
|