@connectedxm/stream-player 0.0.5 → 0.0.6
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/dist/index.es.js +1017 -986
- package/dist/src/StreamControls.d.ts +1 -0
- package/dist/src/StreamPlayer.d.ts +1 -1
- package/dist/src/interfaces.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -26,150 +26,150 @@ var wt = {};
|
|
|
26
26
|
var er;
|
|
27
27
|
function so() {
|
|
28
28
|
return er || (er = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
29
|
-
function a(
|
|
30
|
-
if (
|
|
31
|
-
if (typeof
|
|
32
|
-
return
|
|
33
|
-
if (typeof
|
|
34
|
-
switch (
|
|
29
|
+
function a(R) {
|
|
30
|
+
if (R == null) return null;
|
|
31
|
+
if (typeof R == "function")
|
|
32
|
+
return R.$$typeof === k ? null : R.displayName || R.name || null;
|
|
33
|
+
if (typeof R == "string") return R;
|
|
34
|
+
switch (R) {
|
|
35
35
|
case y:
|
|
36
36
|
return "Fragment";
|
|
37
37
|
case T:
|
|
38
38
|
return "Profiler";
|
|
39
39
|
case E:
|
|
40
40
|
return "StrictMode";
|
|
41
|
-
case
|
|
41
|
+
case P:
|
|
42
42
|
return "Suspense";
|
|
43
43
|
case x:
|
|
44
44
|
return "SuspenseList";
|
|
45
45
|
case L:
|
|
46
46
|
return "Activity";
|
|
47
47
|
}
|
|
48
|
-
if (typeof
|
|
49
|
-
switch (typeof
|
|
48
|
+
if (typeof R == "object")
|
|
49
|
+
switch (typeof R.tag == "number" && console.error(
|
|
50
50
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
51
|
-
),
|
|
51
|
+
), R.$$typeof) {
|
|
52
52
|
case p:
|
|
53
53
|
return "Portal";
|
|
54
54
|
case S:
|
|
55
|
-
return
|
|
55
|
+
return R.displayName || "Context";
|
|
56
56
|
case v:
|
|
57
|
-
return (
|
|
57
|
+
return (R._context.displayName || "Context") + ".Consumer";
|
|
58
58
|
case A:
|
|
59
|
-
var O =
|
|
60
|
-
return
|
|
59
|
+
var O = R.render;
|
|
60
|
+
return R = R.displayName, R || (R = O.displayName || O.name || "", R = R !== "" ? "ForwardRef(" + R + ")" : "ForwardRef"), R;
|
|
61
|
+
case I:
|
|
62
|
+
return O = R.displayName || null, O !== null ? O : a(R.type) || "Memo";
|
|
61
63
|
case b:
|
|
62
|
-
|
|
63
|
-
case R:
|
|
64
|
-
O = I._payload, I = I._init;
|
|
64
|
+
O = R._payload, R = R._init;
|
|
65
65
|
try {
|
|
66
|
-
return a(
|
|
66
|
+
return a(R(O));
|
|
67
67
|
} catch {
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
return null;
|
|
71
71
|
}
|
|
72
|
-
function e(
|
|
73
|
-
return "" +
|
|
72
|
+
function e(R) {
|
|
73
|
+
return "" + R;
|
|
74
74
|
}
|
|
75
|
-
function t(
|
|
75
|
+
function t(R) {
|
|
76
76
|
try {
|
|
77
|
-
e(
|
|
77
|
+
e(R);
|
|
78
78
|
var O = !1;
|
|
79
79
|
} catch {
|
|
80
80
|
O = !0;
|
|
81
81
|
}
|
|
82
82
|
if (O) {
|
|
83
83
|
O = console;
|
|
84
|
-
var H = O.error, j = typeof Symbol == "function" && Symbol.toStringTag &&
|
|
84
|
+
var H = O.error, j = typeof Symbol == "function" && Symbol.toStringTag && R[Symbol.toStringTag] || R.constructor.name || "Object";
|
|
85
85
|
return H.call(
|
|
86
86
|
O,
|
|
87
87
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
88
88
|
j
|
|
89
|
-
), e(
|
|
89
|
+
), e(R);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
function s(
|
|
93
|
-
if (
|
|
94
|
-
if (typeof
|
|
92
|
+
function s(R) {
|
|
93
|
+
if (R === y) return "<>";
|
|
94
|
+
if (typeof R == "object" && R !== null && R.$$typeof === b)
|
|
95
95
|
return "<...>";
|
|
96
96
|
try {
|
|
97
|
-
var O = a(
|
|
97
|
+
var O = a(R);
|
|
98
98
|
return O ? "<" + O + ">" : "<...>";
|
|
99
99
|
} catch {
|
|
100
100
|
return "<...>";
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
function i() {
|
|
104
|
-
var
|
|
105
|
-
return
|
|
104
|
+
var R = C.A;
|
|
105
|
+
return R === null ? null : R.getOwner();
|
|
106
106
|
}
|
|
107
107
|
function r() {
|
|
108
108
|
return Error("react-stack-top-frame");
|
|
109
109
|
}
|
|
110
|
-
function n(
|
|
111
|
-
if (
|
|
112
|
-
var O = Object.getOwnPropertyDescriptor(
|
|
110
|
+
function n(R) {
|
|
111
|
+
if (M.call(R, "key")) {
|
|
112
|
+
var O = Object.getOwnPropertyDescriptor(R, "key").get;
|
|
113
113
|
if (O && O.isReactWarning) return !1;
|
|
114
114
|
}
|
|
115
|
-
return
|
|
115
|
+
return R.key !== void 0;
|
|
116
116
|
}
|
|
117
|
-
function o(
|
|
117
|
+
function o(R, O) {
|
|
118
118
|
function H() {
|
|
119
119
|
F || (F = !0, console.error(
|
|
120
120
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
121
121
|
O
|
|
122
122
|
));
|
|
123
123
|
}
|
|
124
|
-
H.isReactWarning = !0, Object.defineProperty(
|
|
124
|
+
H.isReactWarning = !0, Object.defineProperty(R, "key", {
|
|
125
125
|
get: H,
|
|
126
126
|
configurable: !0
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
function c() {
|
|
130
|
-
var
|
|
131
|
-
return U[
|
|
130
|
+
var R = a(this.type);
|
|
131
|
+
return U[R] || (U[R] = !0, console.error(
|
|
132
132
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
133
|
-
)),
|
|
133
|
+
)), R = this.props.ref, R !== void 0 ? R : null;
|
|
134
134
|
}
|
|
135
|
-
function l(
|
|
135
|
+
function l(R, O, H, j, Q, Z) {
|
|
136
136
|
var te = H.ref;
|
|
137
|
-
return
|
|
137
|
+
return R = {
|
|
138
138
|
$$typeof: g,
|
|
139
|
-
type:
|
|
139
|
+
type: R,
|
|
140
140
|
key: O,
|
|
141
141
|
props: H,
|
|
142
142
|
_owner: j
|
|
143
|
-
}, (te !== void 0 ? te : null) !== null ? Object.defineProperty(
|
|
143
|
+
}, (te !== void 0 ? te : null) !== null ? Object.defineProperty(R, "ref", {
|
|
144
144
|
enumerable: !1,
|
|
145
145
|
get: c
|
|
146
|
-
}) : Object.defineProperty(
|
|
146
|
+
}) : Object.defineProperty(R, "ref", { enumerable: !1, value: null }), R._store = {}, Object.defineProperty(R._store, "validated", {
|
|
147
147
|
configurable: !1,
|
|
148
148
|
enumerable: !1,
|
|
149
149
|
writable: !0,
|
|
150
150
|
value: 0
|
|
151
|
-
}), Object.defineProperty(
|
|
151
|
+
}), Object.defineProperty(R, "_debugInfo", {
|
|
152
152
|
configurable: !1,
|
|
153
153
|
enumerable: !1,
|
|
154
154
|
writable: !0,
|
|
155
155
|
value: null
|
|
156
|
-
}), Object.defineProperty(
|
|
156
|
+
}), Object.defineProperty(R, "_debugStack", {
|
|
157
157
|
configurable: !1,
|
|
158
158
|
enumerable: !1,
|
|
159
159
|
writable: !0,
|
|
160
160
|
value: Q
|
|
161
|
-
}), Object.defineProperty(
|
|
161
|
+
}), Object.defineProperty(R, "_debugTask", {
|
|
162
162
|
configurable: !1,
|
|
163
163
|
enumerable: !1,
|
|
164
164
|
writable: !0,
|
|
165
165
|
value: Z
|
|
166
|
-
}), Object.freeze && (Object.freeze(
|
|
166
|
+
}), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
|
|
167
167
|
}
|
|
168
|
-
function u(
|
|
168
|
+
function u(R, O, H, j, Q, Z) {
|
|
169
169
|
var te = O.children;
|
|
170
170
|
if (te !== void 0)
|
|
171
171
|
if (j)
|
|
172
|
-
if (
|
|
172
|
+
if ($(te)) {
|
|
173
173
|
for (j = 0; j < te.length; j++)
|
|
174
174
|
h(te[j]);
|
|
175
175
|
Object.freeze && Object.freeze(te);
|
|
@@ -178,8 +178,8 @@ function so() {
|
|
|
178
178
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
179
179
|
);
|
|
180
180
|
else h(te);
|
|
181
|
-
if (
|
|
182
|
-
te = a(
|
|
181
|
+
if (M.call(O, "key")) {
|
|
182
|
+
te = a(R);
|
|
183
183
|
var ce = Object.keys(O).filter(function(we) {
|
|
184
184
|
return we !== "key";
|
|
185
185
|
});
|
|
@@ -203,9 +203,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
203
203
|
} else H = O;
|
|
204
204
|
return te && o(
|
|
205
205
|
H,
|
|
206
|
-
typeof
|
|
206
|
+
typeof R == "function" ? R.displayName || R.name || "Unknown" : R
|
|
207
207
|
), l(
|
|
208
|
-
|
|
208
|
+
R,
|
|
209
209
|
te,
|
|
210
210
|
H,
|
|
211
211
|
i(),
|
|
@@ -213,43 +213,43 @@ React keys must be passed directly to JSX without using spread:
|
|
|
213
213
|
Z
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
|
-
function h(
|
|
217
|
-
d(
|
|
216
|
+
function h(R) {
|
|
217
|
+
d(R) ? R._store && (R._store.validated = 1) : typeof R == "object" && R !== null && R.$$typeof === b && (R._payload.status === "fulfilled" ? d(R._payload.value) && R._payload.value._store && (R._payload.value._store.validated = 1) : R._store && (R._store.validated = 1));
|
|
218
218
|
}
|
|
219
|
-
function d(
|
|
220
|
-
return typeof
|
|
219
|
+
function d(R) {
|
|
220
|
+
return typeof R == "object" && R !== null && R.$$typeof === g;
|
|
221
221
|
}
|
|
222
|
-
var f = Ae, g = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), S = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"),
|
|
222
|
+
var f = Ae, g = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), S = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), L = Symbol.for("react.activity"), k = Symbol.for("react.client.reference"), C = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, $ = Array.isArray, N = console.createTask ? console.createTask : function() {
|
|
223
223
|
return null;
|
|
224
224
|
};
|
|
225
225
|
f = {
|
|
226
|
-
react_stack_bottom_frame: function(
|
|
227
|
-
return
|
|
226
|
+
react_stack_bottom_frame: function(R) {
|
|
227
|
+
return R();
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
|
-
var F, U = {},
|
|
230
|
+
var F, U = {}, B = f.react_stack_bottom_frame.bind(
|
|
231
231
|
f,
|
|
232
232
|
r
|
|
233
|
-
)(), V =
|
|
234
|
-
wt.Fragment = y, wt.jsx = function(
|
|
235
|
-
var j = 1e4 >
|
|
233
|
+
)(), V = N(s(r)), W = {};
|
|
234
|
+
wt.Fragment = y, wt.jsx = function(R, O, H) {
|
|
235
|
+
var j = 1e4 > C.recentlyCreatedOwnerStacks++;
|
|
236
236
|
return u(
|
|
237
|
-
|
|
237
|
+
R,
|
|
238
238
|
O,
|
|
239
239
|
H,
|
|
240
240
|
!1,
|
|
241
|
-
j ? Error("react-stack-top-frame") :
|
|
242
|
-
j ?
|
|
241
|
+
j ? Error("react-stack-top-frame") : B,
|
|
242
|
+
j ? N(s(R)) : V
|
|
243
243
|
);
|
|
244
|
-
}, wt.jsxs = function(
|
|
245
|
-
var j = 1e4 >
|
|
244
|
+
}, wt.jsxs = function(R, O, H) {
|
|
245
|
+
var j = 1e4 > C.recentlyCreatedOwnerStacks++;
|
|
246
246
|
return u(
|
|
247
|
-
|
|
247
|
+
R,
|
|
248
248
|
O,
|
|
249
249
|
H,
|
|
250
250
|
!0,
|
|
251
|
-
j ? Error("react-stack-top-frame") :
|
|
252
|
-
j ?
|
|
251
|
+
j ? Error("react-stack-top-frame") : B,
|
|
252
|
+
j ? N(s(R)) : V
|
|
253
253
|
);
|
|
254
254
|
};
|
|
255
255
|
})()), wt;
|
|
@@ -262,7 +262,8 @@ var q = io();
|
|
|
262
262
|
const ne = {
|
|
263
263
|
controlBar: {
|
|
264
264
|
background: "linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent)",
|
|
265
|
-
padding: "1rem"
|
|
265
|
+
padding: "1rem",
|
|
266
|
+
overflow: "visible"
|
|
266
267
|
},
|
|
267
268
|
flexRow: {
|
|
268
269
|
display: "flex",
|
|
@@ -278,7 +279,8 @@ const ne = {
|
|
|
278
279
|
rightControls: {
|
|
279
280
|
display: "flex",
|
|
280
281
|
alignItems: "center",
|
|
281
|
-
gap: "0.5rem"
|
|
282
|
+
gap: "0.5rem",
|
|
283
|
+
overflow: "visible"
|
|
282
284
|
},
|
|
283
285
|
iconButton: {
|
|
284
286
|
padding: "0.5rem",
|
|
@@ -338,7 +340,8 @@ const ne = {
|
|
|
338
340
|
fontWeight: 500
|
|
339
341
|
},
|
|
340
342
|
relative: {
|
|
341
|
-
position: "relative"
|
|
343
|
+
position: "relative",
|
|
344
|
+
overflow: "visible"
|
|
342
345
|
},
|
|
343
346
|
textButton: {
|
|
344
347
|
padding: "0.375rem 0.75rem",
|
|
@@ -359,7 +362,9 @@ const ne = {
|
|
|
359
362
|
backgroundColor: "rgba(0, 0, 0, 0.9)",
|
|
360
363
|
borderRadius: "0.5rem",
|
|
361
364
|
padding: "0.5rem 0",
|
|
362
|
-
minWidth: "120px"
|
|
365
|
+
minWidth: "120px",
|
|
366
|
+
zIndex: 1e3,
|
|
367
|
+
overflow: "visible"
|
|
363
368
|
},
|
|
364
369
|
dropdownWide: {
|
|
365
370
|
minWidth: "140px"
|
|
@@ -385,7 +390,9 @@ const ne = {
|
|
|
385
390
|
},
|
|
386
391
|
controlsWrapper: (a) => ({
|
|
387
392
|
transition: "opacity 0.3s ease",
|
|
388
|
-
opacity: a ? 1 : 0
|
|
393
|
+
opacity: a ? 1 : 0,
|
|
394
|
+
overflow: "visible",
|
|
395
|
+
zIndex: 9999
|
|
389
396
|
})
|
|
390
397
|
}, ro = ({
|
|
391
398
|
controls: a,
|
|
@@ -405,216 +412,226 @@ const ne = {
|
|
|
405
412
|
onQualityChange: g,
|
|
406
413
|
onGoToLive: p,
|
|
407
414
|
onFullscreenToggle: y,
|
|
408
|
-
onStreamInputChange: E
|
|
415
|
+
onStreamInputChange: E,
|
|
416
|
+
roundedCorners: T
|
|
409
417
|
}) => {
|
|
410
|
-
const [
|
|
411
|
-
...
|
|
412
|
-
...
|
|
413
|
-
}),
|
|
418
|
+
const [v, S] = Ae.useState(!1), [A, P] = Ae.useState(!1), [x, I] = Ae.useState(null), b = (C) => C.displayName ? C.displayName : C.locale ? `${C.name} (${C.locale})` : C.name, L = (C, M) => ({
|
|
419
|
+
...M,
|
|
420
|
+
...x === C ? ne.iconButtonHover : {}
|
|
421
|
+
}), k = (C, M) => ({
|
|
414
422
|
...ne.dropdownItem,
|
|
415
|
-
...
|
|
416
|
-
...
|
|
423
|
+
...C ? ne.dropdownItemActive : {},
|
|
424
|
+
...M ? ne.dropdownItemHover : {}
|
|
417
425
|
});
|
|
418
|
-
return a ? /* @__PURE__ */ q.jsx("div", { style: ne.controlsWrapper(e || !t), children: /* @__PURE__ */ q.jsx(
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
"svg",
|
|
426
|
+
return a ? /* @__PURE__ */ q.jsx("div", { style: ne.controlsWrapper(e || !t), children: /* @__PURE__ */ q.jsx(
|
|
427
|
+
"div",
|
|
428
|
+
{
|
|
429
|
+
style: {
|
|
430
|
+
...ne.controlBar,
|
|
431
|
+
borderRadius: T ? "1rem" : "0"
|
|
432
|
+
},
|
|
433
|
+
children: /* @__PURE__ */ q.jsxs("div", { style: ne.flexRow, children: [
|
|
434
|
+
/* @__PURE__ */ q.jsxs("div", { style: ne.leftControls, children: [
|
|
435
|
+
/* @__PURE__ */ q.jsx("div", { style: ne.volumeWrapper, children: /* @__PURE__ */ q.jsx(
|
|
436
|
+
"button",
|
|
430
437
|
{
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
"
|
|
436
|
-
|
|
437
|
-
|
|
438
|
+
onClick: f,
|
|
439
|
+
style: L("mute", ne.iconButton),
|
|
440
|
+
onMouseEnter: () => I("mute"),
|
|
441
|
+
onMouseLeave: () => I(null),
|
|
442
|
+
"aria-label": i ? "Unmute" : "Mute",
|
|
443
|
+
children: i || s === 0 ? /* @__PURE__ */ q.jsx(
|
|
444
|
+
"svg",
|
|
445
|
+
{
|
|
446
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
447
|
+
viewBox: "0 0 24 24",
|
|
448
|
+
fill: "white",
|
|
449
|
+
"aria-hidden": "true",
|
|
450
|
+
"data-slot": "icon",
|
|
451
|
+
style: ne.icon,
|
|
452
|
+
children: /* @__PURE__ */ q.jsx("path", { d: "M13.5 4.06c0-1.336-1.616-2.005-2.56-1.06l-4.5 4.5H4.508c-1.141 0-2.318.664-2.66 1.905A9.76 9.76 0 0 0 1.5 12c0 .898.121 1.768.35 2.595.341 1.24 1.518 1.905 2.659 1.905h1.93l4.5 4.5c.945.945 2.561.276 2.561-1.06V4.06ZM17.78 9.22a.75.75 0 1 0-1.06 1.06L18.44 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06l1.72-1.72 1.72 1.72a.75.75 0 1 0 1.06-1.06L20.56 12l1.72-1.72a.75.75 0 1 0-1.06-1.06l-1.72 1.72-1.72-1.72Z" })
|
|
453
|
+
}
|
|
454
|
+
) : /* @__PURE__ */ q.jsxs(
|
|
455
|
+
"svg",
|
|
456
|
+
{
|
|
457
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
458
|
+
viewBox: "0 0 24 24",
|
|
459
|
+
fill: "white",
|
|
460
|
+
"aria-hidden": "true",
|
|
461
|
+
"data-slot": "icon",
|
|
462
|
+
style: ne.icon,
|
|
463
|
+
children: [
|
|
464
|
+
/* @__PURE__ */ q.jsx("path", { d: "M13.5 4.06c0-1.336-1.616-2.005-2.56-1.06l-4.5 4.5H4.508c-1.141 0-2.318.664-2.66 1.905A9.76 9.76 0 0 0 1.5 12c0 .898.121 1.768.35 2.595.341 1.24 1.518 1.905 2.659 1.905h1.93l4.5 4.5c.945.945 2.561.276 2.561-1.06V4.06ZM18.584 5.106a.75.75 0 0 1 1.06 0c3.808 3.807 3.808 9.98 0 13.788a.75.75 0 0 1-1.06-1.06 8.25 8.25 0 0 0 0-11.668.75.75 0 0 1 0-1.06Z" }),
|
|
465
|
+
/* @__PURE__ */ q.jsx("path", { d: "M15.932 7.757a.75.75 0 0 1 1.061 0 6 6 0 0 1 0 8.486.75.75 0 0 1-1.06-1.061 4.5 4.5 0 0 0 0-6.364.75.75 0 0 1 0-1.06Z" })
|
|
466
|
+
]
|
|
467
|
+
}
|
|
468
|
+
)
|
|
438
469
|
}
|
|
439
|
-
)
|
|
440
|
-
|
|
470
|
+
) }),
|
|
471
|
+
o && c && /* @__PURE__ */ q.jsxs(
|
|
472
|
+
"button",
|
|
441
473
|
{
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
"
|
|
447
|
-
style: ne.icon,
|
|
474
|
+
onClick: p,
|
|
475
|
+
style: L("goToLive", ne.goToLiveButton),
|
|
476
|
+
onMouseEnter: () => I("goToLive"),
|
|
477
|
+
onMouseLeave: () => I(null),
|
|
478
|
+
"aria-label": "Go to live",
|
|
448
479
|
children: [
|
|
449
|
-
|
|
450
|
-
/* @__PURE__ */ q.jsx(
|
|
451
|
-
|
|
452
|
-
}
|
|
453
|
-
)
|
|
454
|
-
}
|
|
455
|
-
) }),
|
|
456
|
-
o && c && /* @__PURE__ */ q.jsxs(
|
|
457
|
-
"button",
|
|
458
|
-
{
|
|
459
|
-
onClick: p,
|
|
460
|
-
style: R("goToLive", ne.goToLiveButton),
|
|
461
|
-
onMouseEnter: () => x("goToLive"),
|
|
462
|
-
onMouseLeave: () => x(null),
|
|
463
|
-
"aria-label": "Go to live",
|
|
464
|
-
children: [
|
|
465
|
-
"Go to Live",
|
|
466
|
-
/* @__PURE__ */ q.jsx(
|
|
467
|
-
"svg",
|
|
468
|
-
{
|
|
469
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
470
|
-
viewBox: "0 0 24 24",
|
|
471
|
-
fill: "white",
|
|
472
|
-
"aria-hidden": "true",
|
|
473
|
-
"data-slot": "icon",
|
|
474
|
-
style: ne.icon,
|
|
475
|
-
children: /* @__PURE__ */ q.jsx(
|
|
476
|
-
"path",
|
|
480
|
+
"Go to Live",
|
|
481
|
+
/* @__PURE__ */ q.jsx(
|
|
482
|
+
"svg",
|
|
477
483
|
{
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
484
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
485
|
+
viewBox: "0 0 24 24",
|
|
486
|
+
fill: "white",
|
|
487
|
+
"aria-hidden": "true",
|
|
488
|
+
"data-slot": "icon",
|
|
489
|
+
style: ne.icon,
|
|
490
|
+
children: /* @__PURE__ */ q.jsx(
|
|
491
|
+
"path",
|
|
492
|
+
{
|
|
493
|
+
fillRule: "evenodd",
|
|
494
|
+
d: "M12.97 3.97a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 1 1-1.06-1.06l6.22-6.22H3a.75.75 0 0 1 0-1.5h16.19l-6.22-6.22a.75.75 0 0 1 0-1.06Z",
|
|
495
|
+
clipRule: "evenodd"
|
|
496
|
+
}
|
|
497
|
+
)
|
|
481
498
|
}
|
|
482
499
|
)
|
|
483
|
-
|
|
484
|
-
)
|
|
485
|
-
]
|
|
486
|
-
}
|
|
487
|
-
),
|
|
488
|
-
o && !c && /* @__PURE__ */ q.jsxs("div", { style: ne.liveIndicator, children: [
|
|
489
|
-
/* @__PURE__ */ q.jsx("div", { style: ne.liveDot }),
|
|
490
|
-
/* @__PURE__ */ q.jsx("span", { style: ne.liveText, children: "LIVE" })
|
|
491
|
-
] })
|
|
492
|
-
] }),
|
|
493
|
-
/* @__PURE__ */ q.jsxs("div", { style: ne.rightControls, children: [
|
|
494
|
-
r.length > 0 && /* @__PURE__ */ q.jsxs("div", { style: ne.relative, children: [
|
|
495
|
-
/* @__PURE__ */ q.jsx(
|
|
496
|
-
"button",
|
|
497
|
-
{
|
|
498
|
-
onClick: () => v(!T),
|
|
499
|
-
style: R("quality", ne.textButton),
|
|
500
|
-
onMouseEnter: () => x("quality"),
|
|
501
|
-
onMouseLeave: () => x(null),
|
|
502
|
-
"aria-label": "Quality settings",
|
|
503
|
-
children: n === -1 ? "Auto" : r.find((P) => P.level === n)?.label || "Auto"
|
|
504
|
-
}
|
|
505
|
-
),
|
|
506
|
-
T && /* @__PURE__ */ q.jsxs("div", { style: ne.dropdown, children: [
|
|
507
|
-
/* @__PURE__ */ q.jsx(
|
|
508
|
-
"button",
|
|
509
|
-
{
|
|
510
|
-
onClick: () => {
|
|
511
|
-
g(-1), v(!1);
|
|
512
|
-
},
|
|
513
|
-
style: L(
|
|
514
|
-
n === -1,
|
|
515
|
-
C === "quality-auto"
|
|
516
|
-
),
|
|
517
|
-
onMouseEnter: () => x("quality-auto"),
|
|
518
|
-
onMouseLeave: () => x(null),
|
|
519
|
-
children: "Auto"
|
|
500
|
+
]
|
|
520
501
|
}
|
|
521
502
|
),
|
|
522
|
-
|
|
523
|
-
"
|
|
524
|
-
{
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
503
|
+
o && !c && /* @__PURE__ */ q.jsxs("div", { style: ne.liveIndicator, children: [
|
|
504
|
+
/* @__PURE__ */ q.jsx("div", { style: ne.liveDot }),
|
|
505
|
+
/* @__PURE__ */ q.jsx("span", { style: ne.liveText, children: "LIVE" })
|
|
506
|
+
] })
|
|
507
|
+
] }),
|
|
508
|
+
/* @__PURE__ */ q.jsxs("div", { style: ne.rightControls, children: [
|
|
509
|
+
r.length > 0 && /* @__PURE__ */ q.jsxs("div", { style: ne.relative, children: [
|
|
510
|
+
/* @__PURE__ */ q.jsx(
|
|
511
|
+
"button",
|
|
512
|
+
{
|
|
513
|
+
onClick: () => S(!v),
|
|
514
|
+
style: L("quality", ne.textButton),
|
|
515
|
+
onMouseEnter: () => I("quality"),
|
|
516
|
+
onMouseLeave: () => I(null),
|
|
517
|
+
"aria-label": "Quality settings",
|
|
518
|
+
children: n === -1 ? "Auto" : r.find((C) => C.level === n)?.label || "Auto"
|
|
519
|
+
}
|
|
520
|
+
),
|
|
521
|
+
v && /* @__PURE__ */ q.jsxs("div", { style: ne.dropdown, children: [
|
|
522
|
+
/* @__PURE__ */ q.jsx(
|
|
523
|
+
"button",
|
|
524
|
+
{
|
|
525
|
+
onClick: () => {
|
|
526
|
+
g(-1), S(!1);
|
|
527
|
+
},
|
|
528
|
+
style: k(
|
|
529
|
+
n === -1,
|
|
530
|
+
x === "quality-auto"
|
|
531
|
+
),
|
|
532
|
+
onMouseEnter: () => I("quality-auto"),
|
|
533
|
+
onMouseLeave: () => I(null),
|
|
534
|
+
children: "Auto"
|
|
535
|
+
}
|
|
531
536
|
),
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
537
|
+
r.map((C) => /* @__PURE__ */ q.jsx(
|
|
538
|
+
"button",
|
|
539
|
+
{
|
|
540
|
+
onClick: () => {
|
|
541
|
+
g(C.level), S(!1);
|
|
542
|
+
},
|
|
543
|
+
style: k(
|
|
544
|
+
n === C.level,
|
|
545
|
+
x === `quality-${C.level}`
|
|
546
|
+
),
|
|
547
|
+
onMouseEnter: () => I(`quality-${C.level}`),
|
|
548
|
+
onMouseLeave: () => I(null),
|
|
549
|
+
children: C.label
|
|
550
|
+
},
|
|
551
|
+
C.level
|
|
552
|
+
))
|
|
553
|
+
] })
|
|
554
|
+
] }),
|
|
555
|
+
h.length > 1 && d && /* @__PURE__ */ q.jsxs("div", { style: ne.relative, children: [
|
|
556
|
+
/* @__PURE__ */ q.jsx(
|
|
557
|
+
"button",
|
|
558
|
+
{
|
|
559
|
+
onClick: () => P(!A),
|
|
560
|
+
style: L("language", ne.textButton),
|
|
561
|
+
onMouseEnter: () => I("language"),
|
|
562
|
+
onMouseLeave: () => I(null),
|
|
563
|
+
"aria-label": "Language settings",
|
|
564
|
+
children: b(d)
|
|
565
|
+
}
|
|
561
566
|
),
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
567
|
+
A && /* @__PURE__ */ q.jsx("div", { style: { ...ne.dropdown, ...ne.dropdownWide }, children: h.map((C) => /* @__PURE__ */ q.jsx(
|
|
568
|
+
"button",
|
|
569
|
+
{
|
|
570
|
+
onClick: () => {
|
|
571
|
+
E(C), P(!1);
|
|
572
|
+
},
|
|
573
|
+
style: k(
|
|
574
|
+
d.id === C.id,
|
|
575
|
+
x === `lang-${C.id}`
|
|
576
|
+
),
|
|
577
|
+
onMouseEnter: () => I(`lang-${C.id}`),
|
|
578
|
+
onMouseLeave: () => I(null),
|
|
579
|
+
children: b(C)
|
|
580
|
+
},
|
|
581
|
+
C.id
|
|
582
|
+
)) })
|
|
583
|
+
] }),
|
|
584
|
+
u && /* @__PURE__ */ q.jsx(
|
|
585
|
+
"button",
|
|
579
586
|
{
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
"
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
"path",
|
|
587
|
+
onClick: y,
|
|
588
|
+
style: L("fullscreen", ne.iconButton),
|
|
589
|
+
onMouseEnter: () => I("fullscreen"),
|
|
590
|
+
onMouseLeave: () => I(null),
|
|
591
|
+
"aria-label": l ? "Exit fullscreen" : "Fullscreen",
|
|
592
|
+
children: l ? /* @__PURE__ */ q.jsx(
|
|
593
|
+
"svg",
|
|
588
594
|
{
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
595
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
596
|
+
viewBox: "0 0 24 24",
|
|
597
|
+
fill: "white",
|
|
598
|
+
"aria-hidden": "true",
|
|
599
|
+
"data-slot": "icon",
|
|
600
|
+
style: ne.icon,
|
|
601
|
+
children: /* @__PURE__ */ q.jsx(
|
|
602
|
+
"path",
|
|
603
|
+
{
|
|
604
|
+
fillRule: "evenodd",
|
|
605
|
+
d: "M3.22 3.22a.75.75 0 0 1 1.06 0l3.97 3.97V4.5a.75.75 0 0 1 1.5 0V9a.75.75 0 0 1-.75.75H4.5a.75.75 0 0 1 0-1.5h2.69L3.22 4.28a.75.75 0 0 1 0-1.06Zm17.56 0a.75.75 0 0 1 0 1.06l-3.97 3.97h2.69a.75.75 0 0 1 0 1.5H15a.75.75 0 0 1-.75-.75V4.5a.75.75 0 0 1 1.5 0v2.69l3.97-3.97a.75.75 0 0 1 1.06 0ZM3.75 15a.75.75 0 0 1 .75-.75H9a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-2.69l-3.97 3.97a.75.75 0 0 1-1.06-1.06l3.97-3.97H4.5a.75.75 0 0 1-.75-.75Zm10.5 0a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-2.69l3.97 3.97a.75.75 0 1 1-1.06 1.06l-3.97-3.97v2.69a.75.75 0 0 1-1.5 0V15Z",
|
|
606
|
+
clipRule: "evenodd"
|
|
607
|
+
}
|
|
608
|
+
)
|
|
592
609
|
}
|
|
593
|
-
)
|
|
594
|
-
|
|
595
|
-
) : /* @__PURE__ */ q.jsx(
|
|
596
|
-
"svg",
|
|
597
|
-
{
|
|
598
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
599
|
-
viewBox: "0 0 24 24",
|
|
600
|
-
fill: "white",
|
|
601
|
-
"aria-hidden": "true",
|
|
602
|
-
"data-slot": "icon",
|
|
603
|
-
style: ne.icon,
|
|
604
|
-
children: /* @__PURE__ */ q.jsx(
|
|
605
|
-
"path",
|
|
610
|
+
) : /* @__PURE__ */ q.jsx(
|
|
611
|
+
"svg",
|
|
606
612
|
{
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
613
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
614
|
+
viewBox: "0 0 24 24",
|
|
615
|
+
fill: "white",
|
|
616
|
+
"aria-hidden": "true",
|
|
617
|
+
"data-slot": "icon",
|
|
618
|
+
style: ne.icon,
|
|
619
|
+
children: /* @__PURE__ */ q.jsx(
|
|
620
|
+
"path",
|
|
621
|
+
{
|
|
622
|
+
fillRule: "evenodd",
|
|
623
|
+
d: "M15 3.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0V5.56l-3.97 3.97a.75.75 0 1 1-1.06-1.06l3.97-3.97h-2.69a.75.75 0 0 1-.75-.75Zm-12 0A.75.75 0 0 1 3.75 3h4.5a.75.75 0 0 1 0 1.5H5.56l3.97 3.97a.75.75 0 0 1-1.06 1.06L4.5 5.56v2.69a.75.75 0 0 1-1.5 0v-4.5Zm11.47 11.78a.75.75 0 1 1 1.06-1.06l3.97 3.97v-2.69a.75.75 0 0 1 1.5 0v4.5a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1 0-1.5h2.69l-3.97-3.97Zm-4.94-1.06a.75.75 0 0 1 0 1.06L5.56 19.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 1 1.5 0v2.69l3.97-3.97a.75.75 0 0 1 1.06 0Z",
|
|
624
|
+
clipRule: "evenodd"
|
|
625
|
+
}
|
|
626
|
+
)
|
|
610
627
|
}
|
|
611
628
|
)
|
|
612
629
|
}
|
|
613
630
|
)
|
|
614
|
-
}
|
|
615
|
-
)
|
|
616
|
-
|
|
617
|
-
|
|
631
|
+
] })
|
|
632
|
+
] })
|
|
633
|
+
}
|
|
634
|
+
) }) : null;
|
|
618
635
|
}, G = Number.isFinite || function(a) {
|
|
619
636
|
return typeof a == "number" && isFinite(a);
|
|
620
637
|
}, no = Number.isSafeInteger || function(a) {
|
|
@@ -1493,12 +1510,12 @@ function bo(a, e, t) {
|
|
|
1493
1510
|
const p = J(n, ["trun"]);
|
|
1494
1511
|
let y = u.start || 0, E = 0, T = g;
|
|
1495
1512
|
for (let v = 0; v < p.length; v++) {
|
|
1496
|
-
const S = p[v], A = z(S, 4),
|
|
1513
|
+
const S = p[v], A = z(S, 4), P = u.sampleCount;
|
|
1497
1514
|
u.sampleCount += A;
|
|
1498
|
-
const x = S[3] & 1,
|
|
1499
|
-
let
|
|
1500
|
-
for (x && (
|
|
1501
|
-
|
|
1515
|
+
const x = S[3] & 1, I = S[3] & 4, b = S[2] & 1, L = S[2] & 2, k = S[2] & 4, C = S[2] & 8;
|
|
1516
|
+
let M = 8, $ = A;
|
|
1517
|
+
for (x && (M += 4), I && A && (!(S[M + 1] & 1) && u.keyFrameIndex === void 0 && (u.keyFrameIndex = P), M += 4, b ? (T = z(S, M), M += 4) : T = g, L && (M += 4), C && (M += 4), y += T, E += T, $--); $--; )
|
|
1518
|
+
b ? (T = z(S, M), M += 4) : T = g, L && (M += 4), k && (S[M + 1] & 1 || u.keyFrameIndex === void 0 && (u.keyFrameIndex = u.sampleCount - ($ + 1), u.keyFrameStart = y), M += 4), C && (M += 4), y += T, E += T;
|
|
1502
1519
|
!E && g && (E += g * A);
|
|
1503
1520
|
}
|
|
1504
1521
|
u.duration += E;
|
|
@@ -1550,23 +1567,23 @@ function or(a, e) {
|
|
|
1550
1567
|
let v = 0;
|
|
1551
1568
|
const S = (p & 16) !== 0;
|
|
1552
1569
|
let A = 0;
|
|
1553
|
-
const
|
|
1570
|
+
const P = (p & 32) !== 0;
|
|
1554
1571
|
let x = 8;
|
|
1555
|
-
g === r && (y && (x += 8), E && (x += 4), T && (v = z(f, x), x += 4), S && (A = z(f, x), x += 4),
|
|
1556
|
-
const
|
|
1557
|
-
let
|
|
1558
|
-
const
|
|
1559
|
-
let
|
|
1572
|
+
g === r && (y && (x += 8), E && (x += 4), T && (v = z(f, x), x += 4), S && (A = z(f, x), x += 4), P && (x += 4), e.type === "video" && (n = _s(e.codec)), J(h, ["trun"]).map((I) => {
|
|
1573
|
+
const b = I[0], L = z(I, 0) & 16777215, k = (L & 1) !== 0;
|
|
1574
|
+
let C = 0;
|
|
1575
|
+
const M = (L & 4) !== 0, $ = (L & 256) !== 0;
|
|
1576
|
+
let N = 0;
|
|
1560
1577
|
const F = (L & 512) !== 0;
|
|
1561
1578
|
let U = 0;
|
|
1562
|
-
const
|
|
1579
|
+
const B = (L & 1024) !== 0, V = (L & 2048) !== 0;
|
|
1563
1580
|
let W = 0;
|
|
1564
|
-
const
|
|
1581
|
+
const R = z(I, 4);
|
|
1565
1582
|
let O = 8;
|
|
1566
|
-
|
|
1567
|
-
let H =
|
|
1568
|
-
for (let j = 0; j <
|
|
1569
|
-
if (
|
|
1583
|
+
k && (C = z(I, O), O += 4), M && (O += 4);
|
|
1584
|
+
let H = C + l;
|
|
1585
|
+
for (let j = 0; j < R; j++) {
|
|
1586
|
+
if ($ ? (N = z(I, O), O += 4) : N = v, F ? (U = z(I, O), O += 4) : U = A, B && (O += 4), V && (b === 0 ? W = z(I, O) : W = bn(I, O), O += 4), e.type === oe.VIDEO) {
|
|
1570
1587
|
let Q = 0;
|
|
1571
1588
|
for (; Q < U; ) {
|
|
1572
1589
|
const Z = z(s, H);
|
|
@@ -1577,7 +1594,7 @@ function or(a, e) {
|
|
|
1577
1594
|
H += Z, Q += Z + 4;
|
|
1578
1595
|
}
|
|
1579
1596
|
}
|
|
1580
|
-
a +=
|
|
1597
|
+
a += N / i;
|
|
1581
1598
|
}
|
|
1582
1599
|
}));
|
|
1583
1600
|
});
|
|
@@ -2297,43 +2314,43 @@ function Zo(a, e, t, s, i) {
|
|
|
2297
2314
|
preferHDR: T,
|
|
2298
2315
|
allowedVideoRanges: v
|
|
2299
2316
|
} = Xo(e, i);
|
|
2300
|
-
for (let
|
|
2301
|
-
const
|
|
2302
|
-
u || (u =
|
|
2317
|
+
for (let I = r.length; I--; ) {
|
|
2318
|
+
const b = a[r[I]];
|
|
2319
|
+
u || (u = b.channels[2] > 0), d = Math.min(d, b.minHeight), f = Math.min(f, b.minFramerate), g = Math.min(g, b.minBitrate), v.filter((k) => b.videoRanges[k] > 0).length > 0 && (h = !0);
|
|
2303
2320
|
}
|
|
2304
2321
|
d = G(d) ? d : 0, f = G(f) ? f : 0;
|
|
2305
2322
|
const S = Math.max(1080, d), A = Math.max(30, f);
|
|
2306
2323
|
g = G(g) ? g : t, t = Math.max(g, t), h || (e = void 0);
|
|
2307
|
-
const
|
|
2324
|
+
const P = r.length > 1;
|
|
2308
2325
|
return {
|
|
2309
|
-
codecSet: r.reduce((
|
|
2310
|
-
const L = a[
|
|
2311
|
-
if (
|
|
2312
|
-
return
|
|
2313
|
-
if (E = h ? v.filter((
|
|
2326
|
+
codecSet: r.reduce((I, b) => {
|
|
2327
|
+
const L = a[b];
|
|
2328
|
+
if (b === I)
|
|
2329
|
+
return I;
|
|
2330
|
+
if (E = h ? v.filter((k) => L.videoRanges[k] > 0) : [], P) {
|
|
2314
2331
|
if (L.minBitrate > t)
|
|
2315
|
-
return Ge(
|
|
2332
|
+
return Ge(b, `min bitrate of ${L.minBitrate} > current estimate of ${t}`), I;
|
|
2316
2333
|
if (!L.hasDefaultAudio)
|
|
2317
|
-
return Ge(
|
|
2318
|
-
if (o &&
|
|
2319
|
-
return Ge(
|
|
2334
|
+
return Ge(b, "no renditions with default or auto-select sound found"), I;
|
|
2335
|
+
if (o && b.indexOf(o.substring(0, 4)) % 5 !== 0)
|
|
2336
|
+
return Ge(b, `audio codec preference "${o}" not found`), I;
|
|
2320
2337
|
if (n && !l) {
|
|
2321
2338
|
if (!L.channels[n])
|
|
2322
|
-
return Ge(
|
|
2339
|
+
return Ge(b, `no renditions with ${n} channel sound found (channels options: ${Object.keys(L.channels)})`), I;
|
|
2323
2340
|
} else if ((!o || l) && u && L.channels[2] === 0)
|
|
2324
|
-
return Ge(
|
|
2341
|
+
return Ge(b, "no renditions with stereo sound found"), I;
|
|
2325
2342
|
if (L.minHeight > S)
|
|
2326
|
-
return Ge(
|
|
2343
|
+
return Ge(b, `min resolution of ${L.minHeight} > maximum of ${S}`), I;
|
|
2327
2344
|
if (L.minFramerate > A)
|
|
2328
|
-
return Ge(
|
|
2329
|
-
if (!E.some((
|
|
2330
|
-
return Ge(
|
|
2331
|
-
if (c &&
|
|
2332
|
-
return Ge(
|
|
2345
|
+
return Ge(b, `min framerate of ${L.minFramerate} > maximum of ${A}`), I;
|
|
2346
|
+
if (!E.some((k) => L.videoRanges[k] > 0))
|
|
2347
|
+
return Ge(b, `no variants with VIDEO-RANGE of ${le(E)} found`), I;
|
|
2348
|
+
if (c && b.indexOf(c.substring(0, 4)) % 5 !== 0)
|
|
2349
|
+
return Ge(b, `video codec preference "${c}" not found`), I;
|
|
2333
2350
|
if (L.maxScore < y)
|
|
2334
|
-
return Ge(
|
|
2351
|
+
return Ge(b, `max score of ${L.maxScore} < selected max of ${y}`), I;
|
|
2335
2352
|
}
|
|
2336
|
-
return
|
|
2353
|
+
return I && (ys(b) >= ys(I) || L.fragmentError > a[I].fragmentError) ? I : (p = L.minIndex, y = L.maxScore, b);
|
|
2337
2354
|
}, void 0),
|
|
2338
2355
|
videoRanges: E,
|
|
2339
2356
|
preferHDR: T,
|
|
@@ -2511,34 +2528,34 @@ class il extends Me {
|
|
|
2511
2528
|
const v = this.bwEstimator.getEstimateTTFB(), S = Math.abs(c.playbackRate);
|
|
2512
2529
|
if (d <= Math.max(v, 1e3 * (h / (S * 2))))
|
|
2513
2530
|
return;
|
|
2514
|
-
const A = T ? T.len / S : 0,
|
|
2515
|
-
let
|
|
2516
|
-
|
|
2517
|
-
const
|
|
2518
|
-
if (
|
|
2531
|
+
const A = T ? T.len / S : 0, P = u.loading.first ? u.loading.first - u.loading.start : -1, x = u.loaded && P > -1, I = this.getBwEstimate(), b = n.levels, L = b[g], k = Math.max(u.loaded, Math.round(h * (i.bitrate || L.averageBitrate) / 8));
|
|
2532
|
+
let C = x ? d - P : d;
|
|
2533
|
+
C < 1 && x && (C = Math.min(d, u.loaded * 8 / I));
|
|
2534
|
+
const M = x ? u.loaded * 1e3 / C : 0, $ = v / 1e3, N = M ? (k - u.loaded) / M : k * 8 / I + $;
|
|
2535
|
+
if (N <= A)
|
|
2519
2536
|
return;
|
|
2520
|
-
const F =
|
|
2537
|
+
const F = M ? M * 8 : I, U = ((s = t?.details || this.hls.latestLevelDetails) == null ? void 0 : s.live) === !0, B = this.hls.config.abrBandWidthUpFactor;
|
|
2521
2538
|
let V = Number.POSITIVE_INFINITY, W;
|
|
2522
2539
|
for (W = g - 1; W > f; W--) {
|
|
2523
|
-
const j =
|
|
2524
|
-
if (V = this.getTimeToLoadFrag(
|
|
2540
|
+
const j = b[W].maxBitrate, Q = !b[W].details || U;
|
|
2541
|
+
if (V = this.getTimeToLoadFrag($, F, h * j, Q), V < Math.min(A, h + $))
|
|
2525
2542
|
break;
|
|
2526
2543
|
}
|
|
2527
|
-
if (V >=
|
|
2544
|
+
if (V >= N || V > h * 10)
|
|
2528
2545
|
return;
|
|
2529
|
-
x ? this.bwEstimator.sample(d - Math.min(v,
|
|
2530
|
-
const
|
|
2531
|
-
this.getBwEstimate() *
|
|
2532
|
-
const O = this.findBestLevel(
|
|
2546
|
+
x ? this.bwEstimator.sample(d - Math.min(v, P), u.loaded) : this.bwEstimator.sampleTTFB(d);
|
|
2547
|
+
const R = b[W].maxBitrate;
|
|
2548
|
+
this.getBwEstimate() * B > R && this.resetEstimator(R);
|
|
2549
|
+
const O = this.findBestLevel(R, f, W, 0, A, 1, 1);
|
|
2533
2550
|
O > -1 && (W = O), this.warn(`Fragment ${i.sn}${r ? " part " + r.index : ""} of level ${g} is loading too slowly;
|
|
2534
2551
|
Fragment duration: ${i.duration.toFixed(3)}
|
|
2535
2552
|
Time to underbuffer: ${A.toFixed(3)} s
|
|
2536
|
-
Estimated load time for current fragment: ${
|
|
2553
|
+
Estimated load time for current fragment: ${N.toFixed(3)} s
|
|
2537
2554
|
Estimated load time for down switch fragment: ${V.toFixed(3)} s
|
|
2538
|
-
TTFB estimate: ${
|
|
2539
|
-
Current BW estimate: ${G(
|
|
2555
|
+
TTFB estimate: ${P | 0} ms
|
|
2556
|
+
Current BW estimate: ${G(I) ? I | 0 : "Unknown"} bps
|
|
2540
2557
|
New BW estimate: ${this.getBwEstimate() | 0} bps
|
|
2541
|
-
Switching to level ${W} @ ${
|
|
2558
|
+
Switching to level ${W} @ ${R | 0} bps`), n.nextLoadLevel = n.nextAutoLevel = W, this.clearTimer();
|
|
2542
2559
|
const H = () => {
|
|
2543
2560
|
if (this.clearTimer(), this.fragCurrent === i && this.hls.loadLevel === W && W > 0) {
|
|
2544
2561
|
const j = this.getStarvationDelay();
|
|
@@ -2550,7 +2567,7 @@ class il extends Me {
|
|
|
2550
2567
|
}
|
|
2551
2568
|
}
|
|
2552
2569
|
};
|
|
2553
|
-
y ||
|
|
2570
|
+
y || N > V * 2 ? H() : this.timer = self.setInterval(H, V * 1e3), n.trigger(m.FRAG_LOAD_EMERGENCY_ABORTED, {
|
|
2554
2571
|
frag: i,
|
|
2555
2572
|
part: r,
|
|
2556
2573
|
stats: u
|
|
@@ -2759,35 +2776,35 @@ class il extends Me {
|
|
|
2759
2776
|
if (g.length === 1)
|
|
2760
2777
|
return 0;
|
|
2761
2778
|
const T = g[h], v = !!((c = this.hls.latestLevelDetails) != null && c.live), S = y === -1 || u === -1;
|
|
2762
|
-
let A,
|
|
2779
|
+
let A, P = "SDR", x = T?.frameRate || 0;
|
|
2763
2780
|
const {
|
|
2764
|
-
audioPreference:
|
|
2765
|
-
videoPreference:
|
|
2781
|
+
audioPreference: I,
|
|
2782
|
+
videoPreference: b
|
|
2766
2783
|
} = E, L = this.audioTracksByGroup || (this.audioTracksByGroup = Nn(p));
|
|
2767
|
-
let
|
|
2784
|
+
let k = -1;
|
|
2768
2785
|
if (S) {
|
|
2769
2786
|
if (this.firstSelection !== -1)
|
|
2770
2787
|
return this.firstSelection;
|
|
2771
|
-
const F = this.codecTiers || (this.codecTiers = Jo(g, L, t, s)), U = Zo(F,
|
|
2772
|
-
codecSet:
|
|
2788
|
+
const F = this.codecTiers || (this.codecTiers = Jo(g, L, t, s)), U = Zo(F, P, e, I, b), {
|
|
2789
|
+
codecSet: B,
|
|
2773
2790
|
videoRanges: V,
|
|
2774
2791
|
minFramerate: W,
|
|
2775
|
-
minBitrate:
|
|
2792
|
+
minBitrate: R,
|
|
2776
2793
|
minIndex: O,
|
|
2777
2794
|
preferHDR: H
|
|
2778
2795
|
} = U;
|
|
2779
|
-
|
|
2796
|
+
k = O, A = B, P = H ? V[V.length - 1] : V[0], x = W, e = Math.max(e, R), this.log(`picked start tier ${le(U)}`);
|
|
2780
2797
|
} else
|
|
2781
|
-
A = T?.codecSet,
|
|
2782
|
-
const
|
|
2798
|
+
A = T?.codecSet, P = T?.videoRange;
|
|
2799
|
+
const C = f ? f.duration : d ? d.duration : 0, M = this.bwEstimator.getEstimateTTFB() / 1e3, $ = [];
|
|
2783
2800
|
for (let F = s; F >= t; F--) {
|
|
2784
|
-
var
|
|
2785
|
-
const U = g[F],
|
|
2801
|
+
var N;
|
|
2802
|
+
const U = g[F], B = F > h;
|
|
2786
2803
|
if (!U)
|
|
2787
2804
|
continue;
|
|
2788
2805
|
if (E.useMediaCapabilities && !U.supportedResult && !U.supportedPromise) {
|
|
2789
2806
|
const Q = navigator.mediaCapabilities;
|
|
2790
|
-
typeof Q?.decodingInfo == "function" && Ko(U, L,
|
|
2807
|
+
typeof Q?.decodingInfo == "function" && Ko(U, L, P, x, e, I) ? (U.supportedPromise = Fn(U, L, Q, this.supportedCache), U.supportedPromise.then((Z) => {
|
|
2791
2808
|
if (!this.hls)
|
|
2792
2809
|
return;
|
|
2793
2810
|
U.supportedResult = Z;
|
|
@@ -2797,24 +2814,24 @@ class il extends Me {
|
|
|
2797
2814
|
this.warn(`Error handling MediaCapabilities decodingInfo: ${Z}`);
|
|
2798
2815
|
})) : U.supportedResult = wn;
|
|
2799
2816
|
}
|
|
2800
|
-
if ((A && U.codecSet !== A ||
|
|
2801
|
-
|
|
2817
|
+
if ((A && U.codecSet !== A || P && U.videoRange !== P || B && x > U.frameRate || !B && x > 0 && x < U.frameRate || (N = U.supportedResult) != null && (N = N.decodingInfoResults) != null && N.some((Q) => Q.smooth === !1)) && (!S || F !== k)) {
|
|
2818
|
+
$.push(F);
|
|
2802
2819
|
continue;
|
|
2803
2820
|
}
|
|
2804
|
-
const V = U.details, W = (f ? V?.partTarget : V?.averagetargetduration) ||
|
|
2805
|
-
let
|
|
2806
|
-
|
|
2807
|
-
const O =
|
|
2821
|
+
const V = U.details, W = (f ? V?.partTarget : V?.averagetargetduration) || C;
|
|
2822
|
+
let R;
|
|
2823
|
+
B ? R = o * e : R = n * e;
|
|
2824
|
+
const O = C && i >= C * 2 && r === 0 ? U.averageBitrate : U.maxBitrate, H = this.getTimeToLoadFrag(M, R, O * W, V === void 0);
|
|
2808
2825
|
if (
|
|
2809
2826
|
// if adjusted bw is greater than level bitrate AND
|
|
2810
|
-
|
|
2827
|
+
R >= O && // no level change, or new level has no error history
|
|
2811
2828
|
(F === u || U.loadError === 0 && U.fragmentError === 0) && // fragment fetchDuration unknown OR live stream OR fragment fetchDuration less than max allowed fetch duration, then this level matches
|
|
2812
2829
|
// we don't account for max Fetch Duration for live streams, this is to avoid switching down when near the edge of live sliding window ...
|
|
2813
2830
|
// special case to support startLevel = -1 (bitrateTest) on live streams : in that case we should not exit loop so that findBestLevel will return -1
|
|
2814
|
-
(H <=
|
|
2831
|
+
(H <= M || !G(H) || v && !this.bitrateTestDelay || H < l)
|
|
2815
2832
|
) {
|
|
2816
2833
|
const Q = this.forcedAutoLevel;
|
|
2817
|
-
return F !== y && (Q === -1 || Q !== y) && (
|
|
2834
|
+
return F !== y && (Q === -1 || Q !== y) && ($.length && this.trace(`Skipped level(s) ${$.join(",")} of ${s} max with CODECS and VIDEO-RANGE:"${g[$[0]].codecs}" ${g[$[0]].videoRange}; not compatible with "${A}" ${P}`), this.info(`switch candidate:${h}->${F} adjustedbw(${Math.round(R)})-bitrate=${Math.round(R - O)} ttfb:${M.toFixed(1)} avgDuration:${W.toFixed(1)} maxFetchDuration:${l.toFixed(1)} fetchDuration:${H.toFixed(1)} firstSelection:${S} codecSet:${U.codecSet} videoRange:${U.videoRange} hls.loadLevel:${y}`)), S && (this.firstSelection = F), F;
|
|
2818
2835
|
}
|
|
2819
2836
|
}
|
|
2820
2837
|
return -1;
|
|
@@ -3145,30 +3162,30 @@ class ll extends Me {
|
|
|
3145
3162
|
} = s;
|
|
3146
3163
|
!s.autoLevelEnabled && !s.config.preserveManualLevelOnError && (s.loadLevel = -1);
|
|
3147
3164
|
const p = (r = e.frag) == null ? void 0 : r.type, E = (p === K.AUDIO && l === D.FRAG_PARSING_ERROR || e.sourceBufferName === "audio" && (l === D.BUFFER_ADD_CODEC_ERROR || l === D.BUFFER_APPEND_ERROR)) && h.some(({
|
|
3148
|
-
audioCodec:
|
|
3149
|
-
}) => i.audioCodec !==
|
|
3150
|
-
codecSet:
|
|
3165
|
+
audioCodec: P
|
|
3166
|
+
}) => i.audioCodec !== P), v = e.sourceBufferName === "video" && (l === D.BUFFER_ADD_CODEC_ERROR || l === D.BUFFER_APPEND_ERROR) && h.some(({
|
|
3167
|
+
codecSet: P,
|
|
3151
3168
|
audioCodec: x
|
|
3152
|
-
}) => i.codecSet !==
|
|
3169
|
+
}) => i.codecSet !== P && i.audioCodec === x), {
|
|
3153
3170
|
type: S,
|
|
3154
3171
|
groupId: A
|
|
3155
3172
|
} = (n = e.context) != null ? n : {};
|
|
3156
|
-
for (let
|
|
3157
|
-
const x = (
|
|
3173
|
+
for (let P = h.length; P--; ) {
|
|
3174
|
+
const x = (P + d) % h.length;
|
|
3158
3175
|
if (x !== d && x >= f && x <= g && h[x].loadError === 0) {
|
|
3159
3176
|
var o, c;
|
|
3160
|
-
const
|
|
3177
|
+
const I = h[x];
|
|
3161
3178
|
if (l === D.FRAG_GAP && p === K.MAIN && e.frag) {
|
|
3162
|
-
const
|
|
3163
|
-
if (
|
|
3164
|
-
const L = mt(e.frag,
|
|
3179
|
+
const b = h[x].details;
|
|
3180
|
+
if (b) {
|
|
3181
|
+
const L = mt(e.frag, b.fragments, e.frag.start);
|
|
3165
3182
|
if (L != null && L.gap)
|
|
3166
3183
|
continue;
|
|
3167
3184
|
}
|
|
3168
3185
|
} else {
|
|
3169
|
-
if (S === ee.AUDIO_TRACK &&
|
|
3186
|
+
if (S === ee.AUDIO_TRACK && I.hasAudioGroup(A) || S === ee.SUBTITLE_TRACK && I.hasSubtitleGroup(A))
|
|
3170
3187
|
continue;
|
|
3171
|
-
if (p === K.AUDIO && (o = i.audioGroups) != null && o.some((
|
|
3188
|
+
if (p === K.AUDIO && (o = i.audioGroups) != null && o.some((b) => I.hasAudioGroup(b)) || p === K.SUBTITLE && (c = i.subtitleGroups) != null && c.some((b) => I.hasSubtitleGroup(b)) || E && i.audioCodec === I.audioCodec || v && i.codecSet === I.codecSet || !E && i.codecSet !== I.codecSet)
|
|
3172
3189
|
continue;
|
|
3173
3190
|
}
|
|
3174
3191
|
u = x;
|
|
@@ -3636,12 +3653,12 @@ class dl {
|
|
|
3636
3653
|
const i = this.keySize + 6, r = this.invKeySchedule, n = this.invSBox, o = this.invSubMix, c = o[0], l = o[1], u = o[2], h = o[3], d = this.uint8ArrayToUint32Array_(s);
|
|
3637
3654
|
let f = d[0], g = d[1], p = d[2], y = d[3];
|
|
3638
3655
|
const E = new Int32Array(e), T = new Int32Array(E.length);
|
|
3639
|
-
let v, S, A,
|
|
3656
|
+
let v, S, A, P, x, I, b, L, k, C, M, $, N, F;
|
|
3640
3657
|
const U = this.networkToHostOrderSwap;
|
|
3641
3658
|
for (; t < E.length; ) {
|
|
3642
|
-
for (
|
|
3643
|
-
v = c[x >>> 24] ^ l[
|
|
3644
|
-
v = n[x >>> 24] << 24 ^ n[
|
|
3659
|
+
for (k = U(E[t]), C = U(E[t + 1]), M = U(E[t + 2]), $ = U(E[t + 3]), x = k ^ r[0], I = $ ^ r[1], b = M ^ r[2], L = C ^ r[3], N = 4, F = 1; F < i; F++)
|
|
3660
|
+
v = c[x >>> 24] ^ l[I >> 16 & 255] ^ u[b >> 8 & 255] ^ h[L & 255] ^ r[N], S = c[I >>> 24] ^ l[b >> 16 & 255] ^ u[L >> 8 & 255] ^ h[x & 255] ^ r[N + 1], A = c[b >>> 24] ^ l[L >> 16 & 255] ^ u[x >> 8 & 255] ^ h[I & 255] ^ r[N + 2], P = c[L >>> 24] ^ l[x >> 16 & 255] ^ u[I >> 8 & 255] ^ h[b & 255] ^ r[N + 3], x = v, I = S, b = A, L = P, N = N + 4;
|
|
3661
|
+
v = n[x >>> 24] << 24 ^ n[I >> 16 & 255] << 16 ^ n[b >> 8 & 255] << 8 ^ n[L & 255] ^ r[N], S = n[I >>> 24] << 24 ^ n[b >> 16 & 255] << 16 ^ n[L >> 8 & 255] << 8 ^ n[x & 255] ^ r[N + 1], A = n[b >>> 24] << 24 ^ n[L >> 16 & 255] << 16 ^ n[x >> 8 & 255] << 8 ^ n[I & 255] ^ r[N + 2], P = n[L >>> 24] << 24 ^ n[x >> 16 & 255] << 16 ^ n[I >> 8 & 255] << 8 ^ n[b & 255] ^ r[N + 3], T[t] = U(v ^ f), T[t + 1] = U(P ^ g), T[t + 2] = U(A ^ p), T[t + 3] = U(S ^ y), f = k, g = C, p = M, y = $, t = t + 4;
|
|
3645
3662
|
}
|
|
3646
3663
|
return T.buffer;
|
|
3647
3664
|
}
|
|
@@ -4832,21 +4849,21 @@ class We {
|
|
|
4832
4849
|
const c = {
|
|
4833
4850
|
url: t
|
|
4834
4851
|
}, l = new Ll(t), u = l.fragments, h = [];
|
|
4835
|
-
let d = null, f = 0, g = 0, p = 0, y = 0, E = 0, T = null, v = new Os(i, c), S, A,
|
|
4852
|
+
let d = null, f = 0, g = 0, p = 0, y = 0, E = 0, T = null, v = new Os(i, c), S, A, P, x = -1, I = !1, b = null, L;
|
|
4836
4853
|
if (Bs.lastIndex = 0, l.m3u8 = e, l.hasVariableRefs = Lr(e), ((o = Bs.exec(e)) == null ? void 0 : o[0]) !== "#EXTM3U")
|
|
4837
4854
|
return l.playlistParsingError = new Error("Missing format identifier #EXTM3U"), l;
|
|
4838
4855
|
for (; (S = Bs.exec(e)) !== null; ) {
|
|
4839
|
-
|
|
4840
|
-
const
|
|
4841
|
-
if (
|
|
4842
|
-
v.duration = parseFloat(
|
|
4843
|
-
const
|
|
4844
|
-
v.title =
|
|
4856
|
+
I && (I = !1, v = new Os(i, c), v.playlistOffset = p, v.setStart(p), v.sn = f, v.cc = y, E && (v.bitrate = E), v.level = s, d && (v.initSegment = d, d.rawProgramDateTime && (v.rawProgramDateTime = d.rawProgramDateTime, d.rawProgramDateTime = null), b && (v.setByteRange(b), b = null)));
|
|
4857
|
+
const $ = S[1];
|
|
4858
|
+
if ($) {
|
|
4859
|
+
v.duration = parseFloat($);
|
|
4860
|
+
const N = (" " + S[2]).slice(1);
|
|
4861
|
+
v.title = N || null, v.tagList.push(N ? ["INF", $, N] : ["INF", $]);
|
|
4845
4862
|
} else if (S[3]) {
|
|
4846
4863
|
if (G(v.duration)) {
|
|
4847
|
-
v.playlistOffset = p, v.setStart(p),
|
|
4848
|
-
const
|
|
4849
|
-
v.relurl = ui(l,
|
|
4864
|
+
v.playlistOffset = p, v.setStart(p), P && Mr(v, P, l), v.sn = f, v.level = s, v.cc = y, u.push(v);
|
|
4865
|
+
const N = (" " + S[3]).slice(1);
|
|
4866
|
+
v.relurl = ui(l, N), di(v, T, h), T = v, p += v.duration, f++, g = 0, I = !0;
|
|
4850
4867
|
}
|
|
4851
4868
|
} else {
|
|
4852
4869
|
if (S = S[0].match(kl), !S) {
|
|
@@ -4855,8 +4872,8 @@ class We {
|
|
|
4855
4872
|
}
|
|
4856
4873
|
for (A = 1; A < S.length && S[A] === void 0; A++)
|
|
4857
4874
|
;
|
|
4858
|
-
const
|
|
4859
|
-
switch (
|
|
4875
|
+
const N = (" " + S[A]).slice(1), F = (" " + S[A + 1]).slice(1), U = S[A + 2] ? (" " + S[A + 2]).slice(1) : null;
|
|
4876
|
+
switch (N) {
|
|
4860
4877
|
case "BYTERANGE":
|
|
4861
4878
|
T ? v.setByteRange(F, T) : v.setByteRange(F);
|
|
4862
4879
|
break;
|
|
@@ -4864,34 +4881,34 @@ class We {
|
|
|
4864
4881
|
v.rawProgramDateTime = F, v.tagList.push(["PROGRAM-DATE-TIME", F]), x === -1 && (x = u.length);
|
|
4865
4882
|
break;
|
|
4866
4883
|
case "PLAYLIST-TYPE":
|
|
4867
|
-
l.type && ze(l,
|
|
4884
|
+
l.type && ze(l, N, S), l.type = F.toUpperCase();
|
|
4868
4885
|
break;
|
|
4869
4886
|
case "MEDIA-SEQUENCE":
|
|
4870
|
-
l.startSN !== 0 ? ze(l,
|
|
4887
|
+
l.startSN !== 0 ? ze(l, N, S) : u.length > 0 && Nr(l, N, S), f = l.startSN = parseInt(F);
|
|
4871
4888
|
break;
|
|
4872
4889
|
case "SKIP": {
|
|
4873
|
-
l.skippedSegments && ze(l,
|
|
4874
|
-
const
|
|
4890
|
+
l.skippedSegments && ze(l, N, S);
|
|
4891
|
+
const B = new ue(F, l), V = B.decimalInteger("SKIPPED-SEGMENTS");
|
|
4875
4892
|
if (G(V)) {
|
|
4876
4893
|
l.skippedSegments += V;
|
|
4877
|
-
for (let
|
|
4894
|
+
for (let R = V; R--; )
|
|
4878
4895
|
u.push(null);
|
|
4879
4896
|
f += V;
|
|
4880
4897
|
}
|
|
4881
|
-
const W =
|
|
4898
|
+
const W = B.enumeratedString("RECENTLY-REMOVED-DATERANGES");
|
|
4882
4899
|
W && (l.recentlyRemovedDateranges = (l.recentlyRemovedDateranges || []).concat(W.split(" ")));
|
|
4883
4900
|
break;
|
|
4884
4901
|
}
|
|
4885
4902
|
case "TARGETDURATION":
|
|
4886
|
-
l.targetduration !== 0 && ze(l,
|
|
4903
|
+
l.targetduration !== 0 && ze(l, N, S), l.targetduration = Math.max(parseInt(F), 1);
|
|
4887
4904
|
break;
|
|
4888
4905
|
case "VERSION":
|
|
4889
|
-
l.version !== null && ze(l,
|
|
4906
|
+
l.version !== null && ze(l, N, S), l.version = parseInt(F);
|
|
4890
4907
|
break;
|
|
4891
4908
|
case "INDEPENDENT-SEGMENTS":
|
|
4892
4909
|
break;
|
|
4893
4910
|
case "ENDLIST":
|
|
4894
|
-
l.live || ze(l,
|
|
4911
|
+
l.live || ze(l, N, S), l.live = !1;
|
|
4895
4912
|
break;
|
|
4896
4913
|
case "#":
|
|
4897
4914
|
(F || U) && v.tagList.push(U ? [F, U] : [F]);
|
|
@@ -4900,36 +4917,36 @@ class We {
|
|
|
4900
4917
|
y++, v.tagList.push(["DIS"]);
|
|
4901
4918
|
break;
|
|
4902
4919
|
case "GAP":
|
|
4903
|
-
v.gap = !0, v.tagList.push([
|
|
4920
|
+
v.gap = !0, v.tagList.push([N]);
|
|
4904
4921
|
break;
|
|
4905
4922
|
case "BITRATE":
|
|
4906
|
-
v.tagList.push([
|
|
4923
|
+
v.tagList.push([N, F]), E = parseInt(F) * 1e3, G(E) ? v.bitrate = E : E = 0;
|
|
4907
4924
|
break;
|
|
4908
4925
|
case "DATERANGE": {
|
|
4909
|
-
const
|
|
4926
|
+
const B = new ue(F, l), V = new Hn(B, l.dateRanges[B.ID], l.dateRangeTagCount);
|
|
4910
4927
|
l.dateRangeTagCount++, V.isValid || l.skippedSegments ? l.dateRanges[V.id] = V : re.warn(`Ignoring invalid DATERANGE tag: "${F}"`), v.tagList.push(["EXT-X-DATERANGE", F]);
|
|
4911
4928
|
break;
|
|
4912
4929
|
}
|
|
4913
4930
|
case "DEFINE": {
|
|
4914
4931
|
{
|
|
4915
|
-
const
|
|
4916
|
-
"IMPORT" in
|
|
4932
|
+
const B = new ue(F, l);
|
|
4933
|
+
"IMPORT" in B ? El(l, B, n) : Ir(l, B, t);
|
|
4917
4934
|
}
|
|
4918
4935
|
break;
|
|
4919
4936
|
}
|
|
4920
4937
|
case "DISCONTINUITY-SEQUENCE":
|
|
4921
|
-
l.startCC !== 0 ? ze(l,
|
|
4938
|
+
l.startCC !== 0 ? ze(l, N, S) : u.length > 0 && Nr(l, N, S), l.startCC = y = parseInt(F);
|
|
4922
4939
|
break;
|
|
4923
4940
|
case "KEY": {
|
|
4924
|
-
const
|
|
4925
|
-
if (
|
|
4926
|
-
if (
|
|
4927
|
-
|
|
4941
|
+
const B = Pr(F, t, l);
|
|
4942
|
+
if (B.isSupported()) {
|
|
4943
|
+
if (B.method === "NONE") {
|
|
4944
|
+
P = void 0;
|
|
4928
4945
|
break;
|
|
4929
4946
|
}
|
|
4930
|
-
|
|
4931
|
-
const V =
|
|
4932
|
-
V != null && V.matches(
|
|
4947
|
+
P || (P = {});
|
|
4948
|
+
const V = P[B.keyFormat];
|
|
4949
|
+
V != null && V.matches(B) || (V && (P = ae({}, P)), P[B.keyFormat] = B);
|
|
4933
4950
|
} else
|
|
4934
4951
|
re.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${F}"`);
|
|
4935
4952
|
break;
|
|
@@ -4938,47 +4955,47 @@ class We {
|
|
|
4938
4955
|
l.startTimeOffset = kr(F);
|
|
4939
4956
|
break;
|
|
4940
4957
|
case "MAP": {
|
|
4941
|
-
const
|
|
4958
|
+
const B = new ue(F, l);
|
|
4942
4959
|
if (v.duration) {
|
|
4943
4960
|
const V = new Os(i, c);
|
|
4944
|
-
Fr(V,
|
|
4961
|
+
Fr(V, B, s, P), d = V, v.initSegment = d, d.rawProgramDateTime && !v.rawProgramDateTime && (v.rawProgramDateTime = d.rawProgramDateTime);
|
|
4945
4962
|
} else {
|
|
4946
4963
|
const V = v.byteRangeEndOffset;
|
|
4947
4964
|
if (V) {
|
|
4948
4965
|
const W = v.byteRangeStartOffset;
|
|
4949
|
-
|
|
4966
|
+
b = `${V - W}@${W}`;
|
|
4950
4967
|
} else
|
|
4951
|
-
|
|
4952
|
-
Fr(v,
|
|
4968
|
+
b = null;
|
|
4969
|
+
Fr(v, B, s, P), d = v, I = !0;
|
|
4953
4970
|
}
|
|
4954
4971
|
d.cc = y;
|
|
4955
4972
|
break;
|
|
4956
4973
|
}
|
|
4957
4974
|
case "SERVER-CONTROL": {
|
|
4958
|
-
L && ze(l,
|
|
4975
|
+
L && ze(l, N, S), L = new ue(F), l.canBlockReload = L.bool("CAN-BLOCK-RELOAD"), l.canSkipUntil = L.optionalFloat("CAN-SKIP-UNTIL", 0), l.canSkipDateRanges = l.canSkipUntil > 0 && L.bool("CAN-SKIP-DATERANGES"), l.partHoldBack = L.optionalFloat("PART-HOLD-BACK", 0), l.holdBack = L.optionalFloat("HOLD-BACK", 0);
|
|
4959
4976
|
break;
|
|
4960
4977
|
}
|
|
4961
4978
|
case "PART-INF": {
|
|
4962
|
-
l.partTarget && ze(l,
|
|
4963
|
-
const
|
|
4964
|
-
l.partTarget =
|
|
4979
|
+
l.partTarget && ze(l, N, S);
|
|
4980
|
+
const B = new ue(F);
|
|
4981
|
+
l.partTarget = B.decimalFloatingPoint("PART-TARGET");
|
|
4965
4982
|
break;
|
|
4966
4983
|
}
|
|
4967
4984
|
case "PART": {
|
|
4968
|
-
let
|
|
4969
|
-
|
|
4970
|
-
const V = g > 0 ?
|
|
4971
|
-
|
|
4985
|
+
let B = l.partList;
|
|
4986
|
+
B || (B = l.partList = []);
|
|
4987
|
+
const V = g > 0 ? B[B.length - 1] : void 0, W = g++, R = new ue(F, l), O = new Eo(R, v, c, W, V);
|
|
4988
|
+
B.push(O), v.duration += O.duration;
|
|
4972
4989
|
break;
|
|
4973
4990
|
}
|
|
4974
4991
|
case "PRELOAD-HINT": {
|
|
4975
|
-
const
|
|
4976
|
-
l.preloadHint =
|
|
4992
|
+
const B = new ue(F, l);
|
|
4993
|
+
l.preloadHint = B;
|
|
4977
4994
|
break;
|
|
4978
4995
|
}
|
|
4979
4996
|
case "RENDITION-REPORT": {
|
|
4980
|
-
const
|
|
4981
|
-
l.renditionReports = l.renditionReports || [], l.renditionReports.push(
|
|
4997
|
+
const B = new ue(F, l);
|
|
4998
|
+
l.renditionReports = l.renditionReports || [], l.renditionReports.push(B);
|
|
4982
4999
|
break;
|
|
4983
5000
|
}
|
|
4984
5001
|
default:
|
|
@@ -4987,14 +5004,14 @@ class We {
|
|
|
4987
5004
|
}
|
|
4988
5005
|
}
|
|
4989
5006
|
}
|
|
4990
|
-
T && !T.relurl ? (u.pop(), p -= T.duration, l.partList && (l.fragmentHint = T)) : l.partList && (di(v, T, h), v.cc = y, l.fragmentHint = v,
|
|
4991
|
-
const
|
|
4992
|
-
if (p += l.skippedSegments * l.targetduration, p > 0 &&
|
|
4993
|
-
l.averagetargetduration = p /
|
|
4994
|
-
const
|
|
4995
|
-
l.endSN =
|
|
5007
|
+
T && !T.relurl ? (u.pop(), p -= T.duration, l.partList && (l.fragmentHint = T)) : l.partList && (di(v, T, h), v.cc = y, l.fragmentHint = v, P && Mr(v, P, l)), l.targetduration || (l.playlistParsingError = new Error("Missing Target Duration"));
|
|
5008
|
+
const k = u.length, C = u[0], M = u[k - 1];
|
|
5009
|
+
if (p += l.skippedSegments * l.targetduration, p > 0 && k && M) {
|
|
5010
|
+
l.averagetargetduration = p / k;
|
|
5011
|
+
const $ = M.sn;
|
|
5012
|
+
l.endSN = $ !== "initSegment" ? $ : 0, l.live || (M.endList = !0), x > 0 && (Ol(u, x), C && h.unshift(C));
|
|
4996
5013
|
}
|
|
4997
|
-
return l.fragmentHint && (p += l.fragmentHint.duration), l.totalduration = p, h.length && l.dateRangeTagCount &&
|
|
5014
|
+
return l.fragmentHint && (p += l.fragmentHint.duration), l.totalduration = p, h.length && l.dateRangeTagCount && C && zn(h, l), l.endCC = y, l;
|
|
4998
5015
|
}
|
|
4999
5016
|
}
|
|
5000
5017
|
function zn(a, e) {
|
|
@@ -7488,9 +7505,9 @@ class Rc extends Ta {
|
|
|
7488
7505
|
u();
|
|
7489
7506
|
const T = u();
|
|
7490
7507
|
if (h(5), g(3), u(), y(), T === 100 || T === 110 || T === 122 || T === 244 || T === 44 || T === 83 || T === 86 || T === 118 || T === 128) {
|
|
7491
|
-
const
|
|
7492
|
-
if (
|
|
7493
|
-
for (c =
|
|
7508
|
+
const I = d();
|
|
7509
|
+
if (I === 3 && g(1), y(), y(), g(1), f())
|
|
7510
|
+
for (c = I !== 3 ? 8 : 12, l = 0; l < c; l++)
|
|
7494
7511
|
f() && (l < 6 ? E(16, t) : E(64, t));
|
|
7495
7512
|
}
|
|
7496
7513
|
y();
|
|
@@ -7501,8 +7518,8 @@ class Rc extends Ta {
|
|
|
7501
7518
|
for (g(1), p(), p(), o = d(), l = 0; l < o; l++)
|
|
7502
7519
|
p();
|
|
7503
7520
|
y(), g(1);
|
|
7504
|
-
const S = d(), A = d(),
|
|
7505
|
-
|
|
7521
|
+
const S = d(), A = d(), P = h(1);
|
|
7522
|
+
P === 0 && g(1), g(1), f() && (s = d(), i = d(), r = d(), n = d());
|
|
7506
7523
|
let x = [1, 1];
|
|
7507
7524
|
if (f() && f())
|
|
7508
7525
|
switch (u()) {
|
|
@@ -7561,7 +7578,7 @@ class Rc extends Ta {
|
|
|
7561
7578
|
}
|
|
7562
7579
|
return {
|
|
7563
7580
|
width: Math.ceil((S + 1) * 16 - s * 2 - i * 2),
|
|
7564
|
-
height: (2 -
|
|
7581
|
+
height: (2 - P) * (A + 1) * 16 - (P ? 2 : 4) * (r + n),
|
|
7565
7582
|
pixelRatio: x
|
|
7566
7583
|
};
|
|
7567
7584
|
}
|
|
@@ -7693,11 +7710,11 @@ class bc extends Ta {
|
|
|
7693
7710
|
t.readUEG();
|
|
7694
7711
|
const S = t.readUEG();
|
|
7695
7712
|
S == 3 && t.skipBits(1);
|
|
7696
|
-
const A = t.readUEG(),
|
|
7697
|
-
let
|
|
7698
|
-
x && (
|
|
7699
|
-
const
|
|
7700
|
-
for (let se =
|
|
7713
|
+
const A = t.readUEG(), P = t.readUEG(), x = t.readBoolean();
|
|
7714
|
+
let I = 0, b = 0, L = 0, k = 0;
|
|
7715
|
+
x && (I += t.readUEG(), b += t.readUEG(), L += t.readUEG(), k += t.readUEG());
|
|
7716
|
+
const C = t.readUEG(), M = t.readUEG(), $ = t.readUEG(), N = t.readBoolean();
|
|
7717
|
+
for (let se = N ? 0 : s; se <= s; se++)
|
|
7701
7718
|
t.skipUEG(), t.skipUEG(), t.skipUEG();
|
|
7702
7719
|
if (t.skipUEG(), t.skipUEG(), t.skipUEG(), t.skipUEG(), t.skipUEG(), t.skipUEG(), t.readBoolean() && t.readBoolean())
|
|
7703
7720
|
for (let xe = 0; xe < 4; xe++)
|
|
@@ -7711,12 +7728,12 @@ class bc extends Ta {
|
|
|
7711
7728
|
t.readEG();
|
|
7712
7729
|
}
|
|
7713
7730
|
t.readBoolean(), t.readBoolean(), t.readBoolean() && (t.readUByte(), t.skipUEG(), t.skipUEG(), t.readBoolean());
|
|
7714
|
-
const
|
|
7731
|
+
const B = t.readUEG();
|
|
7715
7732
|
let V = 0;
|
|
7716
|
-
for (let se = 0; se <
|
|
7733
|
+
for (let se = 0; se < B; se++) {
|
|
7717
7734
|
let xe = !1;
|
|
7718
7735
|
if (se !== 0 && (xe = t.readBoolean()), xe) {
|
|
7719
|
-
se ===
|
|
7736
|
+
se === B && t.readUEG(), t.readBoolean(), t.readUEG();
|
|
7720
7737
|
let Oe = 0;
|
|
7721
7738
|
for (let ot = 0; ot <= V; ot++) {
|
|
7722
7739
|
const Ne = t.readBoolean();
|
|
@@ -7736,12 +7753,12 @@ class bc extends Ta {
|
|
|
7736
7753
|
if (t.readBoolean()) {
|
|
7737
7754
|
const se = t.readUEG();
|
|
7738
7755
|
for (let xe = 0; xe < se; xe++) {
|
|
7739
|
-
for (let Oe = 0; Oe <
|
|
7756
|
+
for (let Oe = 0; Oe < $ + 4; Oe++)
|
|
7740
7757
|
t.readBits(1);
|
|
7741
7758
|
t.readBits(1);
|
|
7742
7759
|
}
|
|
7743
7760
|
}
|
|
7744
|
-
let
|
|
7761
|
+
let R = 0, O = 1, H = 1, j = !0, Q = 1, Z = 0;
|
|
7745
7762
|
t.readBoolean(), t.readBoolean();
|
|
7746
7763
|
let te = !1;
|
|
7747
7764
|
if (t.readBoolean()) {
|
|
@@ -7767,12 +7784,12 @@ class bc extends Ta {
|
|
|
7767
7784
|
t.readUEG(), t.readUEG(), Ct && (t.readUEG(), t.readUEG()), t.skipBits(1);
|
|
7768
7785
|
}
|
|
7769
7786
|
}
|
|
7770
|
-
t.readBoolean() && (t.readBoolean(), t.readBoolean(), t.readBoolean(),
|
|
7787
|
+
t.readBoolean() && (t.readBoolean(), t.readBoolean(), t.readBoolean(), R = t.readUEG());
|
|
7771
7788
|
}
|
|
7772
|
-
let Se = A, we =
|
|
7789
|
+
let Se = A, we = P;
|
|
7773
7790
|
if (x) {
|
|
7774
7791
|
let se = 1, xe = 1;
|
|
7775
|
-
S === 1 ? se = xe = 2 : S == 2 && (se = 2), Se = A - se *
|
|
7792
|
+
S === 1 ? se = xe = 2 : S == 2 && (se = 2), Se = A - se * b - se * I, we = P - xe * k - xe * L;
|
|
7776
7793
|
}
|
|
7777
7794
|
const at = i ? ["A", "B", "C"][i] : "", Za = o << 24 | c << 16 | l << 8 | u;
|
|
7778
7795
|
let Ps = 0;
|
|
@@ -7788,10 +7805,10 @@ class bc extends Ta {
|
|
|
7788
7805
|
general_profile_compatibility_flags: [o, c, l, u],
|
|
7789
7806
|
general_constraint_indicator_flags: [h, d, f, g, p, y],
|
|
7790
7807
|
general_level_idc: E,
|
|
7791
|
-
bit_depth:
|
|
7792
|
-
bit_depth_luma_minus8:
|
|
7793
|
-
bit_depth_chroma_minus8:
|
|
7794
|
-
min_spatial_segmentation_idc:
|
|
7808
|
+
bit_depth: C + 8,
|
|
7809
|
+
bit_depth_luma_minus8: C,
|
|
7810
|
+
bit_depth_chroma_minus8: M,
|
|
7811
|
+
min_spatial_segmentation_idc: R,
|
|
7795
7812
|
chroma_format_idc: S,
|
|
7796
7813
|
frame_rate: {
|
|
7797
7814
|
fixed: j,
|
|
@@ -7893,22 +7910,22 @@ class st {
|
|
|
7893
7910
|
let A = 0;
|
|
7894
7911
|
for (let x = S; x < v; x += pe)
|
|
7895
7912
|
if (e[x] === 71) {
|
|
7896
|
-
const
|
|
7897
|
-
let
|
|
7913
|
+
const I = !!(e[x + 1] & 64), b = gi(e, x), L = (e[x + 3] & 48) >> 4;
|
|
7914
|
+
let k;
|
|
7898
7915
|
if (L > 1) {
|
|
7899
|
-
if (
|
|
7916
|
+
if (k = x + 5 + e[x + 4], k === x + pe)
|
|
7900
7917
|
continue;
|
|
7901
7918
|
} else
|
|
7902
|
-
|
|
7903
|
-
switch (
|
|
7919
|
+
k = x + 4;
|
|
7920
|
+
switch (b) {
|
|
7904
7921
|
case u:
|
|
7905
|
-
|
|
7922
|
+
I && (h && (r = vt(h, this.logger)) && (this.readyVideoParser(n.segmentCodec), this.videoParser !== null && this.videoParser.parsePES(n, l, r, !1)), h = {
|
|
7906
7923
|
data: [],
|
|
7907
7924
|
size: 0
|
|
7908
|
-
}), h && (h.data.push(e.subarray(
|
|
7925
|
+
}), h && (h.data.push(e.subarray(k, x + pe)), h.size += x + pe - k);
|
|
7909
7926
|
break;
|
|
7910
7927
|
case d:
|
|
7911
|
-
if (
|
|
7928
|
+
if (I) {
|
|
7912
7929
|
if (g && (r = vt(g, this.logger)))
|
|
7913
7930
|
switch (o.segmentCodec) {
|
|
7914
7931
|
case "aac":
|
|
@@ -7926,40 +7943,40 @@ class st {
|
|
|
7926
7943
|
size: 0
|
|
7927
7944
|
};
|
|
7928
7945
|
}
|
|
7929
|
-
g && (g.data.push(e.subarray(
|
|
7946
|
+
g && (g.data.push(e.subarray(k, x + pe)), g.size += x + pe - k);
|
|
7930
7947
|
break;
|
|
7931
7948
|
case f:
|
|
7932
|
-
|
|
7949
|
+
I && (p && (r = vt(p, this.logger)) && this.parseID3PES(c, r), p = {
|
|
7933
7950
|
data: [],
|
|
7934
7951
|
size: 0
|
|
7935
|
-
}), p && (p.data.push(e.subarray(
|
|
7952
|
+
}), p && (p.data.push(e.subarray(k, x + pe)), p.size += x + pe - k);
|
|
7936
7953
|
break;
|
|
7937
7954
|
case 0:
|
|
7938
|
-
|
|
7955
|
+
I && (k += e[k] + 1), T = this._pmtId = _c(e, k);
|
|
7939
7956
|
break;
|
|
7940
7957
|
case T: {
|
|
7941
|
-
|
|
7942
|
-
const
|
|
7943
|
-
u =
|
|
7958
|
+
I && (k += e[k] + 1);
|
|
7959
|
+
const C = Dc(e, k, this.typeSupported, s, this.observer, this.logger);
|
|
7960
|
+
u = C.videoPid, u > 0 && (n.pid = u, n.segmentCodec = C.segmentVideoCodec), d = C.audioPid, d > 0 && (o.pid = d, o.segmentCodec = C.segmentAudioCodec), f = C.id3Pid, f > 0 && (c.pid = f), y !== null && !E && (this.logger.warn(`MPEG-TS PMT found at ${x} after unknown PID '${y}'. Backtracking to sync byte @${S} to parse all TS packets.`), y = null, x = S - 188), E = this.pmtParsed = !0;
|
|
7944
7961
|
break;
|
|
7945
7962
|
}
|
|
7946
7963
|
case 17:
|
|
7947
7964
|
case 8191:
|
|
7948
7965
|
break;
|
|
7949
7966
|
default:
|
|
7950
|
-
y =
|
|
7967
|
+
y = b;
|
|
7951
7968
|
break;
|
|
7952
7969
|
}
|
|
7953
7970
|
} else
|
|
7954
7971
|
A++;
|
|
7955
7972
|
A > 0 && mi(this.observer, new Error(`Found ${A} TS packet/s that do not start with 0x47`), void 0, this.logger), n.pesData = h, o.pesData = g, c.pesData = p;
|
|
7956
|
-
const
|
|
7973
|
+
const P = {
|
|
7957
7974
|
audioTrack: o,
|
|
7958
7975
|
videoTrack: n,
|
|
7959
7976
|
id3Track: c,
|
|
7960
7977
|
textTrack: l
|
|
7961
7978
|
};
|
|
7962
|
-
return i && this.extractRemainingSamples(
|
|
7979
|
+
return i && this.extractRemainingSamples(P), P;
|
|
7963
7980
|
}
|
|
7964
7981
|
flush() {
|
|
7965
7982
|
const {
|
|
@@ -9529,31 +9546,31 @@ class ds extends Me {
|
|
|
9529
9546
|
const E = e.pid > -1, T = t.pid > -1, v = t.samples.length, S = e.samples.length > 0, A = o && v > 0 || v > 1;
|
|
9530
9547
|
if ((!E || S) && (!T || A) || this.ISGenerated || o) {
|
|
9531
9548
|
if (this.ISGenerated) {
|
|
9532
|
-
var x,
|
|
9533
|
-
const
|
|
9534
|
-
(
|
|
9549
|
+
var x, I, b, L;
|
|
9550
|
+
const $ = this.videoTrackConfig;
|
|
9551
|
+
($ && (t.width !== $.width || t.height !== $.height || ((x = t.pixelRatio) == null ? void 0 : x[0]) !== ((I = $.pixelRatio) == null ? void 0 : I[0]) || ((b = t.pixelRatio) == null ? void 0 : b[1]) !== ((L = $.pixelRatio) == null ? void 0 : L[1])) || !$ && A || this.nextAudioTs === null && S) && this.resetInitSegment();
|
|
9535
9552
|
}
|
|
9536
9553
|
this.ISGenerated || (h = this.generateIS(e, t, r, n));
|
|
9537
|
-
const
|
|
9538
|
-
let
|
|
9539
|
-
if (A && (
|
|
9540
|
-
if (g = !0,
|
|
9541
|
-
this.warn(`Dropped ${
|
|
9542
|
-
const
|
|
9543
|
-
t.samples = t.samples.slice(
|
|
9544
|
-
} else
|
|
9554
|
+
const k = this.isVideoContiguous;
|
|
9555
|
+
let C = -1, M;
|
|
9556
|
+
if (A && (C = Nc(t.samples), !k && this.config.forceKeyFrameOnDiscontinuity))
|
|
9557
|
+
if (g = !0, C > 0) {
|
|
9558
|
+
this.warn(`Dropped ${C} out of ${v} video samples due to a missing keyframe`);
|
|
9559
|
+
const $ = this.getVideoStartPts(t.samples);
|
|
9560
|
+
t.samples = t.samples.slice(C), t.dropped += C, y += (t.samples[0].pts - $) / t.inputTimeScale, M = y;
|
|
9561
|
+
} else C === -1 && (this.warn(`No keyframe found out of ${v} video samples`), g = !1);
|
|
9545
9562
|
if (this.ISGenerated) {
|
|
9546
9563
|
if (S && A) {
|
|
9547
|
-
const
|
|
9564
|
+
const $ = this.getVideoStartPts(t.samples), F = (De(e.samples[0].pts, $) - $) / t.inputTimeScale;
|
|
9548
9565
|
p += Math.max(0, F), y += Math.max(0, -F);
|
|
9549
9566
|
}
|
|
9550
9567
|
if (S) {
|
|
9551
9568
|
if (e.samplerate || (this.warn("regenerate InitSegment as audio detected"), h = this.generateIS(e, t, r, n)), u = this.remuxAudio(e, p, this.isAudioContiguous, n, T || A || c === K.AUDIO ? y : void 0), A) {
|
|
9552
|
-
const
|
|
9553
|
-
t.inputTimeScale || (this.warn("regenerate InitSegment as video detected"), h = this.generateIS(e, t, r, n)), l = this.remuxVideo(t, y,
|
|
9569
|
+
const $ = u ? u.endPTS - u.startPTS : 0;
|
|
9570
|
+
t.inputTimeScale || (this.warn("regenerate InitSegment as video detected"), h = this.generateIS(e, t, r, n)), l = this.remuxVideo(t, y, k, $);
|
|
9554
9571
|
}
|
|
9555
|
-
} else A && (l = this.remuxVideo(t, y,
|
|
9556
|
-
l && (l.firstKeyFrame =
|
|
9572
|
+
} else A && (l = this.remuxVideo(t, y, k, 0));
|
|
9573
|
+
l && (l.firstKeyFrame = C, l.independent = C !== -1, l.firstKeyFramePTS = M);
|
|
9557
9574
|
}
|
|
9558
9575
|
}
|
|
9559
9576
|
return this.ISGenerated && this._initPTS && this._initDTS && (s.samples.length && (f = Sa(s, r, this._initPTS, this._initDTS)), i.samples.length && (d = xa(i, r, this._initPTS))), {
|
|
@@ -9637,109 +9654,109 @@ class ds extends Me {
|
|
|
9637
9654
|
const r = e.inputTimeScale, n = e.samples, o = [], c = n.length, l = this._initPTS, u = l.baseTime * r / l.timescale;
|
|
9638
9655
|
let h = this.nextVideoTs, d = 8, f = this.videoSampleDuration, g, p, y = Number.POSITIVE_INFINITY, E = Number.NEGATIVE_INFINITY, T = !1;
|
|
9639
9656
|
if (!s || h === null) {
|
|
9640
|
-
const
|
|
9641
|
-
St && h !== null && Math.abs(
|
|
9657
|
+
const R = u + t * r, O = n[0].pts - De(n[0].dts, n[0].pts);
|
|
9658
|
+
St && h !== null && Math.abs(R - O - (h + u)) < 15e3 ? s = !0 : h = R - O - u;
|
|
9642
9659
|
}
|
|
9643
9660
|
const v = h + u;
|
|
9644
|
-
for (let
|
|
9645
|
-
const O = n[
|
|
9646
|
-
O.pts = De(O.pts, v), O.dts = De(O.dts, v), O.dts < n[
|
|
9661
|
+
for (let R = 0; R < c; R++) {
|
|
9662
|
+
const O = n[R];
|
|
9663
|
+
O.pts = De(O.pts, v), O.dts = De(O.dts, v), O.dts < n[R > 0 ? R - 1 : R].dts && (T = !0);
|
|
9647
9664
|
}
|
|
9648
|
-
T && n.sort(function(
|
|
9649
|
-
const H =
|
|
9665
|
+
T && n.sort(function(R, O) {
|
|
9666
|
+
const H = R.dts - O.dts, j = R.pts - O.pts;
|
|
9650
9667
|
return H || j;
|
|
9651
9668
|
}), g = n[0].dts, p = n[n.length - 1].dts;
|
|
9652
9669
|
const S = p - g, A = S ? Math.round(S / (c - 1)) : f || e.inputTimeScale / 30;
|
|
9653
9670
|
if (s) {
|
|
9654
|
-
const
|
|
9655
|
-
if ((O || H) && (O ? this.warn(`${(e.segmentCodec || "").toUpperCase()}: ${Ot(
|
|
9671
|
+
const R = g - v, O = R > A, H = R < -1;
|
|
9672
|
+
if ((O || H) && (O ? this.warn(`${(e.segmentCodec || "").toUpperCase()}: ${Ot(R, !0)} ms (${R}dts) hole between fragments detected at ${t.toFixed(3)}`) : this.warn(`${(e.segmentCodec || "").toUpperCase()}: ${Ot(-R, !0)} ms (${R}dts) overlapping between fragments detected at ${t.toFixed(3)}`), !H || v >= n[0].pts || St)) {
|
|
9656
9673
|
g = v;
|
|
9657
|
-
const j = n[0].pts -
|
|
9674
|
+
const j = n[0].pts - R;
|
|
9658
9675
|
if (O)
|
|
9659
9676
|
n[0].dts = g, n[0].pts = j;
|
|
9660
9677
|
else {
|
|
9661
9678
|
let Q = !0;
|
|
9662
9679
|
for (let Z = 0; Z < n.length && !(n[Z].dts > j && Q); Z++) {
|
|
9663
9680
|
const te = n[Z].pts;
|
|
9664
|
-
if (n[Z].dts -=
|
|
9681
|
+
if (n[Z].dts -= R, n[Z].pts -= R, Z < n.length - 1) {
|
|
9665
9682
|
const ce = n[Z + 1].pts, Se = n[Z].pts, we = ce <= Se, at = ce <= te;
|
|
9666
9683
|
Q = we == at;
|
|
9667
9684
|
}
|
|
9668
9685
|
}
|
|
9669
9686
|
}
|
|
9670
|
-
this.log(`Video: Initial PTS/DTS adjusted: ${Ot(j, !0)}/${Ot(g, !0)}, delta: ${Ot(
|
|
9687
|
+
this.log(`Video: Initial PTS/DTS adjusted: ${Ot(j, !0)}/${Ot(g, !0)}, delta: ${Ot(R, !0)} ms`);
|
|
9671
9688
|
}
|
|
9672
9689
|
}
|
|
9673
9690
|
g = Math.max(0, g);
|
|
9674
|
-
let
|
|
9675
|
-
for (let
|
|
9676
|
-
const O = n[
|
|
9691
|
+
let P = 0, x = 0, I = g;
|
|
9692
|
+
for (let R = 0; R < c; R++) {
|
|
9693
|
+
const O = n[R], H = O.units, j = H.length;
|
|
9677
9694
|
let Q = 0;
|
|
9678
9695
|
for (let Z = 0; Z < j; Z++)
|
|
9679
9696
|
Q += H[Z].data.length;
|
|
9680
|
-
x += Q,
|
|
9697
|
+
x += Q, P += j, O.length = Q, O.dts < I ? (O.dts = I, I += A / 4 | 0 || 1) : I = O.dts, y = Math.min(O.pts, y), E = Math.max(O.pts, E);
|
|
9681
9698
|
}
|
|
9682
9699
|
p = n[c - 1].dts;
|
|
9683
|
-
const
|
|
9700
|
+
const b = x + 4 * P + 8;
|
|
9684
9701
|
let L;
|
|
9685
9702
|
try {
|
|
9686
|
-
L = new Uint8Array(
|
|
9687
|
-
} catch (
|
|
9703
|
+
L = new Uint8Array(b);
|
|
9704
|
+
} catch (R) {
|
|
9688
9705
|
this.observer.emit(m.ERROR, m.ERROR, {
|
|
9689
9706
|
type: Y.MUX_ERROR,
|
|
9690
9707
|
details: D.REMUX_ALLOC_ERROR,
|
|
9691
9708
|
fatal: !1,
|
|
9692
|
-
error:
|
|
9693
|
-
bytes:
|
|
9694
|
-
reason: `fail allocating video mdat ${
|
|
9709
|
+
error: R,
|
|
9710
|
+
bytes: b,
|
|
9711
|
+
reason: `fail allocating video mdat ${b}`
|
|
9695
9712
|
});
|
|
9696
9713
|
return;
|
|
9697
9714
|
}
|
|
9698
|
-
const
|
|
9699
|
-
|
|
9700
|
-
let
|
|
9701
|
-
for (let
|
|
9702
|
-
const O = n[
|
|
9715
|
+
const k = new DataView(L.buffer);
|
|
9716
|
+
k.setUint32(0, b), L.set(_.types.mdat, 4);
|
|
9717
|
+
let C = !1, M = Number.POSITIVE_INFINITY, $ = Number.POSITIVE_INFINITY, N = Number.NEGATIVE_INFINITY, F = Number.NEGATIVE_INFINITY;
|
|
9718
|
+
for (let R = 0; R < c; R++) {
|
|
9719
|
+
const O = n[R], H = O.units;
|
|
9703
9720
|
let j = 0;
|
|
9704
9721
|
for (let te = 0, ce = H.length; te < ce; te++) {
|
|
9705
9722
|
const Se = H[te], we = Se.data, at = Se.data.byteLength;
|
|
9706
|
-
|
|
9723
|
+
k.setUint32(d, at), d += 4, L.set(we, d), d += at, j += 4 + at;
|
|
9707
9724
|
}
|
|
9708
9725
|
let Q;
|
|
9709
|
-
if (
|
|
9710
|
-
f = n[
|
|
9726
|
+
if (R < c - 1)
|
|
9727
|
+
f = n[R + 1].dts - O.dts, Q = n[R + 1].pts - O.pts;
|
|
9711
9728
|
else {
|
|
9712
|
-
const te = this.config, ce =
|
|
9713
|
-
if (Q =
|
|
9729
|
+
const te = this.config, ce = R > 0 ? O.dts - n[R - 1].dts : A;
|
|
9730
|
+
if (Q = R > 0 ? O.pts - n[R - 1].pts : A, te.stretchShortVideoTrack && this.nextAudioTs !== null) {
|
|
9714
9731
|
const Se = Math.floor(te.maxBufferHole * r), we = (i ? y + i * r : this.nextAudioTs + u) - O.pts;
|
|
9715
|
-
we > Se ? (f = we - ce, f < 0 ? f = ce :
|
|
9732
|
+
we > Se ? (f = we - ce, f < 0 ? f = ce : C = !0, this.log(`It is approximately ${we / 90} ms to the next segment; using duration ${f / 90} ms for the last video frame.`)) : f = ce;
|
|
9716
9733
|
} else
|
|
9717
9734
|
f = ce;
|
|
9718
9735
|
}
|
|
9719
9736
|
const Z = Math.round(O.pts - O.dts);
|
|
9720
|
-
|
|
9737
|
+
M = Math.min(M, f), N = Math.max(N, f), $ = Math.min($, Q), F = Math.max(F, Q), o.push(Wr(O.key, f, j, Z));
|
|
9721
9738
|
}
|
|
9722
9739
|
if (o.length) {
|
|
9723
9740
|
if (St) {
|
|
9724
9741
|
if (St < 70) {
|
|
9725
|
-
const
|
|
9726
|
-
|
|
9742
|
+
const R = o[0].flags;
|
|
9743
|
+
R.dependsOn = 2, R.isNonSync = 0;
|
|
9727
9744
|
}
|
|
9728
|
-
} else if (Vs && F -
|
|
9745
|
+
} else if (Vs && F - $ < N - M && A / N < 0.025 && o[0].cts === 0) {
|
|
9729
9746
|
this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");
|
|
9730
|
-
let
|
|
9747
|
+
let R = g;
|
|
9731
9748
|
for (let O = 0, H = o.length; O < H; O++) {
|
|
9732
|
-
const j =
|
|
9749
|
+
const j = R + o[O].duration, Q = R + o[O].cts;
|
|
9733
9750
|
if (O < H - 1) {
|
|
9734
9751
|
const Z = j + o[O + 1].cts;
|
|
9735
9752
|
o[O].duration = Z - Q;
|
|
9736
9753
|
} else
|
|
9737
9754
|
o[O].duration = O ? o[O - 1].duration : A;
|
|
9738
|
-
o[O].cts = 0,
|
|
9755
|
+
o[O].cts = 0, R = j;
|
|
9739
9756
|
}
|
|
9740
9757
|
}
|
|
9741
9758
|
}
|
|
9742
|
-
f =
|
|
9759
|
+
f = C || !f ? A : f;
|
|
9743
9760
|
const U = p + f;
|
|
9744
9761
|
this.nextVideoTs = h = U - u, this.videoSampleDuration = f, this.isVideoContiguous = !0;
|
|
9745
9762
|
const W = {
|
|
@@ -9783,39 +9800,39 @@ class ds extends Me {
|
|
|
9783
9800
|
}
|
|
9784
9801
|
if (e.segmentCodec === "aac") {
|
|
9785
9802
|
const F = this.config.maxAudioFramesDrift;
|
|
9786
|
-
for (let U = 0,
|
|
9787
|
-
const V = p[U], W = V.pts,
|
|
9788
|
-
if (
|
|
9789
|
-
U === 0 && (this.warn(`Audio frame @ ${(W / n).toFixed(3)}s overlaps marker by ${Math.round(1e3 *
|
|
9790
|
-
else if (
|
|
9791
|
-
let H = Math.round(
|
|
9792
|
-
for (
|
|
9793
|
-
H--,
|
|
9794
|
-
U === 0 && (this.nextAudioTs = E =
|
|
9803
|
+
for (let U = 0, B = E + T; U < p.length; U++) {
|
|
9804
|
+
const V = p[U], W = V.pts, R = W - B, O = Math.abs(1e3 * R / n);
|
|
9805
|
+
if (R <= -F * u && g)
|
|
9806
|
+
U === 0 && (this.warn(`Audio frame @ ${(W / n).toFixed(3)}s overlaps marker by ${Math.round(1e3 * R / n)} ms.`), this.nextAudioTs = E = W - T, B = W);
|
|
9807
|
+
else if (R >= F * u && O < wc && g) {
|
|
9808
|
+
let H = Math.round(R / u);
|
|
9809
|
+
for (B = W - H * u; B < 0 && H && u; )
|
|
9810
|
+
H--, B += u;
|
|
9811
|
+
U === 0 && (this.nextAudioTs = E = B - T), this.warn(`Injecting ${H} audio frames @ ${((B - T) / n).toFixed(3)}s due to ${Math.round(1e3 * R / n)} ms gap.`);
|
|
9795
9812
|
for (let j = 0; j < H; j++) {
|
|
9796
9813
|
let Q = Cc.getSilentFrame(e.parsedCodec || e.manifestCodec || e.codec, e.channelCount);
|
|
9797
9814
|
Q || (this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."), Q = V.unit.subarray()), p.splice(U, 0, {
|
|
9798
9815
|
unit: Q,
|
|
9799
|
-
pts:
|
|
9800
|
-
}),
|
|
9816
|
+
pts: B
|
|
9817
|
+
}), B += u, U++;
|
|
9801
9818
|
}
|
|
9802
9819
|
}
|
|
9803
|
-
V.pts =
|
|
9820
|
+
V.pts = B, B += u;
|
|
9804
9821
|
}
|
|
9805
9822
|
}
|
|
9806
|
-
let S = null, A = null,
|
|
9807
|
-
for (;
|
|
9808
|
-
x += p[
|
|
9823
|
+
let S = null, A = null, P, x = 0, I = p.length;
|
|
9824
|
+
for (; I--; )
|
|
9825
|
+
x += p[I].unit.byteLength;
|
|
9809
9826
|
for (let F = 0, U = p.length; F < U; F++) {
|
|
9810
|
-
const
|
|
9811
|
-
let W =
|
|
9827
|
+
const B = p[F], V = B.unit;
|
|
9828
|
+
let W = B.pts;
|
|
9812
9829
|
if (A !== null) {
|
|
9813
9830
|
const O = f[F - 1];
|
|
9814
9831
|
O.duration = Math.round((W - A) / c);
|
|
9815
9832
|
} else if (s && e.segmentCodec === "aac" && (W = E + T), S = W, x > 0) {
|
|
9816
9833
|
x += y;
|
|
9817
9834
|
try {
|
|
9818
|
-
|
|
9835
|
+
P = new Uint8Array(x);
|
|
9819
9836
|
} catch (O) {
|
|
9820
9837
|
this.observer.emit(m.ERROR, m.ERROR, {
|
|
9821
9838
|
type: Y.MUX_ERROR,
|
|
@@ -9827,35 +9844,35 @@ class ds extends Me {
|
|
|
9827
9844
|
});
|
|
9828
9845
|
return;
|
|
9829
9846
|
}
|
|
9830
|
-
d || (new DataView(
|
|
9847
|
+
d || (new DataView(P.buffer).setUint32(0, x), P.set(_.types.mdat, 4));
|
|
9831
9848
|
} else
|
|
9832
9849
|
return;
|
|
9833
|
-
|
|
9834
|
-
const
|
|
9835
|
-
y +=
|
|
9850
|
+
P.set(V, y);
|
|
9851
|
+
const R = V.byteLength;
|
|
9852
|
+
y += R, f.push(Wr(!0, l, R, 0)), A = W;
|
|
9836
9853
|
}
|
|
9837
|
-
const
|
|
9838
|
-
if (!
|
|
9854
|
+
const b = f.length;
|
|
9855
|
+
if (!b)
|
|
9839
9856
|
return;
|
|
9840
9857
|
const L = f[f.length - 1];
|
|
9841
9858
|
E = A - T, this.nextAudioTs = E + c * L.duration;
|
|
9842
|
-
const
|
|
9859
|
+
const k = d ? new Uint8Array(0) : _.moof(e.sequenceNumber++, S / c, ae({}, e, {
|
|
9843
9860
|
samples: f
|
|
9844
9861
|
}));
|
|
9845
9862
|
e.samples = [];
|
|
9846
|
-
const
|
|
9847
|
-
data1:
|
|
9848
|
-
data2:
|
|
9849
|
-
startPTS:
|
|
9850
|
-
endPTS:
|
|
9851
|
-
startDTS:
|
|
9852
|
-
endDTS:
|
|
9863
|
+
const C = (S - T) / n, M = this.nextAudioTs / n, N = {
|
|
9864
|
+
data1: k,
|
|
9865
|
+
data2: P,
|
|
9866
|
+
startPTS: C,
|
|
9867
|
+
endPTS: M,
|
|
9868
|
+
startDTS: C,
|
|
9869
|
+
endDTS: M,
|
|
9853
9870
|
type: "audio",
|
|
9854
9871
|
hasAudio: !0,
|
|
9855
9872
|
hasVideo: !1,
|
|
9856
|
-
nb:
|
|
9873
|
+
nb: b
|
|
9857
9874
|
};
|
|
9858
|
-
return this.isAudioContiguous = !0,
|
|
9875
|
+
return this.isAudioContiguous = !0, N;
|
|
9859
9876
|
}
|
|
9860
9877
|
}
|
|
9861
9878
|
function De(a, e) {
|
|
@@ -9988,41 +10005,41 @@ class Bc extends Me {
|
|
|
9988
10005
|
return this.warn("Failed to generate initSegment."), h;
|
|
9989
10006
|
this.emitInitSegment && (f.tracks = this.initTracks, this.emitInitSegment = !1);
|
|
9990
10007
|
const p = bo(d, g, this), y = g.audio ? p[g.audio.id] : null, E = g.video ? p[g.video.id] : null, T = es(E, 1 / 0), v = es(y, 1 / 0), S = es(E, 0, !0), A = es(y, 0, !0);
|
|
9991
|
-
let
|
|
9992
|
-
const
|
|
9993
|
-
if (
|
|
9994
|
-
const
|
|
9995
|
-
|
|
10008
|
+
let P = r, x = 0;
|
|
10009
|
+
const I = y && (!E || !l && v < T || l && l.trackId === g.audio.id), b = I ? y : E;
|
|
10010
|
+
if (b) {
|
|
10011
|
+
const B = b.timescale, V = b.start - r * B, W = I ? g.audio.id : g.video.id;
|
|
10012
|
+
P = b.start / B, x = I ? A - v : S - T, (n || !l) && (Uc(l, P, r, x) || B !== l.timescale) && (l && this.warn(`Timestamps at playlist time: ${n ? "" : "~"}${r} ${V / B} != initPTS: ${l.baseTime / l.timescale} (${l.baseTime}/${l.timescale}) trackId: ${l.trackId}`), this.log(`Found initPTS at playlist time: ${r} offset: ${P - r} (${V}/${B}) trackId: ${W}`), l = null, f.initPTS = V, f.timescale = B, f.trackId = W);
|
|
9996
10013
|
} else
|
|
9997
10014
|
this.warn(`No audio or video samples found for initPTS at playlist time: ${r}`);
|
|
9998
|
-
l ? (f.initPTS = l.baseTime, f.timescale = l.timescale, f.trackId = l.trackId) : ((!f.timescale || f.trackId === void 0 || f.initPTS === void 0) && (this.warn("Could not set initPTS"), f.initPTS =
|
|
10015
|
+
l ? (f.initPTS = l.baseTime, f.timescale = l.timescale, f.trackId = l.trackId) : ((!f.timescale || f.trackId === void 0 || f.initPTS === void 0) && (this.warn("Could not set initPTS"), f.initPTS = P, f.timescale = 1, f.trackId = -1), this.initPTS = l = {
|
|
9999
10016
|
baseTime: f.initPTS,
|
|
10000
10017
|
timescale: f.timescale,
|
|
10001
10018
|
trackId: f.trackId
|
|
10002
10019
|
});
|
|
10003
|
-
const L =
|
|
10004
|
-
x > 0 ? this.lastEndTime =
|
|
10005
|
-
const
|
|
10006
|
-
let
|
|
10007
|
-
|
|
10008
|
-
const
|
|
10020
|
+
const L = P - l.baseTime / l.timescale, k = L + x;
|
|
10021
|
+
x > 0 ? this.lastEndTime = k : (this.warn("Duration parsed from mp4 should be greater than zero"), this.resetNextTimestamp());
|
|
10022
|
+
const C = !!g.audio, M = !!g.video;
|
|
10023
|
+
let $ = "";
|
|
10024
|
+
C && ($ += "audio"), M && ($ += "video");
|
|
10025
|
+
const N = (g.audio ? g.audio.encrypted : !1) || (g.video ? g.video.encrypted : !1), F = {
|
|
10009
10026
|
data1: d,
|
|
10010
10027
|
startPTS: L,
|
|
10011
10028
|
startDTS: L,
|
|
10012
|
-
endPTS:
|
|
10013
|
-
endDTS:
|
|
10014
|
-
type:
|
|
10015
|
-
hasAudio:
|
|
10016
|
-
hasVideo:
|
|
10029
|
+
endPTS: k,
|
|
10030
|
+
endDTS: k,
|
|
10031
|
+
type: $,
|
|
10032
|
+
hasAudio: C,
|
|
10033
|
+
hasVideo: M,
|
|
10017
10034
|
nb: 1,
|
|
10018
10035
|
dropped: 0,
|
|
10019
|
-
encrypted:
|
|
10036
|
+
encrypted: N
|
|
10020
10037
|
};
|
|
10021
|
-
h.audio =
|
|
10038
|
+
h.audio = C && !M ? F : void 0, h.video = M ? F : void 0;
|
|
10022
10039
|
const U = E?.sampleCount;
|
|
10023
10040
|
if (U) {
|
|
10024
|
-
const
|
|
10025
|
-
F.nb = U, F.dropped =
|
|
10041
|
+
const B = E.keyFrameIndex, V = B !== -1;
|
|
10042
|
+
F.nb = U, F.dropped = B === 0 || this.isVideoContiguous ? 0 : V ? B : U, F.independent = V, F.firstKeyFrame = B, V && E.keyFrameStart && (F.firstKeyFramePTS = (E.keyFrameStart - l.baseTime) / l.timescale), this.isVideoContiguous || (h.independent = V), this.isVideoContiguous || (this.isVideoContiguous = V), F.dropped && this.warn(`fmp4 does not start with IDR: firstIDR ${B}/${U} dropped: ${F.dropped} start: ${F.firstKeyFramePTS || "NA"}`);
|
|
10026
10043
|
}
|
|
10027
10044
|
return h.initSegment = f, h.id3 = Sa(s, r, l, l), i.samples.length && (h.text = xa(i, r, l)), h;
|
|
10028
10045
|
}
|
|
@@ -10094,39 +10111,39 @@ class qr {
|
|
|
10094
10111
|
initSegmentData: v
|
|
10095
10112
|
} = c, S = $c(n, t);
|
|
10096
10113
|
if (S && It(S.method)) {
|
|
10097
|
-
const
|
|
10098
|
-
if (
|
|
10099
|
-
let L =
|
|
10114
|
+
const I = this.getDecrypter(), b = ki(S.method);
|
|
10115
|
+
if (I.isSync()) {
|
|
10116
|
+
let L = I.softwareDecrypt(n, S.key.buffer, S.iv.buffer, b);
|
|
10100
10117
|
if (s.part > -1) {
|
|
10101
|
-
const
|
|
10102
|
-
L =
|
|
10118
|
+
const C = I.flush();
|
|
10119
|
+
L = C && C.buffer;
|
|
10103
10120
|
}
|
|
10104
10121
|
if (!L)
|
|
10105
10122
|
return r.executeEnd = Ze(), Hs(s);
|
|
10106
10123
|
n = new Uint8Array(L);
|
|
10107
10124
|
} else
|
|
10108
|
-
return this.asyncResult = !0, this.decryptionPromise =
|
|
10109
|
-
const
|
|
10110
|
-
return this.decryptionPromise = null,
|
|
10125
|
+
return this.asyncResult = !0, this.decryptionPromise = I.webCryptoDecrypt(n, S.key.buffer, S.iv.buffer, b).then((L) => {
|
|
10126
|
+
const k = this.push(L, null, s);
|
|
10127
|
+
return this.decryptionPromise = null, k;
|
|
10111
10128
|
}), this.decryptionPromise;
|
|
10112
10129
|
}
|
|
10113
10130
|
const A = this.needsProbing(u, h);
|
|
10114
10131
|
if (A) {
|
|
10115
|
-
const
|
|
10116
|
-
if (
|
|
10117
|
-
return this.logger.warn(`[transmuxer] ${
|
|
10132
|
+
const I = this.configureTransmuxer(n);
|
|
10133
|
+
if (I)
|
|
10134
|
+
return this.logger.warn(`[transmuxer] ${I.message}`), this.observer.emit(m.ERROR, m.ERROR, {
|
|
10118
10135
|
type: Y.MEDIA_ERROR,
|
|
10119
10136
|
details: D.FRAG_PARSING_ERROR,
|
|
10120
10137
|
fatal: !1,
|
|
10121
|
-
error:
|
|
10122
|
-
reason:
|
|
10138
|
+
error: I,
|
|
10139
|
+
reason: I.message
|
|
10123
10140
|
}), r.executeEnd = Ze(), Hs(s);
|
|
10124
10141
|
}
|
|
10125
10142
|
(u || h || g || A) && this.resetInitSegment(v, p, y, T, t), (u || g || A) && this.resetInitialTimestamp(E), l || this.resetContiguity();
|
|
10126
|
-
const
|
|
10127
|
-
this.asyncResult = Ht(
|
|
10143
|
+
const P = this.transmux(n, S, f, d, s);
|
|
10144
|
+
this.asyncResult = Ht(P);
|
|
10128
10145
|
const x = this.currentTransmuxState;
|
|
10129
|
-
return x.contiguous = !0, x.discontinuity = !1, x.trackSwitch = !1, r.executeEnd = Ze(),
|
|
10146
|
+
return x.contiguous = !0, x.discontinuity = !1, x.trackSwitch = !1, r.executeEnd = Ze(), P;
|
|
10130
10147
|
}
|
|
10131
10148
|
// Due to data caching, flush calls can produce more than one TransmuxerResult (hence the Array type)
|
|
10132
10149
|
flush(e) {
|
|
@@ -10381,19 +10398,19 @@ class Aa {
|
|
|
10381
10398
|
const {
|
|
10382
10399
|
instanceNo: f,
|
|
10383
10400
|
transmuxer: g
|
|
10384
|
-
} = this, p = n ? n.start : r.start, y = r.decryptdata, E = this.frag, T = !(E && r.cc === E.cc), v = !(E && l.level === E.level), S = E ? l.sn - E.sn : -1, A = this.part ? l.part - this.part.index : -1,
|
|
10385
|
-
(v || S || r.stats.parsing.start === 0) && (r.stats.parsing.start =
|
|
10386
|
-
const
|
|
10387
|
-
if (!x || T ||
|
|
10401
|
+
} = this, p = n ? n.start : r.start, y = r.decryptdata, E = this.frag, T = !(E && r.cc === E.cc), v = !(E && l.level === E.level), S = E ? l.sn - E.sn : -1, A = this.part ? l.part - this.part.index : -1, P = S === 0 && l.id > 1 && l.id === E?.stats.chunkCount, x = !v && (S === 1 || S === 0 && (A === 1 || P && A <= 0)), I = self.performance.now();
|
|
10402
|
+
(v || S || r.stats.parsing.start === 0) && (r.stats.parsing.start = I), n && (A || !x) && (n.stats.parsing.start = I);
|
|
10403
|
+
const b = !(E && ((h = r.initSegment) == null ? void 0 : h.url) === ((d = E.initSegment) == null ? void 0 : d.url)), L = new Kc(T, x, c, v, p, b);
|
|
10404
|
+
if (!x || T || b) {
|
|
10388
10405
|
this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${r.type} sn: ${l.sn}${l.part > -1 ? " part: " + l.part : ""} ${this.id === K.MAIN ? "level" : "track"}: ${l.level} id: ${l.id}
|
|
10389
10406
|
discontinuity: ${T}
|
|
10390
10407
|
trackSwitch: ${v}
|
|
10391
10408
|
contiguous: ${x}
|
|
10392
10409
|
accurateTimeOffset: ${c}
|
|
10393
10410
|
timeOffset: ${p}
|
|
10394
|
-
initSegmentChange: ${
|
|
10395
|
-
const
|
|
10396
|
-
this.configureTransmuxer(
|
|
10411
|
+
initSegmentChange: ${b}`);
|
|
10412
|
+
const k = new Gc(s, i, t, o, u);
|
|
10413
|
+
this.configureTransmuxer(k);
|
|
10397
10414
|
}
|
|
10398
10415
|
if (this.frag = r, this.part = n, this.workerContext)
|
|
10399
10416
|
this.workerContext.worker.postMessage({
|
|
@@ -10405,12 +10422,12 @@ class Aa {
|
|
|
10405
10422
|
state: L
|
|
10406
10423
|
}, e instanceof ArrayBuffer ? [e] : []);
|
|
10407
10424
|
else if (g) {
|
|
10408
|
-
const
|
|
10409
|
-
Ht(
|
|
10410
|
-
this.handleTransmuxComplete(
|
|
10411
|
-
}).catch((
|
|
10412
|
-
this.transmuxerError(
|
|
10413
|
-
}) : this.handleTransmuxComplete(
|
|
10425
|
+
const k = g.push(e, y, l, L);
|
|
10426
|
+
Ht(k) ? k.then((C) => {
|
|
10427
|
+
this.handleTransmuxComplete(C);
|
|
10428
|
+
}).catch((C) => {
|
|
10429
|
+
this.transmuxerError(C, l, "transmuxer-interface push error");
|
|
10430
|
+
}) : this.handleTransmuxComplete(k);
|
|
10414
10431
|
}
|
|
10415
10432
|
}
|
|
10416
10433
|
flush(e) {
|
|
@@ -11076,22 +11093,22 @@ class Ki extends Me {
|
|
|
11076
11093
|
return;
|
|
11077
11094
|
let p, y, E;
|
|
11078
11095
|
if (i.canBlockReload && i.endSN && i.advanced) {
|
|
11079
|
-
const T = this.hls.config.lowLatencyMode, v = i.lastPartSn, S = i.endSN, A = i.lastPartIndex,
|
|
11080
|
-
|
|
11081
|
-
const
|
|
11082
|
-
let L = Math.min(
|
|
11096
|
+
const T = this.hls.config.lowLatencyMode, v = i.lastPartSn, S = i.endSN, A = i.lastPartIndex, P = A !== -1, x = v === S;
|
|
11097
|
+
P ? x ? (y = S + 1, E = T ? 0 : A) : (y = v, E = T ? A + 1 : i.maxPartIndex) : y = S + 1;
|
|
11098
|
+
const I = i.age, b = I + i.ageHeader;
|
|
11099
|
+
let L = Math.min(b - i.partTarget, i.targetduration * 1.5);
|
|
11083
11100
|
if (L > 0) {
|
|
11084
|
-
if (
|
|
11085
|
-
this.log(`Playlist last advanced ${
|
|
11086
|
-
else if (s != null && s.tuneInGoal &&
|
|
11101
|
+
if (b > i.targetduration * 3)
|
|
11102
|
+
this.log(`Playlist last advanced ${I.toFixed(2)}s ago. Omitting segment and part directives.`), y = void 0, E = void 0;
|
|
11103
|
+
else if (s != null && s.tuneInGoal && b - i.partTarget > s.tuneInGoal)
|
|
11087
11104
|
this.warn(`CDN Tune-in goal increased from: ${s.tuneInGoal} to: ${L} with playlist age: ${i.age}`), L = 0;
|
|
11088
11105
|
else {
|
|
11089
|
-
const
|
|
11090
|
-
if (y +=
|
|
11091
|
-
const
|
|
11092
|
-
E +=
|
|
11106
|
+
const k = Math.floor(L / i.targetduration);
|
|
11107
|
+
if (y += k, E !== void 0) {
|
|
11108
|
+
const C = Math.round(L % i.targetduration / i.partTarget);
|
|
11109
|
+
E += C;
|
|
11093
11110
|
}
|
|
11094
|
-
this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${
|
|
11111
|
+
this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${I.toFixed(2)}s goal: ${L} skip sn ${k} to part ${E}`);
|
|
11095
11112
|
}
|
|
11096
11113
|
i.tuneInGoal = L;
|
|
11097
11114
|
}
|
|
@@ -11720,7 +11737,7 @@ transfer tracks: ${le(i, (c, l) => c === "initSegment" ? void 0 : l)}}`), !Sn(i,
|
|
|
11720
11737
|
supplemental: E
|
|
11721
11738
|
} = h;
|
|
11722
11739
|
let T = i[c];
|
|
11723
|
-
const v = (l = this.transferData) == null || (l = l.tracks) == null ? void 0 : l[c], S = v != null && v.buffer ? v : T, A = S?.pendingCodec || S?.codec,
|
|
11740
|
+
const v = (l = this.transferData) == null || (l = l.tracks) == null ? void 0 : l[c], S = v != null && v.buffer ? v : T, A = S?.pendingCodec || S?.codec, P = S?.levelCodec;
|
|
11724
11741
|
T || (T = i[c] = {
|
|
11725
11742
|
buffer: void 0,
|
|
11726
11743
|
listeners: [],
|
|
@@ -11731,10 +11748,10 @@ transfer tracks: ${le(i, (c, l) => c === "initSegment" ? void 0 : l)}}`), !Sn(i,
|
|
|
11731
11748
|
metadata: y,
|
|
11732
11749
|
id: d
|
|
11733
11750
|
});
|
|
11734
|
-
const x = cs(A,
|
|
11735
|
-
let
|
|
11736
|
-
const L = (u =
|
|
11737
|
-
|
|
11751
|
+
const x = cs(A, P), I = x?.replace(Qr, "$1");
|
|
11752
|
+
let b = cs(f, g);
|
|
11753
|
+
const L = (u = b) == null ? void 0 : u.replace(Qr, "$1");
|
|
11754
|
+
b && x && I !== L && (c.slice(0, 5) === "audio" && (b = Es(b, this.appendSource)), this.log(`switching codec ${A} to ${b}`), b !== (T.pendingCodec || T.codec) && (T.pendingCodec = b), T.container = p, this.appendChangeType(c, p, b));
|
|
11738
11755
|
}), (this.tracksReady || this.sourceBufferCount) && (t.tracks = this.sourceBufferTracks), !this.sourceBufferCount && (this.bufferCodecEventsTotal > 1 && !this.tracks.video && !t.video && ((s = t.audio) == null ? void 0 : s.id) === "main" && (this.log("Main audio-only"), this.bufferCodecEventsTotal = 1), this.mediaSourceOpenOrEnded && this.checkPendingTracks());
|
|
11739
11756
|
}
|
|
11740
11757
|
get sourceBufferTracks() {
|
|
@@ -11824,47 +11841,47 @@ transfer tracks: ${le(i, (c, l) => c === "initSegment" ? void 0 : l)}}`), !Sn(i,
|
|
|
11824
11841
|
r === "audio" && E?.container === "audio/mpeg" && (T = !this.lastMpegAudioChunk || l.id === 1 || this.lastMpegAudioChunk.sn !== l.sn, this.lastMpegAudioChunk = l);
|
|
11825
11842
|
const v = s.video, S = v?.buffer;
|
|
11826
11843
|
if (S && d !== "initSegment") {
|
|
11827
|
-
const x = c || o,
|
|
11844
|
+
const x = c || o, I = this.blockedAudioAppend;
|
|
11828
11845
|
if (r === "audio" && n !== "main" && !this.blockedAudioAppend && !(v.ending || v.ended)) {
|
|
11829
|
-
const L = x.start + x.duration * 0.05,
|
|
11830
|
-
!
|
|
11846
|
+
const L = x.start + x.duration * 0.05, k = S.buffered, C = this.currentOp("video");
|
|
11847
|
+
!k.length && !C ? this.blockAudio(x) : !C && !X.isBuffered(S, L) && this.lastVideoAppendEnd < L && this.blockAudio(x);
|
|
11831
11848
|
} else if (r === "video") {
|
|
11832
|
-
const
|
|
11833
|
-
if (
|
|
11834
|
-
const L =
|
|
11835
|
-
(
|
|
11849
|
+
const b = x.end;
|
|
11850
|
+
if (I) {
|
|
11851
|
+
const L = I.frag.start;
|
|
11852
|
+
(b > L || b < this.lastVideoAppendEnd || X.isBuffered(S, L)) && this.unblockAudio();
|
|
11836
11853
|
}
|
|
11837
|
-
this.lastVideoAppendEnd =
|
|
11854
|
+
this.lastVideoAppendEnd = b;
|
|
11838
11855
|
}
|
|
11839
11856
|
}
|
|
11840
|
-
const A = (c || o).start,
|
|
11857
|
+
const A = (c || o).start, P = {
|
|
11841
11858
|
label: `append-${r}`,
|
|
11842
11859
|
execute: () => {
|
|
11843
11860
|
var x;
|
|
11844
11861
|
h.executeStart = self.performance.now();
|
|
11845
|
-
const
|
|
11846
|
-
|
|
11862
|
+
const I = (x = this.tracks[r]) == null ? void 0 : x.buffer;
|
|
11863
|
+
I && (T ? this.updateTimestampOffset(I, A, 0.1, r, d, f) : u !== void 0 && G(u) && this.updateTimestampOffset(I, u, 1e-6, r, d, f)), this.appendExecutor(i, r);
|
|
11847
11864
|
},
|
|
11848
11865
|
onStart: () => {
|
|
11849
11866
|
},
|
|
11850
11867
|
onComplete: () => {
|
|
11851
11868
|
const x = self.performance.now();
|
|
11852
11869
|
h.executeEnd = h.end = x, p.first === 0 && (p.first = x), y && y.first === 0 && (y.first = x);
|
|
11853
|
-
const
|
|
11854
|
-
this.sourceBuffers.forEach(([
|
|
11855
|
-
|
|
11870
|
+
const I = {};
|
|
11871
|
+
this.sourceBuffers.forEach(([b, L]) => {
|
|
11872
|
+
b && (I[b] = X.getBuffered(L));
|
|
11856
11873
|
}), this.appendErrors[r] = 0, r === "audio" || r === "video" ? this.appendErrors.audiovideo = 0 : (this.appendErrors.audio = 0, this.appendErrors.video = 0), this.hls.trigger(m.BUFFER_APPENDED, {
|
|
11857
11874
|
type: r,
|
|
11858
11875
|
frag: o,
|
|
11859
11876
|
part: c,
|
|
11860
11877
|
chunkMeta: l,
|
|
11861
11878
|
parent: o.type,
|
|
11862
|
-
timeRanges:
|
|
11879
|
+
timeRanges: I
|
|
11863
11880
|
});
|
|
11864
11881
|
},
|
|
11865
11882
|
onError: (x) => {
|
|
11866
|
-
var
|
|
11867
|
-
const
|
|
11883
|
+
var I;
|
|
11884
|
+
const b = {
|
|
11868
11885
|
type: Y.MEDIA_ERROR,
|
|
11869
11886
|
parent: o.type,
|
|
11870
11887
|
details: D.BUFFER_APPEND_ERROR,
|
|
@@ -11875,21 +11892,21 @@ transfer tracks: ${le(i, (c, l) => c === "initSegment" ? void 0 : l)}}`), !Sn(i,
|
|
|
11875
11892
|
error: x,
|
|
11876
11893
|
err: x,
|
|
11877
11894
|
fatal: !1
|
|
11878
|
-
}, L = (
|
|
11895
|
+
}, L = (I = this.media) == null ? void 0 : I.error;
|
|
11879
11896
|
if (x.code === DOMException.QUOTA_EXCEEDED_ERR || x.name == "QuotaExceededError" || "quota" in x)
|
|
11880
|
-
|
|
11897
|
+
b.details = D.BUFFER_FULL_ERROR;
|
|
11881
11898
|
else if (x.code === DOMException.INVALID_STATE_ERR && this.mediaSourceOpenOrEnded && !L)
|
|
11882
|
-
|
|
11899
|
+
b.errorAction = Lt(!0);
|
|
11883
11900
|
else if (x.name === Ia && this.sourceBufferCount === 0)
|
|
11884
|
-
|
|
11901
|
+
b.errorAction = Lt(!0);
|
|
11885
11902
|
else {
|
|
11886
|
-
const
|
|
11887
|
-
this.warn(`Failed ${
|
|
11903
|
+
const k = ++this.appendErrors[r];
|
|
11904
|
+
this.warn(`Failed ${k}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${r}" sourceBuffer (${L || "no media error"})`), (k >= this.hls.config.appendErrorMaxRetry || L) && (b.fatal = !0);
|
|
11888
11905
|
}
|
|
11889
|
-
this.hls.trigger(m.ERROR,
|
|
11906
|
+
this.hls.trigger(m.ERROR, b);
|
|
11890
11907
|
}
|
|
11891
11908
|
};
|
|
11892
|
-
this.log(`queuing "${r}" append sn: ${d}${c ? " p: " + c.index : ""} of ${o.type === K.MAIN ? "level" : "track"} ${o.level} cc: ${f}`), this.append(
|
|
11909
|
+
this.log(`queuing "${r}" append sn: ${d}${c ? " p: " + c.index : ""} of ${o.type === K.MAIN ? "level" : "track"} ${o.level} cc: ${f}`), this.append(P, r, this.isPending(this.tracks[r]));
|
|
11893
11910
|
}
|
|
11894
11911
|
getFlushOp(e, t, s) {
|
|
11895
11912
|
return this.log(`queuing "${e}" remove ${t}-${s}`), {
|
|
@@ -14957,21 +14974,21 @@ class ih extends Me {
|
|
|
14957
14974
|
let c = 0, l = 0;
|
|
14958
14975
|
if (e.forEach((u, h) => {
|
|
14959
14976
|
const d = u.cue.pre, f = u.cue.post, g = e[h - 1] || null, p = u.appendInPlace, y = f ? r : u.startOffset, E = u.duration, T = u.timelineOccupancy === bs.Range ? E : 0, v = u.resumptionOffset, S = g?.startTime === y, A = y + u.cumulativeDuration;
|
|
14960
|
-
let
|
|
14977
|
+
let P = p ? A + E : y + v;
|
|
14961
14978
|
if (d || !f && y <= 0) {
|
|
14962
|
-
const
|
|
14979
|
+
const I = l;
|
|
14963
14980
|
l += T, u.timelineStart = A;
|
|
14964
|
-
const
|
|
14981
|
+
const b = n;
|
|
14965
14982
|
n += E, s.push({
|
|
14966
14983
|
event: u,
|
|
14967
14984
|
start: A,
|
|
14968
|
-
end:
|
|
14985
|
+
end: P,
|
|
14969
14986
|
playout: {
|
|
14970
|
-
start:
|
|
14987
|
+
start: b,
|
|
14971
14988
|
end: n
|
|
14972
14989
|
},
|
|
14973
14990
|
integrated: {
|
|
14974
|
-
start:
|
|
14991
|
+
start: I,
|
|
14975
14992
|
end: l
|
|
14976
14993
|
}
|
|
14977
14994
|
});
|
|
@@ -14979,41 +14996,41 @@ class ih extends Me {
|
|
|
14979
14996
|
if (!S) {
|
|
14980
14997
|
const L = y - c;
|
|
14981
14998
|
if (L > nn) {
|
|
14982
|
-
const
|
|
14999
|
+
const k = c, C = l;
|
|
14983
15000
|
l += L;
|
|
14984
|
-
const
|
|
15001
|
+
const M = n;
|
|
14985
15002
|
n += L;
|
|
14986
|
-
const
|
|
15003
|
+
const $ = {
|
|
14987
15004
|
previousEvent: e[h - 1] || null,
|
|
14988
15005
|
nextEvent: u,
|
|
14989
|
-
start:
|
|
14990
|
-
end:
|
|
15006
|
+
start: k,
|
|
15007
|
+
end: k + L,
|
|
14991
15008
|
playout: {
|
|
14992
|
-
start:
|
|
15009
|
+
start: M,
|
|
14993
15010
|
end: n
|
|
14994
15011
|
},
|
|
14995
15012
|
integrated: {
|
|
14996
|
-
start:
|
|
15013
|
+
start: C,
|
|
14997
15014
|
end: l
|
|
14998
15015
|
}
|
|
14999
15016
|
};
|
|
15000
|
-
s.push(
|
|
15017
|
+
s.push($);
|
|
15001
15018
|
} else L > 0 && g && (g.cumulativeDuration += L, s[s.length - 1].end = y);
|
|
15002
15019
|
}
|
|
15003
|
-
f && (
|
|
15004
|
-
const
|
|
15020
|
+
f && (P = A), u.timelineStart = A;
|
|
15021
|
+
const I = l;
|
|
15005
15022
|
l += T;
|
|
15006
|
-
const
|
|
15023
|
+
const b = n;
|
|
15007
15024
|
n += E, s.push({
|
|
15008
15025
|
event: u,
|
|
15009
15026
|
start: A,
|
|
15010
|
-
end:
|
|
15027
|
+
end: P,
|
|
15011
15028
|
playout: {
|
|
15012
|
-
start:
|
|
15029
|
+
start: b,
|
|
15013
15030
|
end: n
|
|
15014
15031
|
},
|
|
15015
15032
|
integrated: {
|
|
15016
|
-
start:
|
|
15033
|
+
start: I,
|
|
15017
15034
|
end: l
|
|
15018
15035
|
}
|
|
15019
15036
|
});
|
|
@@ -15390,13 +15407,13 @@ Schedule: ${c.map((p) => Be(p))} pos: ${this.timelinePos}`), u.length && this.lo
|
|
|
15390
15407
|
if (p != null && (f = p.event) != null && f.restrictions.skip || !e.schedule)
|
|
15391
15408
|
return;
|
|
15392
15409
|
e.log(`seek to ${h} "${d}"`);
|
|
15393
|
-
const y = e.effectivePlayingItem, E = e.schedule.findItemIndexAtTime(h, d), T = (g = e.schedule.items) == null ? void 0 : g[E], v = e.getBufferingPlayer(), S = v?.interstitial, A = S?.appendInPlace,
|
|
15394
|
-
if (y && (A ||
|
|
15395
|
-
const x = s(e.playingAsset),
|
|
15396
|
-
if (
|
|
15397
|
-
const
|
|
15398
|
-
if (
|
|
15399
|
-
|
|
15410
|
+
const y = e.effectivePlayingItem, E = e.schedule.findItemIndexAtTime(h, d), T = (g = e.schedule.items) == null ? void 0 : g[E], v = e.getBufferingPlayer(), S = v?.interstitial, A = S?.appendInPlace, P = y && e.itemsMatch(y, T);
|
|
15411
|
+
if (y && (A || P)) {
|
|
15412
|
+
const x = s(e.playingAsset), I = x?.media || e.primaryMedia;
|
|
15413
|
+
if (I) {
|
|
15414
|
+
const b = d === "primary" ? I.currentTime : i(y, d, e.playingAsset, "timelinePos", "currentTime"), L = h - b, k = (A ? b : I.currentTime) + L;
|
|
15415
|
+
if (k >= 0 && (!x || A || k <= x.duration)) {
|
|
15416
|
+
I.currentTime = k;
|
|
15400
15417
|
return;
|
|
15401
15418
|
}
|
|
15402
15419
|
}
|
|
@@ -15404,31 +15421,31 @@ Schedule: ${c.map((p) => Be(p))} pos: ${this.timelinePos}`), u.length && this.lo
|
|
|
15404
15421
|
if (T) {
|
|
15405
15422
|
let x = h;
|
|
15406
15423
|
if (d !== "primary") {
|
|
15407
|
-
const
|
|
15424
|
+
const b = T[d].start, L = h - b;
|
|
15408
15425
|
x = T.start + L;
|
|
15409
15426
|
}
|
|
15410
|
-
const
|
|
15411
|
-
if ((!e.isInterstitial(y) || y.event.appendInPlace) && (
|
|
15412
|
-
const
|
|
15413
|
-
|
|
15427
|
+
const I = !e.isInterstitial(T);
|
|
15428
|
+
if ((!e.isInterstitial(y) || y.event.appendInPlace) && (I || T.event.appendInPlace)) {
|
|
15429
|
+
const b = e.media || (A ? v?.media : null);
|
|
15430
|
+
b && (b.currentTime = x);
|
|
15414
15431
|
} else if (y) {
|
|
15415
|
-
const
|
|
15416
|
-
if (E >
|
|
15417
|
-
const
|
|
15418
|
-
if (
|
|
15419
|
-
e.setSchedulePosition(
|
|
15432
|
+
const b = e.findItemIndex(y);
|
|
15433
|
+
if (E > b) {
|
|
15434
|
+
const k = e.schedule.findJumpRestrictedIndex(b + 1, E);
|
|
15435
|
+
if (k > b) {
|
|
15436
|
+
e.setSchedulePosition(k);
|
|
15420
15437
|
return;
|
|
15421
15438
|
}
|
|
15422
15439
|
}
|
|
15423
15440
|
let L = 0;
|
|
15424
|
-
if (
|
|
15441
|
+
if (I)
|
|
15425
15442
|
e.timelinePos = x, e.checkBuffer();
|
|
15426
15443
|
else {
|
|
15427
|
-
const
|
|
15428
|
-
for (let
|
|
15429
|
-
const
|
|
15430
|
-
if (
|
|
15431
|
-
L =
|
|
15444
|
+
const k = T.event.assetList, C = h - (T[d] || T).start;
|
|
15445
|
+
for (let M = k.length; M--; ) {
|
|
15446
|
+
const $ = k[M];
|
|
15447
|
+
if ($.duration && C >= $.startOffset && C < $.startOffset + $.duration) {
|
|
15448
|
+
L = M;
|
|
15432
15449
|
break;
|
|
15433
15450
|
}
|
|
15434
15451
|
}
|
|
@@ -16212,17 +16229,17 @@ Schedule: ${c.map((p) => Be(p))} pos: ${this.timelinePos}`), u.length && this.lo
|
|
|
16212
16229
|
const y = (S) => {
|
|
16213
16230
|
if (S.live) {
|
|
16214
16231
|
var A;
|
|
16215
|
-
const
|
|
16232
|
+
const I = new Error(`Interstitials MUST be VOD assets ${e}`), b = {
|
|
16216
16233
|
fatal: !0,
|
|
16217
16234
|
type: Y.OTHER_ERROR,
|
|
16218
16235
|
details: D.INTERSTITIAL_ASSET_ITEM_ERROR,
|
|
16219
|
-
error:
|
|
16236
|
+
error: I
|
|
16220
16237
|
}, L = ((A = this.schedule) == null ? void 0 : A.findEventIndex(e.identifier)) || -1;
|
|
16221
|
-
this.handleAssetItemError(
|
|
16238
|
+
this.handleAssetItemError(b, e, L, s, I.message);
|
|
16222
16239
|
return;
|
|
16223
16240
|
}
|
|
16224
|
-
const
|
|
16225
|
-
(p || x === null ||
|
|
16241
|
+
const P = S.edge - S.fragmentStart, x = t.duration;
|
|
16242
|
+
(p || x === null || P > x) && (p = !1, this.log(`Interstitial asset "${h}" duration change ${x} > ${P}`), t.duration = P, this.updateSchedule());
|
|
16226
16243
|
};
|
|
16227
16244
|
g.on(m.LEVEL_UPDATED, (S, {
|
|
16228
16245
|
details: A
|
|
@@ -16230,11 +16247,11 @@ Schedule: ${c.map((p) => Be(p))} pos: ${this.timelinePos}`), u.length && this.lo
|
|
|
16230
16247
|
details: A
|
|
16231
16248
|
}) => y(A)), g.on(m.EVENT_CUE_ENTER, () => this.onInterstitialCueEnter());
|
|
16232
16249
|
const E = (S, A) => {
|
|
16233
|
-
const
|
|
16234
|
-
if (
|
|
16235
|
-
|
|
16250
|
+
const P = this.getAssetPlayer(h);
|
|
16251
|
+
if (P && A.tracks) {
|
|
16252
|
+
P.off(m.BUFFER_CODECS, E), P.tracks = A.tracks;
|
|
16236
16253
|
const x = this.primaryMedia;
|
|
16237
|
-
this.bufferingAsset ===
|
|
16254
|
+
this.bufferingAsset === P.assetItem && x && !P.media && this.bufferAssetPlayer(P, x);
|
|
16238
16255
|
}
|
|
16239
16256
|
};
|
|
16240
16257
|
g.on(m.BUFFER_CODECS, E);
|
|
@@ -16243,7 +16260,7 @@ Schedule: ${c.map((p) => Be(p))} pos: ${this.timelinePos}`), u.length && this.lo
|
|
|
16243
16260
|
const A = this.getAssetPlayer(h);
|
|
16244
16261
|
if (this.log(`buffered to end of asset ${A}`), !A || !this.schedule)
|
|
16245
16262
|
return;
|
|
16246
|
-
const
|
|
16263
|
+
const P = this.schedule.findEventIndex(e.identifier), x = (S = this.schedule.items) == null ? void 0 : S[P];
|
|
16247
16264
|
this.isInterstitial(x) && this.advanceAssetBuffering(x, t);
|
|
16248
16265
|
};
|
|
16249
16266
|
g.on(m.BUFFERED_TO_END, T);
|
|
@@ -16251,15 +16268,15 @@ Schedule: ${c.map((p) => Be(p))} pos: ${this.timelinePos}`), u.length && this.lo
|
|
|
16251
16268
|
if (!this.getAssetPlayer(h) || !this.schedule)
|
|
16252
16269
|
return;
|
|
16253
16270
|
this.shouldPlay = !0;
|
|
16254
|
-
const
|
|
16255
|
-
this.advanceAfterAssetEnded(e,
|
|
16271
|
+
const P = this.schedule.findEventIndex(e.identifier);
|
|
16272
|
+
this.advanceAfterAssetEnded(e, P, S);
|
|
16256
16273
|
};
|
|
16257
16274
|
return g.once(m.MEDIA_ENDED, v(s)), g.once(m.PLAYOUT_LIMIT_REACHED, v(1 / 0)), g.on(m.ERROR, (S, A) => {
|
|
16258
16275
|
if (!this.schedule)
|
|
16259
16276
|
return;
|
|
16260
|
-
const
|
|
16277
|
+
const P = this.getAssetPlayer(h);
|
|
16261
16278
|
if (A.details === D.BUFFER_STALLED_ERROR) {
|
|
16262
|
-
if (
|
|
16279
|
+
if (P != null && P.appendInPlace) {
|
|
16263
16280
|
this.handleInPlaceStall(e);
|
|
16264
16281
|
return;
|
|
16265
16282
|
}
|
|
@@ -16270,13 +16287,13 @@ Schedule: ${c.map((p) => Be(p))} pos: ${this.timelinePos}`), u.length && this.lo
|
|
|
16270
16287
|
}), g.on(m.DESTROYING, () => {
|
|
16271
16288
|
if (!this.getAssetPlayer(h) || !this.schedule)
|
|
16272
16289
|
return;
|
|
16273
|
-
const A = new Error(`Asset player destroyed unexpectedly ${h}`),
|
|
16290
|
+
const A = new Error(`Asset player destroyed unexpectedly ${h}`), P = {
|
|
16274
16291
|
fatal: !0,
|
|
16275
16292
|
type: Y.OTHER_ERROR,
|
|
16276
16293
|
details: D.INTERSTITIAL_ASSET_ITEM_ERROR,
|
|
16277
16294
|
error: A
|
|
16278
16295
|
};
|
|
16279
|
-
this.handleAssetItemError(
|
|
16296
|
+
this.handleAssetItemError(P, e, this.schedule.findEventIndex(e.identifier), s, A.message);
|
|
16280
16297
|
}), this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${xt(t)}`), this.hls.trigger(m.INTERSTITIAL_ASSET_PLAYER_CREATED, {
|
|
16281
16298
|
asset: t,
|
|
16282
16299
|
assetListIndex: s,
|
|
@@ -17498,7 +17515,7 @@ var Wi = (function() {
|
|
|
17498
17515
|
enumerable: !0
|
|
17499
17516
|
};
|
|
17500
17517
|
u.hasBeenReset = !1;
|
|
17501
|
-
let d = "", f = !1, g = o, p = c, y = l, E = null, T = "", v = !0, S = "auto", A = "start",
|
|
17518
|
+
let d = "", f = !1, g = o, p = c, y = l, E = null, T = "", v = !0, S = "auto", A = "start", P = 50, x = "middle", I = 50, b = "middle";
|
|
17502
17519
|
Object.defineProperty(u, "id", r({}, h, {
|
|
17503
17520
|
get: function() {
|
|
17504
17521
|
return d;
|
|
@@ -17550,10 +17567,10 @@ var Wi = (function() {
|
|
|
17550
17567
|
return T;
|
|
17551
17568
|
},
|
|
17552
17569
|
set: function(L) {
|
|
17553
|
-
const
|
|
17554
|
-
if (
|
|
17570
|
+
const k = s(L);
|
|
17571
|
+
if (k === !1)
|
|
17555
17572
|
throw new SyntaxError("An invalid or illegal string was specified.");
|
|
17556
|
-
T =
|
|
17573
|
+
T = k, this.hasBeenReset = !0;
|
|
17557
17574
|
}
|
|
17558
17575
|
})), Object.defineProperty(u, "snapToLines", r({}, h, {
|
|
17559
17576
|
get: function() {
|
|
@@ -17576,48 +17593,48 @@ var Wi = (function() {
|
|
|
17576
17593
|
return A;
|
|
17577
17594
|
},
|
|
17578
17595
|
set: function(L) {
|
|
17579
|
-
const
|
|
17580
|
-
if (!
|
|
17596
|
+
const k = i(L);
|
|
17597
|
+
if (!k)
|
|
17581
17598
|
throw new SyntaxError("An invalid or illegal string was specified.");
|
|
17582
|
-
A =
|
|
17599
|
+
A = k, this.hasBeenReset = !0;
|
|
17583
17600
|
}
|
|
17584
17601
|
})), Object.defineProperty(u, "position", r({}, h, {
|
|
17585
17602
|
get: function() {
|
|
17586
|
-
return
|
|
17603
|
+
return P;
|
|
17587
17604
|
},
|
|
17588
17605
|
set: function(L) {
|
|
17589
17606
|
if (L < 0 || L > 100)
|
|
17590
17607
|
throw new Error("Position must be between 0 and 100.");
|
|
17591
|
-
|
|
17608
|
+
P = L, this.hasBeenReset = !0;
|
|
17592
17609
|
}
|
|
17593
17610
|
})), Object.defineProperty(u, "positionAlign", r({}, h, {
|
|
17594
17611
|
get: function() {
|
|
17595
17612
|
return x;
|
|
17596
17613
|
},
|
|
17597
17614
|
set: function(L) {
|
|
17598
|
-
const
|
|
17599
|
-
if (!
|
|
17615
|
+
const k = i(L);
|
|
17616
|
+
if (!k)
|
|
17600
17617
|
throw new SyntaxError("An invalid or illegal string was specified.");
|
|
17601
|
-
x =
|
|
17618
|
+
x = k, this.hasBeenReset = !0;
|
|
17602
17619
|
}
|
|
17603
17620
|
})), Object.defineProperty(u, "size", r({}, h, {
|
|
17604
17621
|
get: function() {
|
|
17605
|
-
return
|
|
17622
|
+
return I;
|
|
17606
17623
|
},
|
|
17607
17624
|
set: function(L) {
|
|
17608
17625
|
if (L < 0 || L > 100)
|
|
17609
17626
|
throw new Error("Size must be between 0 and 100.");
|
|
17610
|
-
|
|
17627
|
+
I = L, this.hasBeenReset = !0;
|
|
17611
17628
|
}
|
|
17612
17629
|
})), Object.defineProperty(u, "align", r({}, h, {
|
|
17613
17630
|
get: function() {
|
|
17614
|
-
return
|
|
17631
|
+
return b;
|
|
17615
17632
|
},
|
|
17616
17633
|
set: function(L) {
|
|
17617
|
-
const
|
|
17618
|
-
if (!
|
|
17634
|
+
const k = i(L);
|
|
17635
|
+
if (!k)
|
|
17619
17636
|
throw new SyntaxError("An invalid or illegal string was specified.");
|
|
17620
|
-
|
|
17637
|
+
b = k, this.hasBeenReset = !0;
|
|
17621
17638
|
}
|
|
17622
17639
|
})), u.displayState = void 0;
|
|
17623
17640
|
}
|
|
@@ -17896,8 +17913,8 @@ function Rh(a, e, t, s, i, r, n) {
|
|
|
17896
17913
|
}
|
|
17897
17914
|
const S = y.endTime - y.startTime, A = De((y.startTime + T - f) * 9e4, i * 9e4) / 9e4;
|
|
17898
17915
|
y.startTime = Math.max(A, 0), y.endTime = Math.max(A + S, 0);
|
|
17899
|
-
const
|
|
17900
|
-
y.text = decodeURIComponent(encodeURIComponent(
|
|
17916
|
+
const P = y.text.trim();
|
|
17917
|
+
y.text = decodeURIComponent(encodeURIComponent(P)), y.id || (y.id = ji(y.startTime, y.endTime, P)), y.endTime > 0 && l.push(y);
|
|
17901
17918
|
}, o.onparsingerror = function(y) {
|
|
17902
17919
|
g = y;
|
|
17903
17920
|
}, o.onflush = function() {
|
|
@@ -19212,8 +19229,8 @@ class Zh extends Kn {
|
|
|
19212
19229
|
}
|
|
19213
19230
|
const h = X.bufferInfo(n, e, 0), d = h.nextStart || 0, f = this.fragmentTracker;
|
|
19214
19231
|
if (o && f && this.hls) {
|
|
19215
|
-
const
|
|
19216
|
-
if (x ||
|
|
19232
|
+
const P = pn(this.hls.inFlightFragments, e), x = h.len > ps, I = !d || P || d - e > ps && !f.getPartialFragment(e);
|
|
19233
|
+
if (x || I)
|
|
19217
19234
|
return;
|
|
19218
19235
|
this.moved = !1;
|
|
19219
19236
|
}
|
|
@@ -19221,8 +19238,8 @@ class Zh extends Kn {
|
|
|
19221
19238
|
if (!this.moved && this.stalled !== null && f) {
|
|
19222
19239
|
if (!(h.len > 0) && !d)
|
|
19223
19240
|
return;
|
|
19224
|
-
const x = Math.max(d, h.start || 0) - e,
|
|
19225
|
-
if (x > 0 && (x <=
|
|
19241
|
+
const x = Math.max(d, h.start || 0) - e, b = !!(g != null && g.live) ? g.targetduration * 2 : ps, L = os(e, f);
|
|
19242
|
+
if (x > 0 && (x <= b || L)) {
|
|
19226
19243
|
n.paused || this._trySkipBufferHole(L);
|
|
19227
19244
|
return;
|
|
19228
19245
|
}
|
|
@@ -19668,40 +19685,40 @@ class ed {
|
|
|
19668
19685
|
this.id3Track || (this.id3Track = this.createTrack(this.media));
|
|
19669
19686
|
for (let p = 0; p < u.length; p++) {
|
|
19670
19687
|
const y = u[p], E = l[y], T = E.startTime, v = h[y], S = v?.cues || {};
|
|
19671
|
-
let A = v?.durationKnown || !1,
|
|
19688
|
+
let A = v?.durationKnown || !1, P = ls;
|
|
19672
19689
|
const {
|
|
19673
19690
|
duration: x,
|
|
19674
|
-
endDate:
|
|
19691
|
+
endDate: I
|
|
19675
19692
|
} = E;
|
|
19676
|
-
if (
|
|
19677
|
-
|
|
19693
|
+
if (I && x !== null)
|
|
19694
|
+
P = T + x, A = !0;
|
|
19678
19695
|
else if (E.endOnNext && !A) {
|
|
19679
|
-
const L = u.reduce((
|
|
19680
|
-
if (
|
|
19681
|
-
const
|
|
19682
|
-
if (
|
|
19683
|
-
return
|
|
19696
|
+
const L = u.reduce((k, C) => {
|
|
19697
|
+
if (C !== E.id) {
|
|
19698
|
+
const M = l[C];
|
|
19699
|
+
if (M.class === E.class && M.startDate > E.startDate && (!k || E.startDate < k.startDate))
|
|
19700
|
+
return M;
|
|
19684
19701
|
}
|
|
19685
|
-
return
|
|
19702
|
+
return k;
|
|
19686
19703
|
}, null);
|
|
19687
|
-
L && (
|
|
19704
|
+
L && (P = L.startTime, A = !0);
|
|
19688
19705
|
}
|
|
19689
|
-
const
|
|
19690
|
-
for (let L = 0; L <
|
|
19691
|
-
const
|
|
19692
|
-
if (!Sl(
|
|
19706
|
+
const b = Object.keys(E.attr);
|
|
19707
|
+
for (let L = 0; L < b.length; L++) {
|
|
19708
|
+
const k = b[L];
|
|
19709
|
+
if (!Sl(k))
|
|
19693
19710
|
continue;
|
|
19694
|
-
const
|
|
19695
|
-
if (
|
|
19696
|
-
A && !(v != null && v.durationKnown) ?
|
|
19711
|
+
const C = S[k];
|
|
19712
|
+
if (C)
|
|
19713
|
+
A && !(v != null && v.durationKnown) ? C.endTime = P : Math.abs(C.startTime - T) > 0.01 && (C.startTime = T, C.endTime = P);
|
|
19697
19714
|
else if (o) {
|
|
19698
|
-
let
|
|
19699
|
-
xl(
|
|
19700
|
-
const
|
|
19701
|
-
key:
|
|
19702
|
-
data:
|
|
19715
|
+
let M = E.attr[k];
|
|
19716
|
+
xl(k) && (M = xn(M));
|
|
19717
|
+
const N = ei(o, T, P, {
|
|
19718
|
+
key: k,
|
|
19719
|
+
data: M
|
|
19703
19720
|
}, Ce.dateRange);
|
|
19704
|
-
|
|
19721
|
+
N && (N.id = y, this.id3Track.addCue(N), S[k] = N, n && (k === "X-ASSET-LIST" || k === "X-ASSET-URL") && N.addEventListener("enter", this.onEventCueEnter));
|
|
19705
19722
|
}
|
|
19706
19723
|
}
|
|
19707
19724
|
h[y] = {
|
|
@@ -19909,20 +19926,20 @@ class sd extends Ki {
|
|
|
19909
19926
|
"FRAME-RATE": v,
|
|
19910
19927
|
"HDCP-LEVEL": S,
|
|
19911
19928
|
"PATHWAY-ID": A,
|
|
19912
|
-
RESOLUTION:
|
|
19929
|
+
RESOLUTION: P,
|
|
19913
19930
|
"VIDEO-RANGE": x
|
|
19914
|
-
} = h,
|
|
19915
|
-
if (r[
|
|
19916
|
-
if (r[
|
|
19917
|
-
const L = n[
|
|
19931
|
+
} = h, b = `${`${A || "."}-`}${u.bitrate}-${P}-${v}-${T}-${x}-${S}`;
|
|
19932
|
+
if (r[b])
|
|
19933
|
+
if (r[b].uri !== u.url && !u.attrs["PATHWAY-ID"]) {
|
|
19934
|
+
const L = n[b] += 1;
|
|
19918
19935
|
u.attrs["PATHWAY-ID"] = new Array(L + 1).join(".");
|
|
19919
|
-
const
|
|
19920
|
-
r[
|
|
19936
|
+
const k = this.createLevel(u);
|
|
19937
|
+
r[b] = k, i.push(k);
|
|
19921
19938
|
} else
|
|
19922
|
-
r[
|
|
19939
|
+
r[b].addGroupId("audio", h.AUDIO), r[b].addGroupId("text", h.SUBTITLES);
|
|
19923
19940
|
else {
|
|
19924
19941
|
const L = this.createLevel(u);
|
|
19925
|
-
r[
|
|
19942
|
+
r[b] = L, n[b] = 1, i.push(L);
|
|
19926
19943
|
}
|
|
19927
19944
|
}), this.filterAndSortMediaOptions(i, t, o, c, l);
|
|
19928
19945
|
}
|
|
@@ -19953,7 +19970,7 @@ class sd extends Ki {
|
|
|
19953
19970
|
Promise.resolve().then(() => {
|
|
19954
19971
|
if (this.hls) {
|
|
19955
19972
|
let T = "no level with compatible codecs found in manifest", v = T;
|
|
19956
|
-
t.levels.length && (v = `one or more CODECS in variant not supported: ${le(t.levels.map((A) => A.attrs.CODECS).filter((A,
|
|
19973
|
+
t.levels.length && (v = `one or more CODECS in variant not supported: ${le(t.levels.map((A) => A.attrs.CODECS).filter((A, P, x) => x.indexOf(A) === P))}`, this.warn(v), T += ` (${v})`);
|
|
19957
19974
|
const S = new Error(T);
|
|
19958
19975
|
this.hls.trigger(m.ERROR, {
|
|
19959
19976
|
type: Y.MEDIA_ERROR,
|
|
@@ -20775,24 +20792,24 @@ class ad extends Oi {
|
|
|
20775
20792
|
startPTS: v,
|
|
20776
20793
|
endPTS: S,
|
|
20777
20794
|
startDTS: A,
|
|
20778
|
-
endDTS:
|
|
20795
|
+
endDTS: P
|
|
20779
20796
|
} = u;
|
|
20780
20797
|
if (c)
|
|
20781
20798
|
c.elementaryStreams[u.type] = {
|
|
20782
20799
|
startPTS: v,
|
|
20783
20800
|
endPTS: S,
|
|
20784
20801
|
startDTS: A,
|
|
20785
|
-
endDTS:
|
|
20802
|
+
endDTS: P
|
|
20786
20803
|
};
|
|
20787
20804
|
else if (u.firstKeyFrame && u.independent && r.id === 1 && !T && (this.couldBacktrack = !0), u.dropped && u.independent) {
|
|
20788
|
-
const x = this.getMainFwdBufferInfo(),
|
|
20789
|
-
if (!E &&
|
|
20805
|
+
const x = this.getMainFwdBufferInfo(), I = (x ? x.end : this.getLoadPosition()) + this.config.maxBufferHole, b = u.firstKeyFramePTS ? u.firstKeyFramePTS : v;
|
|
20806
|
+
if (!E && I < b - this.config.maxBufferHole && !T) {
|
|
20790
20807
|
this.backtrack(o);
|
|
20791
20808
|
return;
|
|
20792
20809
|
} else T && (o.gap = !0);
|
|
20793
|
-
o.setElementaryStreamInfo(u.type, o.start, S, o.start,
|
|
20810
|
+
o.setElementaryStreamInfo(u.type, o.start, S, o.start, P, !0);
|
|
20794
20811
|
} else E && v - (g.appliedTimelineOffset || 0) > ps && (o.gap = !0);
|
|
20795
|
-
o.setElementaryStreamInfo(u.type, v, S, A,
|
|
20812
|
+
o.setElementaryStreamInfo(u.type, v, S, A, P), this.backtrackFragment && (this.backtrackFragment = o), this.bufferFragmentData(u, o, c, r, E || T);
|
|
20796
20813
|
} else if (E || T)
|
|
20797
20814
|
o.gap = !0;
|
|
20798
20815
|
else {
|
|
@@ -21392,11 +21409,11 @@ class ld {
|
|
|
21392
21409
|
} = this.hls.config;
|
|
21393
21410
|
let {
|
|
21394
21411
|
audioCodec: A,
|
|
21395
|
-
videoCodec:
|
|
21412
|
+
videoCodec: P
|
|
21396
21413
|
} = T;
|
|
21397
21414
|
for (let x = v.length; x--; ) {
|
|
21398
|
-
const
|
|
21399
|
-
Ut(
|
|
21415
|
+
const I = v[x];
|
|
21416
|
+
Ut(I, "audio", S) ? (T.audioCodec = A = A ? `${A},${I}` : I, _t.audio[A.substring(0, 4)] = 2, v.splice(x, 1)) : Ut(I, "video", S) && (T.videoCodec = P = P ? `${P},${I}` : I, _t.video[P.substring(0, 4)] = 2, v.splice(x, 1));
|
|
21400
21417
|
}
|
|
21401
21418
|
}
|
|
21402
21419
|
});
|
|
@@ -21676,18 +21693,18 @@ class Pe {
|
|
|
21676
21693
|
capLevelController: n,
|
|
21677
21694
|
errorController: o,
|
|
21678
21695
|
fpsController: c
|
|
21679
|
-
} = s, l = new o(this), u = this.abrController = new i(this), h = new cl(this), d = s.interstitialsController, f = d ? this.interstitialsController = new d(this, Pe) : null, g = this.bufferController = new r(this, h), p = this.capLevelController = new n(this), y = new c(this), E = new ld(this), T = s.contentSteeringController, v = T ? new T(this) : null, S = this.levelController = new sd(this, v), A = new ed(this),
|
|
21696
|
+
} = s, l = new o(this), u = this.abrController = new i(this), h = new cl(this), d = s.interstitialsController, f = d ? this.interstitialsController = new d(this, Pe) : null, g = this.bufferController = new r(this, h), p = this.capLevelController = new n(this), y = new c(this), E = new ld(this), T = s.contentSteeringController, v = T ? new T(this) : null, S = this.levelController = new sd(this, v), A = new ed(this), P = new od(this.config, this.logger), x = this.streamController = new ad(this, h, P), I = this.gapController = new Zh(this, h);
|
|
21680
21697
|
p.setStreamController(x), y.setStreamController(x);
|
|
21681
|
-
const
|
|
21682
|
-
f &&
|
|
21683
|
-
const L = [u, g,
|
|
21684
|
-
this.audioTrackController = this.createController(s.audioTrackController,
|
|
21685
|
-
const
|
|
21686
|
-
|
|
21687
|
-
const
|
|
21688
|
-
|
|
21689
|
-
const
|
|
21690
|
-
typeof
|
|
21698
|
+
const b = [E, S, x];
|
|
21699
|
+
f && b.splice(1, 0, f), v && b.splice(1, 0, v), this.networkControllers = b;
|
|
21700
|
+
const L = [u, g, I, p, y, A, h];
|
|
21701
|
+
this.audioTrackController = this.createController(s.audioTrackController, b);
|
|
21702
|
+
const k = s.audioStreamController;
|
|
21703
|
+
k && b.push(this.audioStreamController = new k(this, h, P)), this.subtitleTrackController = this.createController(s.subtitleTrackController, b);
|
|
21704
|
+
const C = s.subtitleStreamController;
|
|
21705
|
+
C && b.push(this.subtititleStreamController = new C(this, h, P)), this.createController(s.timelineController, L), P.emeController = this.emeController = this.createController(s.emeController, L), this.cmcdController = this.createController(s.cmcdController, L), this.latencyController = this.createController(td, L), this.coreComponents = L, b.push(l);
|
|
21706
|
+
const M = l.onErrorOut;
|
|
21707
|
+
typeof M == "function" && this.on(m.ERROR, M, l), this.on(m.MANIFEST_LOADED, E.onManifestLoaded, E);
|
|
21691
21708
|
}
|
|
21692
21709
|
createController(e, t) {
|
|
21693
21710
|
if (e) {
|
|
@@ -22437,60 +22454,60 @@ const cd = async ({
|
|
|
22437
22454
|
ft(() => {
|
|
22438
22455
|
o(!1), l([]), h(-1), f(!1), v(!1);
|
|
22439
22456
|
}, [a]), ft(() => {
|
|
22440
|
-
const
|
|
22441
|
-
if (!
|
|
22442
|
-
f(!
|
|
22443
|
-
const
|
|
22444
|
-
|
|
22445
|
-
const
|
|
22446
|
-
f(!
|
|
22457
|
+
const C = t.current;
|
|
22458
|
+
if (!C || !T) return;
|
|
22459
|
+
f(!C.paused), p(C.volume), E(C.muted);
|
|
22460
|
+
const M = localStorage.getItem("hls-player-volume");
|
|
22461
|
+
M && (C.volume = parseFloat(M), p(parseFloat(M)));
|
|
22462
|
+
const $ = () => {
|
|
22463
|
+
f(!C.paused), p(C.volume), E(C.muted);
|
|
22447
22464
|
};
|
|
22448
|
-
return
|
|
22449
|
-
|
|
22465
|
+
return C.addEventListener("play", $), C.addEventListener("pause", $), C.addEventListener("volumechange", $), () => {
|
|
22466
|
+
C.removeEventListener("play", $), C.removeEventListener("pause", $), C.removeEventListener("volumechange", $);
|
|
22450
22467
|
};
|
|
22451
22468
|
}, [t, T]);
|
|
22452
|
-
const
|
|
22453
|
-
const
|
|
22454
|
-
if (!(!
|
|
22469
|
+
const P = ri(S), x = dt(async () => {
|
|
22470
|
+
const C = t.current;
|
|
22471
|
+
if (!(!C || C.paused === !1))
|
|
22455
22472
|
try {
|
|
22456
|
-
await
|
|
22473
|
+
await C.play();
|
|
22457
22474
|
} catch {
|
|
22458
22475
|
console.log("Autoplay blocked, waiting for user interaction");
|
|
22459
22476
|
}
|
|
22460
22477
|
}, [t]);
|
|
22461
22478
|
ft(() => {
|
|
22462
|
-
S && !
|
|
22479
|
+
S && !P.current && r.current && a && (console.log("Stream came back online, reloading source"), r.current.loadSource(
|
|
22463
22480
|
ii(a, e)
|
|
22464
|
-
), x()),
|
|
22481
|
+
), x()), P.current = S;
|
|
22465
22482
|
}, [S, a, x]), ft(() => {
|
|
22466
22483
|
if (!a || !t.current) return;
|
|
22467
|
-
const
|
|
22484
|
+
const C = t.current;
|
|
22468
22485
|
if (Pe.isSupported()) {
|
|
22469
|
-
const
|
|
22470
|
-
return r.current =
|
|
22486
|
+
const M = new Pe(A);
|
|
22487
|
+
return r.current = M, M.loadSource(ii(a, e)), M.attachMedia(C), v(!0), M.on(Pe.Events.MANIFEST_PARSED, ($, N) => {
|
|
22471
22488
|
l(
|
|
22472
|
-
|
|
22489
|
+
N.levels.map((F, U) => ({
|
|
22473
22490
|
level: U,
|
|
22474
22491
|
height: F.height,
|
|
22475
22492
|
label: `${F.height}p`
|
|
22476
22493
|
}))
|
|
22477
22494
|
), x();
|
|
22478
|
-
}),
|
|
22479
|
-
|
|
22480
|
-
type:
|
|
22481
|
-
message:
|
|
22495
|
+
}), M.on(Pe.Events.ERROR, ($, N) => {
|
|
22496
|
+
N.fatal && (N.type === Pe.ErrorTypes.NETWORK_ERROR ? setTimeout(() => M.startLoad(), 5e3) : N.type === Pe.ErrorTypes.MEDIA_ERROR ? M.recoverMediaError() : (o(!0), s?.({
|
|
22497
|
+
type: N.type,
|
|
22498
|
+
message: N.details || "Unknown error",
|
|
22482
22499
|
fatal: !0
|
|
22483
22500
|
})));
|
|
22484
22501
|
}), () => {
|
|
22485
|
-
|
|
22502
|
+
M.destroy(), r.current = null;
|
|
22486
22503
|
};
|
|
22487
|
-
} else if (
|
|
22488
|
-
|
|
22489
|
-
const
|
|
22504
|
+
} else if (C.canPlayType("application/vnd.apple.mpegurl")) {
|
|
22505
|
+
C.src = ii(a, e), v(!0);
|
|
22506
|
+
const M = () => {
|
|
22490
22507
|
o(!0), s?.({ type: "native", message: "Playback error", fatal: !0 });
|
|
22491
22508
|
};
|
|
22492
|
-
return
|
|
22493
|
-
|
|
22509
|
+
return C.addEventListener("loadedmetadata", x), C.addEventListener("error", M), () => {
|
|
22510
|
+
C.removeEventListener("loadedmetadata", x), C.removeEventListener("error", M);
|
|
22494
22511
|
};
|
|
22495
22512
|
}
|
|
22496
22513
|
}, [
|
|
@@ -22501,20 +22518,20 @@ const cd = async ({
|
|
|
22501
22518
|
t,
|
|
22502
22519
|
x
|
|
22503
22520
|
]);
|
|
22504
|
-
const
|
|
22505
|
-
const
|
|
22506
|
-
|
|
22507
|
-
}, [t]),
|
|
22508
|
-
(
|
|
22509
|
-
const
|
|
22510
|
-
|
|
22521
|
+
const I = dt(() => {
|
|
22522
|
+
const C = t.current;
|
|
22523
|
+
C && (C.paused ? C.play() : C.pause());
|
|
22524
|
+
}, [t]), b = dt(
|
|
22525
|
+
(C) => {
|
|
22526
|
+
const M = t.current;
|
|
22527
|
+
M && (M.volume = C, M.muted = C === 0, localStorage.setItem("hls-player-volume", C.toString()));
|
|
22511
22528
|
},
|
|
22512
22529
|
[t]
|
|
22513
22530
|
), L = dt(() => {
|
|
22514
|
-
const
|
|
22515
|
-
|
|
22516
|
-
}, [t]),
|
|
22517
|
-
r.current && (r.current.currentLevel =
|
|
22531
|
+
const C = t.current;
|
|
22532
|
+
C && (C.muted = !C.muted, !C.muted && C.volume === 0 && (C.volume = 0.5));
|
|
22533
|
+
}, [t]), k = dt((C) => {
|
|
22534
|
+
r.current && (r.current.currentLevel = C, h(C));
|
|
22518
22535
|
}, []);
|
|
22519
22536
|
return {
|
|
22520
22537
|
isLive: S,
|
|
@@ -22524,10 +22541,10 @@ const cd = async ({
|
|
|
22524
22541
|
muted: y,
|
|
22525
22542
|
qualities: c,
|
|
22526
22543
|
currentQuality: u,
|
|
22527
|
-
handlePlayPause:
|
|
22528
|
-
handleVolumeChange:
|
|
22544
|
+
handlePlayPause: I,
|
|
22545
|
+
handleVolumeChange: b,
|
|
22529
22546
|
handleMuteToggle: L,
|
|
22530
|
-
handleQualityChange:
|
|
22547
|
+
handleQualityChange: k
|
|
22531
22548
|
};
|
|
22532
22549
|
}, fd = {
|
|
22533
22550
|
sm: {
|
|
@@ -22580,7 +22597,9 @@ const cd = async ({
|
|
|
22580
22597
|
inset: 0,
|
|
22581
22598
|
display: "flex",
|
|
22582
22599
|
flexDirection: "column",
|
|
22583
|
-
paddingTop: "3rem"
|
|
22600
|
+
paddingTop: "3rem",
|
|
22601
|
+
overflow: "visible",
|
|
22602
|
+
zIndex: 9999
|
|
22584
22603
|
},
|
|
22585
22604
|
overlay: {
|
|
22586
22605
|
position: "relative",
|
|
@@ -22670,209 +22689,221 @@ const cd = async ({
|
|
|
22670
22689
|
onChange: r,
|
|
22671
22690
|
hlsConfig: n,
|
|
22672
22691
|
size: o = "md",
|
|
22673
|
-
controls: c = !1
|
|
22692
|
+
controls: c = !1,
|
|
22693
|
+
roundedCorners: l = !1
|
|
22674
22694
|
}) => {
|
|
22675
|
-
const
|
|
22695
|
+
const u = Ae.useRef(null), h = Ae.useRef(null), [d, f] = Ae.useState(!1), [g, p] = Ae.useState(!0), [y, E] = Ae.useState(null), [T, v] = Ae.useState(!1);
|
|
22676
22696
|
Ae.useEffect(() => {
|
|
22677
22697
|
gd();
|
|
22678
22698
|
}, []), Ae.useEffect(() => {
|
|
22679
|
-
if (e.length > 0 && !
|
|
22680
|
-
const
|
|
22681
|
-
|
|
22699
|
+
if (e.length > 0 && !y) {
|
|
22700
|
+
const F = s ? e.find((U) => U.locale === s) : null;
|
|
22701
|
+
E(F ?? e[0]);
|
|
22682
22702
|
}
|
|
22683
22703
|
}, [e, s]);
|
|
22684
22704
|
const {
|
|
22685
|
-
isLive:
|
|
22686
|
-
hasError:
|
|
22687
|
-
playing:
|
|
22688
|
-
volume:
|
|
22689
|
-
muted:
|
|
22705
|
+
isLive: S,
|
|
22706
|
+
hasError: A,
|
|
22707
|
+
playing: P,
|
|
22708
|
+
volume: x,
|
|
22709
|
+
muted: I,
|
|
22690
22710
|
qualities: b,
|
|
22691
|
-
currentQuality:
|
|
22692
|
-
handlePlayPause:
|
|
22693
|
-
handleMuteToggle:
|
|
22694
|
-
handleQualityChange:
|
|
22711
|
+
currentQuality: L,
|
|
22712
|
+
handlePlayPause: k,
|
|
22713
|
+
handleMuteToggle: C,
|
|
22714
|
+
handleQualityChange: M
|
|
22695
22715
|
} = dd({
|
|
22696
|
-
cloudflareId:
|
|
22716
|
+
cloudflareId: y?.cloudflareId ?? "",
|
|
22697
22717
|
cloudflareStreamDomain: t,
|
|
22698
|
-
videoRef:
|
|
22718
|
+
videoRef: u,
|
|
22699
22719
|
onError: i,
|
|
22700
22720
|
hlsConfig: n
|
|
22701
22721
|
});
|
|
22702
22722
|
Ae.useEffect(() => {
|
|
22703
|
-
const
|
|
22704
|
-
|
|
22723
|
+
const F = () => {
|
|
22724
|
+
f(!!document.fullscreenElement);
|
|
22705
22725
|
};
|
|
22706
|
-
return document.addEventListener("fullscreenchange",
|
|
22707
|
-
document.removeEventListener("fullscreenchange",
|
|
22726
|
+
return document.addEventListener("fullscreenchange", F), () => {
|
|
22727
|
+
document.removeEventListener("fullscreenchange", F);
|
|
22708
22728
|
};
|
|
22709
22729
|
}, []), Ae.useEffect(() => {
|
|
22710
|
-
let
|
|
22711
|
-
const
|
|
22712
|
-
|
|
22713
|
-
|
|
22730
|
+
let F;
|
|
22731
|
+
const U = () => {
|
|
22732
|
+
p(!0), clearTimeout(F), F = setTimeout(() => {
|
|
22733
|
+
P && p(!1);
|
|
22714
22734
|
}, 3e3);
|
|
22715
|
-
},
|
|
22716
|
-
return
|
|
22717
|
-
clearTimeout(
|
|
22735
|
+
}, B = h.current;
|
|
22736
|
+
return B && (B.addEventListener("mousemove", U), B.addEventListener("mouseenter", U)), () => {
|
|
22737
|
+
clearTimeout(F), B && (B.removeEventListener("mousemove", U), B.removeEventListener("mouseenter", U));
|
|
22718
22738
|
};
|
|
22719
|
-
}, [
|
|
22720
|
-
const
|
|
22721
|
-
if (
|
|
22739
|
+
}, [P]);
|
|
22740
|
+
const $ = () => {
|
|
22741
|
+
if (h.current)
|
|
22722
22742
|
try {
|
|
22723
|
-
document.fullscreenElement ? document.exitFullscreen() :
|
|
22724
|
-
} catch (
|
|
22725
|
-
console.error("Error toggling fullscreen:",
|
|
22743
|
+
document.fullscreenElement ? document.exitFullscreen() : h.current.requestFullscreen();
|
|
22744
|
+
} catch (F) {
|
|
22745
|
+
console.error("Error toggling fullscreen:", F);
|
|
22726
22746
|
}
|
|
22727
22747
|
};
|
|
22728
22748
|
if (Ae.useEffect(() => {
|
|
22729
22749
|
typeof a < "u" && (a.current = {
|
|
22730
|
-
playing:
|
|
22731
|
-
playPause:
|
|
22732
|
-
volume:
|
|
22733
|
-
muteToggle:
|
|
22734
|
-
quality:
|
|
22750
|
+
playing: P,
|
|
22751
|
+
playPause: k,
|
|
22752
|
+
volume: x,
|
|
22753
|
+
muteToggle: C,
|
|
22754
|
+
quality: L,
|
|
22735
22755
|
qualities: b,
|
|
22736
|
-
qualityChange:
|
|
22737
|
-
fullscreen:
|
|
22738
|
-
fullscreenToggle:
|
|
22739
|
-
selectedStreamInput:
|
|
22756
|
+
qualityChange: M,
|
|
22757
|
+
fullscreen: d,
|
|
22758
|
+
fullscreenToggle: $,
|
|
22759
|
+
selectedStreamInput: y,
|
|
22740
22760
|
streamInputs: e,
|
|
22741
|
-
setSelectedStreamInput: (
|
|
22761
|
+
setSelectedStreamInput: (F) => E(F)
|
|
22742
22762
|
});
|
|
22743
22763
|
}, []), Ae.useEffect(() => {
|
|
22744
22764
|
r && r({
|
|
22745
|
-
isLive:
|
|
22746
|
-
playing:
|
|
22747
|
-
muted:
|
|
22748
|
-
volume:
|
|
22749
|
-
quality:
|
|
22765
|
+
isLive: S,
|
|
22766
|
+
playing: P,
|
|
22767
|
+
muted: I,
|
|
22768
|
+
volume: x,
|
|
22769
|
+
quality: L,
|
|
22750
22770
|
qualities: b,
|
|
22751
|
-
fullscreen:
|
|
22752
|
-
selectedStreamInput:
|
|
22771
|
+
fullscreen: d,
|
|
22772
|
+
selectedStreamInput: y
|
|
22753
22773
|
});
|
|
22754
22774
|
}, [
|
|
22755
|
-
|
|
22756
|
-
|
|
22775
|
+
S,
|
|
22776
|
+
P,
|
|
22777
|
+
I,
|
|
22757
22778
|
x,
|
|
22758
|
-
|
|
22759
|
-
R,
|
|
22779
|
+
L,
|
|
22760
22780
|
b,
|
|
22761
|
-
|
|
22762
|
-
|
|
22781
|
+
d,
|
|
22782
|
+
y,
|
|
22763
22783
|
r
|
|
22764
|
-
]), !
|
|
22784
|
+
]), !y)
|
|
22765
22785
|
return null;
|
|
22766
|
-
const
|
|
22767
|
-
return /* @__PURE__ */ q.jsxs(
|
|
22768
|
-
|
|
22769
|
-
|
|
22770
|
-
|
|
22771
|
-
|
|
22772
|
-
|
|
22773
|
-
|
|
22774
|
-
|
|
22775
|
-
|
|
22776
|
-
|
|
22777
|
-
|
|
22778
|
-
}
|
|
22779
|
-
),
|
|
22780
|
-
/* @__PURE__ */ q.jsxs("div", { style: c ? ye.overlayControls : ye.overlay, children: [
|
|
22781
|
-
/* @__PURE__ */ q.jsxs("div", { style: ye.flexOne, children: [
|
|
22782
|
-
!v && !S && /* @__PURE__ */ q.jsxs("div", { style: ye.centeredOverlay, children: [
|
|
22783
|
-
/* @__PURE__ */ q.jsx(
|
|
22784
|
-
"div",
|
|
22785
|
-
{
|
|
22786
|
-
style: {
|
|
22787
|
-
...ye.spinner,
|
|
22788
|
-
...B.spinner
|
|
22789
|
-
}
|
|
22790
|
-
}
|
|
22791
|
-
),
|
|
22792
|
-
/* @__PURE__ */ q.jsx(
|
|
22793
|
-
"p",
|
|
22794
|
-
{
|
|
22795
|
-
style: {
|
|
22796
|
-
...ye.waitingText,
|
|
22797
|
-
...B.waitingText
|
|
22798
|
-
},
|
|
22799
|
-
children: "Waiting for stream..."
|
|
22800
|
-
}
|
|
22801
|
-
),
|
|
22802
|
-
/* @__PURE__ */ q.jsx(
|
|
22803
|
-
"p",
|
|
22804
|
-
{
|
|
22805
|
-
style: {
|
|
22806
|
-
...ye.waitingSubtext,
|
|
22807
|
-
...B.waitingSubtext
|
|
22808
|
-
},
|
|
22809
|
-
children: "The stream will start automatically when available"
|
|
22810
|
-
}
|
|
22811
|
-
)
|
|
22812
|
-
] }),
|
|
22813
|
-
S && /* @__PURE__ */ q.jsxs("div", { style: ye.centeredOverlay, children: [
|
|
22814
|
-
/* @__PURE__ */ q.jsx("p", { style: ye.errorTitle, children: "Stream Error" }),
|
|
22815
|
-
/* @__PURE__ */ q.jsx("p", { style: ye.errorText, children: "Unable to load the stream. Please try again later." })
|
|
22816
|
-
] }),
|
|
22817
|
-
v && !S && !A && /* @__PURE__ */ q.jsx("div", { style: ye.playOverlay, onClick: L, children: /* @__PURE__ */ q.jsx(
|
|
22818
|
-
"button",
|
|
22786
|
+
const N = fd[o];
|
|
22787
|
+
return /* @__PURE__ */ q.jsxs(
|
|
22788
|
+
"div",
|
|
22789
|
+
{
|
|
22790
|
+
ref: h,
|
|
22791
|
+
style: {
|
|
22792
|
+
...ye.container,
|
|
22793
|
+
borderRadius: l ? "1rem" : "0"
|
|
22794
|
+
},
|
|
22795
|
+
children: [
|
|
22796
|
+
/* @__PURE__ */ q.jsx(
|
|
22797
|
+
"video",
|
|
22819
22798
|
{
|
|
22820
|
-
|
|
22821
|
-
|
|
22822
|
-
|
|
22823
|
-
|
|
22824
|
-
|
|
22825
|
-
|
|
22826
|
-
|
|
22827
|
-
|
|
22828
|
-
|
|
22829
|
-
|
|
22799
|
+
ref: u,
|
|
22800
|
+
autoPlay: !0,
|
|
22801
|
+
muted: I,
|
|
22802
|
+
playsInline: !0,
|
|
22803
|
+
"webkit-playsinline": "",
|
|
22804
|
+
controls: !1,
|
|
22805
|
+
style: { ...ye.video, borderRadius: l ? "1rem" : "0" }
|
|
22806
|
+
}
|
|
22807
|
+
),
|
|
22808
|
+
/* @__PURE__ */ q.jsxs("div", { style: c ? ye.overlayControls : ye.overlay, children: [
|
|
22809
|
+
/* @__PURE__ */ q.jsxs("div", { style: ye.flexOne, children: [
|
|
22810
|
+
!S && !A && /* @__PURE__ */ q.jsxs("div", { style: ye.centeredOverlay, children: [
|
|
22811
|
+
/* @__PURE__ */ q.jsx(
|
|
22812
|
+
"div",
|
|
22813
|
+
{
|
|
22814
|
+
style: {
|
|
22815
|
+
...ye.spinner,
|
|
22816
|
+
...N.spinner
|
|
22817
|
+
}
|
|
22818
|
+
}
|
|
22819
|
+
),
|
|
22820
|
+
/* @__PURE__ */ q.jsx(
|
|
22821
|
+
"p",
|
|
22822
|
+
{
|
|
22823
|
+
style: {
|
|
22824
|
+
...ye.waitingText,
|
|
22825
|
+
...N.waitingText
|
|
22826
|
+
},
|
|
22827
|
+
children: "Waiting for stream..."
|
|
22828
|
+
}
|
|
22829
|
+
),
|
|
22830
|
+
/* @__PURE__ */ q.jsx(
|
|
22831
|
+
"p",
|
|
22832
|
+
{
|
|
22833
|
+
style: {
|
|
22834
|
+
...ye.waitingSubtext,
|
|
22835
|
+
...N.waitingSubtext
|
|
22836
|
+
},
|
|
22837
|
+
children: "The stream will start automatically when available"
|
|
22838
|
+
}
|
|
22839
|
+
)
|
|
22840
|
+
] }),
|
|
22841
|
+
A && /* @__PURE__ */ q.jsxs("div", { style: ye.centeredOverlay, children: [
|
|
22842
|
+
/* @__PURE__ */ q.jsx("p", { style: ye.errorTitle, children: "Stream Error" }),
|
|
22843
|
+
/* @__PURE__ */ q.jsx("p", { style: ye.errorText, children: "Unable to load the stream. Please try again later." })
|
|
22844
|
+
] }),
|
|
22845
|
+
S && !A && !P && /* @__PURE__ */ q.jsx("div", { style: ye.playOverlay, onClick: k, children: /* @__PURE__ */ q.jsx(
|
|
22846
|
+
"button",
|
|
22830
22847
|
{
|
|
22831
|
-
|
|
22832
|
-
|
|
22833
|
-
|
|
22834
|
-
|
|
22848
|
+
style: {
|
|
22849
|
+
...ye.playButton,
|
|
22850
|
+
...N.playButton,
|
|
22851
|
+
...T ? ye.playButtonHover : {}
|
|
22852
|
+
},
|
|
22853
|
+
"aria-label": "Play video",
|
|
22854
|
+
onMouseEnter: () => v(!0),
|
|
22855
|
+
onMouseLeave: () => v(!1),
|
|
22835
22856
|
children: /* @__PURE__ */ q.jsx(
|
|
22836
|
-
"
|
|
22857
|
+
"svg",
|
|
22837
22858
|
{
|
|
22838
|
-
|
|
22839
|
-
|
|
22840
|
-
|
|
22859
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22860
|
+
viewBox: "0 0 24 24",
|
|
22861
|
+
fill: "currentColor",
|
|
22862
|
+
style: { ...ye.playIcon, ...N.playIcon },
|
|
22863
|
+
children: /* @__PURE__ */ q.jsx(
|
|
22864
|
+
"path",
|
|
22865
|
+
{
|
|
22866
|
+
fillRule: "evenodd",
|
|
22867
|
+
d: "M4.5 5.653c0-1.427 1.529-2.33 2.779-1.643l11.54 6.347c1.295.712 1.295 2.573 0 3.286L7.28 19.99c-1.25.687-2.779-.217-2.779-1.643V5.653Z",
|
|
22868
|
+
clipRule: "evenodd"
|
|
22869
|
+
}
|
|
22870
|
+
)
|
|
22841
22871
|
}
|
|
22842
22872
|
)
|
|
22843
22873
|
}
|
|
22844
|
-
)
|
|
22845
|
-
|
|
22846
|
-
|
|
22847
|
-
|
|
22848
|
-
|
|
22849
|
-
|
|
22850
|
-
|
|
22851
|
-
|
|
22852
|
-
|
|
22853
|
-
|
|
22854
|
-
|
|
22855
|
-
|
|
22856
|
-
|
|
22857
|
-
|
|
22858
|
-
|
|
22859
|
-
|
|
22860
|
-
|
|
22861
|
-
|
|
22862
|
-
|
|
22863
|
-
|
|
22864
|
-
|
|
22865
|
-
|
|
22866
|
-
|
|
22867
|
-
|
|
22868
|
-
|
|
22869
|
-
|
|
22870
|
-
|
|
22871
|
-
|
|
22872
|
-
|
|
22873
|
-
|
|
22874
|
-
|
|
22875
|
-
|
|
22874
|
+
) }),
|
|
22875
|
+
S && !A && P && /* @__PURE__ */ q.jsx("div", { style: ye.clickableArea, onClick: k })
|
|
22876
|
+
] }),
|
|
22877
|
+
/* @__PURE__ */ q.jsx(
|
|
22878
|
+
ro,
|
|
22879
|
+
{
|
|
22880
|
+
controls: c,
|
|
22881
|
+
showControls: g,
|
|
22882
|
+
playing: P,
|
|
22883
|
+
volume: x,
|
|
22884
|
+
muted: I,
|
|
22885
|
+
qualities: b,
|
|
22886
|
+
currentQuality: L,
|
|
22887
|
+
isLive: S,
|
|
22888
|
+
isBehindLive: !1,
|
|
22889
|
+
isFullscreen: d,
|
|
22890
|
+
streamInputs: e,
|
|
22891
|
+
selectedStreamInput: y,
|
|
22892
|
+
onPlayPause: k,
|
|
22893
|
+
onMuteToggle: C,
|
|
22894
|
+
onQualityChange: M,
|
|
22895
|
+
onGoToLive: () => {
|
|
22896
|
+
},
|
|
22897
|
+
fullscreenSupported: !!u.current?.requestFullscreen,
|
|
22898
|
+
onFullscreenToggle: $,
|
|
22899
|
+
onStreamInputChange: (F) => E(F),
|
|
22900
|
+
roundedCorners: l
|
|
22901
|
+
}
|
|
22902
|
+
)
|
|
22903
|
+
] })
|
|
22904
|
+
]
|
|
22905
|
+
}
|
|
22906
|
+
);
|
|
22876
22907
|
};
|
|
22877
22908
|
export {
|
|
22878
22909
|
Td as StreamPlayer,
|