@das-fed/ui 7.0.2-beta.8 → 7.0.2-beta.9
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/package.json +5 -5
- package/packages/components/hls-player/index.js +6 -5
- package/packages/components/hls-player/index.js.gz +0 -0
- package/packages/components/hls-player/src/type.d.ts +3 -0
- package/packages/components/hls-player/style.css +1 -1
- package/packages/components/hls-player/style.css.gz +0 -0
- package/packages/components/live-player/index.d.ts +2 -0
- package/packages/components/live-player/index.js +705 -702
- package/packages/components/live-player/index.js.gz +0 -0
- package/packages/components/live-player/src/type.d.ts +3 -0
- package/packages/components/live-player/style.css +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/live-player/style.css';
|
|
2
|
-
import { defineComponent as Yt, useCssVars as Jt, ref as
|
|
2
|
+
import { defineComponent as Yt, useCssVars as Jt, ref as He, toRefs as Zt, computed as ot, onMounted as $t, onBeforeUnmount as Qt, withDirectives as ei, createElementBlock as dt, openBlock as ut, unref as Xe, normalizeStyle as ti, renderSlot as ii, createTextVNode as ri, toDisplayString as ai } from "vue";
|
|
3
3
|
import { withInstall as ni } from "@das-fed/utils/with-install/index";
|
|
4
4
|
import { ElLoadingDirective as si } from "element-plus/es";
|
|
5
5
|
import "element-plus/es/components/base/style/css";
|
|
@@ -128,20 +128,20 @@ var Tt = { exports: {} };
|
|
|
128
128
|
}), O.d(Z, "c", function() {
|
|
129
129
|
return f;
|
|
130
130
|
});
|
|
131
|
-
var U, B = (U = function(L,
|
|
131
|
+
var U, B = (U = function(L, M) {
|
|
132
132
|
return (U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(C, j) {
|
|
133
133
|
C.__proto__ = j;
|
|
134
134
|
} || function(C, j) {
|
|
135
135
|
for (var H in j) j.hasOwnProperty(H) && (C[H] = j[H]);
|
|
136
|
-
})(L,
|
|
137
|
-
}, function(L,
|
|
136
|
+
})(L, M);
|
|
137
|
+
}, function(L, M) {
|
|
138
138
|
function C() {
|
|
139
139
|
this.constructor = L;
|
|
140
140
|
}
|
|
141
|
-
U(L,
|
|
141
|
+
U(L, M), L.prototype = M === null ? Object.create(M) : (C.prototype = M.prototype, new C());
|
|
142
142
|
}), m = function() {
|
|
143
|
-
function L(
|
|
144
|
-
this._message =
|
|
143
|
+
function L(M) {
|
|
144
|
+
this._message = M;
|
|
145
145
|
}
|
|
146
146
|
return Object.defineProperty(L.prototype, "name", { get: function() {
|
|
147
147
|
return "RuntimeException";
|
|
@@ -151,26 +151,26 @@ var Tt = { exports: {} };
|
|
|
151
151
|
return this.name + ": " + this.message;
|
|
152
152
|
}, L;
|
|
153
153
|
}(), b = function(L) {
|
|
154
|
-
function
|
|
154
|
+
function M(C) {
|
|
155
155
|
return L.call(this, C) || this;
|
|
156
156
|
}
|
|
157
|
-
return B(
|
|
157
|
+
return B(M, L), Object.defineProperty(M.prototype, "name", { get: function() {
|
|
158
158
|
return "IllegalStateException";
|
|
159
|
-
}, enumerable: !1, configurable: !0 }),
|
|
159
|
+
}, enumerable: !1, configurable: !0 }), M;
|
|
160
160
|
}(m), v = function(L) {
|
|
161
|
-
function
|
|
161
|
+
function M(C) {
|
|
162
162
|
return L.call(this, C) || this;
|
|
163
163
|
}
|
|
164
|
-
return B(
|
|
164
|
+
return B(M, L), Object.defineProperty(M.prototype, "name", { get: function() {
|
|
165
165
|
return "InvalidArgumentException";
|
|
166
|
-
}, enumerable: !1, configurable: !0 }),
|
|
166
|
+
}, enumerable: !1, configurable: !0 }), M;
|
|
167
167
|
}(m), f = function(L) {
|
|
168
|
-
function
|
|
168
|
+
function M(C) {
|
|
169
169
|
return L.call(this, C) || this;
|
|
170
170
|
}
|
|
171
|
-
return B(
|
|
171
|
+
return B(M, L), Object.defineProperty(M.prototype, "name", { get: function() {
|
|
172
172
|
return "NotImplementedException";
|
|
173
|
-
}, enumerable: !1, configurable: !0 }),
|
|
173
|
+
}, enumerable: !1, configurable: !0 }), M;
|
|
174
174
|
}(m);
|
|
175
175
|
}, function(fe, Z, O) {
|
|
176
176
|
var U = {};
|
|
@@ -182,7 +182,7 @@ var Tt = { exports: {} };
|
|
|
182
182
|
f.version = { major: parseInt(v.majorVersion, 10), string: v.version }, L.length > 1 && (f.version.minor = parseInt(L[1], 10)), L.length > 2 && (f.version.build = parseInt(L[2], 10));
|
|
183
183
|
}
|
|
184
184
|
v.platform && (f[v.platform] = !0), (f.chrome || f.opr || f.safari) && (f.webkit = !0), (f.rv || f.iemobile) && (f.rv && delete f.rv, v.browser = "msie", f.msie = !0), f.edge && (delete f.edge, v.browser = "msedge", f.msedge = !0), f.opr && (v.browser = "opera", f.opera = !0), f.safari && f.android && (v.browser = "android", f.android = !0);
|
|
185
|
-
for (var
|
|
185
|
+
for (var M in f.name = v.browser, f.platform = v.platform, U) U.hasOwnProperty(M) && delete U[M];
|
|
186
186
|
Object.assign(U, f);
|
|
187
187
|
})(), Z.a = U;
|
|
188
188
|
}, function(fe, Z, O) {
|
|
@@ -204,14 +204,14 @@ var Tt = { exports: {} };
|
|
|
204
204
|
}
|
|
205
205
|
fe.exports = v, fe.exports.once = function(y, G) {
|
|
206
206
|
return new Promise(function(T, l) {
|
|
207
|
-
function u(
|
|
208
|
-
y.removeListener(G, _), l(
|
|
207
|
+
function u(h) {
|
|
208
|
+
y.removeListener(G, _), l(h);
|
|
209
209
|
}
|
|
210
210
|
function _() {
|
|
211
211
|
typeof y.removeListener == "function" && y.removeListener("error", u), T([].slice.call(arguments));
|
|
212
212
|
}
|
|
213
|
-
|
|
214
|
-
typeof
|
|
213
|
+
ie(y, G, _, { once: !0 }), G !== "error" && function(h, P, D) {
|
|
214
|
+
typeof h.on == "function" && ie(h, "error", P, D);
|
|
215
215
|
}(y, u, { once: !0 });
|
|
216
216
|
});
|
|
217
217
|
}, v.EventEmitter = v, v.prototype._events = void 0, v.prototype._eventsCount = 0, v.prototype._maxListeners = void 0;
|
|
@@ -219,16 +219,16 @@ var Tt = { exports: {} };
|
|
|
219
219
|
function L(y) {
|
|
220
220
|
if (typeof y != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof y);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function M(y) {
|
|
223
223
|
return y._maxListeners === void 0 ? v.defaultMaxListeners : y._maxListeners;
|
|
224
224
|
}
|
|
225
225
|
function C(y, G, T, l) {
|
|
226
|
-
var u, _,
|
|
227
|
-
if (L(T), (_ = y._events) === void 0 ? (_ = y._events = /* @__PURE__ */ Object.create(null), y._eventsCount = 0) : (_.newListener !== void 0 && (y.emit("newListener", G, T.listener ? T.listener : T), _ = y._events),
|
|
228
|
-
else if (typeof
|
|
229
|
-
|
|
230
|
-
var D = new Error("Possible EventEmitter memory leak detected. " +
|
|
231
|
-
D.name = "MaxListenersExceededWarning", D.emitter = y, D.type = G, D.count =
|
|
226
|
+
var u, _, h, P;
|
|
227
|
+
if (L(T), (_ = y._events) === void 0 ? (_ = y._events = /* @__PURE__ */ Object.create(null), y._eventsCount = 0) : (_.newListener !== void 0 && (y.emit("newListener", G, T.listener ? T.listener : T), _ = y._events), h = _[G]), h === void 0) h = _[G] = T, ++y._eventsCount;
|
|
228
|
+
else if (typeof h == "function" ? h = _[G] = l ? [T, h] : [h, T] : l ? h.unshift(T) : h.push(T), (u = M(y)) > 0 && h.length > u && !h.warned) {
|
|
229
|
+
h.warned = !0;
|
|
230
|
+
var D = new Error("Possible EventEmitter memory leak detected. " + h.length + " " + String(G) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
231
|
+
D.name = "MaxListenersExceededWarning", D.emitter = y, D.type = G, D.count = h.length, P = D;
|
|
232
232
|
}
|
|
233
233
|
return y;
|
|
234
234
|
}
|
|
@@ -239,14 +239,14 @@ var Tt = { exports: {} };
|
|
|
239
239
|
var l = { fired: !1, wrapFn: void 0, target: y, type: G, listener: T }, u = j.bind(l);
|
|
240
240
|
return u.listener = T, l.wrapFn = u, u;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function le(y, G, T) {
|
|
243
243
|
var l = y._events;
|
|
244
244
|
if (l === void 0) return [];
|
|
245
245
|
var u = l[G];
|
|
246
246
|
return u === void 0 ? [] : typeof u == "function" ? T ? [u.listener || u] : [u] : T ? function(_) {
|
|
247
|
-
for (var
|
|
248
|
-
return
|
|
249
|
-
}(u) :
|
|
247
|
+
for (var h = new Array(_.length), P = 0; P < h.length; ++P) h[P] = _[P].listener || _[P];
|
|
248
|
+
return h;
|
|
249
|
+
}(u) : X(u, u.length);
|
|
250
250
|
}
|
|
251
251
|
function ne(y) {
|
|
252
252
|
var G = this._events;
|
|
@@ -257,11 +257,11 @@ var Tt = { exports: {} };
|
|
|
257
257
|
}
|
|
258
258
|
return 0;
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function X(y, G) {
|
|
261
261
|
for (var T = new Array(G), l = 0; l < G; ++l) T[l] = y[l];
|
|
262
262
|
return T;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function ie(y, G, T, l) {
|
|
265
265
|
if (typeof y.on == "function") l.once ? y.once(G, T) : y.on(G, T);
|
|
266
266
|
else {
|
|
267
267
|
if (typeof y.addEventListener != "function") throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof y);
|
|
@@ -281,7 +281,7 @@ var Tt = { exports: {} };
|
|
|
281
281
|
if (typeof y != "number" || y < 0 || b(y)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + y + ".");
|
|
282
282
|
return this._maxListeners = y, this;
|
|
283
283
|
}, v.prototype.getMaxListeners = function() {
|
|
284
|
-
return
|
|
284
|
+
return M(this);
|
|
285
285
|
}, v.prototype.emit = function(y) {
|
|
286
286
|
for (var G = [], T = 1; T < arguments.length; T++) G.push(arguments[T]);
|
|
287
287
|
var l = y === "error", u = this._events;
|
|
@@ -290,14 +290,14 @@ var Tt = { exports: {} };
|
|
|
290
290
|
if (l) {
|
|
291
291
|
var _;
|
|
292
292
|
if (G.length > 0 && (_ = G[0]), _ instanceof Error) throw _;
|
|
293
|
-
var
|
|
294
|
-
throw
|
|
293
|
+
var h = new Error("Unhandled error." + (_ ? " (" + _.message + ")" : ""));
|
|
294
|
+
throw h.context = _, h;
|
|
295
295
|
}
|
|
296
296
|
var P = u[y];
|
|
297
297
|
if (P === void 0) return !1;
|
|
298
298
|
if (typeof P == "function") m(P, this, G);
|
|
299
299
|
else {
|
|
300
|
-
var D = P.length, V =
|
|
300
|
+
var D = P.length, V = X(P, D);
|
|
301
301
|
for (T = 0; T < D; ++T) m(V[T], this, G);
|
|
302
302
|
}
|
|
303
303
|
return !0;
|
|
@@ -310,20 +310,20 @@ var Tt = { exports: {} };
|
|
|
310
310
|
}, v.prototype.prependOnceListener = function(y, G) {
|
|
311
311
|
return L(G), this.prependListener(y, H(this, y, G)), this;
|
|
312
312
|
}, v.prototype.removeListener = function(y, G) {
|
|
313
|
-
var T, l, u, _,
|
|
313
|
+
var T, l, u, _, h;
|
|
314
314
|
if (L(G), (l = this._events) === void 0) return this;
|
|
315
315
|
if ((T = l[y]) === void 0) return this;
|
|
316
316
|
if (T === G || T.listener === G) --this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete l[y], l.removeListener && this.emit("removeListener", y, T.listener || G));
|
|
317
317
|
else if (typeof T != "function") {
|
|
318
318
|
for (u = -1, _ = T.length - 1; _ >= 0; _--) if (T[_] === G || T[_].listener === G) {
|
|
319
|
-
|
|
319
|
+
h = T[_].listener, u = _;
|
|
320
320
|
break;
|
|
321
321
|
}
|
|
322
322
|
if (u < 0) return this;
|
|
323
323
|
u === 0 ? T.shift() : function(P, D) {
|
|
324
324
|
for (; D + 1 < P.length; D++) P[D] = P[D + 1];
|
|
325
325
|
P.pop();
|
|
326
|
-
}(T, u), T.length === 1 && (l[y] = T[0]), l.removeListener !== void 0 && this.emit("removeListener", y,
|
|
326
|
+
}(T, u), T.length === 1 && (l[y] = T[0]), l.removeListener !== void 0 && this.emit("removeListener", y, h || G);
|
|
327
327
|
}
|
|
328
328
|
return this;
|
|
329
329
|
}, v.prototype.off = v.prototype.removeListener, v.prototype.removeAllListeners = function(y) {
|
|
@@ -339,9 +339,9 @@ var Tt = { exports: {} };
|
|
|
339
339
|
else if (G !== void 0) for (l = G.length - 1; l >= 0; l--) this.removeListener(y, G[l]);
|
|
340
340
|
return this;
|
|
341
341
|
}, v.prototype.listeners = function(y) {
|
|
342
|
-
return
|
|
342
|
+
return le(this, y, !0);
|
|
343
343
|
}, v.prototype.rawListeners = function(y) {
|
|
344
|
-
return
|
|
344
|
+
return le(this, y, !1);
|
|
345
345
|
}, v.listenerCount = function(y, G) {
|
|
346
346
|
return typeof y.listenerCount == "function" ? y.listenerCount(G) : ne.call(y, G);
|
|
347
347
|
}, v.prototype.listenerCount = ne, v.prototype.eventNames = function() {
|
|
@@ -357,8 +357,8 @@ var Tt = { exports: {} };
|
|
|
357
357
|
}), O.d(Z, "c", function() {
|
|
358
358
|
return b;
|
|
359
359
|
});
|
|
360
|
-
var U = function(v, f, L,
|
|
361
|
-
this.dts = v, this.pts = f, this.duration = L, this.originalDts =
|
|
360
|
+
var U = function(v, f, L, M, C) {
|
|
361
|
+
this.dts = v, this.pts = f, this.duration = L, this.originalDts = M, this.isSyncPoint = C, this.fileposition = null;
|
|
362
362
|
}, B = function() {
|
|
363
363
|
function v() {
|
|
364
364
|
this.beginDts = 0, this.endDts = 0, this.beginPts = 0, this.endPts = 0, this.originalBeginDts = 0, this.originalEndDts = 0, this.syncPoints = [], this.firstSample = null, this.lastSample = null;
|
|
@@ -377,15 +377,15 @@ var Tt = { exports: {} };
|
|
|
377
377
|
f.length !== 0 && (L.length > 0 && f[0].originalDts < L[L.length - 1].originalDts && this.clear(), Array.prototype.push.apply(L, f));
|
|
378
378
|
}, v.prototype.getLastSyncPointBeforeDts = function(f) {
|
|
379
379
|
if (this._list.length == 0) return null;
|
|
380
|
-
var L = this._list,
|
|
381
|
-
for (f < L[0].dts && (
|
|
382
|
-
if ((j = H + Math.floor((
|
|
383
|
-
|
|
380
|
+
var L = this._list, M = 0, C = L.length - 1, j = 0, H = 0, le = C;
|
|
381
|
+
for (f < L[0].dts && (M = 0, H = le + 1); H <= le; ) {
|
|
382
|
+
if ((j = H + Math.floor((le - H) / 2)) === C || f >= L[j].dts && f < L[j + 1].dts) {
|
|
383
|
+
M = j;
|
|
384
384
|
break;
|
|
385
385
|
}
|
|
386
|
-
L[j].dts < f ? H = j + 1 :
|
|
386
|
+
L[j].dts < f ? H = j + 1 : le = j - 1;
|
|
387
387
|
}
|
|
388
|
-
return this._list[
|
|
388
|
+
return this._list[M];
|
|
389
389
|
}, v;
|
|
390
390
|
}(), b = function() {
|
|
391
391
|
function v(f) {
|
|
@@ -402,21 +402,21 @@ var Tt = { exports: {} };
|
|
|
402
402
|
}, v.prototype._searchNearestSegmentBefore = function(f) {
|
|
403
403
|
var L = this._list;
|
|
404
404
|
if (L.length === 0) return -2;
|
|
405
|
-
var
|
|
406
|
-
if (f < L[0].originalBeginDts) return
|
|
405
|
+
var M = L.length - 1, C = 0, j = 0, H = M, le = 0;
|
|
406
|
+
if (f < L[0].originalBeginDts) return le = -1;
|
|
407
407
|
for (; j <= H; ) {
|
|
408
|
-
if ((C = j + Math.floor((H - j) / 2)) ===
|
|
409
|
-
|
|
408
|
+
if ((C = j + Math.floor((H - j) / 2)) === M || f > L[C].lastSample.originalDts && f < L[C + 1].originalBeginDts) {
|
|
409
|
+
le = C;
|
|
410
410
|
break;
|
|
411
411
|
}
|
|
412
412
|
L[C].originalBeginDts < f ? j = C + 1 : H = C - 1;
|
|
413
413
|
}
|
|
414
|
-
return
|
|
414
|
+
return le;
|
|
415
415
|
}, v.prototype._searchNearestSegmentAfter = function(f) {
|
|
416
416
|
return this._searchNearestSegmentBefore(f) + 1;
|
|
417
417
|
}, v.prototype.append = function(f) {
|
|
418
|
-
var L = this._list,
|
|
419
|
-
C !== -1 && C < L.length &&
|
|
418
|
+
var L = this._list, M = f, C = this._lastAppendLocation, j = 0;
|
|
419
|
+
C !== -1 && C < L.length && M.originalBeginDts >= L[C].lastSample.originalDts && (C === L.length - 1 || C < L.length - 1 && M.originalBeginDts < L[C + 1].originalBeginDts) ? j = C + 1 : L.length > 0 && (j = this._searchNearestSegmentBefore(M.originalBeginDts) + 1), this._lastAppendLocation = j, this._list.splice(j, 0, M);
|
|
420
420
|
}, v.prototype.getLastSegmentBefore = function(f) {
|
|
421
421
|
var L = this._searchNearestSegmentBefore(f);
|
|
422
422
|
return L >= 0 ? this._list[L] : null;
|
|
@@ -424,8 +424,8 @@ var Tt = { exports: {} };
|
|
|
424
424
|
var L = this.getLastSegmentBefore(f);
|
|
425
425
|
return L != null ? L.lastSample : null;
|
|
426
426
|
}, v.prototype.getLastSyncPointBefore = function(f) {
|
|
427
|
-
for (var L = this._searchNearestSegmentBefore(f),
|
|
428
|
-
return
|
|
427
|
+
for (var L = this._searchNearestSegmentBefore(f), M = this._list[L].syncPoints; M.length === 0 && L > 0; ) L--, M = this._list[L].syncPoints;
|
|
428
|
+
return M.length > 0 ? M[M.length - 1] : null;
|
|
429
429
|
}, v;
|
|
430
430
|
}();
|
|
431
431
|
}, function(fe, Z, O) {
|
|
@@ -443,13 +443,13 @@ var Tt = { exports: {} };
|
|
|
443
443
|
var b = this.keyframesIndex, v = this._search(b.times, m);
|
|
444
444
|
return { index: v, milliseconds: b.times[v], fileposition: b.filepositions[v] };
|
|
445
445
|
}, B.prototype._search = function(m, b) {
|
|
446
|
-
var v = 0, f = m.length - 1, L = 0,
|
|
447
|
-
for (b < m[0] && (v = 0,
|
|
448
|
-
if ((L =
|
|
446
|
+
var v = 0, f = m.length - 1, L = 0, M = 0, C = f;
|
|
447
|
+
for (b < m[0] && (v = 0, M = C + 1); M <= C; ) {
|
|
448
|
+
if ((L = M + Math.floor((C - M) / 2)) === f || b >= m[L] && b < m[L + 1]) {
|
|
449
449
|
v = L;
|
|
450
450
|
break;
|
|
451
451
|
}
|
|
452
|
-
m[L] < b ?
|
|
452
|
+
m[L] < b ? M = L + 1 : C = L - 1;
|
|
453
453
|
}
|
|
454
454
|
return v;
|
|
455
455
|
}, B;
|
|
@@ -522,7 +522,7 @@ var Tt = { exports: {} };
|
|
|
522
522
|
}
|
|
523
523
|
return !1;
|
|
524
524
|
}
|
|
525
|
-
var L,
|
|
525
|
+
var L, M = function(r) {
|
|
526
526
|
for (var t = [], i = r, e = 0, a = r.length; e < a; ) if (i[e] < 128) t.push(String.fromCharCode(i[e])), ++e;
|
|
527
527
|
else {
|
|
528
528
|
if (!(i[e] < 192)) {
|
|
@@ -568,11 +568,11 @@ var Tt = { exports: {} };
|
|
|
568
568
|
}, r.parseString = function(t, i, e) {
|
|
569
569
|
if (e < 2) throw new C.a("Data not enough when parse String");
|
|
570
570
|
var a = new DataView(t, i, e).getUint16(0, !j);
|
|
571
|
-
return { data: a > 0 ?
|
|
571
|
+
return { data: a > 0 ? M(new Uint8Array(t, i + 2, a)) : "", size: 2 + a };
|
|
572
572
|
}, r.parseLongString = function(t, i, e) {
|
|
573
573
|
if (e < 4) throw new C.a("Data not enough when parse LongString");
|
|
574
574
|
var a = new DataView(t, i, e).getUint32(0, !j);
|
|
575
|
-
return { data: a > 0 ?
|
|
575
|
+
return { data: a > 0 ? M(new Uint8Array(t, i + 4, a)) : "", size: 4 + a };
|
|
576
576
|
}, r.parseDate = function(t, i, e) {
|
|
577
577
|
if (e < 10) throw new C.a("Data size invalid when parse Date");
|
|
578
578
|
var a = new DataView(t, i, e), s = a.getFloat64(0, !j), n = a.getInt16(8, !j);
|
|
@@ -638,7 +638,7 @@ var Tt = { exports: {} };
|
|
|
638
638
|
}
|
|
639
639
|
return { data: a, size: n, objectEnd: p };
|
|
640
640
|
}, r;
|
|
641
|
-
}(),
|
|
641
|
+
}(), le = function() {
|
|
642
642
|
function r(t) {
|
|
643
643
|
this.TAG = "ExpGolomb", this._buffer = t, this._buffer_index = 0, this._total_bytes = t.byteLength, this._total_bits = 8 * t.byteLength, this._current_word = 0, this._current_word_bits_left = 0;
|
|
644
644
|
}
|
|
@@ -687,7 +687,7 @@ var Tt = { exports: {} };
|
|
|
687
687
|
var s = i[a].toString(16);
|
|
688
688
|
s.length < 2 && (s = "0" + s), e += s;
|
|
689
689
|
}
|
|
690
|
-
var n = r._ebsp2rbsp(t), o = new
|
|
690
|
+
var n = r._ebsp2rbsp(t), o = new le(n);
|
|
691
691
|
o.readByte();
|
|
692
692
|
var p = o.readByte();
|
|
693
693
|
o.readByte();
|
|
@@ -703,17 +703,17 @@ var Tt = { exports: {} };
|
|
|
703
703
|
var q = o.readUEG();
|
|
704
704
|
for (J = 0; J < q; J++) o.readSEG();
|
|
705
705
|
}
|
|
706
|
-
var
|
|
706
|
+
var de = o.readUEG();
|
|
707
707
|
o.readBits(1);
|
|
708
708
|
var he = o.readUEG(), K = o.readUEG(), Q = o.readBits(1);
|
|
709
709
|
Q === 0 && o.readBits(1), o.readBits(1);
|
|
710
710
|
var _e = 0, te = 0, se = 0, be = 0;
|
|
711
711
|
o.readBool() && (_e = o.readUEG(), te = o.readUEG(), se = o.readUEG(), be = o.readUEG());
|
|
712
|
-
var Ae = 1,
|
|
712
|
+
var Ae = 1, ue = 1, ye = 0, Re = !0, ke = 0, Ne = 0;
|
|
713
713
|
if (o.readBool()) {
|
|
714
714
|
if (o.readBool()) {
|
|
715
715
|
var Pe = o.readByte();
|
|
716
|
-
Pe > 0 && Pe < 16 ? (Ae = [1, 12, 10, 16, 40, 24, 20, 32, 80, 18, 15, 64, 160, 4, 3, 2][Pe - 1],
|
|
716
|
+
Pe > 0 && Pe < 16 ? (Ae = [1, 12, 10, 16, 40, 24, 20, 32, 80, 18, 15, 64, 160, 4, 3, 2][Pe - 1], ue = [1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1][Pe - 1]) : Pe === 255 && (Ae = o.readByte() << 8 | o.readByte(), ue = o.readByte() << 8 | o.readByte());
|
|
717
717
|
}
|
|
718
718
|
if (o.readBool() && o.readBool(), o.readBool() && (o.readBits(4), o.readBool() && o.readBits(24)), o.readBool() && (o.readUEG(), o.readUEG()), o.readBool()) {
|
|
719
719
|
var Ge = o.readBits(32), je = o.readBits(32);
|
|
@@ -721,13 +721,13 @@ var Tt = { exports: {} };
|
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
723
|
var Ve = 1;
|
|
724
|
-
Ae === 1 &&
|
|
724
|
+
Ae === 1 && ue === 1 || (Ve = Ae / ue);
|
|
725
725
|
var Ce = 0, ge = 0;
|
|
726
726
|
S === 0 ? (Ce = 1, ge = 2 - Q) : (Ce = S === 3 ? 1 : 2, ge = (S === 1 ? 2 : 1) * (2 - Q));
|
|
727
727
|
var xe = 16 * (he + 1), Ue = 16 * (K + 1) * (2 - Q);
|
|
728
728
|
xe -= (_e + te) * Ce, Ue -= (se + be) * ge;
|
|
729
729
|
var Je = Math.ceil(xe * Ve);
|
|
730
|
-
return o.destroy(), o = null, { codec_mimetype: e, profile_idc: p, level_idc: g, profile_string: E, level_string: A, chroma_format_idc: S, bit_depth: I, bit_depth_luma: I, bit_depth_chroma: z, ref_frames:
|
|
730
|
+
return o.destroy(), o = null, { codec_mimetype: e, profile_idc: p, level_idc: g, profile_string: E, level_string: A, chroma_format_idc: S, bit_depth: I, bit_depth_luma: I, bit_depth_chroma: z, ref_frames: de, chroma_format: w, chroma_format_string: r.getChromaFormatString(w), frame_rate: { fixed: Re, fps: ye, fps_den: Ne, fps_num: ke }, sar_ratio: { width: Ae, height: ue }, codec_size: { width: xe, height: Ue }, present_size: { width: Je, height: Ue } };
|
|
731
731
|
}, r._skipScalingList = function(t, i) {
|
|
732
732
|
for (var e = 8, a = 8, s = 0; s < i; s++) a !== 0 && (a = (e + t.readSEG() + 256) % 256), e = a === 0 ? e : a;
|
|
733
733
|
}, r.getProfileString = function(t) {
|
|
@@ -763,19 +763,19 @@ var Tt = { exports: {} };
|
|
|
763
763
|
return "Unknown";
|
|
764
764
|
}
|
|
765
765
|
}, r;
|
|
766
|
-
}(),
|
|
766
|
+
}(), X = O(5), ie = function() {
|
|
767
767
|
function r() {
|
|
768
768
|
}
|
|
769
769
|
return r._ebsp2rbsp = function(t) {
|
|
770
770
|
for (var i = t, e = i.byteLength, a = new Uint8Array(e), s = 0, n = 0; n < e; n++) n >= 2 && i[n] === 3 && i[n - 1] === 0 && i[n - 2] === 0 || (a[s] = i[n], s++);
|
|
771
771
|
return new Uint8Array(a.buffer, 0, s);
|
|
772
772
|
}, r.parseVPS = function(t) {
|
|
773
|
-
var i = r._ebsp2rbsp(t), e = new
|
|
773
|
+
var i = r._ebsp2rbsp(t), e = new le(i);
|
|
774
774
|
return e.readByte(), e.readByte(), e.readBits(4), e.readBits(2), e.readBits(6), { num_temporal_layers: e.readBits(3) + 1, temporal_id_nested: e.readBool() };
|
|
775
775
|
}, r.parseSPS = function(t) {
|
|
776
|
-
var i = r._ebsp2rbsp(t), e = new
|
|
776
|
+
var i = r._ebsp2rbsp(t), e = new le(i);
|
|
777
777
|
e.readByte(), e.readByte();
|
|
778
|
-
for (var a = 0, s = 0, n = 0, o = 0, p = (e.readBits(4), e.readBits(3)), g = (e.readBool(), e.readBits(2)), E = e.readBool(), A = e.readBits(5), S = e.readByte(), w = e.readByte(), I = e.readByte(), z = e.readByte(), N = e.readByte(), J = e.readByte(), W = e.readByte(), q = e.readByte(),
|
|
778
|
+
for (var a = 0, s = 0, n = 0, o = 0, p = (e.readBits(4), e.readBits(3)), g = (e.readBool(), e.readBits(2)), E = e.readBool(), A = e.readBits(5), S = e.readByte(), w = e.readByte(), I = e.readByte(), z = e.readByte(), N = e.readByte(), J = e.readByte(), W = e.readByte(), q = e.readByte(), de = e.readByte(), he = e.readByte(), K = e.readByte(), Q = [], _e = [], te = 0; te < p; te++) Q.push(e.readBool()), _e.push(e.readBool());
|
|
779
779
|
if (p > 0) for (te = p; te < 8; te++) e.readBits(2);
|
|
780
780
|
for (te = 0; te < p; te++) Q[te] && (e.readByte(), e.readByte(), e.readByte(), e.readByte(), e.readByte(), e.readByte(), e.readByte(), e.readByte(), e.readByte(), e.readByte(), e.readByte()), _e[te] && e.readByte();
|
|
781
781
|
e.readUEG();
|
|
@@ -783,7 +783,7 @@ var Tt = { exports: {} };
|
|
|
783
783
|
se == 3 && e.readBits(1);
|
|
784
784
|
var be = e.readUEG(), Ae = e.readUEG();
|
|
785
785
|
e.readBool() && (a += e.readUEG(), s += e.readUEG(), n += e.readUEG(), o += e.readUEG());
|
|
786
|
-
var
|
|
786
|
+
var ue = e.readUEG(), ye = e.readUEG(), Re = e.readUEG();
|
|
787
787
|
for (te = e.readBool() ? 0 : p; te <= p; te++) e.readUEG(), e.readUEG(), e.readUEG();
|
|
788
788
|
if (e.readUEG(), e.readUEG(), e.readUEG(), e.readUEG(), e.readUEG(), e.readUEG(), e.readBool() && e.readBool()) for (var ke = 0; ke < 4; ke++) for (var Ne = 0; Ne < (ke === 3 ? 2 : 6); Ne++)
|
|
789
789
|
if (e.readBool()) {
|
|
@@ -814,11 +814,11 @@ var Tt = { exports: {} };
|
|
|
814
814
|
e.readBits(1);
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
var pt = 0,
|
|
817
|
+
var pt = 0, qe = 1, Ke = 1, mt = !1, it = 1, rt = 1;
|
|
818
818
|
if (e.readBool(), e.readBool(), e.readBool()) {
|
|
819
819
|
if (e.readBool()) {
|
|
820
|
-
var
|
|
821
|
-
|
|
820
|
+
var We = e.readByte();
|
|
821
|
+
We > 0 && We <= 16 ? (qe = [1, 12, 10, 16, 40, 24, 20, 32, 80, 18, 15, 64, 160, 4, 3, 2][We - 1], Ke = [1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1][We - 1]) : We === 255 && (qe = e.readBits(16), Ke = e.readBits(16));
|
|
822
822
|
}
|
|
823
823
|
if (e.readBool() && e.readBool(), e.readBool() && (e.readBits(3), e.readBool(), e.readBool() && (e.readByte(), e.readByte(), e.readByte())), e.readBool() && (e.readUEG(), e.readUEG()), e.readBool(), e.readBool(), e.readBool(), e.readBool() && (e.readUEG(), e.readUEG(), e.readUEG(), e.readUEG()), e.readBool() && (it = e.readBits(32), rt = e.readBits(32), e.readBool() && (e.readUEG(), e.readBool()))) {
|
|
824
824
|
var at = !1, nt = !1, Ze = !1;
|
|
@@ -836,9 +836,9 @@ var Tt = { exports: {} };
|
|
|
836
836
|
}
|
|
837
837
|
e.readBool();
|
|
838
838
|
var Xt = "hvc1." + A + ".1.L" + K + ".B0", bt = be - (a + s) * (se === 1 || se === 2 ? 2 : 1), St = Ae - (n + o) * (se === 1 ? 2 : 1), Et = 1;
|
|
839
|
-
return
|
|
839
|
+
return qe !== 1 && Ke !== 1 && (Et = qe / Ke), e.destroy(), e = null, { codec_mimetype: Xt, level_string: r.getLevelString(K), profile_idc: A, bit_depth: ue + 8, ref_frames: 1, chroma_format: se, chroma_format_string: r.getChromaFormatString(se), general_level_idc: K, general_profile_space: g, general_tier_flag: E, general_profile_idc: A, general_profile_compatibility_flags_1: S, general_profile_compatibility_flags_2: w, general_profile_compatibility_flags_3: I, general_profile_compatibility_flags_4: z, general_constraint_indicator_flags_1: N, general_constraint_indicator_flags_2: J, general_constraint_indicator_flags_3: W, general_constraint_indicator_flags_4: q, general_constraint_indicator_flags_5: de, general_constraint_indicator_flags_6: he, min_spatial_segmentation_idc: pt, constant_frame_rate: 0, chroma_format_idc: se, bit_depth_luma_minus8: ue, bit_depth_chroma_minus8: ye, frame_rate: { fixed: mt, fps: rt / it, fps_den: it, fps_num: rt }, sar_ratio: { width: qe, height: Ke }, codec_size: { width: bt, height: St }, present_size: { width: bt * Et, height: St } };
|
|
840
840
|
}, r.parsePPS = function(t) {
|
|
841
|
-
var i = r._ebsp2rbsp(t), e = new
|
|
841
|
+
var i = r._ebsp2rbsp(t), e = new le(i);
|
|
842
842
|
e.readByte(), e.readByte(), e.readUEG(), e.readUEG(), e.readBool(), e.readBool(), e.readBits(3), e.readBool(), e.readBool(), e.readUEG(), e.readUEG(), e.readSEG(), e.readBool(), e.readBool(), e.readBool() && e.readUEG(), e.readSEG(), e.readSEG(), e.readBool(), e.readBool(), e.readBool(), e.readBool();
|
|
843
843
|
var a = e.readBool(), s = e.readBool(), n = 1;
|
|
844
844
|
return s && a ? n = 0 : s ? n = 3 : a && (n = 2), { parallelismType: n };
|
|
@@ -1051,8 +1051,8 @@ var Tt = { exports: {} };
|
|
|
1051
1051
|
var W = { unit: J, length: J.byteLength, dts: I, pts: I };
|
|
1052
1052
|
A.samples.push(W), A.length += J.length;
|
|
1053
1053
|
}
|
|
1054
|
-
} else this._onError(
|
|
1055
|
-
} else this._onError(
|
|
1054
|
+
} else this._onError(X.a.FORMAT_ERROR, "Flv: Invalid audio sample rate idx: " + p);
|
|
1055
|
+
} else this._onError(X.a.CODEC_UNSUPPORTED, "Flv: Unsupported audio codec idx: " + n);
|
|
1056
1056
|
}
|
|
1057
1057
|
}, r.prototype._parseAACAudioData = function(t, i, e) {
|
|
1058
1058
|
if (!(e <= 1)) {
|
|
@@ -1062,7 +1062,7 @@ var Tt = { exports: {} };
|
|
|
1062
1062
|
m.a.w(this.TAG, "Flv: Invalid AAC packet, missing AACPacketType or/and Data!");
|
|
1063
1063
|
}, r.prototype._parseAACAudioSpecificConfig = function(t, i, e) {
|
|
1064
1064
|
var a, s, n = new Uint8Array(t, i, e), o = null, p = 0, g = null;
|
|
1065
|
-
if (p = a = n[0] >>> 3, (s = (7 & n[0]) << 1 | n[1] >>> 7) < 0 || s >= this._mpegSamplingRates.length) this._onError(
|
|
1065
|
+
if (p = a = n[0] >>> 3, (s = (7 & n[0]) << 1 | n[1] >>> 7) < 0 || s >= this._mpegSamplingRates.length) this._onError(X.a.FORMAT_ERROR, "Flv: AAC invalid sampling frequency index!");
|
|
1066
1066
|
else {
|
|
1067
1067
|
var E = this._mpegSamplingRates[s], A = (120 & n[1]) >>> 3;
|
|
1068
1068
|
if (!(A < 0 || A >= 8)) {
|
|
@@ -1070,7 +1070,7 @@ var Tt = { exports: {} };
|
|
|
1070
1070
|
var S = self.navigator.userAgent.toLowerCase();
|
|
1071
1071
|
return S.indexOf("firefox") !== -1 ? s >= 6 ? (p = 5, o = new Array(4), g = s - 3) : (p = 2, o = new Array(2), g = s) : S.indexOf("android") !== -1 ? (p = 2, o = new Array(2), g = s) : (p = 5, g = s, o = new Array(4), s >= 6 ? g = s - 3 : A === 1 && (p = 2, o = new Array(2), g = s)), o[0] = p << 3, o[0] |= (15 & s) >>> 1, o[1] = (15 & s) << 7, o[1] |= (15 & A) << 3, p === 5 && (o[1] |= (15 & g) >>> 1, o[2] = (1 & g) << 7, o[2] |= 8, o[3] = 0), { config: o, samplingRate: E, channelCount: A, codec: "mp4a.40." + p, originalCodec: "mp4a.40." + a };
|
|
1072
1072
|
}
|
|
1073
|
-
this._onError(
|
|
1073
|
+
this._onError(X.a.FORMAT_ERROR, "Flv: AAC invalid channel configuration");
|
|
1074
1074
|
}
|
|
1075
1075
|
}, r.prototype._parseMP3AudioData = function(t, i, e, a) {
|
|
1076
1076
|
if (!(e < 4)) {
|
|
@@ -1110,13 +1110,13 @@ var Tt = { exports: {} };
|
|
|
1110
1110
|
var n = new Uint8Array(t, i, e)[0], o = (112 & n) >>> 4;
|
|
1111
1111
|
if (128 & n) {
|
|
1112
1112
|
var p = 15 & n, g = String.fromCharCode.apply(String, new Uint8Array(t, i, e).slice(1, 5));
|
|
1113
|
-
if (g !== "hvc1") return void this._onError(
|
|
1113
|
+
if (g !== "hvc1") return void this._onError(X.a.CODEC_UNSUPPORTED, "Flv: Unsupported codec in video frame: " + g);
|
|
1114
1114
|
this._parseEnhancedHEVCVideoPacket(t, i + 5, e - 5, a, s, o, p);
|
|
1115
1115
|
} else {
|
|
1116
1116
|
var E = 15 & n;
|
|
1117
1117
|
if (E === 7) this._parseAVCVideoPacket(t, i + 1, e - 1, a, s, o);
|
|
1118
1118
|
else {
|
|
1119
|
-
if (E !== 12) return void this._onError(
|
|
1119
|
+
if (E !== 12) return void this._onError(X.a.CODEC_UNSUPPORTED, "Flv: Unsupported codec in video frame: " + E);
|
|
1120
1120
|
this._parseHEVCVideoPacket(t, i + 1, e - 1, a, s, o);
|
|
1121
1121
|
}
|
|
1122
1122
|
}
|
|
@@ -1127,7 +1127,7 @@ var Tt = { exports: {} };
|
|
|
1127
1127
|
var o = this._littleEndian, p = new DataView(t, i, e), g = p.getUint8(0), E = (16777215 & p.getUint32(0, !o)) << 8 >> 8;
|
|
1128
1128
|
if (g === 0) this._parseAVCDecoderConfigurationRecord(t, i + 4, e - 4);
|
|
1129
1129
|
else if (g === 1) this._parseAVCVideoData(t, i + 4, e - 4, a, s, n, E);
|
|
1130
|
-
else if (g !== 2) return void this._onError(
|
|
1130
|
+
else if (g !== 2) return void this._onError(X.a.FORMAT_ERROR, "Flv: Invalid video packet type " + g);
|
|
1131
1131
|
}
|
|
1132
1132
|
}, r.prototype._parseHEVCVideoPacket = function(t, i, e, a, s, n) {
|
|
1133
1133
|
if (e < 4) m.a.w(this.TAG, "Flv: Invalid HEVC packet, missing HEVCPacketType or/and CompositionTime");
|
|
@@ -1135,7 +1135,7 @@ var Tt = { exports: {} };
|
|
|
1135
1135
|
var o = this._littleEndian, p = new DataView(t, i, e), g = p.getUint8(0), E = (16777215 & p.getUint32(0, !o)) << 8 >> 8;
|
|
1136
1136
|
if (g === 0) this._parseHEVCDecoderConfigurationRecord(t, i + 4, e - 4);
|
|
1137
1137
|
else if (g === 1) this._parseHEVCVideoData(t, i + 4, e - 4, a, s, n, E);
|
|
1138
|
-
else if (g !== 2) return void this._onError(
|
|
1138
|
+
else if (g !== 2) return void this._onError(X.a.FORMAT_ERROR, "Flv: Invalid video packet type " + g);
|
|
1139
1139
|
}
|
|
1140
1140
|
}, r.prototype._parseEnhancedHEVCVideoPacket = function(t, i, e, a, s, n, o) {
|
|
1141
1141
|
if (e < 4) m.a.w(this.TAG, "Flv: Invalid HEVC packet, missing HEVCPacketType or/and CompositionTime");
|
|
@@ -1146,7 +1146,7 @@ var Tt = { exports: {} };
|
|
|
1146
1146
|
var E = (4294967040 & g.getUint32(0, !p)) >> 8;
|
|
1147
1147
|
this._parseHEVCVideoData(t, i + 3, e - 3, a, s, n, E);
|
|
1148
1148
|
} else if (o === 3) this._parseHEVCVideoData(t, i, e, a, s, n, 0);
|
|
1149
|
-
else if (o !== 2) return void this._onError(
|
|
1149
|
+
else if (o !== 2) return void this._onError(X.a.FORMAT_ERROR, "Flv: Invalid video packet type " + o);
|
|
1150
1150
|
}
|
|
1151
1151
|
}, r.prototype._parseAVCDecoderConfigurationRecord = function(t, i, e) {
|
|
1152
1152
|
if (e < 7) m.a.w(this.TAG, "Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");
|
|
@@ -1174,13 +1174,13 @@ var Tt = { exports: {} };
|
|
|
1174
1174
|
a.codecWidth = N.codec_size.width, a.codecHeight = N.codec_size.height, a.presentWidth = N.present_size.width, a.presentHeight = N.present_size.height, a.profile = N.profile_string, a.level = N.level_string, a.bitDepth = N.bit_depth, a.chromaFormat = N.chroma_format, a.sarRatio = N.sar_ratio, a.frameRate = N.frame_rate, N.frame_rate.fixed !== !1 && N.frame_rate.fps_num !== 0 && N.frame_rate.fps_den !== 0 || (a.frameRate = this._referenceFrameRate);
|
|
1175
1175
|
var J = a.frameRate.fps_den, W = a.frameRate.fps_num;
|
|
1176
1176
|
a.refSampleDuration = a.timescale * (J / W);
|
|
1177
|
-
for (var q = z.subarray(1, 4),
|
|
1177
|
+
for (var q = z.subarray(1, 4), de = "avc1.", he = 0; he < 3; he++) {
|
|
1178
1178
|
var K = q[he].toString(16);
|
|
1179
|
-
K.length < 2 && (K = "0" + K),
|
|
1179
|
+
K.length < 2 && (K = "0" + K), de += K;
|
|
1180
1180
|
}
|
|
1181
|
-
a.codec =
|
|
1181
|
+
a.codec = de;
|
|
1182
1182
|
var Q = this._mediaInfo;
|
|
1183
|
-
Q.width = a.codecWidth, Q.height = a.codecHeight, Q.fps = a.frameRate.fps, Q.profile = a.profile, Q.level = a.level, Q.refFrames = N.ref_frames, Q.chromaFormat = N.chroma_format_string, Q.sarNum = a.sarRatio.width, Q.sarDen = a.sarRatio.height, Q.videoCodec =
|
|
1183
|
+
Q.width = a.codecWidth, Q.height = a.codecHeight, Q.fps = a.frameRate.fps, Q.profile = a.profile, Q.level = a.level, Q.refFrames = N.ref_frames, Q.chromaFormat = N.chroma_format_string, Q.sarNum = a.sarRatio.width, Q.sarDen = a.sarRatio.height, Q.videoCodec = de, Q.hasAudio ? Q.audioCodec != null && (Q.mimeType = 'video/x-flv; codecs="' + Q.videoCodec + "," + Q.audioCodec + '"') : Q.mimeType = 'video/x-flv; codecs="' + Q.videoCodec + '"', Q.isComplete() && this._onMediaInfo(Q);
|
|
1184
1184
|
}
|
|
1185
1185
|
}
|
|
1186
1186
|
}
|
|
@@ -1189,10 +1189,10 @@ var Tt = { exports: {} };
|
|
|
1189
1189
|
for (_e > 1 && m.a.w(this.TAG, "Flv: Strange AVCDecoderConfigurationRecord: PPS Count = " + _e), S++, w = 0; w < _e; w++)
|
|
1190
1190
|
I = o.getUint16(S, !n), S += 2, I !== 0 && (S += I);
|
|
1191
1191
|
a.avcc = new Uint8Array(e), a.avcc.set(new Uint8Array(t, i, e), 0), m.a.v(this.TAG, "Parsed AVCDecoderConfigurationRecord"), this._isInitialMetadataDispatched() ? this._dispatch && (this._audioTrack.length || this._videoTrack.length) && this._onDataAvailable(this._audioTrack, this._videoTrack) : this._videoInitialMetadataDispatched = !0, this._dispatch = !1, this._onTrackMetadata("video", a);
|
|
1192
|
-
} else this._onError(
|
|
1193
|
-
} else this._onError(
|
|
1194
|
-
} else this._onError(
|
|
1195
|
-
else this._onError(
|
|
1192
|
+
} else this._onError(X.a.FORMAT_ERROR, "Flv: Invalid AVCDecoderConfigurationRecord: No PPS");
|
|
1193
|
+
} else this._onError(X.a.FORMAT_ERROR, "Flv: Invalid AVCDecoderConfigurationRecord: No SPS");
|
|
1194
|
+
} else this._onError(X.a.FORMAT_ERROR, "Flv: Strange NaluLengthSizeMinusOne: " + (this._naluLengthSize - 1));
|
|
1195
|
+
else this._onError(X.a.FORMAT_ERROR, "Flv: Invalid AVCDecoderConfigurationRecord");
|
|
1196
1196
|
}
|
|
1197
1197
|
}, r.prototype._parseHEVCDecoderConfigurationRecord = function(t, i, e) {
|
|
1198
1198
|
if (e < 22) m.a.w(this.TAG, "Flv: Invalid HEVCDecoderConfigurationRecord, lack of data!");
|
|
@@ -1214,10 +1214,10 @@ var Tt = { exports: {} };
|
|
|
1214
1214
|
var J = o.getUint16(w + 0, !n);
|
|
1215
1215
|
if (N === 0) if (I === 33) {
|
|
1216
1216
|
w += 2;
|
|
1217
|
-
var W = new Uint8Array(t, i + w, J), q =
|
|
1217
|
+
var W = new Uint8Array(t, i + w, J), q = ie.parseSPS(W);
|
|
1218
1218
|
a.codecWidth = q.codec_size.width, a.codecHeight = q.codec_size.height, a.presentWidth = q.present_size.width, a.presentHeight = q.present_size.height, a.profile = q.profile_string, a.level = q.level_string, a.bitDepth = q.bit_depth, a.chromaFormat = q.chroma_format, a.sarRatio = q.sar_ratio, a.frameRate = q.frame_rate, q.frame_rate.fixed !== !1 && q.frame_rate.fps_num !== 0 && q.frame_rate.fps_den !== 0 || (a.frameRate = this._referenceFrameRate);
|
|
1219
|
-
var
|
|
1220
|
-
a.refSampleDuration = a.timescale * (
|
|
1219
|
+
var de = a.frameRate.fps_den, he = a.frameRate.fps_num;
|
|
1220
|
+
a.refSampleDuration = a.timescale * (de / he), a.codec = q.codec_mimetype;
|
|
1221
1221
|
var K = this._mediaInfo;
|
|
1222
1222
|
K.width = a.codecWidth, K.height = a.codecHeight, K.fps = a.frameRate.fps, K.profile = a.profile, K.level = a.level, K.refFrames = q.ref_frames, K.chromaFormat = q.chroma_format_string, K.sarNum = a.sarRatio.width, K.sarDen = a.sarRatio.height, K.videoCodec = q.codec_mimetype, K.hasAudio ? K.audioCodec != null && (K.mimeType = 'video/x-flv; codecs="' + K.videoCodec + "," + K.audioCodec + '"') : K.mimeType = 'video/x-flv; codecs="' + K.videoCodec + '"', K.isComplete() && this._onMediaInfo(K), w += J;
|
|
1223
1223
|
} else w += 2 + J;
|
|
@@ -1225,8 +1225,8 @@ var Tt = { exports: {} };
|
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
1227
|
a.hvcc = new Uint8Array(e), a.hvcc.set(new Uint8Array(t, i, e), 0), m.a.v(this.TAG, "Parsed HEVCDecoderConfigurationRecord"), this._isInitialMetadataDispatched() ? this._dispatch && (this._audioTrack.length || this._videoTrack.length) && this._onDataAvailable(this._audioTrack, this._videoTrack) : this._videoInitialMetadataDispatched = !0, this._dispatch = !1, this._onTrackMetadata("video", a);
|
|
1228
|
-
} else this._onError(
|
|
1229
|
-
else this._onError(
|
|
1228
|
+
} else this._onError(X.a.FORMAT_ERROR, "Flv: Strange NaluLengthSizeMinusOne: " + (this._naluLengthSize - 1));
|
|
1229
|
+
else this._onError(X.a.FORMAT_ERROR, "Flv: Invalid HEVCDecoderConfigurationRecord");
|
|
1230
1230
|
}
|
|
1231
1231
|
}, r.prototype._parseAVCVideoData = function(t, i, e, a, s, n, o) {
|
|
1232
1232
|
for (var p = this._littleEndian, g = new DataView(t, i, e), E = [], A = 0, S = 0, w = this._naluLengthSize, I = this._timestampBase + a, z = n === 1; S < e; ) {
|
|
@@ -1242,8 +1242,8 @@ var Tt = { exports: {} };
|
|
|
1242
1242
|
E.push(q), A += W.byteLength, S += w + N;
|
|
1243
1243
|
}
|
|
1244
1244
|
if (E.length) {
|
|
1245
|
-
var
|
|
1246
|
-
z && (he.fileposition = s),
|
|
1245
|
+
var de = this._videoTrack, he = { units: E, length: A, isKeyframe: z, dts: I, cts: o, pts: I + o };
|
|
1246
|
+
z && (he.fileposition = s), de.samples.push(he), de.length += A;
|
|
1247
1247
|
}
|
|
1248
1248
|
}, r.prototype._parseHEVCVideoData = function(t, i, e, a, s, n, o) {
|
|
1249
1249
|
for (var p = this._littleEndian, g = new DataView(t, i, e), E = [], A = 0, S = 0, w = this._naluLengthSize, I = this._timestampBase + a, z = n === 1; S < e; ) {
|
|
@@ -1259,11 +1259,11 @@ var Tt = { exports: {} };
|
|
|
1259
1259
|
E.push(q), A += W.byteLength, S += w + N;
|
|
1260
1260
|
}
|
|
1261
1261
|
if (E.length) {
|
|
1262
|
-
var
|
|
1263
|
-
z && (he.fileposition = s),
|
|
1262
|
+
var de = this._videoTrack, he = { units: E, length: A, isKeyframe: z, dts: I, cts: o, pts: I + o };
|
|
1263
|
+
z && (he.fileposition = s), de.samples.push(he), de.length += A;
|
|
1264
1264
|
}
|
|
1265
1265
|
}, r;
|
|
1266
|
-
}(),
|
|
1266
|
+
}(), h = function() {
|
|
1267
1267
|
function r() {
|
|
1268
1268
|
}
|
|
1269
1269
|
return r.prototype.destroy = function() {
|
|
@@ -1285,11 +1285,11 @@ var Tt = { exports: {} };
|
|
|
1285
1285
|
(function(r) {
|
|
1286
1286
|
r[r.kUnspecified = 0] = "kUnspecified", r[r.kSliceNonIDR = 1] = "kSliceNonIDR", r[r.kSliceDPA = 2] = "kSliceDPA", r[r.kSliceDPB = 3] = "kSliceDPB", r[r.kSliceDPC = 4] = "kSliceDPC", r[r.kSliceIDR = 5] = "kSliceIDR", r[r.kSliceSEI = 6] = "kSliceSEI", r[r.kSliceSPS = 7] = "kSliceSPS", r[r.kSlicePPS = 8] = "kSlicePPS", r[r.kSliceAUD = 9] = "kSliceAUD", r[r.kEndOfSequence = 10] = "kEndOfSequence", r[r.kEndOfStream = 11] = "kEndOfStream", r[r.kFiller = 12] = "kFiller", r[r.kSPSExt = 13] = "kSPSExt", r[r.kReserved0 = 14] = "kReserved0";
|
|
1287
1287
|
})(D || (D = {}));
|
|
1288
|
-
var k, d,
|
|
1288
|
+
var k, d, c = function() {
|
|
1289
1289
|
}, R = function(r) {
|
|
1290
1290
|
var t = r.data.byteLength;
|
|
1291
1291
|
this.type = r.type, this.data = new Uint8Array(4 + t), new DataView(this.data.buffer).setUint32(0, t), this.data.set(r.data, 4);
|
|
1292
|
-
},
|
|
1292
|
+
}, Y = function() {
|
|
1293
1293
|
function r(t) {
|
|
1294
1294
|
this.TAG = "H264AnnexBParser", this.current_startcode_offset_ = 0, this.eof_flag_ = !1, this.data_ = t, this.current_startcode_offset_ = this.findNextStartCodeOffset(0), this.eof_flag_ && m.a.e(this.TAG, "Could not find H264 startcode until payload end!");
|
|
1295
1295
|
}
|
|
@@ -1305,12 +1305,12 @@ var Tt = { exports: {} };
|
|
|
1305
1305
|
var e = this.current_startcode_offset_, a = 31 & t[e += (t[e] << 24 | t[e + 1] << 16 | t[e + 2] << 8 | t[e + 3]) === 1 ? 4 : 3], s = (128 & t[e]) >>> 7, n = this.findNextStartCodeOffset(e);
|
|
1306
1306
|
if (this.current_startcode_offset_ = n, !(a >= D.kReserved0) && s === 0) {
|
|
1307
1307
|
var o = t.subarray(e, n);
|
|
1308
|
-
(i = new
|
|
1308
|
+
(i = new c()).type = a, i.data = o;
|
|
1309
1309
|
}
|
|
1310
1310
|
}
|
|
1311
1311
|
return i;
|
|
1312
1312
|
}, r;
|
|
1313
|
-
}(),
|
|
1313
|
+
}(), oe = function() {
|
|
1314
1314
|
function r(t, i, e) {
|
|
1315
1315
|
var a = 8 + t.byteLength + 1 + 2 + i.byteLength, s = !1;
|
|
1316
1316
|
t[3] !== 66 && t[3] !== 77 && t[3] !== 88 && (s = !0, a += 4);
|
|
@@ -1343,13 +1343,13 @@ var Tt = { exports: {} };
|
|
|
1343
1343
|
this.constructor = r;
|
|
1344
1344
|
}
|
|
1345
1345
|
me(r, t), r.prototype = t === null ? Object.create(t) : (i.prototype = t.prototype, new i());
|
|
1346
|
-
}),
|
|
1346
|
+
}), x = function() {
|
|
1347
1347
|
}, F = function(r) {
|
|
1348
1348
|
function t() {
|
|
1349
1349
|
return r !== null && r.apply(this, arguments) || this;
|
|
1350
1350
|
}
|
|
1351
1351
|
return Te(t, r), t;
|
|
1352
|
-
}(
|
|
1352
|
+
}(x), $ = function() {
|
|
1353
1353
|
function r(t) {
|
|
1354
1354
|
this.TAG = "AACADTSParser", this.data_ = t, this.current_syncword_offset_ = this.findNextSyncwordOffset(0), this.eof_flag_ && m.a.e(this.TAG, "Could not found ADTS syncword until payload end");
|
|
1355
1355
|
}
|
|
@@ -1371,7 +1371,7 @@ var Tt = { exports: {} };
|
|
|
1371
1371
|
var w = this.findNextSyncwordOffset(e + S);
|
|
1372
1372
|
if (this.current_syncword_offset_ = w, (a === 0 || a === 1) && s === 0) {
|
|
1373
1373
|
var I = t.subarray(e, e + S);
|
|
1374
|
-
(i = new
|
|
1374
|
+
(i = new x()).audio_object_type = o + 1, i.sampling_freq_index = p, i.sampling_frequency = De[p], i.channel_config = g, i.data = I;
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
1377
1377
|
return i;
|
|
@@ -1380,7 +1380,7 @@ var Tt = { exports: {} };
|
|
|
1380
1380
|
}, r.prototype.getIncompleteData = function() {
|
|
1381
1381
|
return this.has_last_incomplete_data ? this.data_.subarray(this.current_syncword_offset_) : null;
|
|
1382
1382
|
}, r;
|
|
1383
|
-
}(),
|
|
1383
|
+
}(), re = function() {
|
|
1384
1384
|
function r(t) {
|
|
1385
1385
|
this.TAG = "AACLOASParser", this.data_ = t, this.current_syncword_offset_ = this.findNextSyncwordOffset(0), this.eof_flag_ && m.a.e(this.TAG, "Could not found LOAS syncword until payload end");
|
|
1386
1386
|
}
|
|
@@ -1400,7 +1400,7 @@ var Tt = { exports: {} };
|
|
|
1400
1400
|
this.eof_flag_ = !0, this.has_last_incomplete_data = !0;
|
|
1401
1401
|
break;
|
|
1402
1402
|
}
|
|
1403
|
-
var n = new
|
|
1403
|
+
var n = new le(i.subarray(a + 3, a + 3 + s)), o = null;
|
|
1404
1404
|
if (n.readBool()) {
|
|
1405
1405
|
if (t == null) {
|
|
1406
1406
|
m.a.w(this.TAG, "StreamMuxConfig Missing"), this.current_syncword_offset_ = this.findNextSyncwordOffset(a + 3 + s), n.destroy();
|
|
@@ -1455,7 +1455,7 @@ var Tt = { exports: {} };
|
|
|
1455
1455
|
var W = n.readByte();
|
|
1456
1456
|
if (J += W, W !== 255) break;
|
|
1457
1457
|
}
|
|
1458
|
-
for (var q = new Uint8Array(J),
|
|
1458
|
+
for (var q = new Uint8Array(J), de = 0; de < J; de++) q[de] = n.readByte();
|
|
1459
1459
|
(e = new F()).audio_object_type = o.audio_object_type, e.sampling_freq_index = o.sampling_freq_index, e.sampling_frequency = De[o.sampling_freq_index], e.channel_config = o.channel_config, e.other_data_present = o.other_data_present, e.data = q, this.current_syncword_offset_ = this.findNextSyncwordOffset(a + 3 + s);
|
|
1460
1460
|
}
|
|
1461
1461
|
return e;
|
|
@@ -1464,7 +1464,7 @@ var Tt = { exports: {} };
|
|
|
1464
1464
|
}, r.prototype.getIncompleteData = function() {
|
|
1465
1465
|
return this.has_last_incomplete_data ? this.data_.subarray(this.current_syncword_offset_) : null;
|
|
1466
1466
|
}, r;
|
|
1467
|
-
}(),
|
|
1467
|
+
}(), ae = function(r) {
|
|
1468
1468
|
var t = null, i = r.audio_object_type, e = r.audio_object_type, a = r.sampling_freq_index, s = r.channel_config, n = 0, o = navigator.userAgent.toLowerCase();
|
|
1469
1469
|
o.indexOf("firefox") !== -1 ? a >= 6 ? (e = 5, t = new Array(4), n = a - 3) : (e = 2, t = new Array(2), n = a) : o.indexOf("android") !== -1 ? (e = 2, t = new Array(2), n = a) : (e = 5, n = a, t = new Array(4), a >= 6 ? n = a - 3 : s === 1 && (e = 2, t = new Array(2), n = a)), t[0] = e << 3, t[0] |= (15 & a) >>> 1, t[1] = (15 & a) << 7, t[1] |= (15 & s) << 3, e === 5 && (t[1] |= (15 & n) >>> 1, t[2] = (1 & n) << 7, t[2] |= 8, t[3] = 0), this.config = t, this.sampling_rate = De[a], this.channel_count = s, this.codec_mimetype = "mp4a.40." + e, this.original_codec_mimetype = "mp4a.40." + i;
|
|
1470
1470
|
}, ce = function() {
|
|
@@ -1526,31 +1526,31 @@ var Tt = { exports: {} };
|
|
|
1526
1526
|
for (var a = e.readBits(4), s = [], n = 0; n < a; n++) s.push(Ct(e));
|
|
1527
1527
|
return { descriptor_tag: r, descriptor_length: t, identifier: i, audio_count: a, components: s };
|
|
1528
1528
|
}, It = function(r) {
|
|
1529
|
-
var t = new
|
|
1529
|
+
var t = new le(r), i = t.readBits(8), e = t.readBool(), a = t.readBool();
|
|
1530
1530
|
t.readBits(2);
|
|
1531
1531
|
var s = t.readBits(12), n = t.readBits(8), o = t.readBool(), p = t.readBits(6), g = 4 * t.readBits(31) + t.readBits(2), E = t.readBits(8), A = t.readBits(12), S = t.readBits(12), w = t.readBits(8), I = null;
|
|
1532
1532
|
w === Se.kSpliceNull ? I = {} : w === Se.kSpliceSchedule ? I = function(se) {
|
|
1533
|
-
for (var be = se.readBits(8), Ae = [],
|
|
1533
|
+
for (var be = se.readBits(8), Ae = [], ue = 0; ue < be; ue++) Ae.push(et(se));
|
|
1534
1534
|
return { splice_count: be, events: Ae };
|
|
1535
1535
|
}(t) : w === Se.kSpliceInsert ? I = function(se) {
|
|
1536
1536
|
var be = se.readBits(32), Ae = se.readBool();
|
|
1537
1537
|
se.readBits(7);
|
|
1538
|
-
var
|
|
1539
|
-
if (Ae) return
|
|
1540
|
-
if (
|
|
1541
|
-
|
|
1542
|
-
for (var ye = 0; ye <
|
|
1538
|
+
var ue = { splice_event_id: be, splice_event_cancel_indicator: Ae };
|
|
1539
|
+
if (Ae) return ue;
|
|
1540
|
+
if (ue.out_of_network_indicator = se.readBool(), ue.program_splice_flag = se.readBool(), ue.duration_flag = se.readBool(), ue.splice_immediate_flag = se.readBool(), se.readBits(4), ue.program_splice_flag && !ue.splice_immediate_flag && (ue.splice_time = Oe(se)), !ue.program_splice_flag) {
|
|
1541
|
+
ue.component_count = se.readBits(8), ue.components = [];
|
|
1542
|
+
for (var ye = 0; ye < ue.component_count; ye++) ue.components.push($e(ue.splice_immediate_flag, se));
|
|
1543
1543
|
}
|
|
1544
|
-
return
|
|
1544
|
+
return ue.duration_flag && (ue.break_duration = Be(se)), ue.unique_program_id = se.readBits(16), ue.avail_num = se.readBits(8), ue.avails_expected = se.readBits(8), ue;
|
|
1545
1545
|
}(t) : w === Se.kTimeSignal ? I = function(se) {
|
|
1546
1546
|
return { splice_time: Oe(se) };
|
|
1547
1547
|
}(t) : w === Se.kBandwidthReservation ? I = {} : w === Se.kPrivateCommand ? I = function(se, be) {
|
|
1548
|
-
for (var Ae = String.fromCharCode(be.readBits(8), be.readBits(8), be.readBits(8), be.readBits(8)),
|
|
1549
|
-
return { identifier: Ae, private_data:
|
|
1548
|
+
for (var Ae = String.fromCharCode(be.readBits(8), be.readBits(8), be.readBits(8), be.readBits(8)), ue = new Uint8Array(se - 4), ye = 0; ye < se - 4; ye++) ue[ye] = be.readBits(8);
|
|
1549
|
+
return { identifier: Ae, private_data: ue.buffer };
|
|
1550
1550
|
}(S, t) : t.readBits(8 * S);
|
|
1551
1551
|
for (var z = [], N = t.readBits(16), J = 0; J < N; ) {
|
|
1552
|
-
var W = t.readBits(8), q = t.readBits(8),
|
|
1553
|
-
W === 0 ? z.push(tt(W, q,
|
|
1552
|
+
var W = t.readBits(8), q = t.readBits(8), de = String.fromCharCode(t.readBits(8), t.readBits(8), t.readBits(8), t.readBits(8));
|
|
1553
|
+
W === 0 ? z.push(tt(W, q, de, t)) : W === 1 ? z.push(wt(W, q, de, t)) : W === 2 ? z.push(Lt(W, q, de, t)) : W === 3 ? z.push(Dt(W, q, de, t)) : W === 4 ? z.push(Bt(W, q, de, t)) : t.readBits(8 * (q - 4)), J += 2 + q;
|
|
1554
1554
|
}
|
|
1555
1555
|
var he = { table_id: i, section_syntax_indicator: e, private_indicator: a, section_length: s, protocol_version: n, encrypted_packet: o, encryption_algorithm: p, pts_adjustment: g, cw_index: E, tier: A, splice_command_length: S, splice_command_type: w, splice_command: I, descriptor_loop_length: N, splice_descriptors: z, E_CRC32: o ? t.readBits(32) : void 0, CRC32: t.readBits(32) };
|
|
1556
1556
|
if (w === Se.kSpliceInsert) {
|
|
@@ -1836,11 +1836,11 @@ var Tt = { exports: {} };
|
|
|
1836
1836
|
if (I !== u.kH264 || J) if (I !== u.kH265 || J) if (I !== u.kADTSAAC || W) if (I !== u.kLOASAAC || W) if (I !== u.kAC3 || W) if (I !== u.kMPEG1Audio && I !== u.kMPEG2Audio || W) if (I === u.kPESPrivateData) {
|
|
1837
1837
|
if (g.pes_private_data_pids[z] = !0, N > 0) {
|
|
1838
1838
|
for (var q = w + 5; q < w + 5 + N; ) {
|
|
1839
|
-
var
|
|
1840
|
-
if (
|
|
1839
|
+
var de = i[q + 0], he = i[q + 1];
|
|
1840
|
+
if (de === 5) {
|
|
1841
1841
|
var K = String.fromCharCode.apply(String, Array.from(i.subarray(q + 2, q + 2 + he)));
|
|
1842
1842
|
K === "VANC" ? g.smpte2038_pids[z] = !0 : K === "Opus" && (g.common_pids.opus = z);
|
|
1843
|
-
} else if (
|
|
1843
|
+
} else if (de === 127 && z === g.common_pids.opus) {
|
|
1844
1844
|
var Q = null;
|
|
1845
1845
|
if (i[q + 2] === 128 && (Q = i[q + 3]), Q == null) {
|
|
1846
1846
|
m.a.e(this.TAG, "Not Supported Opus channel count.");
|
|
@@ -1873,7 +1873,7 @@ var Tt = { exports: {} };
|
|
|
1873
1873
|
} else e.nearest_pts = this.aac_last_sample_pts_;
|
|
1874
1874
|
this.onSCTE35Metadata && this.onSCTE35Metadata(e);
|
|
1875
1875
|
}, t.prototype.parseH264Payload = function(i, e, a, s, n) {
|
|
1876
|
-
for (var o = new
|
|
1876
|
+
for (var o = new Y(i), p = null, g = [], E = 0, A = !1; (p = o.readNextNaluPayload()) != null; ) {
|
|
1877
1877
|
var S = new R(p);
|
|
1878
1878
|
if (S.type === D.kSliceSPS) {
|
|
1879
1879
|
var w = ne.parseSPS(p.data);
|
|
@@ -1891,10 +1891,10 @@ var Tt = { exports: {} };
|
|
|
1891
1891
|
var S = new Pt(p);
|
|
1892
1892
|
if (S.type === Ee.kSliceVPS) {
|
|
1893
1893
|
if (!this.video_init_segment_dispatched_) {
|
|
1894
|
-
var w =
|
|
1894
|
+
var w = ie.parseVPS(p.data);
|
|
1895
1895
|
this.video_metadata_.vps = S, this.video_metadata_.details = Fe(Fe({}, this.video_metadata_.details), w);
|
|
1896
1896
|
}
|
|
1897
|
-
} else S.type === Ee.kSliceSPS ? (w =
|
|
1897
|
+
} else S.type === Ee.kSliceSPS ? (w = ie.parseSPS(p.data), this.video_init_segment_dispatched_ ? this.detectVideoMetadataChange(S, w) === !0 && (m.a.v(this.TAG, "H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment"), this.video_metadata_changed_ = !0, this.video_metadata_ = { vps: void 0, sps: S, pps: void 0, details: w }) : (this.video_metadata_.sps = S, this.video_metadata_.details = Fe(Fe({}, this.video_metadata_.details), w))) : S.type === Ee.kSlicePPS ? (!this.video_init_segment_dispatched_ || this.video_metadata_changed_) && (w = ie.parsePPS(p.data), this.video_metadata_.pps = S, this.video_metadata_.details = Fe(Fe({}, this.video_metadata_.details), w), this.video_metadata_.vps && this.video_metadata_.sps && this.video_metadata_.pps && (this.video_metadata_changed_ && this.dispatchVideoMediaSegment(), this.dispatchVideoInitSegment())) : S.type !== Ee.kSliceIDR_W_RADL && S.type !== Ee.kSliceIDR_N_LP && S.type !== Ee.kSliceCRA_NUT || (A = !0);
|
|
1898
1898
|
this.video_init_segment_dispatched_ && (g.push(S), E += S.data.byteLength);
|
|
1899
1899
|
}
|
|
1900
1900
|
var I = Math.floor(e / this.timescale_), z = Math.floor(a / this.timescale_);
|
|
@@ -1920,7 +1920,7 @@ var Tt = { exports: {} };
|
|
|
1920
1920
|
e.hvcc = g.getData(), this.video_init_segment_dispatched_ == 0 && m.a.v(this.TAG, "Generated first HEVCDecoderConfigurationRecord for mimeType: " + e.codec);
|
|
1921
1921
|
} else {
|
|
1922
1922
|
o = this.video_metadata_.sps.data.subarray(4), p = this.video_metadata_.pps.data.subarray(4);
|
|
1923
|
-
var E = new
|
|
1923
|
+
var E = new oe(o, p, i);
|
|
1924
1924
|
e.avcc = E.getData(), this.video_init_segment_dispatched_ == 0 && m.a.v(this.TAG, "Generated first AVCDecoderConfigurationRecord for mimeType: " + e.codec);
|
|
1925
1925
|
}
|
|
1926
1926
|
this.onTrackMetadata("video", e), this.video_init_segment_dispatched_ = !0, this.video_metadata_changed_ = !1;
|
|
@@ -1974,7 +1974,7 @@ var Tt = { exports: {} };
|
|
|
1974
1974
|
Math.abs(p - o) > 1 && (m.a.w(this.TAG, "AAC: Detected pts overlapped, expected: " + p + "ms, PES pts: " + o + "ms"), o = p);
|
|
1975
1975
|
}
|
|
1976
1976
|
}
|
|
1977
|
-
for (var g, E = new
|
|
1977
|
+
for (var g, E = new re(i), A = null, S = o; (A = E.readNextAACFrame((a = this.loas_previous_frame) !== null && a !== void 0 ? a : void 0)) != null; ) {
|
|
1978
1978
|
this.loas_previous_frame = A, n = 1024 / A.sampling_frequency * 1e3;
|
|
1979
1979
|
var w = { codec: "aac", data: A };
|
|
1980
1980
|
this.audio_init_segment_dispatched_ == 0 ? (this.audio_metadata_ = { codec: "aac", audio_object_type: A.audio_object_type, sampling_freq_index: A.sampling_freq_index, sampling_frequency: A.sampling_frequency, channel_config: A.channel_config }, this.dispatchAudioInitSegment(w)) : this.detectAudioMetadataChange(w) && (this.dispatchAudioMediaSegment(), this.dispatchAudioInitSegment(w)), g = S;
|
|
@@ -2071,7 +2071,7 @@ var Tt = { exports: {} };
|
|
|
2071
2071
|
}, t.prototype.dispatchAudioInitSegment = function(i) {
|
|
2072
2072
|
var e = { type: "audio" };
|
|
2073
2073
|
if (e.id = this.audio_track_.id, e.timescale = 1e3, e.duration = this.duration_, this.audio_metadata_.codec === "aac") {
|
|
2074
|
-
var a = i.codec === "aac" ? i.data : null, s = new
|
|
2074
|
+
var a = i.codec === "aac" ? i.data : null, s = new ae(a);
|
|
2075
2075
|
e.audioSampleRate = s.sampling_rate, e.channelCount = s.channel_count, e.codec = s.codec_mimetype, e.originalCodec = s.original_codec_mimetype, e.config = s.config, e.refSampleDuration = 1024 / e.audioSampleRate * e.timescale;
|
|
2076
2076
|
} else if (this.audio_metadata_.codec === "ac-3") {
|
|
2077
2077
|
var n = i.codec === "ac-3" ? i.data : null, o = new jt(n);
|
|
@@ -2116,7 +2116,7 @@ var Tt = { exports: {} };
|
|
|
2116
2116
|
o.dts = g;
|
|
2117
2117
|
}
|
|
2118
2118
|
o.ancillaries = function(E) {
|
|
2119
|
-
for (var A = new
|
|
2119
|
+
for (var A = new le(E), S = 0, w = []; S += 6, A.readBits(6) === 0; ) {
|
|
2120
2120
|
var I = A.readBool();
|
|
2121
2121
|
S += 1;
|
|
2122
2122
|
var z = A.readBits(11);
|
|
@@ -2129,18 +2129,18 @@ var Tt = { exports: {} };
|
|
|
2129
2129
|
S += 10;
|
|
2130
2130
|
var q = 255 & A.readBits(10);
|
|
2131
2131
|
S += 10;
|
|
2132
|
-
for (var
|
|
2132
|
+
for (var de = new Uint8Array(q), he = 0; he < q; he++) {
|
|
2133
2133
|
var K = 255 & A.readBits(10);
|
|
2134
|
-
S += 10,
|
|
2134
|
+
S += 10, de[he] = K;
|
|
2135
2135
|
}
|
|
2136
2136
|
A.readBits(10), S += 10;
|
|
2137
2137
|
var Q = "User Defined";
|
|
2138
|
-
J === 65 ? W === 7 && (Q = "SCTE-104") : J === 95 ? W === 220 ? Q = "ARIB STD-B37 (1SEG)" : W === 221 ? Q = "ARIB STD-B37 (ANALOG)" : W === 222 ? Q = "ARIB STD-B37 (SD)" : W === 223 && (Q = "ARIB STD-B37 (HD)") : J === 97 && (W === 1 ? Q = "EIA-708" : W === 2 && (Q = "EIA-608")), w.push({ yc_indicator: I, line_number: z, horizontal_offset: N, did: J, sdid: W, user_data:
|
|
2138
|
+
J === 65 ? W === 7 && (Q = "SCTE-104") : J === 95 ? W === 220 ? Q = "ARIB STD-B37 (1SEG)" : W === 221 ? Q = "ARIB STD-B37 (ANALOG)" : W === 222 ? Q = "ARIB STD-B37 (SD)" : W === 223 && (Q = "ARIB STD-B37 (HD)") : J === 97 && (W === 1 ? Q = "EIA-708" : W === 2 && (Q = "EIA-608")), w.push({ yc_indicator: I, line_number: z, horizontal_offset: N, did: J, sdid: W, user_data: de, description: Q, information: {} }), A.readBits(8 - (S - Math.floor(S / 8)) % 8), S += (8 - (S - Math.floor(S / 8))) % 8;
|
|
2139
2139
|
}
|
|
2140
2140
|
return A.destroy(), A = null, w;
|
|
2141
2141
|
}(i), this.onSMPTE2038Metadata && this.onSMPTE2038Metadata(o);
|
|
2142
2142
|
}, t;
|
|
2143
|
-
}(
|
|
2143
|
+
}(h), Ht = function() {
|
|
2144
2144
|
for (var r = 0, t = 0, i = arguments.length; t < i; t++) r += arguments[t].length;
|
|
2145
2145
|
var e = Array(r), a = 0;
|
|
2146
2146
|
for (t = 0; t < i; t++) for (var s = arguments[t], n = 0, o = s.length; n < o; n++, a++) e[a] = s[n];
|
|
@@ -2379,16 +2379,16 @@ var Tt = { exports: {} };
|
|
|
2379
2379
|
} else n = 0;
|
|
2380
2380
|
}
|
|
2381
2381
|
if (A) {
|
|
2382
|
-
var
|
|
2383
|
-
if (he != null && he.beginDts <
|
|
2382
|
+
var de = J - n, he = this._videoSegmentInfoList.getLastSegmentBefore(J);
|
|
2383
|
+
if (he != null && he.beginDts < de) {
|
|
2384
2384
|
if (ke = ht.getSilentFrame(this._audioMeta.originalCodec, this._audioMeta.channelCount)) {
|
|
2385
|
-
var K = he.beginDts, Q =
|
|
2385
|
+
var K = he.beginDts, Q = de - he.beginDts;
|
|
2386
2386
|
m.a.v(this.TAG, "InsertPrefixSilentAudio: dts: " + K + ", duration: " + Q), s.unshift({ unit: ke, dts: K, pts: K }), I += ke.byteLength;
|
|
2387
2387
|
}
|
|
2388
2388
|
} else A = !1;
|
|
2389
2389
|
}
|
|
2390
2390
|
for (var _e = [], te = 0; te < s.length; te++) {
|
|
2391
|
-
var se = (N = s[te]).unit, be = N.dts - this._dtsBase, Ae = (K = be, !1),
|
|
2391
|
+
var se = (N = s[te]).unit, be = N.dts - this._dtsBase, Ae = (K = be, !1), ue = null, ye = 0;
|
|
2392
2392
|
if (!(be < -1e-3)) {
|
|
2393
2393
|
if (this._audioMeta.codec !== "mp3") {
|
|
2394
2394
|
var Re = be;
|
|
@@ -2400,17 +2400,17 @@ var Tt = { exports: {} };
|
|
|
2400
2400
|
Ae = !0;
|
|
2401
2401
|
var ke, Ne = Math.floor(n / p);
|
|
2402
2402
|
m.a.w(this.TAG, `Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
2403
|
-
originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.round(n) + " ms, generate: " + Ne + " frames"), K = Math.floor(Re), ye = Math.floor(Re + p) - K, (ke = ht.getSilentFrame(this._audioMeta.originalCodec, this._audioMeta.channelCount)) == null && (m.a.w(this.TAG, "Unable to generate silent frame for " + this._audioMeta.originalCodec + " with " + this._audioMeta.channelCount + " channels, repeat last frame"), ke = se),
|
|
2403
|
+
originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.round(n) + " ms, generate: " + Ne + " frames"), K = Math.floor(Re), ye = Math.floor(Re + p) - K, (ke = ht.getSilentFrame(this._audioMeta.originalCodec, this._audioMeta.channelCount)) == null && (m.a.w(this.TAG, "Unable to generate silent frame for " + this._audioMeta.originalCodec + " with " + this._audioMeta.channelCount + " channels, repeat last frame"), ke = se), ue = [];
|
|
2404
2404
|
for (var Pe = 0; Pe < Ne; Pe++) {
|
|
2405
2405
|
Re += p;
|
|
2406
2406
|
var Ge = Math.floor(Re), je = Math.floor(Re + p) - Ge, Ve = { dts: Ge, pts: Ge, cts: 0, unit: ke, size: ke.byteLength, duration: je, originalDts: be, flags: { isLeading: 0, dependsOn: 1, isDependedOn: 0, hasRedundancy: 0 } };
|
|
2407
|
-
|
|
2407
|
+
ue.push(Ve), I += Ve.size;
|
|
2408
2408
|
}
|
|
2409
2409
|
this._audioNextDts = Re + p;
|
|
2410
2410
|
} else K = Math.floor(Re), ye = Math.floor(Re + p) - K, this._audioNextDts = Re + p;
|
|
2411
2411
|
} else
|
|
2412
2412
|
K = be - n, te !== s.length - 1 ? ye = s[te + 1].dts - this._dtsBase - n - K : z != null ? ye = z.dts - this._dtsBase - n - K : ye = _e.length >= 1 ? _e[_e.length - 1].duration : Math.floor(p), this._audioNextDts = K + ye;
|
|
2413
|
-
o === -1 && (o = K), _e.push({ dts: K, pts: K, cts: 0, unit: N.unit, size: N.unit.byteLength, duration: ye, originalDts: be, flags: { isLeading: 0, dependsOn: 1, isDependedOn: 0, hasRedundancy: 0 } }), Ae && _e.push.apply(_e,
|
|
2413
|
+
o === -1 && (o = K), _e.push({ dts: K, pts: K, cts: 0, unit: N.unit, size: N.unit.byteLength, duration: ye, originalDts: be, flags: { isLeading: 0, dependsOn: 1, isDependedOn: 0, hasRedundancy: 0 } }), Ae && _e.push.apply(_e, ue);
|
|
2414
2414
|
}
|
|
2415
2415
|
}
|
|
2416
2416
|
if (_e.length === 0) return a.samples = [], void (a.length = 0);
|
|
@@ -2446,19 +2446,19 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2446
2446
|
J <= 3 && (J = 0), o = z - (N.dts + N.duration + J);
|
|
2447
2447
|
} else o = 0;
|
|
2448
2448
|
}
|
|
2449
|
-
for (var W = new Me.b(), q = [],
|
|
2450
|
-
var he = (I = n[
|
|
2449
|
+
for (var W = new Me.b(), q = [], de = 0; de < n.length; de++) {
|
|
2450
|
+
var he = (I = n[de]).dts - this._dtsBase, K = I.isKeyframe, Q = he - o, _e = I.cts, te = Q + _e;
|
|
2451
2451
|
p === -1 && (p = Q, g = te);
|
|
2452
2452
|
var se = 0;
|
|
2453
|
-
if (
|
|
2453
|
+
if (de !== n.length - 1 ? se = n[de + 1].dts - this._dtsBase - o - Q : w != null ? se = w.dts - this._dtsBase - o - Q : se = q.length >= 1 ? q[q.length - 1].duration : Math.floor(this._videoMeta.refSampleDuration), K) {
|
|
2454
2454
|
var be = new Me.d(Q, te, se, I.dts, !0);
|
|
2455
2455
|
be.fileposition = I.fileposition, W.appendSyncPoint(be);
|
|
2456
2456
|
}
|
|
2457
2457
|
q.push({ dts: Q, pts: te, cts: _e, units: I.units, size: I.length, isKeyframe: K, duration: se, originalDts: he, flags: { isLeading: 0, dependsOn: K ? 2 : 1, isDependedOn: K ? 1 : 0, hasRedundancy: 0, isNonSync: K ? 0 : 1 } });
|
|
2458
2458
|
}
|
|
2459
|
-
for ((A = new Uint8Array(S))[0] = S >>> 24 & 255, A[1] = S >>> 16 & 255, A[2] = S >>> 8 & 255, A[3] = 255 & S, A.set(ze.types.mdat, 4),
|
|
2460
|
-
var
|
|
2461
|
-
A.set(
|
|
2459
|
+
for ((A = new Uint8Array(S))[0] = S >>> 24 & 255, A[1] = S >>> 16 & 255, A[2] = S >>> 8 & 255, A[3] = 255 & S, A.set(ze.types.mdat, 4), de = 0; de < q.length; de++) for (var Ae = q[de].units; Ae.length; ) {
|
|
2460
|
+
var ue = Ae.shift().data;
|
|
2461
|
+
A.set(ue, E), E += ue.byteLength;
|
|
2462
2462
|
}
|
|
2463
2463
|
var ye = q[q.length - 1];
|
|
2464
2464
|
if (e = ye.dts + ye.duration, a = ye.pts + ye.duration, this._videoNextDts = e, W.beginDts = p, W.endDts = e, W.beginPts = g, W.endPts = a, W.originalBeginDts = q[0].originalDts, W.originalEndDts = ye.originalDts + ye.duration, W.firstSample = new Me.d(q[0].dts, q[0].pts, q[0].duration, q[0].originalDts, q[0].isKeyframe), W.lastSample = new Me.d(ye.dts, ye.pts, ye.duration, ye.originalDts, ye.isKeyframe), this._isLive || this._videoSegmentInfoList.append(W), s.samples = q, s.sequenceNumber++, this._forceFirstIDR) {
|
|
@@ -2530,7 +2530,7 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2530
2530
|
var s = null;
|
|
2531
2531
|
(s = _.probe(t)).match && (this._setupFLVDemuxerRemuxer(s), a = this._demuxer.parseChunks(t, i)), s.match || s.needMoreData || (s = lt.probe(t)).match && (this._setupTSDemuxerRemuxer(s), a = this._demuxer.parseChunks(t, i)), s.match || s.needMoreData || (s = null, m.a.e(this.TAG, "Non MPEG-TS/FLV, Unsupported media type!"), Promise.resolve().then(function() {
|
|
2532
2532
|
e._internalAbort();
|
|
2533
|
-
}), this._emitter.emit(Le.a.DEMUX_ERROR,
|
|
2533
|
+
}), this._emitter.emit(Le.a.DEMUX_ERROR, X.a.FORMAT_UNSUPPORTED, "Non MPEG-TS/FLV, Unsupported media type!"));
|
|
2534
2534
|
}
|
|
2535
2535
|
return a;
|
|
2536
2536
|
}, r.prototype._setupFLVDemuxerRemuxer = function(t) {
|
|
@@ -2623,17 +2623,17 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2623
2623
|
return (U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, _) {
|
|
2624
2624
|
u.__proto__ = _;
|
|
2625
2625
|
} || function(u, _) {
|
|
2626
|
-
for (var
|
|
2626
|
+
for (var h in _) _.hasOwnProperty(h) && (u[h] = _[h]);
|
|
2627
2627
|
})(T, l);
|
|
2628
2628
|
}, function(T, l) {
|
|
2629
2629
|
function u() {
|
|
2630
2630
|
this.constructor = T;
|
|
2631
2631
|
}
|
|
2632
2632
|
U(T, l), T.prototype = l === null ? Object.create(l) : (u.prototype = l.prototype, new u());
|
|
2633
|
-
}),
|
|
2633
|
+
}), M = function(T) {
|
|
2634
2634
|
function l(u, _) {
|
|
2635
|
-
var
|
|
2636
|
-
return
|
|
2635
|
+
var h = T.call(this, "fetch-stream-loader") || this;
|
|
2636
|
+
return h.TAG = "FetchStreamLoader", h._seekHandler = u, h._config = _, h._needStash = !0, h._requestAbort = !1, h._abortController = null, h._contentLength = null, h._receivedLength = 0, h;
|
|
2637
2637
|
}
|
|
2638
2638
|
return L(l, T), l.isSupported = function() {
|
|
2639
2639
|
try {
|
|
@@ -2645,7 +2645,7 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2645
2645
|
}, l.prototype.destroy = function() {
|
|
2646
2646
|
this.isWorking() && this.abort(), T.prototype.destroy.call(this);
|
|
2647
2647
|
}, l.prototype.open = function(u, _) {
|
|
2648
|
-
var
|
|
2648
|
+
var h = this;
|
|
2649
2649
|
this._dataSource = u, this._range = _;
|
|
2650
2650
|
var P = u.url;
|
|
2651
2651
|
this._config.reuseRedirectedURL && u.redirectedURL != null && (P = u.redirectedURL);
|
|
@@ -2657,21 +2657,21 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2657
2657
|
var ve = { method: "GET", headers: V, mode: "cors", cache: "default", referrerPolicy: "no-referrer-when-downgrade" };
|
|
2658
2658
|
if (typeof this._config.headers == "object") for (var pe in this._config.headers) V.append(pe, this._config.headers[pe]);
|
|
2659
2659
|
u.cors === !1 && (ve.mode = "same-origin"), u.withCredentials && (ve.credentials = "include"), u.referrerPolicy && (ve.referrerPolicy = u.referrerPolicy), self.AbortController && (this._abortController = new self.AbortController(), ve.signal = this._abortController.signal), this._status = b.c.kConnecting, self.fetch(D.url, ve).then(function(k) {
|
|
2660
|
-
if (
|
|
2660
|
+
if (h._requestAbort) return h._status = b.c.kIdle, void k.body.cancel();
|
|
2661
2661
|
if (k.ok && k.status >= 200 && k.status <= 299) {
|
|
2662
|
-
if (k.url !== D.url &&
|
|
2663
|
-
var d =
|
|
2664
|
-
|
|
2662
|
+
if (k.url !== D.url && h._onURLRedirect) {
|
|
2663
|
+
var d = h._seekHandler.removeURLParameters(k.url);
|
|
2664
|
+
h._onURLRedirect(d);
|
|
2665
2665
|
}
|
|
2666
|
-
var
|
|
2667
|
-
return
|
|
2666
|
+
var c = k.headers.get("Content-Length");
|
|
2667
|
+
return c != null && (h._contentLength = parseInt(c), h._contentLength !== 0 && h._onContentLengthKnown && h._onContentLengthKnown(h._contentLength)), h._pump.call(h, k.body.getReader());
|
|
2668
2668
|
}
|
|
2669
|
-
if (
|
|
2670
|
-
|
|
2669
|
+
if (h._status = b.c.kError, !h._onError) throw new f.d("FetchStreamLoader: Http code invalid, " + k.status + " " + k.statusText);
|
|
2670
|
+
h._onError(b.b.HTTP_STATUS_CODE_INVALID, { code: k.status, msg: k.statusText });
|
|
2671
2671
|
}).catch(function(k) {
|
|
2672
|
-
if (!
|
|
2673
|
-
if (
|
|
2674
|
-
|
|
2672
|
+
if (!h._abortController || !h._abortController.signal.aborted) {
|
|
2673
|
+
if (h._status = b.c.kError, !h._onError) throw k;
|
|
2674
|
+
h._onError(b.b.EXCEPTION, { code: -1, msg: k.message });
|
|
2675
2675
|
}
|
|
2676
2676
|
});
|
|
2677
2677
|
}, l.prototype.abort = function() {
|
|
@@ -2681,8 +2681,8 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2681
2681
|
}
|
|
2682
2682
|
}, l.prototype._pump = function(u) {
|
|
2683
2683
|
var _ = this;
|
|
2684
|
-
return u.read().then(function(
|
|
2685
|
-
if (
|
|
2684
|
+
return u.read().then(function(h) {
|
|
2685
|
+
if (h.done) if (_._contentLength !== null && _._receivedLength < _._contentLength) {
|
|
2686
2686
|
_._status = b.c.kError;
|
|
2687
2687
|
var P = b.b.EARLY_EOF, D = { code: -1, msg: "Fetch stream meet Early-EOF" };
|
|
2688
2688
|
if (!_._onError) throw new f.d(D.msg);
|
|
@@ -2692,25 +2692,25 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2692
2692
|
if (_._abortController && _._abortController.signal.aborted) return void (_._status = b.c.kComplete);
|
|
2693
2693
|
if (_._requestAbort === !0) return _._status = b.c.kComplete, u.cancel();
|
|
2694
2694
|
_._status = b.c.kBuffering;
|
|
2695
|
-
var V =
|
|
2695
|
+
var V = h.value.buffer, ee = _._range.from + _._receivedLength;
|
|
2696
2696
|
_._receivedLength += V.byteLength, _._onDataArrival && _._onDataArrival(V, ee, _._receivedLength), _._pump(u);
|
|
2697
2697
|
}
|
|
2698
|
-
}).catch(function(
|
|
2698
|
+
}).catch(function(h) {
|
|
2699
2699
|
if (_._abortController && _._abortController.signal.aborted) _._status = b.c.kComplete;
|
|
2700
|
-
else if (
|
|
2700
|
+
else if (h.code !== 11 || !v.a.msedge) {
|
|
2701
2701
|
_._status = b.c.kError;
|
|
2702
2702
|
var P = 0, D = null;
|
|
2703
|
-
if (
|
|
2703
|
+
if (h.code !== 19 && h.message !== "network error" || !(_._contentLength === null || _._contentLength !== null && _._receivedLength < _._contentLength) ? (P = b.b.EXCEPTION, D = { code: h.code, msg: h.message }) : (P = b.b.EARLY_EOF, D = { code: h.code, msg: "Fetch stream meet Early-EOF" }), !_._onError) throw new f.d(D.msg);
|
|
2704
2704
|
_._onError(P, D);
|
|
2705
2705
|
}
|
|
2706
2706
|
});
|
|
2707
2707
|
}, l;
|
|
2708
2708
|
}(b.a), C = /* @__PURE__ */ function() {
|
|
2709
2709
|
var T = function(l, u) {
|
|
2710
|
-
return (T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(_,
|
|
2711
|
-
_.__proto__ =
|
|
2712
|
-
} || function(_,
|
|
2713
|
-
for (var P in
|
|
2710
|
+
return (T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(_, h) {
|
|
2711
|
+
_.__proto__ = h;
|
|
2712
|
+
} || function(_, h) {
|
|
2713
|
+
for (var P in h) h.hasOwnProperty(P) && (_[P] = h[P]);
|
|
2714
2714
|
})(l, u);
|
|
2715
2715
|
};
|
|
2716
2716
|
return function(l, u) {
|
|
@@ -2721,8 +2721,8 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2721
2721
|
};
|
|
2722
2722
|
}(), j = function(T) {
|
|
2723
2723
|
function l(u, _) {
|
|
2724
|
-
var
|
|
2725
|
-
return
|
|
2724
|
+
var h = T.call(this, "xhr-moz-chunked-loader") || this;
|
|
2725
|
+
return h.TAG = "MozChunkedLoader", h._seekHandler = u, h._config = _, h._needStash = !0, h._xhr = null, h._requestAbort = !1, h._contentLength = null, h._receivedLength = 0, h;
|
|
2726
2726
|
}
|
|
2727
2727
|
return C(l, T), l.isSupported = function() {
|
|
2728
2728
|
try {
|
|
@@ -2735,9 +2735,9 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2735
2735
|
this.isWorking() && this.abort(), this._xhr && (this._xhr.onreadystatechange = null, this._xhr.onprogress = null, this._xhr.onloadend = null, this._xhr.onerror = null, this._xhr = null), T.prototype.destroy.call(this);
|
|
2736
2736
|
}, l.prototype.open = function(u, _) {
|
|
2737
2737
|
this._dataSource = u, this._range = _;
|
|
2738
|
-
var
|
|
2739
|
-
this._config.reuseRedirectedURL && u.redirectedURL != null && (
|
|
2740
|
-
var P = this._seekHandler.getConfig(
|
|
2738
|
+
var h = u.url;
|
|
2739
|
+
this._config.reuseRedirectedURL && u.redirectedURL != null && (h = u.redirectedURL);
|
|
2740
|
+
var P = this._seekHandler.getConfig(h, _);
|
|
2741
2741
|
this._requestURL = P.url;
|
|
2742
2742
|
var D = this._xhr = new XMLHttpRequest();
|
|
2743
2743
|
if (D.open("GET", P.url, !0), D.responseType = "moz-chunked-arraybuffer", D.onreadystatechange = this._onReadyStateChange.bind(this), D.onprogress = this._onProgress.bind(this), D.onloadend = this._onLoadEnd.bind(this), D.onerror = this._onXhrError.bind(this), u.withCredentials && (D.withCredentials = !0), typeof P.headers == "object") {
|
|
@@ -2755,8 +2755,8 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2755
2755
|
var _ = u.target;
|
|
2756
2756
|
if (_.readyState === 2) {
|
|
2757
2757
|
if (_.responseURL != null && _.responseURL !== this._requestURL && this._onURLRedirect) {
|
|
2758
|
-
var
|
|
2759
|
-
this._onURLRedirect(
|
|
2758
|
+
var h = this._seekHandler.removeURLParameters(_.responseURL);
|
|
2759
|
+
this._onURLRedirect(h);
|
|
2760
2760
|
}
|
|
2761
2761
|
if (_.status !== 0 && (_.status < 200 || _.status > 299)) {
|
|
2762
2762
|
if (this._status = b.c.kError, !this._onError) throw new f.d("MozChunkedLoader: Http code invalid, " + _.status + " " + _.statusText);
|
|
@@ -2766,23 +2766,23 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2766
2766
|
}, l.prototype._onProgress = function(u) {
|
|
2767
2767
|
if (this._status !== b.c.kError) {
|
|
2768
2768
|
this._contentLength === null && u.total !== null && u.total !== 0 && (this._contentLength = u.total, this._onContentLengthKnown && this._onContentLengthKnown(this._contentLength));
|
|
2769
|
-
var _ = u.target.response,
|
|
2770
|
-
this._receivedLength += _.byteLength, this._onDataArrival && this._onDataArrival(_,
|
|
2769
|
+
var _ = u.target.response, h = this._range.from + this._receivedLength;
|
|
2770
|
+
this._receivedLength += _.byteLength, this._onDataArrival && this._onDataArrival(_, h, this._receivedLength);
|
|
2771
2771
|
}
|
|
2772
2772
|
}, l.prototype._onLoadEnd = function(u) {
|
|
2773
2773
|
this._requestAbort !== !0 ? this._status !== b.c.kError && (this._status = b.c.kComplete, this._onComplete && this._onComplete(this._range.from, this._range.from + this._receivedLength - 1)) : this._requestAbort = !1;
|
|
2774
2774
|
}, l.prototype._onXhrError = function(u) {
|
|
2775
2775
|
this._status = b.c.kError;
|
|
2776
|
-
var _ = 0,
|
|
2777
|
-
if (this._contentLength && u.loaded < this._contentLength ? (_ = b.b.EARLY_EOF,
|
|
2778
|
-
this._onError(_,
|
|
2776
|
+
var _ = 0, h = null;
|
|
2777
|
+
if (this._contentLength && u.loaded < this._contentLength ? (_ = b.b.EARLY_EOF, h = { code: -1, msg: "Moz-Chunked stream meet Early-Eof" }) : (_ = b.b.EXCEPTION, h = { code: -1, msg: u.constructor.name + " " + u.type }), !this._onError) throw new f.d(h.msg);
|
|
2778
|
+
this._onError(_, h);
|
|
2779
2779
|
}, l;
|
|
2780
2780
|
}(b.a), H = /* @__PURE__ */ function() {
|
|
2781
2781
|
var T = function(l, u) {
|
|
2782
|
-
return (T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(_,
|
|
2783
|
-
_.__proto__ =
|
|
2784
|
-
} || function(_,
|
|
2785
|
-
for (var P in
|
|
2782
|
+
return (T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(_, h) {
|
|
2783
|
+
_.__proto__ = h;
|
|
2784
|
+
} || function(_, h) {
|
|
2785
|
+
for (var P in h) h.hasOwnProperty(P) && (_[P] = h[P]);
|
|
2786
2786
|
})(l, u);
|
|
2787
2787
|
};
|
|
2788
2788
|
return function(l, u) {
|
|
@@ -2791,10 +2791,10 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2791
2791
|
}
|
|
2792
2792
|
T(l, u), l.prototype = u === null ? Object.create(u) : (_.prototype = u.prototype, new _());
|
|
2793
2793
|
};
|
|
2794
|
-
}(),
|
|
2794
|
+
}(), le = function(T) {
|
|
2795
2795
|
function l(u, _) {
|
|
2796
|
-
var
|
|
2797
|
-
return
|
|
2796
|
+
var h = T.call(this, "xhr-range-loader") || this;
|
|
2797
|
+
return h.TAG = "RangeLoader", h._seekHandler = u, h._config = _, h._needStash = !1, h._chunkSizeKBList = [128, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 5120, 6144, 7168, 8192], h._currentChunkSizeKB = 384, h._currentSpeedNormalized = 0, h._zeroSpeedChunkCount = 0, h._xhr = null, h._speedSampler = new m(), h._requestAbort = !1, h._waitForTotalLength = !1, h._totalLengthReceived = !1, h._currentRequestURL = null, h._currentRedirectedURL = null, h._currentRequestRange = null, h._totalLength = null, h._contentLength = null, h._receivedLength = 0, h._lastTimeLoaded = 0, h;
|
|
2798
2798
|
}
|
|
2799
2799
|
return H(l, T), l.isSupported = function() {
|
|
2800
2800
|
try {
|
|
@@ -2809,16 +2809,16 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2809
2809
|
return this._speedSampler.lastSecondKBps;
|
|
2810
2810
|
}, enumerable: !1, configurable: !0 }), l.prototype.open = function(u, _) {
|
|
2811
2811
|
this._dataSource = u, this._range = _, this._status = b.c.kConnecting;
|
|
2812
|
-
var
|
|
2813
|
-
this._dataSource.filesize != null && this._dataSource.filesize !== 0 && (
|
|
2812
|
+
var h = !1;
|
|
2813
|
+
this._dataSource.filesize != null && this._dataSource.filesize !== 0 && (h = !0, this._totalLength = this._dataSource.filesize), this._totalLengthReceived || h ? this._openSubRange() : (this._waitForTotalLength = !0, this._internalOpen(this._dataSource, { from: 0, to: -1 }));
|
|
2814
2814
|
}, l.prototype._openSubRange = function() {
|
|
2815
|
-
var u = 1024 * this._currentChunkSizeKB, _ = this._range.from + this._receivedLength,
|
|
2816
|
-
this._contentLength != null &&
|
|
2815
|
+
var u = 1024 * this._currentChunkSizeKB, _ = this._range.from + this._receivedLength, h = _ + u;
|
|
2816
|
+
this._contentLength != null && h - this._range.from >= this._contentLength && (h = this._range.from + this._contentLength - 1), this._currentRequestRange = { from: _, to: h }, this._internalOpen(this._dataSource, this._currentRequestRange);
|
|
2817
2817
|
}, l.prototype._internalOpen = function(u, _) {
|
|
2818
2818
|
this._lastTimeLoaded = 0;
|
|
2819
|
-
var
|
|
2820
|
-
this._config.reuseRedirectedURL && (this._currentRedirectedURL != null ?
|
|
2821
|
-
var P = this._seekHandler.getConfig(
|
|
2819
|
+
var h = u.url;
|
|
2820
|
+
this._config.reuseRedirectedURL && (this._currentRedirectedURL != null ? h = this._currentRedirectedURL : u.redirectedURL != null && (h = u.redirectedURL));
|
|
2821
|
+
var P = this._seekHandler.getConfig(h, _);
|
|
2822
2822
|
this._currentRequestURL = P.url;
|
|
2823
2823
|
var D = this._xhr = new XMLHttpRequest();
|
|
2824
2824
|
if (D.open("GET", P.url, !0), D.responseType = "arraybuffer", D.onreadystatechange = this._onReadyStateChange.bind(this), D.onprogress = this._onProgress.bind(this), D.onload = this._onLoad.bind(this), D.onerror = this._onXhrError.bind(this), u.withCredentials && (D.withCredentials = !0), typeof P.headers == "object") {
|
|
@@ -2838,8 +2838,8 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2838
2838
|
var _ = u.target;
|
|
2839
2839
|
if (_.readyState === 2) {
|
|
2840
2840
|
if (_.responseURL != null) {
|
|
2841
|
-
var
|
|
2842
|
-
_.responseURL !== this._currentRequestURL &&
|
|
2841
|
+
var h = this._seekHandler.removeURLParameters(_.responseURL);
|
|
2842
|
+
_.responseURL !== this._currentRequestURL && h !== this._currentRedirectedURL && (this._currentRedirectedURL = h, this._onURLRedirect && this._onURLRedirect(h));
|
|
2843
2843
|
}
|
|
2844
2844
|
if (_.status >= 200 && _.status <= 299) {
|
|
2845
2845
|
if (this._waitForTotalLength) return;
|
|
@@ -2855,8 +2855,8 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2855
2855
|
var _ = !1;
|
|
2856
2856
|
if (this._waitForTotalLength) {
|
|
2857
2857
|
this._waitForTotalLength = !1, this._totalLengthReceived = !0, _ = !0;
|
|
2858
|
-
var
|
|
2859
|
-
this._internalAbort(),
|
|
2858
|
+
var h = u.total;
|
|
2859
|
+
this._internalAbort(), h != null & h !== 0 && (this._totalLength = h);
|
|
2860
2860
|
}
|
|
2861
2861
|
if (this._range.to === -1 ? this._contentLength = this._totalLength - this._range.from : this._contentLength = this._range.to - this._range.from + 1, _) return void this._openSubRange();
|
|
2862
2862
|
this._onContentLengthKnown && this._onContentLengthKnown(this._contentLength);
|
|
@@ -2865,10 +2865,10 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2865
2865
|
this._lastTimeLoaded = u.loaded, this._speedSampler.addBytes(P);
|
|
2866
2866
|
}
|
|
2867
2867
|
}, l.prototype._normalizeSpeed = function(u) {
|
|
2868
|
-
var _ = this._chunkSizeKBList,
|
|
2868
|
+
var _ = this._chunkSizeKBList, h = _.length - 1, P = 0, D = 0, V = h;
|
|
2869
2869
|
if (u < _[0]) return _[0];
|
|
2870
2870
|
for (; D <= V; ) {
|
|
2871
|
-
if ((P = D + Math.floor((V - D) / 2)) ===
|
|
2871
|
+
if ((P = D + Math.floor((V - D) / 2)) === h || u >= _[P] && u < _[P + 1]) return _[P];
|
|
2872
2872
|
_[P] < u ? D = P + 1 : V = P - 1;
|
|
2873
2873
|
}
|
|
2874
2874
|
}, l.prototype._onLoad = function(u) {
|
|
@@ -2877,8 +2877,8 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2877
2877
|
this._lastTimeLoaded = 0;
|
|
2878
2878
|
var _ = this._speedSampler.lastSecondKBps;
|
|
2879
2879
|
if (_ === 0 && (this._zeroSpeedChunkCount++, this._zeroSpeedChunkCount >= 3 && (_ = this._speedSampler.currentKBps)), _ !== 0) {
|
|
2880
|
-
var
|
|
2881
|
-
this._currentSpeedNormalized !==
|
|
2880
|
+
var h = this._normalizeSpeed(_);
|
|
2881
|
+
this._currentSpeedNormalized !== h && (this._currentSpeedNormalized = h, this._currentChunkSizeKB = h);
|
|
2882
2882
|
}
|
|
2883
2883
|
var P = u.target.response, D = this._range.from + this._receivedLength;
|
|
2884
2884
|
this._receivedLength += P.byteLength;
|
|
@@ -2887,16 +2887,16 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2887
2887
|
}
|
|
2888
2888
|
}, l.prototype._onXhrError = function(u) {
|
|
2889
2889
|
this._status = b.c.kError;
|
|
2890
|
-
var _ = 0,
|
|
2891
|
-
if (this._contentLength && this._receivedLength > 0 && this._receivedLength < this._contentLength ? (_ = b.b.EARLY_EOF,
|
|
2892
|
-
this._onError(_,
|
|
2890
|
+
var _ = 0, h = null;
|
|
2891
|
+
if (this._contentLength && this._receivedLength > 0 && this._receivedLength < this._contentLength ? (_ = b.b.EARLY_EOF, h = { code: -1, msg: "RangeLoader meet Early-Eof" }) : (_ = b.b.EXCEPTION, h = { code: -1, msg: u.constructor.name + " " + u.type }), !this._onError) throw new f.d(h.msg);
|
|
2892
|
+
this._onError(_, h);
|
|
2893
2893
|
}, l;
|
|
2894
2894
|
}(b.a), ne = /* @__PURE__ */ function() {
|
|
2895
2895
|
var T = function(l, u) {
|
|
2896
|
-
return (T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(_,
|
|
2897
|
-
_.__proto__ =
|
|
2898
|
-
} || function(_,
|
|
2899
|
-
for (var P in
|
|
2896
|
+
return (T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(_, h) {
|
|
2897
|
+
_.__proto__ = h;
|
|
2898
|
+
} || function(_, h) {
|
|
2899
|
+
for (var P in h) h.hasOwnProperty(P) && (_[P] = h[P]);
|
|
2900
2900
|
})(l, u);
|
|
2901
2901
|
};
|
|
2902
2902
|
return function(l, u) {
|
|
@@ -2905,7 +2905,7 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2905
2905
|
}
|
|
2906
2906
|
T(l, u), l.prototype = u === null ? Object.create(u) : (_.prototype = u.prototype, new _());
|
|
2907
2907
|
};
|
|
2908
|
-
}(),
|
|
2908
|
+
}(), X = function(T) {
|
|
2909
2909
|
function l() {
|
|
2910
2910
|
var u = T.call(this, "websocket-loader") || this;
|
|
2911
2911
|
return u.TAG = "WebSocketLoader", u._needStash = !0, u._ws = null, u._requestAbort = !1, u._receivedLength = 0, u;
|
|
@@ -2924,9 +2924,9 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2924
2924
|
_.binaryType = "arraybuffer", _.onopen = this._onWebSocketOpen.bind(this), _.onclose = this._onWebSocketClose.bind(this), _.onmessage = this._onWebSocketMessage.bind(this), _.onerror = this._onWebSocketError.bind(this), this._status = b.c.kConnecting;
|
|
2925
2925
|
} catch (P) {
|
|
2926
2926
|
this._status = b.c.kError;
|
|
2927
|
-
var
|
|
2928
|
-
if (!this._onError) throw new f.d(
|
|
2929
|
-
this._onError(b.b.EXCEPTION,
|
|
2927
|
+
var h = { code: P.code, msg: P.message };
|
|
2928
|
+
if (!this._onError) throw new f.d(h.msg);
|
|
2929
|
+
this._onError(b.b.EXCEPTION, h);
|
|
2930
2930
|
}
|
|
2931
2931
|
}, l.prototype.abort = function() {
|
|
2932
2932
|
var u = this._ws;
|
|
@@ -2939,10 +2939,10 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2939
2939
|
var _ = this;
|
|
2940
2940
|
if (u.data instanceof ArrayBuffer) this._dispatchArrayBuffer(u.data);
|
|
2941
2941
|
else if (u.data instanceof Blob) {
|
|
2942
|
-
var
|
|
2943
|
-
|
|
2944
|
-
_._dispatchArrayBuffer(
|
|
2945
|
-
},
|
|
2942
|
+
var h = new FileReader();
|
|
2943
|
+
h.onload = function() {
|
|
2944
|
+
_._dispatchArrayBuffer(h.result);
|
|
2945
|
+
}, h.readAsArrayBuffer(u.data);
|
|
2946
2946
|
} else {
|
|
2947
2947
|
this._status = b.c.kError;
|
|
2948
2948
|
var P = { code: -1, msg: "Unsupported WebSocket message type: " + u.data.constructor.name };
|
|
@@ -2950,23 +2950,23 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2950
2950
|
this._onError(b.b.EXCEPTION, P);
|
|
2951
2951
|
}
|
|
2952
2952
|
}, l.prototype._dispatchArrayBuffer = function(u) {
|
|
2953
|
-
var _ = u,
|
|
2954
|
-
this._receivedLength += _.byteLength, this._onDataArrival && this._onDataArrival(_,
|
|
2953
|
+
var _ = u, h = this._receivedLength;
|
|
2954
|
+
this._receivedLength += _.byteLength, this._onDataArrival && this._onDataArrival(_, h, this._receivedLength);
|
|
2955
2955
|
}, l.prototype._onWebSocketError = function(u) {
|
|
2956
2956
|
this._status = b.c.kError;
|
|
2957
2957
|
var _ = { code: u.code, msg: u.message };
|
|
2958
2958
|
if (!this._onError) throw new f.d(_.msg);
|
|
2959
2959
|
this._onError(b.b.EXCEPTION, _);
|
|
2960
2960
|
}, l;
|
|
2961
|
-
}(b.a),
|
|
2961
|
+
}(b.a), ie = function() {
|
|
2962
2962
|
function T(l) {
|
|
2963
2963
|
this._zeroStart = l || !1;
|
|
2964
2964
|
}
|
|
2965
2965
|
return T.prototype.getConfig = function(l, u) {
|
|
2966
2966
|
var _ = {};
|
|
2967
2967
|
if (u.from !== 0 || u.to !== -1) {
|
|
2968
|
-
var
|
|
2969
|
-
|
|
2968
|
+
var h = void 0;
|
|
2969
|
+
h = u.to !== -1 ? "bytes=" + u.from.toString() + "-" + u.to.toString() : "bytes=" + u.from.toString() + "-", _.Range = h;
|
|
2970
2970
|
} else this._zeroStart && (_.Range = "bytes=0-");
|
|
2971
2971
|
return { url: l, headers: _ };
|
|
2972
2972
|
}, T.prototype.removeURLParameters = function(l) {
|
|
@@ -2979,13 +2979,13 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
2979
2979
|
return T.prototype.getConfig = function(l, u) {
|
|
2980
2980
|
var _ = l;
|
|
2981
2981
|
if (u.from !== 0 || u.to !== -1) {
|
|
2982
|
-
var
|
|
2983
|
-
_.indexOf("?") === -1 && (_ += "?",
|
|
2982
|
+
var h = !0;
|
|
2983
|
+
_.indexOf("?") === -1 && (_ += "?", h = !1), h && (_ += "&"), _ += this._startName + "=" + u.from.toString(), u.to !== -1 && (_ += "&" + this._endName + "=" + u.to.toString());
|
|
2984
2984
|
}
|
|
2985
2985
|
return { url: _, headers: {} };
|
|
2986
2986
|
}, T.prototype.removeURLParameters = function(l) {
|
|
2987
|
-
var u = l.split("?")[0], _ = void 0,
|
|
2988
|
-
|
|
2987
|
+
var u = l.split("?")[0], _ = void 0, h = l.indexOf("?");
|
|
2988
|
+
h !== -1 && (_ = l.substring(h + 1));
|
|
2989
2989
|
var P = "";
|
|
2990
2990
|
if (_ != null && _.length > 0) for (var D = _.split("&"), V = 0; V < D.length; V++) {
|
|
2991
2991
|
var ee = D[V].split("="), pe = V > 0;
|
|
@@ -3040,12 +3040,12 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3040
3040
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(T.prototype, "currentRedirectedURL", { get: function() {
|
|
3041
3041
|
return this._redirectedURL || this._dataSource.redirectedURL;
|
|
3042
3042
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(T.prototype, "currentSpeed", { get: function() {
|
|
3043
|
-
return this._loaderClass ===
|
|
3043
|
+
return this._loaderClass === le ? this._loader.currentSpeed : this._speedSampler.lastSecondKBps;
|
|
3044
3044
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(T.prototype, "loaderType", { get: function() {
|
|
3045
3045
|
return this._loader.type;
|
|
3046
3046
|
}, enumerable: !1, configurable: !0 }), T.prototype._selectSeekHandler = function() {
|
|
3047
3047
|
var l = this._config;
|
|
3048
|
-
if (l.seekType === "range") this._seekHandler = new
|
|
3048
|
+
if (l.seekType === "range") this._seekHandler = new ie(this._config.rangeLoadZeroStart);
|
|
3049
3049
|
else if (l.seekType === "param") {
|
|
3050
3050
|
var u = l.seekParamStart || "bstart", _ = l.seekParamEnd || "bend";
|
|
3051
3051
|
this._seekHandler = new y(u, _);
|
|
@@ -3056,12 +3056,12 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3056
3056
|
}
|
|
3057
3057
|
}, T.prototype._selectLoader = function() {
|
|
3058
3058
|
if (this._config.customLoader != null) this._loaderClass = this._config.customLoader;
|
|
3059
|
-
else if (this._isWebSocketURL) this._loaderClass =
|
|
3060
|
-
else if (
|
|
3059
|
+
else if (this._isWebSocketURL) this._loaderClass = X;
|
|
3060
|
+
else if (M.isSupported()) this._loaderClass = M;
|
|
3061
3061
|
else if (j.isSupported()) this._loaderClass = j;
|
|
3062
3062
|
else {
|
|
3063
|
-
if (!
|
|
3064
|
-
this._loaderClass =
|
|
3063
|
+
if (!le.isSupported()) throw new f.d("Your browser doesn't support xhr with arraybuffer responseType!");
|
|
3064
|
+
this._loaderClass = le;
|
|
3065
3065
|
}
|
|
3066
3066
|
}, T.prototype._createLoader = function() {
|
|
3067
3067
|
this._loader = new this._loaderClass(this._seekHandler, this._config), this._loader.needStashBuffer === !1 && (this._enableStash = !1), this._loader.onContentLengthKnown = this._onContentLengthKnown.bind(this), this._loader.onURLRedirect = this._onURLRedirect.bind(this), this._loader.onDataArrival = this._onLoaderChunkArrival.bind(this), this._loader.onComplete = this._onLoaderComplete.bind(this), this._loader.onError = this._onLoaderError.bind(this);
|
|
@@ -3091,17 +3091,17 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3091
3091
|
if ((u += 1048576) !== this._bufferSize) {
|
|
3092
3092
|
var _ = new ArrayBuffer(u);
|
|
3093
3093
|
if (this._stashUsed > 0) {
|
|
3094
|
-
var
|
|
3095
|
-
new Uint8Array(_, 0, u).set(
|
|
3094
|
+
var h = new Uint8Array(this._stashBuffer, 0, this._stashUsed);
|
|
3095
|
+
new Uint8Array(_, 0, u).set(h, 0);
|
|
3096
3096
|
}
|
|
3097
3097
|
this._stashBuffer = _, this._bufferSize = u;
|
|
3098
3098
|
}
|
|
3099
3099
|
}, T.prototype._normalizeSpeed = function(l) {
|
|
3100
|
-
var u = this._speedNormalizeList, _ = u.length - 1,
|
|
3100
|
+
var u = this._speedNormalizeList, _ = u.length - 1, h = 0, P = 0, D = _;
|
|
3101
3101
|
if (l < u[0]) return u[0];
|
|
3102
3102
|
for (; P <= D; ) {
|
|
3103
|
-
if ((
|
|
3104
|
-
u[
|
|
3103
|
+
if ((h = P + Math.floor((D - P) / 2)) === _ || l >= u[h] && l < u[h + 1]) return u[h];
|
|
3104
|
+
u[h] < l ? P = h + 1 : D = h - 1;
|
|
3105
3105
|
}
|
|
3106
3106
|
}, T.prototype._adjustStashSize = function(l) {
|
|
3107
3107
|
var u = 0;
|
|
@@ -3118,9 +3118,9 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3118
3118
|
if (!this._onDataArrival) throw new f.a("IOController: No existing consumer (onDataArrival) callback!");
|
|
3119
3119
|
if (!this._paused) {
|
|
3120
3120
|
this._isEarlyEofReconnecting && (this._isEarlyEofReconnecting = !1, this._onRecoveredEarlyEof && this._onRecoveredEarlyEof()), this._speedSampler.addBytes(l.byteLength);
|
|
3121
|
-
var
|
|
3122
|
-
if (
|
|
3123
|
-
var P = this._normalizeSpeed(
|
|
3121
|
+
var h = this._speedSampler.lastSecondKBps;
|
|
3122
|
+
if (h !== 0) {
|
|
3123
|
+
var P = this._normalizeSpeed(h);
|
|
3124
3124
|
this._speedNormalized !== P && (this._speedNormalized = P, this._adjustStashSize(P));
|
|
3125
3125
|
}
|
|
3126
3126
|
if (this._enableStash) if (this._stashUsed === 0 && this._stashByteStart === 0 && (this._stashByteStart = u), this._stashUsed + l.byteLength <= this._stashSize)
|
|
@@ -3144,7 +3144,7 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3144
3144
|
}
|
|
3145
3145
|
}, T.prototype._flushStashBuffer = function(l) {
|
|
3146
3146
|
if (this._stashUsed > 0) {
|
|
3147
|
-
var u = this._stashBuffer.slice(0, this._stashUsed), _ = this._dispatchChunks(u, this._stashByteStart),
|
|
3147
|
+
var u = this._stashBuffer.slice(0, this._stashUsed), _ = this._dispatchChunks(u, this._stashByteStart), h = u.byteLength - _;
|
|
3148
3148
|
if (_ < u.byteLength) {
|
|
3149
3149
|
if (!l) {
|
|
3150
3150
|
if (_ > 0) {
|
|
@@ -3153,9 +3153,9 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3153
3153
|
}
|
|
3154
3154
|
return 0;
|
|
3155
3155
|
}
|
|
3156
|
-
B.a.w(this.TAG,
|
|
3156
|
+
B.a.w(this.TAG, h + " bytes unconsumed data remain when flush buffer, dropped");
|
|
3157
3157
|
}
|
|
3158
|
-
return this._stashUsed = 0, this._stashByteStart = 0,
|
|
3158
|
+
return this._stashUsed = 0, this._stashByteStart = 0, h;
|
|
3159
3159
|
}
|
|
3160
3160
|
return 0;
|
|
3161
3161
|
}, T.prototype._onLoaderComplete = function(l, u) {
|
|
@@ -3223,21 +3223,21 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3223
3223
|
}, L.p = "/", L.oe = function(C) {
|
|
3224
3224
|
throw C;
|
|
3225
3225
|
};
|
|
3226
|
-
var
|
|
3227
|
-
return
|
|
3226
|
+
var M = L(L.s = ENTRY_MODULE);
|
|
3227
|
+
return M.default || M;
|
|
3228
3228
|
}
|
|
3229
3229
|
function B(v) {
|
|
3230
3230
|
return (v + "").replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
|
|
3231
3231
|
}
|
|
3232
3232
|
function m(v, f, L) {
|
|
3233
|
-
var
|
|
3234
|
-
|
|
3233
|
+
var M = {};
|
|
3234
|
+
M[L] = [];
|
|
3235
3235
|
var C = f.toString(), j = C.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);
|
|
3236
|
-
if (!j) return
|
|
3237
|
-
for (var H,
|
|
3238
|
-
for (ne = new RegExp("\\(" + B(
|
|
3239
|
-
for (var
|
|
3240
|
-
return
|
|
3236
|
+
if (!j) return M;
|
|
3237
|
+
for (var H, le = j[1], ne = new RegExp("(\\\\n|\\W)" + B(le) + "\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)", "g"); H = ne.exec(C); ) H[3] !== "dll-reference" && M[L].push(H[3]);
|
|
3238
|
+
for (ne = new RegExp("\\(" + B(le) + '\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)', "g"); H = ne.exec(C); ) v[H[2]] || (M[L].push(H[1]), v[H[2]] = O(H[1]).m), M[H[2]] = M[H[2]] || [], M[H[2]].push(H[4]);
|
|
3239
|
+
for (var X, ie = Object.keys(M), y = 0; y < ie.length; y++) for (var G = 0; G < M[ie[y]].length; G++) X = M[ie[y]][G], isNaN(1 * X) || (M[ie[y]][G] = 1 * M[ie[y]][G]);
|
|
3240
|
+
return M;
|
|
3241
3241
|
}
|
|
3242
3242
|
function b(v) {
|
|
3243
3243
|
return Object.keys(v).reduce(function(f, L) {
|
|
@@ -3246,31 +3246,31 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3246
3246
|
}
|
|
3247
3247
|
fe.exports = function(v, f) {
|
|
3248
3248
|
f = f || {};
|
|
3249
|
-
var L = { main: O.m },
|
|
3250
|
-
for (var
|
|
3251
|
-
var u = T[l], _ =
|
|
3249
|
+
var L = { main: O.m }, M = f.all ? { main: Object.keys(L.main) } : function(ne, X) {
|
|
3250
|
+
for (var ie = { main: [X] }, y = { main: [] }, G = { main: {} }; b(ie); ) for (var T = Object.keys(ie), l = 0; l < T.length; l++) {
|
|
3251
|
+
var u = T[l], _ = ie[u].pop();
|
|
3252
3252
|
if (G[u] = G[u] || {}, !G[u][_] && ne[u][_]) {
|
|
3253
3253
|
G[u][_] = !0, y[u] = y[u] || [], y[u].push(_);
|
|
3254
|
-
for (var
|
|
3254
|
+
for (var h = m(ne, ne[u][_], u), P = Object.keys(h), D = 0; D < P.length; D++) ie[P[D]] = ie[P[D]] || [], ie[P[D]] = ie[P[D]].concat(h[P[D]]);
|
|
3255
3255
|
}
|
|
3256
3256
|
}
|
|
3257
3257
|
return y;
|
|
3258
3258
|
}(L, v), C = "";
|
|
3259
|
-
Object.keys(
|
|
3259
|
+
Object.keys(M).filter(function(ne) {
|
|
3260
3260
|
return ne !== "main";
|
|
3261
3261
|
}).forEach(function(ne) {
|
|
3262
|
-
for (var
|
|
3263
|
-
|
|
3264
|
-
return JSON.stringify(
|
|
3262
|
+
for (var X = 0; M[ne][X]; ) X++;
|
|
3263
|
+
M[ne].push(X), L[ne][X] = "(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })", C = C + "var " + ne + " = (" + U.toString().replace("ENTRY_MODULE", JSON.stringify(X)) + ")({" + M[ne].map(function(ie) {
|
|
3264
|
+
return JSON.stringify(ie) + ": " + L[ne][ie].toString();
|
|
3265
3265
|
}).join(",") + `});
|
|
3266
3266
|
`;
|
|
3267
|
-
}), C = C + "new ((" + U.toString().replace("ENTRY_MODULE", JSON.stringify(v)) + ")({" +
|
|
3267
|
+
}), C = C + "new ((" + U.toString().replace("ENTRY_MODULE", JSON.stringify(v)) + ")({" + M.main.map(function(ne) {
|
|
3268
3268
|
return JSON.stringify(ne) + ": " + L.main[ne].toString();
|
|
3269
3269
|
}).join(",") + "}))(self);";
|
|
3270
3270
|
var j = new window.Blob([C], { type: "text/javascript" });
|
|
3271
3271
|
if (f.bare) return j;
|
|
3272
|
-
var H = (window.URL || window.webkitURL || window.mozURL || window.msURL).createObjectURL(j),
|
|
3273
|
-
return
|
|
3272
|
+
var H = (window.URL || window.webkitURL || window.mozURL || window.msURL).createObjectURL(j), le = new window.Worker(H);
|
|
3273
|
+
return le.objectURL = H, le;
|
|
3274
3274
|
};
|
|
3275
3275
|
}, function(fe, Z, O) {
|
|
3276
3276
|
fe.exports = O(19).default;
|
|
@@ -3285,70 +3285,70 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3285
3285
|
*/
|
|
3286
3286
|
var m;
|
|
3287
3287
|
m = function() {
|
|
3288
|
-
function b(
|
|
3289
|
-
return typeof
|
|
3290
|
-
}
|
|
3291
|
-
var v = Array.isArray ? Array.isArray : function(
|
|
3292
|
-
return Object.prototype.toString.call(
|
|
3293
|
-
}, f = 0, L = void 0,
|
|
3294
|
-
y[f] =
|
|
3295
|
-
}, j = typeof window < "u" ? window : void 0, H = j || {},
|
|
3296
|
-
function
|
|
3297
|
-
var
|
|
3288
|
+
function b(x) {
|
|
3289
|
+
return typeof x == "function";
|
|
3290
|
+
}
|
|
3291
|
+
var v = Array.isArray ? Array.isArray : function(x) {
|
|
3292
|
+
return Object.prototype.toString.call(x) === "[object Array]";
|
|
3293
|
+
}, f = 0, L = void 0, M = void 0, C = function(x, F) {
|
|
3294
|
+
y[f] = x, y[f + 1] = F, (f += 2) === 2 && (M ? M(G) : h());
|
|
3295
|
+
}, j = typeof window < "u" ? window : void 0, H = j || {}, le = H.MutationObserver || H.WebKitMutationObserver, ne = typeof self > "u" && U !== void 0 && {}.toString.call(U) === "[object process]", X = typeof Uint8ClampedArray < "u" && typeof importScripts < "u" && typeof MessageChannel < "u";
|
|
3296
|
+
function ie() {
|
|
3297
|
+
var x = setTimeout;
|
|
3298
3298
|
return function() {
|
|
3299
|
-
return
|
|
3299
|
+
return x(G, 1);
|
|
3300
3300
|
};
|
|
3301
3301
|
}
|
|
3302
3302
|
var y = new Array(1e3);
|
|
3303
3303
|
function G() {
|
|
3304
|
-
for (var
|
|
3304
|
+
for (var x = 0; x < f; x += 2) (0, y[x])(y[x + 1]), y[x] = void 0, y[x + 1] = void 0;
|
|
3305
3305
|
f = 0;
|
|
3306
3306
|
}
|
|
3307
|
-
var T, l, u, _,
|
|
3308
|
-
function P(
|
|
3309
|
-
var $ = this,
|
|
3310
|
-
|
|
3311
|
-
var
|
|
3312
|
-
if (
|
|
3313
|
-
var ce = arguments[
|
|
3307
|
+
var T, l, u, _, h = void 0;
|
|
3308
|
+
function P(x, F) {
|
|
3309
|
+
var $ = this, re = new this.constructor(ee);
|
|
3310
|
+
re[V] === void 0 && Se(re);
|
|
3311
|
+
var ae = $._state;
|
|
3312
|
+
if (ae) {
|
|
3313
|
+
var ce = arguments[ae - 1];
|
|
3314
3314
|
C(function() {
|
|
3315
|
-
return
|
|
3315
|
+
return oe(ae, re, ce, $._result);
|
|
3316
3316
|
});
|
|
3317
|
-
} else R($,
|
|
3318
|
-
return
|
|
3317
|
+
} else R($, re, x, F);
|
|
3318
|
+
return re;
|
|
3319
3319
|
}
|
|
3320
|
-
function D(
|
|
3321
|
-
if (
|
|
3320
|
+
function D(x) {
|
|
3321
|
+
if (x && typeof x == "object" && x.constructor === this) return x;
|
|
3322
3322
|
var F = new this(ee);
|
|
3323
|
-
return ve(F,
|
|
3323
|
+
return ve(F, x), F;
|
|
3324
3324
|
}
|
|
3325
|
-
ne ?
|
|
3325
|
+
ne ? h = function() {
|
|
3326
3326
|
return U.nextTick(G);
|
|
3327
|
-
} :
|
|
3327
|
+
} : le ? (l = 0, u = new le(G), _ = document.createTextNode(""), u.observe(_, { characterData: !0 }), h = function() {
|
|
3328
3328
|
_.data = l = ++l % 2;
|
|
3329
|
-
}) :
|
|
3329
|
+
}) : X ? ((T = new MessageChannel()).port1.onmessage = G, h = function() {
|
|
3330
3330
|
return T.port2.postMessage(0);
|
|
3331
|
-
}) :
|
|
3331
|
+
}) : h = j === void 0 ? function() {
|
|
3332
3332
|
try {
|
|
3333
|
-
var
|
|
3334
|
-
return (L =
|
|
3333
|
+
var x = Function("return this")().require("vertx");
|
|
3334
|
+
return (L = x.runOnLoop || x.runOnContext) !== void 0 ? function() {
|
|
3335
3335
|
L(G);
|
|
3336
|
-
} :
|
|
3336
|
+
} : ie();
|
|
3337
3337
|
} catch {
|
|
3338
|
-
return
|
|
3338
|
+
return ie();
|
|
3339
3339
|
}
|
|
3340
|
-
}() :
|
|
3340
|
+
}() : ie();
|
|
3341
3341
|
var V = Math.random().toString(36).substring(2);
|
|
3342
3342
|
function ee() {
|
|
3343
3343
|
}
|
|
3344
|
-
function pe(
|
|
3345
|
-
F.constructor ===
|
|
3346
|
-
|
|
3347
|
-
return ve(
|
|
3344
|
+
function pe(x, F, $) {
|
|
3345
|
+
F.constructor === x.constructor && $ === P && F.constructor.resolve === D ? function(re, ae) {
|
|
3346
|
+
ae._state === 1 ? d(re, ae._result) : ae._state === 2 ? c(re, ae._result) : R(ae, void 0, function(ce) {
|
|
3347
|
+
return ve(re, ce);
|
|
3348
3348
|
}, function(ce) {
|
|
3349
|
-
return
|
|
3349
|
+
return c(re, ce);
|
|
3350
3350
|
});
|
|
3351
|
-
}(
|
|
3351
|
+
}(x, F) : $ === void 0 ? d(x, F) : b($) ? function(re, ae, ce) {
|
|
3352
3352
|
C(function(we) {
|
|
3353
3353
|
var Ee = !1, Oe = function(Be, $e, Qe, et) {
|
|
3354
3354
|
try {
|
|
@@ -3356,74 +3356,74 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3356
3356
|
} catch (tt) {
|
|
3357
3357
|
return tt;
|
|
3358
3358
|
}
|
|
3359
|
-
}(ce,
|
|
3360
|
-
Ee || (Ee = !0,
|
|
3359
|
+
}(ce, ae, function(Be) {
|
|
3360
|
+
Ee || (Ee = !0, ae !== Be ? ve(we, Be) : d(we, Be));
|
|
3361
3361
|
}, function(Be) {
|
|
3362
|
-
Ee || (Ee = !0,
|
|
3362
|
+
Ee || (Ee = !0, c(we, Be));
|
|
3363
3363
|
}, we._label);
|
|
3364
|
-
!Ee && Oe && (Ee = !0,
|
|
3365
|
-
},
|
|
3366
|
-
}(
|
|
3364
|
+
!Ee && Oe && (Ee = !0, c(we, Oe));
|
|
3365
|
+
}, re);
|
|
3366
|
+
}(x, F, $) : d(x, F);
|
|
3367
3367
|
}
|
|
3368
|
-
function ve(
|
|
3369
|
-
if (
|
|
3370
|
-
else if (
|
|
3368
|
+
function ve(x, F) {
|
|
3369
|
+
if (x === F) c(x, new TypeError("You cannot resolve a promise with itself"));
|
|
3370
|
+
else if (ae = typeof (re = F), re === null || ae !== "object" && ae !== "function") d(x, F);
|
|
3371
3371
|
else {
|
|
3372
3372
|
var $ = void 0;
|
|
3373
3373
|
try {
|
|
3374
3374
|
$ = F.then;
|
|
3375
3375
|
} catch (ce) {
|
|
3376
|
-
return void
|
|
3376
|
+
return void c(x, ce);
|
|
3377
3377
|
}
|
|
3378
|
-
pe(
|
|
3378
|
+
pe(x, F, $);
|
|
3379
3379
|
}
|
|
3380
|
-
var
|
|
3380
|
+
var re, ae;
|
|
3381
3381
|
}
|
|
3382
|
-
function k(
|
|
3383
|
-
|
|
3382
|
+
function k(x) {
|
|
3383
|
+
x._onerror && x._onerror(x._result), Y(x);
|
|
3384
3384
|
}
|
|
3385
|
-
function d(
|
|
3386
|
-
|
|
3385
|
+
function d(x, F) {
|
|
3386
|
+
x._state === void 0 && (x._result = F, x._state = 1, x._subscribers.length !== 0 && C(Y, x));
|
|
3387
3387
|
}
|
|
3388
|
-
function
|
|
3389
|
-
|
|
3388
|
+
function c(x, F) {
|
|
3389
|
+
x._state === void 0 && (x._state = 2, x._result = F, C(k, x));
|
|
3390
3390
|
}
|
|
3391
|
-
function R(
|
|
3392
|
-
var
|
|
3393
|
-
|
|
3391
|
+
function R(x, F, $, re) {
|
|
3392
|
+
var ae = x._subscribers, ce = ae.length;
|
|
3393
|
+
x._onerror = null, ae[ce] = F, ae[ce + 1] = $, ae[ce + 2] = re, ce === 0 && x._state && C(Y, x);
|
|
3394
3394
|
}
|
|
3395
|
-
function
|
|
3396
|
-
var F =
|
|
3395
|
+
function Y(x) {
|
|
3396
|
+
var F = x._subscribers, $ = x._state;
|
|
3397
3397
|
if (F.length !== 0) {
|
|
3398
|
-
for (var
|
|
3399
|
-
|
|
3398
|
+
for (var re = void 0, ae = void 0, ce = x._result, we = 0; we < F.length; we += 3) re = F[we], ae = F[we + $], re ? oe($, re, ae, ce) : ae(ce);
|
|
3399
|
+
x._subscribers.length = 0;
|
|
3400
3400
|
}
|
|
3401
3401
|
}
|
|
3402
|
-
function
|
|
3403
|
-
var
|
|
3404
|
-
if (
|
|
3402
|
+
function oe(x, F, $, re) {
|
|
3403
|
+
var ae = b($), ce = void 0, we = void 0, Ee = !0;
|
|
3404
|
+
if (ae) {
|
|
3405
3405
|
try {
|
|
3406
|
-
ce = $(
|
|
3406
|
+
ce = $(re);
|
|
3407
3407
|
} catch (Oe) {
|
|
3408
3408
|
Ee = !1, we = Oe;
|
|
3409
3409
|
}
|
|
3410
|
-
if (F === ce) return void
|
|
3411
|
-
} else ce =
|
|
3412
|
-
F._state !== void 0 || (
|
|
3410
|
+
if (F === ce) return void c(F, new TypeError("A promises callback cannot return that same promise."));
|
|
3411
|
+
} else ce = re;
|
|
3412
|
+
F._state !== void 0 || (ae && Ee ? ve(F, ce) : Ee === !1 ? c(F, we) : x === 1 ? d(F, ce) : x === 2 && c(F, ce));
|
|
3413
3413
|
}
|
|
3414
3414
|
var me = 0;
|
|
3415
|
-
function Se(
|
|
3416
|
-
|
|
3415
|
+
function Se(x) {
|
|
3416
|
+
x[V] = me++, x._state = void 0, x._result = void 0, x._subscribers = [];
|
|
3417
3417
|
}
|
|
3418
3418
|
var De = function() {
|
|
3419
|
-
function
|
|
3420
|
-
this._instanceConstructor = F, this.promise = new F(ee), this.promise[V] || Se(this.promise), v($) ? (this.length = $.length, this._remaining = $.length, this._result = new Array(this.length), this.length === 0 ? d(this.promise, this._result) : (this.length = this.length || 0, this._enumerate($), this._remaining === 0 && d(this.promise, this._result))) :
|
|
3419
|
+
function x(F, $) {
|
|
3420
|
+
this._instanceConstructor = F, this.promise = new F(ee), this.promise[V] || Se(this.promise), v($) ? (this.length = $.length, this._remaining = $.length, this._result = new Array(this.length), this.length === 0 ? d(this.promise, this._result) : (this.length = this.length || 0, this._enumerate($), this._remaining === 0 && d(this.promise, this._result))) : c(this.promise, new Error("Array Methods must be provided an Array"));
|
|
3421
3421
|
}
|
|
3422
|
-
return
|
|
3422
|
+
return x.prototype._enumerate = function(F) {
|
|
3423
3423
|
for (var $ = 0; this._state === void 0 && $ < F.length; $++) this._eachEntry(F[$], $);
|
|
3424
|
-
},
|
|
3425
|
-
var
|
|
3426
|
-
if (
|
|
3424
|
+
}, x.prototype._eachEntry = function(F, $) {
|
|
3425
|
+
var re = this._instanceConstructor, ae = re.resolve;
|
|
3426
|
+
if (ae === D) {
|
|
3427
3427
|
var ce = void 0, we = void 0, Ee = !1;
|
|
3428
3428
|
try {
|
|
3429
3429
|
ce = F.then;
|
|
@@ -3432,83 +3432,83 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3432
3432
|
}
|
|
3433
3433
|
if (ce === P && F._state !== void 0) this._settledAt(F._state, $, F._result);
|
|
3434
3434
|
else if (typeof ce != "function") this._remaining--, this._result[$] = F;
|
|
3435
|
-
else if (
|
|
3436
|
-
var Oe = new
|
|
3437
|
-
Ee ?
|
|
3438
|
-
} else this._willSettleAt(new
|
|
3435
|
+
else if (re === Te) {
|
|
3436
|
+
var Oe = new re(ee);
|
|
3437
|
+
Ee ? c(Oe, we) : pe(Oe, F, ce), this._willSettleAt(Oe, $);
|
|
3438
|
+
} else this._willSettleAt(new re(function(Be) {
|
|
3439
3439
|
return Be(F);
|
|
3440
3440
|
}), $);
|
|
3441
|
-
} else this._willSettleAt(
|
|
3442
|
-
},
|
|
3443
|
-
var
|
|
3444
|
-
|
|
3445
|
-
},
|
|
3446
|
-
var
|
|
3447
|
-
R(F, void 0, function(
|
|
3448
|
-
return
|
|
3449
|
-
}, function(
|
|
3450
|
-
return
|
|
3441
|
+
} else this._willSettleAt(ae(F), $);
|
|
3442
|
+
}, x.prototype._settledAt = function(F, $, re) {
|
|
3443
|
+
var ae = this.promise;
|
|
3444
|
+
ae._state === void 0 && (this._remaining--, F === 2 ? c(ae, re) : this._result[$] = re), this._remaining === 0 && d(ae, this._result);
|
|
3445
|
+
}, x.prototype._willSettleAt = function(F, $) {
|
|
3446
|
+
var re = this;
|
|
3447
|
+
R(F, void 0, function(ae) {
|
|
3448
|
+
return re._settledAt(1, $, ae);
|
|
3449
|
+
}, function(ae) {
|
|
3450
|
+
return re._settledAt(2, $, ae);
|
|
3451
3451
|
});
|
|
3452
|
-
},
|
|
3452
|
+
}, x;
|
|
3453
3453
|
}(), Te = function() {
|
|
3454
|
-
function
|
|
3454
|
+
function x(F) {
|
|
3455
3455
|
this[V] = me++, this._result = this._state = void 0, this._subscribers = [], ee !== F && (typeof F != "function" && function() {
|
|
3456
3456
|
throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");
|
|
3457
|
-
}(), this instanceof
|
|
3457
|
+
}(), this instanceof x ? function($, re) {
|
|
3458
3458
|
try {
|
|
3459
|
-
|
|
3460
|
-
ve($,
|
|
3461
|
-
}, function(
|
|
3462
|
-
|
|
3459
|
+
re(function(ae) {
|
|
3460
|
+
ve($, ae);
|
|
3461
|
+
}, function(ae) {
|
|
3462
|
+
c($, ae);
|
|
3463
3463
|
});
|
|
3464
|
-
} catch (
|
|
3465
|
-
|
|
3464
|
+
} catch (ae) {
|
|
3465
|
+
c($, ae);
|
|
3466
3466
|
}
|
|
3467
3467
|
}(this, F) : function() {
|
|
3468
3468
|
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
|
|
3469
3469
|
}());
|
|
3470
3470
|
}
|
|
3471
|
-
return
|
|
3471
|
+
return x.prototype.catch = function(F) {
|
|
3472
3472
|
return this.then(null, F);
|
|
3473
|
-
},
|
|
3473
|
+
}, x.prototype.finally = function(F) {
|
|
3474
3474
|
var $ = this.constructor;
|
|
3475
|
-
return b(F) ? this.then(function(
|
|
3475
|
+
return b(F) ? this.then(function(re) {
|
|
3476
3476
|
return $.resolve(F()).then(function() {
|
|
3477
|
-
return
|
|
3477
|
+
return re;
|
|
3478
3478
|
});
|
|
3479
|
-
}, function(
|
|
3479
|
+
}, function(re) {
|
|
3480
3480
|
return $.resolve(F()).then(function() {
|
|
3481
|
-
throw
|
|
3481
|
+
throw re;
|
|
3482
3482
|
});
|
|
3483
3483
|
}) : this.then(F, F);
|
|
3484
|
-
},
|
|
3484
|
+
}, x;
|
|
3485
3485
|
}();
|
|
3486
|
-
return Te.prototype.then = P, Te.all = function(
|
|
3487
|
-
return new De(this,
|
|
3488
|
-
}, Te.race = function(
|
|
3486
|
+
return Te.prototype.then = P, Te.all = function(x) {
|
|
3487
|
+
return new De(this, x).promise;
|
|
3488
|
+
}, Te.race = function(x) {
|
|
3489
3489
|
var F = this;
|
|
3490
|
-
return v(
|
|
3491
|
-
for (var
|
|
3492
|
-
}) : new F(function($,
|
|
3493
|
-
return
|
|
3490
|
+
return v(x) ? new F(function($, re) {
|
|
3491
|
+
for (var ae = x.length, ce = 0; ce < ae; ce++) F.resolve(x[ce]).then($, re);
|
|
3492
|
+
}) : new F(function($, re) {
|
|
3493
|
+
return re(new TypeError("You must pass an array to race."));
|
|
3494
3494
|
});
|
|
3495
|
-
}, Te.resolve = D, Te.reject = function(
|
|
3495
|
+
}, Te.resolve = D, Te.reject = function(x) {
|
|
3496
3496
|
var F = new this(ee);
|
|
3497
|
-
return
|
|
3498
|
-
}, Te._setScheduler = function(
|
|
3499
|
-
|
|
3500
|
-
}, Te._setAsap = function(
|
|
3501
|
-
C =
|
|
3497
|
+
return c(F, x), F;
|
|
3498
|
+
}, Te._setScheduler = function(x) {
|
|
3499
|
+
M = x;
|
|
3500
|
+
}, Te._setAsap = function(x) {
|
|
3501
|
+
C = x;
|
|
3502
3502
|
}, Te._asap = C, Te.polyfill = function() {
|
|
3503
|
-
var
|
|
3504
|
-
if (B !== void 0)
|
|
3505
|
-
else if (typeof self < "u")
|
|
3503
|
+
var x = void 0;
|
|
3504
|
+
if (B !== void 0) x = B;
|
|
3505
|
+
else if (typeof self < "u") x = self;
|
|
3506
3506
|
else try {
|
|
3507
|
-
|
|
3507
|
+
x = Function("return this")();
|
|
3508
3508
|
} catch {
|
|
3509
3509
|
throw new Error("polyfill failed because global object is unavailable in this environment");
|
|
3510
3510
|
}
|
|
3511
|
-
var F =
|
|
3511
|
+
var F = x.Promise;
|
|
3512
3512
|
if (F) {
|
|
3513
3513
|
var $ = null;
|
|
3514
3514
|
try {
|
|
@@ -3517,7 +3517,7 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3517
3517
|
}
|
|
3518
3518
|
if ($ === "[object Promise]" && !F.cast) return;
|
|
3519
3519
|
}
|
|
3520
|
-
|
|
3520
|
+
x.Promise = Te;
|
|
3521
3521
|
}, Te.Promise = Te, Te;
|
|
3522
3522
|
}, fe.exports = m();
|
|
3523
3523
|
}).call(this, O(16), O(17));
|
|
@@ -3529,16 +3529,16 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3529
3529
|
function b() {
|
|
3530
3530
|
throw new Error("clearTimeout has not been defined");
|
|
3531
3531
|
}
|
|
3532
|
-
function v(
|
|
3533
|
-
if (O === setTimeout) return setTimeout(
|
|
3534
|
-
if ((O === m || !O) && setTimeout) return O = setTimeout, setTimeout(
|
|
3532
|
+
function v(X) {
|
|
3533
|
+
if (O === setTimeout) return setTimeout(X, 0);
|
|
3534
|
+
if ((O === m || !O) && setTimeout) return O = setTimeout, setTimeout(X, 0);
|
|
3535
3535
|
try {
|
|
3536
|
-
return O(
|
|
3536
|
+
return O(X, 0);
|
|
3537
3537
|
} catch {
|
|
3538
3538
|
try {
|
|
3539
|
-
return O.call(null,
|
|
3539
|
+
return O.call(null, X, 0);
|
|
3540
3540
|
} catch {
|
|
3541
|
-
return O.call(this,
|
|
3541
|
+
return O.call(this, X, 0);
|
|
3542
3542
|
}
|
|
3543
3543
|
}
|
|
3544
3544
|
}
|
|
@@ -3554,19 +3554,19 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3554
3554
|
U = b;
|
|
3555
3555
|
}
|
|
3556
3556
|
})();
|
|
3557
|
-
var f, L = [],
|
|
3557
|
+
var f, L = [], M = !1, C = -1;
|
|
3558
3558
|
function j() {
|
|
3559
|
-
|
|
3559
|
+
M && f && (M = !1, f.length ? L = f.concat(L) : C = -1, L.length && H());
|
|
3560
3560
|
}
|
|
3561
3561
|
function H() {
|
|
3562
|
-
if (!
|
|
3563
|
-
var
|
|
3564
|
-
|
|
3565
|
-
for (var
|
|
3566
|
-
for (f = L, L = []; ++C <
|
|
3567
|
-
C = -1,
|
|
3568
|
-
}
|
|
3569
|
-
f = null,
|
|
3562
|
+
if (!M) {
|
|
3563
|
+
var X = v(j);
|
|
3564
|
+
M = !0;
|
|
3565
|
+
for (var ie = L.length; ie; ) {
|
|
3566
|
+
for (f = L, L = []; ++C < ie; ) f && f[C].run();
|
|
3567
|
+
C = -1, ie = L.length;
|
|
3568
|
+
}
|
|
3569
|
+
f = null, M = !1, function(y) {
|
|
3570
3570
|
if (U === clearTimeout) return clearTimeout(y);
|
|
3571
3571
|
if ((U === b || !U) && clearTimeout) return U = clearTimeout, clearTimeout(y);
|
|
3572
3572
|
try {
|
|
@@ -3578,27 +3578,27 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3578
3578
|
return U.call(this, y);
|
|
3579
3579
|
}
|
|
3580
3580
|
}
|
|
3581
|
-
}(
|
|
3581
|
+
}(X);
|
|
3582
3582
|
}
|
|
3583
3583
|
}
|
|
3584
|
-
function
|
|
3585
|
-
this.fun =
|
|
3584
|
+
function le(X, ie) {
|
|
3585
|
+
this.fun = X, this.array = ie;
|
|
3586
3586
|
}
|
|
3587
3587
|
function ne() {
|
|
3588
3588
|
}
|
|
3589
|
-
B.nextTick = function(
|
|
3590
|
-
var
|
|
3591
|
-
if (arguments.length > 1) for (var y = 1; y < arguments.length; y++)
|
|
3592
|
-
L.push(new
|
|
3593
|
-
},
|
|
3589
|
+
B.nextTick = function(X) {
|
|
3590
|
+
var ie = new Array(arguments.length - 1);
|
|
3591
|
+
if (arguments.length > 1) for (var y = 1; y < arguments.length; y++) ie[y - 1] = arguments[y];
|
|
3592
|
+
L.push(new le(X, ie)), L.length !== 1 || M || v(H);
|
|
3593
|
+
}, le.prototype.run = function() {
|
|
3594
3594
|
this.fun.apply(null, this.array);
|
|
3595
|
-
}, B.title = "browser", B.browser = !0, B.env = {}, B.argv = [], B.version = "", B.versions = {}, B.on = ne, B.addListener = ne, B.once = ne, B.off = ne, B.removeListener = ne, B.removeAllListeners = ne, B.emit = ne, B.prependListener = ne, B.prependOnceListener = ne, B.listeners = function(
|
|
3595
|
+
}, B.title = "browser", B.browser = !0, B.env = {}, B.argv = [], B.version = "", B.versions = {}, B.on = ne, B.addListener = ne, B.once = ne, B.off = ne, B.removeListener = ne, B.removeAllListeners = ne, B.emit = ne, B.prependListener = ne, B.prependOnceListener = ne, B.listeners = function(X) {
|
|
3596
3596
|
return [];
|
|
3597
|
-
}, B.binding = function(
|
|
3597
|
+
}, B.binding = function(X) {
|
|
3598
3598
|
throw new Error("process.binding is not supported");
|
|
3599
3599
|
}, B.cwd = function() {
|
|
3600
3600
|
return "/";
|
|
3601
|
-
}, B.chdir = function(
|
|
3601
|
+
}, B.chdir = function(X) {
|
|
3602
3602
|
throw new Error("process.chdir is not supported");
|
|
3603
3603
|
}, B.umask = function() {
|
|
3604
3604
|
return 0;
|
|
@@ -3621,7 +3621,7 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3621
3621
|
var f = null, L = (function(D, V) {
|
|
3622
3622
|
v.postMessage({ msg: "logcat_callback", data: { type: D, logcat: V } });
|
|
3623
3623
|
}).bind(this);
|
|
3624
|
-
function
|
|
3624
|
+
function M(D, V) {
|
|
3625
3625
|
var ee = { msg: b.a.INIT_SEGMENT, data: { type: D, data: V } };
|
|
3626
3626
|
v.postMessage(ee, [V.data]);
|
|
3627
3627
|
}
|
|
@@ -3637,7 +3637,7 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3637
3637
|
var D = { msg: b.a.RECOVERED_EARLY_EOF };
|
|
3638
3638
|
v.postMessage(D);
|
|
3639
3639
|
}
|
|
3640
|
-
function
|
|
3640
|
+
function le(D) {
|
|
3641
3641
|
var V = { msg: b.a.MEDIA_INFO, data: D };
|
|
3642
3642
|
v.postMessage(V);
|
|
3643
3643
|
}
|
|
@@ -3645,11 +3645,11 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3645
3645
|
var V = { msg: b.a.METADATA_ARRIVED, data: D };
|
|
3646
3646
|
v.postMessage(V);
|
|
3647
3647
|
}
|
|
3648
|
-
function
|
|
3648
|
+
function X(D) {
|
|
3649
3649
|
var V = { msg: b.a.SCRIPTDATA_ARRIVED, data: D };
|
|
3650
3650
|
v.postMessage(V);
|
|
3651
3651
|
}
|
|
3652
|
-
function
|
|
3652
|
+
function ie(D) {
|
|
3653
3653
|
var V = { msg: b.a.TIMED_ID3_METADATA_ARRIVED, data: D };
|
|
3654
3654
|
v.postMessage(V);
|
|
3655
3655
|
}
|
|
@@ -3676,7 +3676,7 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3676
3676
|
function _(D, V) {
|
|
3677
3677
|
v.postMessage({ msg: b.a.IO_ERROR, data: { type: D, info: V } });
|
|
3678
3678
|
}
|
|
3679
|
-
function
|
|
3679
|
+
function h(D, V) {
|
|
3680
3680
|
v.postMessage({ msg: b.a.DEMUX_ERROR, data: { type: D, info: V } });
|
|
3681
3681
|
}
|
|
3682
3682
|
function P(D) {
|
|
@@ -3685,7 +3685,7 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3685
3685
|
B.a.install(), v.addEventListener("message", function(D) {
|
|
3686
3686
|
switch (D.data.cmd) {
|
|
3687
3687
|
case "init":
|
|
3688
|
-
(f = new m.a(D.data.param[0], D.data.param[1])).on(b.a.IO_ERROR, _.bind(this)), f.on(b.a.DEMUX_ERROR,
|
|
3688
|
+
(f = new m.a(D.data.param[0], D.data.param[1])).on(b.a.IO_ERROR, _.bind(this)), f.on(b.a.DEMUX_ERROR, h.bind(this)), f.on(b.a.INIT_SEGMENT, M.bind(this)), f.on(b.a.MEDIA_SEGMENT, C.bind(this)), f.on(b.a.LOADING_COMPLETE, j.bind(this)), f.on(b.a.RECOVERED_EARLY_EOF, H.bind(this)), f.on(b.a.MEDIA_INFO, le.bind(this)), f.on(b.a.METADATA_ARRIVED, ne.bind(this)), f.on(b.a.SCRIPTDATA_ARRIVED, X.bind(this)), f.on(b.a.TIMED_ID3_METADATA_ARRIVED, ie.bind(this)), f.on(b.a.SMPTE2038_METADATA_ARRIVED, y.bind(this)), f.on(b.a.SCTE35_METADATA_ARRIVED, G.bind(this)), f.on(b.a.PES_PRIVATE_DATA_DESCRIPTOR, T.bind(this)), f.on(b.a.PES_PRIVATE_DATA_ARRIVED, l.bind(this)), f.on(b.a.STATISTICS_INFO, u.bind(this)), f.on(b.a.RECOMMEND_SEEKPOINT, P.bind(this));
|
|
3689
3689
|
break;
|
|
3690
3690
|
case "destroy":
|
|
3691
3691
|
f && (f.destroy(), f = null), v.postMessage({ msg: "destroyed" });
|
|
@@ -3725,38 +3725,38 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3725
3725
|
}, k.supportMSEH265Playback = function() {
|
|
3726
3726
|
return window.MediaSource && window.MediaSource.isTypeSupported('video/mp4; codecs="hvc1.1.6.L93.B0"');
|
|
3727
3727
|
}, k.supportNetworkStreamIO = function() {
|
|
3728
|
-
var d = new B.a({}, b()),
|
|
3729
|
-
return d.destroy(),
|
|
3728
|
+
var d = new B.a({}, b()), c = d.loaderType;
|
|
3729
|
+
return d.destroy(), c == "fetch-stream-loader" || c == "xhr-moz-chunked-loader";
|
|
3730
3730
|
}, k.getNetworkLoaderTypeName = function() {
|
|
3731
|
-
var d = new B.a({}, b()),
|
|
3732
|
-
return d.destroy(),
|
|
3731
|
+
var d = new B.a({}, b()), c = d.loaderType;
|
|
3732
|
+
return d.destroy(), c;
|
|
3733
3733
|
}, k.supportNativeMediaPlayback = function(d) {
|
|
3734
3734
|
k.videoElement == null && (k.videoElement = window.document.createElement("video"));
|
|
3735
|
-
var
|
|
3736
|
-
return
|
|
3735
|
+
var c = k.videoElement.canPlayType(d);
|
|
3736
|
+
return c === "probably" || c == "maybe";
|
|
3737
3737
|
}, k.getFeatureList = function() {
|
|
3738
3738
|
var d = { msePlayback: !1, mseLivePlayback: !1, mseH265Playback: !1, networkStreamIO: !1, networkLoaderName: "", nativeMP4H264Playback: !1, nativeMP4H265Playback: !1, nativeWebmVP8Playback: !1, nativeWebmVP9Playback: !1 };
|
|
3739
3739
|
return d.msePlayback = k.supportMSEH264Playback(), d.networkStreamIO = k.supportNetworkStreamIO(), d.networkLoaderName = k.getNetworkLoaderTypeName(), d.mseLivePlayback = d.msePlayback && d.networkStreamIO, d.mseH265Playback = k.supportMSEH265Playback(), d.nativeMP4H264Playback = k.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'), d.nativeMP4H265Playback = k.supportNativeMediaPlayback('video/mp4; codecs="hvc1.1.6.L93.B0"'), d.nativeWebmVP8Playback = k.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'), d.nativeWebmVP9Playback = k.supportNativeMediaPlayback('video/webm; codecs="vp9"'), d;
|
|
3740
3740
|
}, k;
|
|
3741
|
-
}(), f = O(2), L = O(6),
|
|
3742
|
-
function k(d,
|
|
3743
|
-
if (this.TAG = "Transmuxer", this._emitter = new
|
|
3744
|
-
this._worker = ne()(18), this._workerDestroying = !1, this._worker.addEventListener("message", this._onWorkerMessage.bind(this)), this._worker.postMessage({ cmd: "init", param: [d,
|
|
3741
|
+
}(), f = O(2), L = O(6), M = O.n(L), C = O(0), j = O(4), H = { ERROR: "error", LOADING_COMPLETE: "loading_complete", RECOVERED_EARLY_EOF: "recovered_early_eof", MEDIA_INFO: "media_info", METADATA_ARRIVED: "metadata_arrived", SCRIPTDATA_ARRIVED: "scriptdata_arrived", TIMED_ID3_METADATA_ARRIVED: "timed_id3_metadata_arrived", SMPTE2038_METADATA_ARRIVED: "smpte2038_metadata_arrived", SCTE35_METADATA_ARRIVED: "scte35_metadata_arrived", PES_PRIVATE_DATA_DESCRIPTOR: "pes_private_data_descriptor", PES_PRIVATE_DATA_ARRIVED: "pes_private_data_arrived", STATISTICS_INFO: "statistics_info" }, le = O(13), ne = O.n(le), X = O(9), ie = O(10), y = O(1), G = O(8), T = function() {
|
|
3742
|
+
function k(d, c) {
|
|
3743
|
+
if (this.TAG = "Transmuxer", this._emitter = new M.a(), c.enableWorker && typeof Worker < "u") try {
|
|
3744
|
+
this._worker = ne()(18), this._workerDestroying = !1, this._worker.addEventListener("message", this._onWorkerMessage.bind(this)), this._worker.postMessage({ cmd: "init", param: [d, c] }), this.e = { onLoggingConfigChanged: this._onLoggingConfigChanged.bind(this) }, X.a.registerListener(this.e.onLoggingConfigChanged), this._worker.postMessage({ cmd: "logging_config", param: X.a.getConfig() });
|
|
3745
3745
|
} catch {
|
|
3746
|
-
C.a.e(this.TAG, "Error while initialize transmuxing worker, fallback to inline transmuxing"), this._worker = null, this._controller = new
|
|
3746
|
+
C.a.e(this.TAG, "Error while initialize transmuxing worker, fallback to inline transmuxing"), this._worker = null, this._controller = new ie.a(d, c);
|
|
3747
3747
|
}
|
|
3748
|
-
else this._controller = new
|
|
3748
|
+
else this._controller = new ie.a(d, c);
|
|
3749
3749
|
if (this._controller) {
|
|
3750
3750
|
var R = this._controller;
|
|
3751
3751
|
R.on(y.a.IO_ERROR, this._onIOError.bind(this)), R.on(y.a.DEMUX_ERROR, this._onDemuxError.bind(this)), R.on(y.a.INIT_SEGMENT, this._onInitSegment.bind(this)), R.on(y.a.MEDIA_SEGMENT, this._onMediaSegment.bind(this)), R.on(y.a.LOADING_COMPLETE, this._onLoadingComplete.bind(this)), R.on(y.a.RECOVERED_EARLY_EOF, this._onRecoveredEarlyEof.bind(this)), R.on(y.a.MEDIA_INFO, this._onMediaInfo.bind(this)), R.on(y.a.METADATA_ARRIVED, this._onMetaDataArrived.bind(this)), R.on(y.a.SCRIPTDATA_ARRIVED, this._onScriptDataArrived.bind(this)), R.on(y.a.TIMED_ID3_METADATA_ARRIVED, this._onTimedID3MetadataArrived.bind(this)), R.on(y.a.SMPTE2038_METADATA_ARRIVED, this._onSMPTE2038MetadataArrived.bind(this)), R.on(y.a.SCTE35_METADATA_ARRIVED, this._onSCTE35MetadataArrived.bind(this)), R.on(y.a.PES_PRIVATE_DATA_DESCRIPTOR, this._onPESPrivateDataDescriptor.bind(this)), R.on(y.a.PES_PRIVATE_DATA_ARRIVED, this._onPESPrivateDataArrived.bind(this)), R.on(y.a.STATISTICS_INFO, this._onStatisticsInfo.bind(this)), R.on(y.a.RECOMMEND_SEEKPOINT, this._onRecommendSeekpoint.bind(this));
|
|
3752
3752
|
}
|
|
3753
3753
|
}
|
|
3754
3754
|
return k.prototype.destroy = function() {
|
|
3755
|
-
this._worker ? this._workerDestroying || (this._workerDestroying = !0, this._worker.postMessage({ cmd: "destroy" }),
|
|
3756
|
-
}, k.prototype.on = function(d,
|
|
3757
|
-
this._emitter.addListener(d,
|
|
3758
|
-
}, k.prototype.off = function(d,
|
|
3759
|
-
this._emitter.removeListener(d,
|
|
3755
|
+
this._worker ? this._workerDestroying || (this._workerDestroying = !0, this._worker.postMessage({ cmd: "destroy" }), X.a.removeListener(this.e.onLoggingConfigChanged), this.e = null) : (this._controller.destroy(), this._controller = null), this._emitter.removeAllListeners(), this._emitter = null;
|
|
3756
|
+
}, k.prototype.on = function(d, c) {
|
|
3757
|
+
this._emitter.addListener(d, c);
|
|
3758
|
+
}, k.prototype.off = function(d, c) {
|
|
3759
|
+
this._emitter.removeListener(d, c);
|
|
3760
3760
|
}, k.prototype.hasWorker = function() {
|
|
3761
3761
|
return this._worker != null;
|
|
3762
3762
|
}, k.prototype.open = function() {
|
|
@@ -3769,15 +3769,15 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3769
3769
|
this._worker ? this._worker.postMessage({ cmd: "pause" }) : this._controller.pause();
|
|
3770
3770
|
}, k.prototype.resume = function() {
|
|
3771
3771
|
this._worker ? this._worker.postMessage({ cmd: "resume" }) : this._controller.resume();
|
|
3772
|
-
}, k.prototype._onInitSegment = function(d,
|
|
3772
|
+
}, k.prototype._onInitSegment = function(d, c) {
|
|
3773
3773
|
var R = this;
|
|
3774
3774
|
Promise.resolve().then(function() {
|
|
3775
|
-
R._emitter.emit(y.a.INIT_SEGMENT, d,
|
|
3775
|
+
R._emitter.emit(y.a.INIT_SEGMENT, d, c);
|
|
3776
3776
|
});
|
|
3777
|
-
}, k.prototype._onMediaSegment = function(d,
|
|
3777
|
+
}, k.prototype._onMediaSegment = function(d, c) {
|
|
3778
3778
|
var R = this;
|
|
3779
3779
|
Promise.resolve().then(function() {
|
|
3780
|
-
R._emitter.emit(y.a.MEDIA_SEGMENT, d,
|
|
3780
|
+
R._emitter.emit(y.a.MEDIA_SEGMENT, d, c);
|
|
3781
3781
|
});
|
|
3782
3782
|
}, k.prototype._onLoadingComplete = function() {
|
|
3783
3783
|
var d = this;
|
|
@@ -3790,81 +3790,81 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3790
3790
|
d._emitter.emit(y.a.RECOVERED_EARLY_EOF);
|
|
3791
3791
|
});
|
|
3792
3792
|
}, k.prototype._onMediaInfo = function(d) {
|
|
3793
|
-
var
|
|
3793
|
+
var c = this;
|
|
3794
3794
|
Promise.resolve().then(function() {
|
|
3795
|
-
|
|
3795
|
+
c._emitter.emit(y.a.MEDIA_INFO, d);
|
|
3796
3796
|
});
|
|
3797
3797
|
}, k.prototype._onMetaDataArrived = function(d) {
|
|
3798
|
-
var
|
|
3798
|
+
var c = this;
|
|
3799
3799
|
Promise.resolve().then(function() {
|
|
3800
|
-
|
|
3800
|
+
c._emitter.emit(y.a.METADATA_ARRIVED, d);
|
|
3801
3801
|
});
|
|
3802
3802
|
}, k.prototype._onScriptDataArrived = function(d) {
|
|
3803
|
-
var
|
|
3803
|
+
var c = this;
|
|
3804
3804
|
Promise.resolve().then(function() {
|
|
3805
|
-
|
|
3805
|
+
c._emitter.emit(y.a.SCRIPTDATA_ARRIVED, d);
|
|
3806
3806
|
});
|
|
3807
3807
|
}, k.prototype._onTimedID3MetadataArrived = function(d) {
|
|
3808
|
-
var
|
|
3808
|
+
var c = this;
|
|
3809
3809
|
Promise.resolve().then(function() {
|
|
3810
|
-
|
|
3810
|
+
c._emitter.emit(y.a.TIMED_ID3_METADATA_ARRIVED, d);
|
|
3811
3811
|
});
|
|
3812
3812
|
}, k.prototype._onSMPTE2038MetadataArrived = function(d) {
|
|
3813
|
-
var
|
|
3813
|
+
var c = this;
|
|
3814
3814
|
Promise.resolve().then(function() {
|
|
3815
|
-
|
|
3815
|
+
c._emitter.emit(y.a.SMPTE2038_METADATA_ARRIVED, d);
|
|
3816
3816
|
});
|
|
3817
3817
|
}, k.prototype._onSCTE35MetadataArrived = function(d) {
|
|
3818
|
-
var
|
|
3818
|
+
var c = this;
|
|
3819
3819
|
Promise.resolve().then(function() {
|
|
3820
|
-
|
|
3820
|
+
c._emitter.emit(y.a.SCTE35_METADATA_ARRIVED, d);
|
|
3821
3821
|
});
|
|
3822
3822
|
}, k.prototype._onPESPrivateDataDescriptor = function(d) {
|
|
3823
|
-
var
|
|
3823
|
+
var c = this;
|
|
3824
3824
|
Promise.resolve().then(function() {
|
|
3825
|
-
|
|
3825
|
+
c._emitter.emit(y.a.PES_PRIVATE_DATA_DESCRIPTOR, d);
|
|
3826
3826
|
});
|
|
3827
3827
|
}, k.prototype._onPESPrivateDataArrived = function(d) {
|
|
3828
|
-
var
|
|
3828
|
+
var c = this;
|
|
3829
3829
|
Promise.resolve().then(function() {
|
|
3830
|
-
|
|
3830
|
+
c._emitter.emit(y.a.PES_PRIVATE_DATA_ARRIVED, d);
|
|
3831
3831
|
});
|
|
3832
3832
|
}, k.prototype._onStatisticsInfo = function(d) {
|
|
3833
|
-
var
|
|
3833
|
+
var c = this;
|
|
3834
3834
|
Promise.resolve().then(function() {
|
|
3835
|
-
|
|
3835
|
+
c._emitter.emit(y.a.STATISTICS_INFO, d);
|
|
3836
3836
|
});
|
|
3837
|
-
}, k.prototype._onIOError = function(d,
|
|
3837
|
+
}, k.prototype._onIOError = function(d, c) {
|
|
3838
3838
|
var R = this;
|
|
3839
3839
|
Promise.resolve().then(function() {
|
|
3840
|
-
R._emitter.emit(y.a.IO_ERROR, d,
|
|
3840
|
+
R._emitter.emit(y.a.IO_ERROR, d, c);
|
|
3841
3841
|
});
|
|
3842
|
-
}, k.prototype._onDemuxError = function(d,
|
|
3842
|
+
}, k.prototype._onDemuxError = function(d, c) {
|
|
3843
3843
|
var R = this;
|
|
3844
3844
|
Promise.resolve().then(function() {
|
|
3845
|
-
R._emitter.emit(y.a.DEMUX_ERROR, d,
|
|
3845
|
+
R._emitter.emit(y.a.DEMUX_ERROR, d, c);
|
|
3846
3846
|
});
|
|
3847
3847
|
}, k.prototype._onRecommendSeekpoint = function(d) {
|
|
3848
|
-
var
|
|
3848
|
+
var c = this;
|
|
3849
3849
|
Promise.resolve().then(function() {
|
|
3850
|
-
|
|
3850
|
+
c._emitter.emit(y.a.RECOMMEND_SEEKPOINT, d);
|
|
3851
3851
|
});
|
|
3852
3852
|
}, k.prototype._onLoggingConfigChanged = function(d) {
|
|
3853
3853
|
this._worker && this._worker.postMessage({ cmd: "logging_config", param: d });
|
|
3854
3854
|
}, k.prototype._onWorkerMessage = function(d) {
|
|
3855
|
-
var
|
|
3856
|
-
if (
|
|
3857
|
-
switch (
|
|
3855
|
+
var c = d.data, R = c.data;
|
|
3856
|
+
if (c.msg === "destroyed" || this._workerDestroying) return this._workerDestroying = !1, this._worker.terminate(), void (this._worker = null);
|
|
3857
|
+
switch (c.msg) {
|
|
3858
3858
|
case y.a.INIT_SEGMENT:
|
|
3859
3859
|
case y.a.MEDIA_SEGMENT:
|
|
3860
|
-
this._emitter.emit(
|
|
3860
|
+
this._emitter.emit(c.msg, R.type, R.data);
|
|
3861
3861
|
break;
|
|
3862
3862
|
case y.a.LOADING_COMPLETE:
|
|
3863
3863
|
case y.a.RECOVERED_EARLY_EOF:
|
|
3864
|
-
this._emitter.emit(
|
|
3864
|
+
this._emitter.emit(c.msg);
|
|
3865
3865
|
break;
|
|
3866
3866
|
case y.a.MEDIA_INFO:
|
|
3867
|
-
Object.setPrototypeOf(R, G.a.prototype), this._emitter.emit(
|
|
3867
|
+
Object.setPrototypeOf(R, G.a.prototype), this._emitter.emit(c.msg, R);
|
|
3868
3868
|
break;
|
|
3869
3869
|
case y.a.METADATA_ARRIVED:
|
|
3870
3870
|
case y.a.SCRIPTDATA_ARRIVED:
|
|
@@ -3874,169 +3874,169 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
3874
3874
|
case y.a.PES_PRIVATE_DATA_DESCRIPTOR:
|
|
3875
3875
|
case y.a.PES_PRIVATE_DATA_ARRIVED:
|
|
3876
3876
|
case y.a.STATISTICS_INFO:
|
|
3877
|
-
this._emitter.emit(
|
|
3877
|
+
this._emitter.emit(c.msg, R);
|
|
3878
3878
|
break;
|
|
3879
3879
|
case y.a.IO_ERROR:
|
|
3880
3880
|
case y.a.DEMUX_ERROR:
|
|
3881
|
-
this._emitter.emit(
|
|
3881
|
+
this._emitter.emit(c.msg, R.type, R.info);
|
|
3882
3882
|
break;
|
|
3883
3883
|
case y.a.RECOMMEND_SEEKPOINT:
|
|
3884
|
-
this._emitter.emit(
|
|
3884
|
+
this._emitter.emit(c.msg, R);
|
|
3885
3885
|
break;
|
|
3886
3886
|
case "logcat_callback":
|
|
3887
3887
|
C.a.emitter.emit("log", R.type, R.logcat);
|
|
3888
3888
|
}
|
|
3889
3889
|
}, k;
|
|
3890
|
-
}(), l = { ERROR: "error", SOURCE_OPEN: "source_open", UPDATE_END: "update_end", BUFFER_FULL: "buffer_full" }, u = O(7), _ = O(3),
|
|
3890
|
+
}(), l = { ERROR: "error", SOURCE_OPEN: "source_open", UPDATE_END: "update_end", BUFFER_FULL: "buffer_full" }, u = O(7), _ = O(3), h = function() {
|
|
3891
3891
|
function k(d) {
|
|
3892
|
-
this.TAG = "MSEController", this._config = d, this._emitter = new
|
|
3892
|
+
this.TAG = "MSEController", this._config = d, this._emitter = new M.a(), this._config.isLive && this._config.autoCleanupSourceBuffer == null && (this._config.autoCleanupSourceBuffer = !0), this.e = { onSourceOpen: this._onSourceOpen.bind(this), onSourceEnded: this._onSourceEnded.bind(this), onSourceClose: this._onSourceClose.bind(this), onSourceBufferError: this._onSourceBufferError.bind(this), onSourceBufferUpdateEnd: this._onSourceBufferUpdateEnd.bind(this) }, this._mediaSource = null, this._mediaSourceObjectURL = null, this._mediaElement = null, this._isBufferFull = !1, this._hasPendingEos = !1, this._requireSetMediaDuration = !1, this._pendingMediaDuration = 0, this._pendingSourceBufferInit = [], this._mimeTypes = { video: null, audio: null }, this._sourceBuffers = { video: null, audio: null }, this._lastInitSegments = { video: null, audio: null }, this._pendingSegments = { video: [], audio: [] }, this._pendingRemoveRanges = { video: [], audio: [] }, this._idrList = new u.a();
|
|
3893
3893
|
}
|
|
3894
3894
|
return k.prototype.destroy = function() {
|
|
3895
3895
|
(this._mediaElement || this._mediaSource) && this.detachMediaElement(), this.e = null, this._emitter.removeAllListeners(), this._emitter = null;
|
|
3896
|
-
}, k.prototype.on = function(d,
|
|
3897
|
-
this._emitter.addListener(d,
|
|
3898
|
-
}, k.prototype.off = function(d,
|
|
3899
|
-
this._emitter.removeListener(d,
|
|
3896
|
+
}, k.prototype.on = function(d, c) {
|
|
3897
|
+
this._emitter.addListener(d, c);
|
|
3898
|
+
}, k.prototype.off = function(d, c) {
|
|
3899
|
+
this._emitter.removeListener(d, c);
|
|
3900
3900
|
}, k.prototype.attachMediaElement = function(d) {
|
|
3901
3901
|
if (this._mediaSource) throw new _.a("MediaSource has been attached to an HTMLMediaElement!");
|
|
3902
|
-
var
|
|
3903
|
-
|
|
3902
|
+
var c = this._mediaSource = new window.MediaSource();
|
|
3903
|
+
c.addEventListener("sourceopen", this.e.onSourceOpen), c.addEventListener("sourceended", this.e.onSourceEnded), c.addEventListener("sourceclose", this.e.onSourceClose), this._mediaElement = d, this._mediaSourceObjectURL = window.URL.createObjectURL(this._mediaSource), d.src = this._mediaSourceObjectURL;
|
|
3904
3904
|
}, k.prototype.detachMediaElement = function() {
|
|
3905
3905
|
if (this._mediaSource) {
|
|
3906
3906
|
var d = this._mediaSource;
|
|
3907
|
-
for (var
|
|
3908
|
-
var R = this._pendingSegments[
|
|
3909
|
-
R.splice(0, R.length), this._pendingSegments[
|
|
3910
|
-
var
|
|
3911
|
-
if (
|
|
3907
|
+
for (var c in this._sourceBuffers) {
|
|
3908
|
+
var R = this._pendingSegments[c];
|
|
3909
|
+
R.splice(0, R.length), this._pendingSegments[c] = null, this._pendingRemoveRanges[c] = null, this._lastInitSegments[c] = null;
|
|
3910
|
+
var Y = this._sourceBuffers[c];
|
|
3911
|
+
if (Y) {
|
|
3912
3912
|
if (d.readyState !== "closed") {
|
|
3913
3913
|
try {
|
|
3914
|
-
d.removeSourceBuffer(
|
|
3915
|
-
} catch (
|
|
3916
|
-
C.a.e(this.TAG,
|
|
3914
|
+
d.removeSourceBuffer(Y);
|
|
3915
|
+
} catch (oe) {
|
|
3916
|
+
C.a.e(this.TAG, oe.message);
|
|
3917
3917
|
}
|
|
3918
|
-
|
|
3918
|
+
Y.removeEventListener("error", this.e.onSourceBufferError), Y.removeEventListener("updateend", this.e.onSourceBufferUpdateEnd);
|
|
3919
3919
|
}
|
|
3920
|
-
this._mimeTypes[
|
|
3920
|
+
this._mimeTypes[c] = null, this._sourceBuffers[c] = null;
|
|
3921
3921
|
}
|
|
3922
3922
|
}
|
|
3923
3923
|
if (d.readyState === "open") try {
|
|
3924
3924
|
d.endOfStream();
|
|
3925
|
-
} catch (
|
|
3926
|
-
C.a.e(this.TAG,
|
|
3925
|
+
} catch (oe) {
|
|
3926
|
+
C.a.e(this.TAG, oe.message);
|
|
3927
3927
|
}
|
|
3928
3928
|
d.removeEventListener("sourceopen", this.e.onSourceOpen), d.removeEventListener("sourceended", this.e.onSourceEnded), d.removeEventListener("sourceclose", this.e.onSourceClose), this._pendingSourceBufferInit = [], this._isBufferFull = !1, this._idrList.clear(), this._mediaSource = null;
|
|
3929
3929
|
}
|
|
3930
3930
|
this._mediaElement && (this._mediaElement.src = "", this._mediaElement.removeAttribute("src"), this._mediaElement = null), this._mediaSourceObjectURL && (window.URL.revokeObjectURL(this._mediaSourceObjectURL), this._mediaSourceObjectURL = null);
|
|
3931
|
-
}, k.prototype.appendInitSegment = function(d,
|
|
3931
|
+
}, k.prototype.appendInitSegment = function(d, c) {
|
|
3932
3932
|
if (!this._mediaSource || this._mediaSource.readyState !== "open") return this._pendingSourceBufferInit.push(d), void this._pendingSegments[d.type].push(d);
|
|
3933
|
-
var R = d,
|
|
3934
|
-
R.codec && R.codec.length > 0 && (
|
|
3935
|
-
var
|
|
3936
|
-
if (C.a.v(this.TAG, "Received Initialization Segment, mimeType: " +
|
|
3937
|
-
if (this._mimeTypes[R.type]) C.a.v(this.TAG, "Notice: " + R.type + " mimeType changed, origin: " + this._mimeTypes[R.type] + ", target: " +
|
|
3933
|
+
var R = d, Y = "" + R.container;
|
|
3934
|
+
R.codec && R.codec.length > 0 && (Y += ";codecs=" + R.codec);
|
|
3935
|
+
var oe = !1;
|
|
3936
|
+
if (C.a.v(this.TAG, "Received Initialization Segment, mimeType: " + Y), this._lastInitSegments[R.type] = R, Y !== this._mimeTypes[R.type]) {
|
|
3937
|
+
if (this._mimeTypes[R.type]) C.a.v(this.TAG, "Notice: " + R.type + " mimeType changed, origin: " + this._mimeTypes[R.type] + ", target: " + Y);
|
|
3938
3938
|
else {
|
|
3939
|
-
|
|
3939
|
+
oe = !0;
|
|
3940
3940
|
try {
|
|
3941
|
-
var me = this._sourceBuffers[R.type] = this._mediaSource.addSourceBuffer(
|
|
3941
|
+
var me = this._sourceBuffers[R.type] = this._mediaSource.addSourceBuffer(Y);
|
|
3942
3942
|
me.addEventListener("error", this.e.onSourceBufferError), me.addEventListener("updateend", this.e.onSourceBufferUpdateEnd);
|
|
3943
3943
|
} catch (Se) {
|
|
3944
3944
|
return C.a.e(this.TAG, Se.message), void this._emitter.emit(l.ERROR, { code: Se.code, msg: Se.message });
|
|
3945
3945
|
}
|
|
3946
3946
|
}
|
|
3947
|
-
this._mimeTypes[R.type] =
|
|
3947
|
+
this._mimeTypes[R.type] = Y;
|
|
3948
3948
|
}
|
|
3949
|
-
|
|
3949
|
+
c || this._pendingSegments[R.type].push(R), oe || this._sourceBuffers[R.type] && !this._sourceBuffers[R.type].updating && this._doAppendSegments(), j.a.safari && R.container === "audio/mpeg" && R.mediaDuration > 0 && (this._requireSetMediaDuration = !0, this._pendingMediaDuration = R.mediaDuration / 1e3, this._updateMediaSourceDuration());
|
|
3950
3950
|
}, k.prototype.appendMediaSegment = function(d) {
|
|
3951
|
-
var
|
|
3952
|
-
this._pendingSegments[
|
|
3953
|
-
var R = this._sourceBuffers[
|
|
3951
|
+
var c = d;
|
|
3952
|
+
this._pendingSegments[c.type].push(c), this._config.autoCleanupSourceBuffer && this._needCleanupSourceBuffer() && this._doCleanupSourceBuffer();
|
|
3953
|
+
var R = this._sourceBuffers[c.type];
|
|
3954
3954
|
!R || R.updating || this._hasPendingRemoveRanges() || this._doAppendSegments();
|
|
3955
3955
|
}, k.prototype.seek = function(d) {
|
|
3956
|
-
for (var
|
|
3957
|
-
var R = this._sourceBuffers[
|
|
3956
|
+
for (var c in this._sourceBuffers) if (this._sourceBuffers[c]) {
|
|
3957
|
+
var R = this._sourceBuffers[c];
|
|
3958
3958
|
if (this._mediaSource.readyState === "open") try {
|
|
3959
3959
|
R.abort();
|
|
3960
3960
|
} catch (Te) {
|
|
3961
3961
|
C.a.e(this.TAG, Te.message);
|
|
3962
3962
|
}
|
|
3963
3963
|
this._idrList.clear();
|
|
3964
|
-
var
|
|
3965
|
-
if (
|
|
3966
|
-
for (var
|
|
3967
|
-
var me = R.buffered.start(
|
|
3968
|
-
this._pendingRemoveRanges[
|
|
3964
|
+
var Y = this._pendingSegments[c];
|
|
3965
|
+
if (Y.splice(0, Y.length), this._mediaSource.readyState !== "closed") {
|
|
3966
|
+
for (var oe = 0; oe < R.buffered.length; oe++) {
|
|
3967
|
+
var me = R.buffered.start(oe), Se = R.buffered.end(oe);
|
|
3968
|
+
this._pendingRemoveRanges[c].push({ start: me, end: Se });
|
|
3969
3969
|
}
|
|
3970
3970
|
if (R.updating || this._doRemoveRanges(), j.a.safari) {
|
|
3971
|
-
var De = this._lastInitSegments[
|
|
3972
|
-
De && (this._pendingSegments[
|
|
3971
|
+
var De = this._lastInitSegments[c];
|
|
3972
|
+
De && (this._pendingSegments[c].push(De), R.updating || this._doAppendSegments());
|
|
3973
3973
|
}
|
|
3974
3974
|
}
|
|
3975
3975
|
}
|
|
3976
3976
|
}, k.prototype.endOfStream = function() {
|
|
3977
|
-
var d = this._mediaSource,
|
|
3978
|
-
d && d.readyState === "open" ?
|
|
3977
|
+
var d = this._mediaSource, c = this._sourceBuffers;
|
|
3978
|
+
d && d.readyState === "open" ? c.video && c.video.updating || c.audio && c.audio.updating ? this._hasPendingEos = !0 : (this._hasPendingEos = !1, d.endOfStream()) : d && d.readyState === "closed" && this._hasPendingSegments() && (this._hasPendingEos = !0);
|
|
3979
3979
|
}, k.prototype.getNearestKeyframe = function(d) {
|
|
3980
3980
|
return this._idrList.getLastSyncPointBeforeDts(d);
|
|
3981
3981
|
}, k.prototype._needCleanupSourceBuffer = function() {
|
|
3982
3982
|
if (!this._config.autoCleanupSourceBuffer) return !1;
|
|
3983
3983
|
var d = this._mediaElement.currentTime;
|
|
3984
|
-
for (var
|
|
3985
|
-
var R = this._sourceBuffers[
|
|
3984
|
+
for (var c in this._sourceBuffers) {
|
|
3985
|
+
var R = this._sourceBuffers[c];
|
|
3986
3986
|
if (R) {
|
|
3987
|
-
var
|
|
3988
|
-
if (
|
|
3987
|
+
var Y = R.buffered;
|
|
3988
|
+
if (Y.length >= 1 && d - Y.start(0) >= this._config.autoCleanupMaxBackwardDuration) return !0;
|
|
3989
3989
|
}
|
|
3990
3990
|
}
|
|
3991
3991
|
return !1;
|
|
3992
3992
|
}, k.prototype._doCleanupSourceBuffer = function() {
|
|
3993
3993
|
var d = this._mediaElement.currentTime;
|
|
3994
|
-
for (var
|
|
3995
|
-
var R = this._sourceBuffers[
|
|
3994
|
+
for (var c in this._sourceBuffers) {
|
|
3995
|
+
var R = this._sourceBuffers[c];
|
|
3996
3996
|
if (R) {
|
|
3997
|
-
for (var
|
|
3998
|
-
var Se =
|
|
3997
|
+
for (var Y = R.buffered, oe = !1, me = 0; me < Y.length; me++) {
|
|
3998
|
+
var Se = Y.start(me), De = Y.end(me);
|
|
3999
3999
|
if (Se <= d && d < De + 3) {
|
|
4000
4000
|
if (d - Se >= this._config.autoCleanupMaxBackwardDuration) {
|
|
4001
|
-
|
|
4001
|
+
oe = !0;
|
|
4002
4002
|
var Te = d - this._config.autoCleanupMinBackwardDuration;
|
|
4003
|
-
this._pendingRemoveRanges[
|
|
4003
|
+
this._pendingRemoveRanges[c].push({ start: Se, end: Te });
|
|
4004
4004
|
}
|
|
4005
|
-
} else De < d && (
|
|
4005
|
+
} else De < d && (oe = !0, this._pendingRemoveRanges[c].push({ start: Se, end: De }));
|
|
4006
4006
|
}
|
|
4007
|
-
|
|
4007
|
+
oe && !R.updating && this._doRemoveRanges();
|
|
4008
4008
|
}
|
|
4009
4009
|
}
|
|
4010
4010
|
}, k.prototype._updateMediaSourceDuration = function() {
|
|
4011
4011
|
var d = this._sourceBuffers;
|
|
4012
4012
|
if (this._mediaElement.readyState !== 0 && this._mediaSource.readyState === "open" && !(d.video && d.video.updating || d.audio && d.audio.updating)) {
|
|
4013
|
-
var
|
|
4014
|
-
R > 0 && (isNaN(
|
|
4013
|
+
var c = this._mediaSource.duration, R = this._pendingMediaDuration;
|
|
4014
|
+
R > 0 && (isNaN(c) || R > c) && (C.a.v(this.TAG, "Update MediaSource duration from " + c + " to " + R), this._mediaSource.duration = R), this._requireSetMediaDuration = !1, this._pendingMediaDuration = 0;
|
|
4015
4015
|
}
|
|
4016
4016
|
}, k.prototype._doRemoveRanges = function() {
|
|
4017
|
-
for (var d in this._pendingRemoveRanges) if (this._sourceBuffers[d] && !this._sourceBuffers[d].updating) for (var
|
|
4018
|
-
var
|
|
4019
|
-
|
|
4017
|
+
for (var d in this._pendingRemoveRanges) if (this._sourceBuffers[d] && !this._sourceBuffers[d].updating) for (var c = this._sourceBuffers[d], R = this._pendingRemoveRanges[d]; R.length && !c.updating; ) {
|
|
4018
|
+
var Y = R.shift();
|
|
4019
|
+
c.remove(Y.start, Y.end);
|
|
4020
4020
|
}
|
|
4021
4021
|
}, k.prototype._doAppendSegments = function() {
|
|
4022
4022
|
var d = this._pendingSegments;
|
|
4023
|
-
for (var
|
|
4024
|
-
var R = d[
|
|
4023
|
+
for (var c in d) if (this._sourceBuffers[c] && !this._sourceBuffers[c].updating && d[c].length > 0) {
|
|
4024
|
+
var R = d[c].shift();
|
|
4025
4025
|
if (R.timestampOffset) {
|
|
4026
|
-
var
|
|
4027
|
-
Math.abs(
|
|
4026
|
+
var Y = this._sourceBuffers[c].timestampOffset, oe = R.timestampOffset / 1e3;
|
|
4027
|
+
Math.abs(Y - oe) > 0.1 && (C.a.v(this.TAG, "Update MPEG audio timestampOffset from " + Y + " to " + oe), this._sourceBuffers[c].timestampOffset = oe), delete R.timestampOffset;
|
|
4028
4028
|
}
|
|
4029
4029
|
if (!R.data || R.data.byteLength === 0) continue;
|
|
4030
4030
|
try {
|
|
4031
|
-
this._sourceBuffers[
|
|
4031
|
+
this._sourceBuffers[c].appendBuffer(R.data), this._isBufferFull = !1, c === "video" && R.hasOwnProperty("info") && this._idrList.appendArray(R.info.syncPoints);
|
|
4032
4032
|
} catch (me) {
|
|
4033
|
-
this._pendingSegments[
|
|
4033
|
+
this._pendingSegments[c].unshift(R), me.code === 22 ? (this._isBufferFull || this._emitter.emit(l.BUFFER_FULL), this._isBufferFull = !0) : (C.a.e(this.TAG, me.message), this._emitter.emit(l.ERROR, { code: me.code, msg: me.message }));
|
|
4034
4034
|
}
|
|
4035
4035
|
}
|
|
4036
4036
|
}, k.prototype._onSourceOpen = function() {
|
|
4037
4037
|
if (C.a.v(this.TAG, "MediaSource onSourceOpen"), this._mediaSource.removeEventListener("sourceopen", this.e.onSourceOpen), this._pendingSourceBufferInit.length > 0) for (var d = this._pendingSourceBufferInit; d.length; ) {
|
|
4038
|
-
var
|
|
4039
|
-
this.appendInitSegment(
|
|
4038
|
+
var c = d.shift();
|
|
4039
|
+
this.appendInitSegment(c, !0);
|
|
4040
4040
|
}
|
|
4041
4041
|
this._hasPendingSegments() && this._doAppendSegments(), this._emitter.emit(l.SOURCE_OPEN);
|
|
4042
4042
|
}, k.prototype._onSourceEnded = function() {
|
|
@@ -4055,31 +4055,31 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
4055
4055
|
C.a.e(this.TAG, "SourceBuffer Error: " + d);
|
|
4056
4056
|
}, k;
|
|
4057
4057
|
}(), P = O(5), D = { NETWORK_ERROR: "NetworkError", MEDIA_ERROR: "MediaError", OTHER_ERROR: "OtherError" }, V = { NETWORK_EXCEPTION: f.b.EXCEPTION, NETWORK_STATUS_CODE_INVALID: f.b.HTTP_STATUS_CODE_INVALID, NETWORK_TIMEOUT: f.b.CONNECTING_TIMEOUT, NETWORK_UNRECOVERABLE_EARLY_EOF: f.b.UNRECOVERABLE_EARLY_EOF, MEDIA_MSE_ERROR: "MediaMSEError", MEDIA_FORMAT_ERROR: P.a.FORMAT_ERROR, MEDIA_FORMAT_UNSUPPORTED: P.a.FORMAT_UNSUPPORTED, MEDIA_CODEC_UNSUPPORTED: P.a.CODEC_UNSUPPORTED }, ee = function() {
|
|
4058
|
-
function k(d,
|
|
4059
|
-
this.TAG = "MSEPlayer", this._type = "MSEPlayer", this._emitter = new
|
|
4058
|
+
function k(d, c) {
|
|
4059
|
+
this.TAG = "MSEPlayer", this._type = "MSEPlayer", this._emitter = new M.a(), this._config = b(), typeof c == "object" && Object.assign(this._config, c);
|
|
4060
4060
|
var R = d.type.toLowerCase();
|
|
4061
4061
|
if (R !== "mse" && R !== "mpegts" && R !== "m2ts" && R !== "flv") throw new _.b("MSEPlayer requires an mpegts/m2ts/flv MediaDataSource input!");
|
|
4062
4062
|
d.isLive === !0 && (this._config.isLive = !0), this.e = { onvLoadedMetadata: this._onvLoadedMetadata.bind(this), onvSeeking: this._onvSeeking.bind(this), onvCanPlay: this._onvCanPlay.bind(this), onvStalled: this._onvStalled.bind(this), onvProgress: this._onvProgress.bind(this) }, self.performance && self.performance.now ? this._now = self.performance.now.bind(self.performance) : this._now = Date.now, this._pendingSeekTime = null, this._requestSetTime = !1, this._seekpointRecord = null, this._progressChecker = null, this._mediaDataSource = d, this._mediaElement = null, this._msectl = null, this._transmuxer = null, this._mseSourceOpened = !1, this._hasPendingLoad = !1, this._receivedCanPlay = !1, this._mediaInfo = null, this._statisticsInfo = null;
|
|
4063
|
-
var
|
|
4064
|
-
this._alwaysSeekKeyframe = !!(
|
|
4063
|
+
var Y = j.a.chrome && (j.a.version.major < 50 || j.a.version.major === 50 && j.a.version.build < 2661);
|
|
4064
|
+
this._alwaysSeekKeyframe = !!(Y || j.a.msedge || j.a.msie), this._alwaysSeekKeyframe && (this._config.accurateSeek = !1);
|
|
4065
4065
|
}
|
|
4066
4066
|
return k.prototype.destroy = function() {
|
|
4067
4067
|
this._progressChecker != null && (window.clearInterval(this._progressChecker), this._progressChecker = null), this._transmuxer && this.unload(), this._mediaElement && this.detachMediaElement(), this.e = null, this._mediaDataSource = null, this._emitter.removeAllListeners(), this._emitter = null;
|
|
4068
|
-
}, k.prototype.on = function(d,
|
|
4068
|
+
}, k.prototype.on = function(d, c) {
|
|
4069
4069
|
var R = this;
|
|
4070
4070
|
d === H.MEDIA_INFO ? this._mediaInfo != null && Promise.resolve().then(function() {
|
|
4071
4071
|
R._emitter.emit(H.MEDIA_INFO, R.mediaInfo);
|
|
4072
4072
|
}) : d === H.STATISTICS_INFO && this._statisticsInfo != null && Promise.resolve().then(function() {
|
|
4073
4073
|
R._emitter.emit(H.STATISTICS_INFO, R.statisticsInfo);
|
|
4074
|
-
}), this._emitter.addListener(d,
|
|
4075
|
-
}, k.prototype.off = function(d,
|
|
4076
|
-
this._emitter.removeListener(d,
|
|
4074
|
+
}), this._emitter.addListener(d, c);
|
|
4075
|
+
}, k.prototype.off = function(d, c) {
|
|
4076
|
+
this._emitter.removeListener(d, c);
|
|
4077
4077
|
}, k.prototype.attachMediaElement = function(d) {
|
|
4078
|
-
var
|
|
4079
|
-
if (this._mediaElement = d, d.addEventListener("loadedmetadata", this.e.onvLoadedMetadata), d.addEventListener("seeking", this.e.onvSeeking), d.addEventListener("canplay", this.e.onvCanPlay), d.addEventListener("stalled", this.e.onvStalled), d.addEventListener("progress", this.e.onvProgress), this._msectl = new
|
|
4080
|
-
|
|
4078
|
+
var c = this;
|
|
4079
|
+
if (this._mediaElement = d, d.addEventListener("loadedmetadata", this.e.onvLoadedMetadata), d.addEventListener("seeking", this.e.onvSeeking), d.addEventListener("canplay", this.e.onvCanPlay), d.addEventListener("stalled", this.e.onvStalled), d.addEventListener("progress", this.e.onvProgress), this._msectl = new h(this._config), this._msectl.on(l.UPDATE_END, this._onmseUpdateEnd.bind(this)), this._msectl.on(l.BUFFER_FULL, this._onmseBufferFull.bind(this)), this._msectl.on(l.SOURCE_OPEN, function() {
|
|
4080
|
+
c._mseSourceOpened = !0, c._hasPendingLoad && (c._hasPendingLoad = !1, c.load());
|
|
4081
4081
|
}), this._msectl.on(l.ERROR, function(R) {
|
|
4082
|
-
|
|
4082
|
+
c._emitter.emit(H.ERROR, D.MEDIA_ERROR, V.MEDIA_MSE_ERROR, R);
|
|
4083
4083
|
}), this._msectl.attachMediaElement(d), this._pendingSeekTime != null) try {
|
|
4084
4084
|
d.currentTime = this._pendingSeekTime, this._pendingSeekTime = null;
|
|
4085
4085
|
} catch {
|
|
@@ -4090,41 +4090,41 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
4090
4090
|
var d = this;
|
|
4091
4091
|
if (!this._mediaElement) throw new _.a("HTMLMediaElement must be attached before load()!");
|
|
4092
4092
|
if (this._transmuxer) throw new _.a("MSEPlayer.load() has been called, please call unload() first!");
|
|
4093
|
-
this._hasPendingLoad || (this._config.deferLoadAfterSourceOpen && this._mseSourceOpened === !1 ? this._hasPendingLoad = !0 : (this._mediaElement.readyState > 0 && (this._requestSetTime = !0, this._mediaElement.currentTime = 0), this._transmuxer = new T(this._mediaDataSource, this._config), this._transmuxer.on(y.a.INIT_SEGMENT, function(
|
|
4093
|
+
this._hasPendingLoad || (this._config.deferLoadAfterSourceOpen && this._mseSourceOpened === !1 ? this._hasPendingLoad = !0 : (this._mediaElement.readyState > 0 && (this._requestSetTime = !0, this._mediaElement.currentTime = 0), this._transmuxer = new T(this._mediaDataSource, this._config), this._transmuxer.on(y.a.INIT_SEGMENT, function(c, R) {
|
|
4094
4094
|
d._msectl.appendInitSegment(R);
|
|
4095
|
-
}), this._transmuxer.on(y.a.MEDIA_SEGMENT, function(
|
|
4095
|
+
}), this._transmuxer.on(y.a.MEDIA_SEGMENT, function(c, R) {
|
|
4096
4096
|
if (d._msectl.appendMediaSegment(R), d._config.lazyLoad && !d._config.isLive) {
|
|
4097
|
-
var
|
|
4098
|
-
R.info.endDts >= 1e3 * (
|
|
4097
|
+
var Y = d._mediaElement.currentTime;
|
|
4098
|
+
R.info.endDts >= 1e3 * (Y + d._config.lazyLoadMaxDuration) && d._progressChecker == null && (C.a.v(d.TAG, "Maximum buffering duration exceeded, suspend transmuxing task"), d._suspendTransmuxer());
|
|
4099
4099
|
}
|
|
4100
4100
|
}), this._transmuxer.on(y.a.LOADING_COMPLETE, function() {
|
|
4101
4101
|
d._msectl.endOfStream(), d._emitter.emit(H.LOADING_COMPLETE);
|
|
4102
4102
|
}), this._transmuxer.on(y.a.RECOVERED_EARLY_EOF, function() {
|
|
4103
4103
|
d._emitter.emit(H.RECOVERED_EARLY_EOF);
|
|
4104
|
-
}), this._transmuxer.on(y.a.IO_ERROR, function(
|
|
4105
|
-
d._emitter.emit(H.ERROR, D.NETWORK_ERROR,
|
|
4106
|
-
}), this._transmuxer.on(y.a.DEMUX_ERROR, function(
|
|
4107
|
-
d._emitter.emit(H.ERROR, D.MEDIA_ERROR,
|
|
4108
|
-
}), this._transmuxer.on(y.a.MEDIA_INFO, function(
|
|
4109
|
-
d._mediaInfo =
|
|
4110
|
-
}), this._transmuxer.on(y.a.METADATA_ARRIVED, function(
|
|
4111
|
-
d._emitter.emit(H.METADATA_ARRIVED,
|
|
4112
|
-
}), this._transmuxer.on(y.a.SCRIPTDATA_ARRIVED, function(
|
|
4113
|
-
d._emitter.emit(H.SCRIPTDATA_ARRIVED,
|
|
4114
|
-
}), this._transmuxer.on(y.a.TIMED_ID3_METADATA_ARRIVED, function(
|
|
4115
|
-
d._emitter.emit(H.TIMED_ID3_METADATA_ARRIVED,
|
|
4116
|
-
}), this._transmuxer.on(y.a.SMPTE2038_METADATA_ARRIVED, function(
|
|
4117
|
-
d._emitter.emit(H.SMPTE2038_METADATA_ARRIVED,
|
|
4118
|
-
}), this._transmuxer.on(y.a.SCTE35_METADATA_ARRIVED, function(
|
|
4119
|
-
d._emitter.emit(H.SCTE35_METADATA_ARRIVED,
|
|
4120
|
-
}), this._transmuxer.on(y.a.PES_PRIVATE_DATA_DESCRIPTOR, function(
|
|
4121
|
-
d._emitter.emit(H.PES_PRIVATE_DATA_DESCRIPTOR,
|
|
4122
|
-
}), this._transmuxer.on(y.a.PES_PRIVATE_DATA_ARRIVED, function(
|
|
4123
|
-
d._emitter.emit(H.PES_PRIVATE_DATA_ARRIVED,
|
|
4124
|
-
}), this._transmuxer.on(y.a.STATISTICS_INFO, function(
|
|
4125
|
-
d._statisticsInfo = d._fillStatisticsInfo(
|
|
4126
|
-
}), this._transmuxer.on(y.a.RECOMMEND_SEEKPOINT, function(
|
|
4127
|
-
d._mediaElement && !d._config.accurateSeek && (d._requestSetTime = !0, d._mediaElement.currentTime =
|
|
4104
|
+
}), this._transmuxer.on(y.a.IO_ERROR, function(c, R) {
|
|
4105
|
+
d._emitter.emit(H.ERROR, D.NETWORK_ERROR, c, R);
|
|
4106
|
+
}), this._transmuxer.on(y.a.DEMUX_ERROR, function(c, R) {
|
|
4107
|
+
d._emitter.emit(H.ERROR, D.MEDIA_ERROR, c, { code: -1, msg: R });
|
|
4108
|
+
}), this._transmuxer.on(y.a.MEDIA_INFO, function(c) {
|
|
4109
|
+
d._mediaInfo = c, d._emitter.emit(H.MEDIA_INFO, Object.assign({}, c));
|
|
4110
|
+
}), this._transmuxer.on(y.a.METADATA_ARRIVED, function(c) {
|
|
4111
|
+
d._emitter.emit(H.METADATA_ARRIVED, c);
|
|
4112
|
+
}), this._transmuxer.on(y.a.SCRIPTDATA_ARRIVED, function(c) {
|
|
4113
|
+
d._emitter.emit(H.SCRIPTDATA_ARRIVED, c);
|
|
4114
|
+
}), this._transmuxer.on(y.a.TIMED_ID3_METADATA_ARRIVED, function(c) {
|
|
4115
|
+
d._emitter.emit(H.TIMED_ID3_METADATA_ARRIVED, c);
|
|
4116
|
+
}), this._transmuxer.on(y.a.SMPTE2038_METADATA_ARRIVED, function(c) {
|
|
4117
|
+
d._emitter.emit(H.SMPTE2038_METADATA_ARRIVED, c);
|
|
4118
|
+
}), this._transmuxer.on(y.a.SCTE35_METADATA_ARRIVED, function(c) {
|
|
4119
|
+
d._emitter.emit(H.SCTE35_METADATA_ARRIVED, c);
|
|
4120
|
+
}), this._transmuxer.on(y.a.PES_PRIVATE_DATA_DESCRIPTOR, function(c) {
|
|
4121
|
+
d._emitter.emit(H.PES_PRIVATE_DATA_DESCRIPTOR, c);
|
|
4122
|
+
}), this._transmuxer.on(y.a.PES_PRIVATE_DATA_ARRIVED, function(c) {
|
|
4123
|
+
d._emitter.emit(H.PES_PRIVATE_DATA_ARRIVED, c);
|
|
4124
|
+
}), this._transmuxer.on(y.a.STATISTICS_INFO, function(c) {
|
|
4125
|
+
d._statisticsInfo = d._fillStatisticsInfo(c), d._emitter.emit(H.STATISTICS_INFO, Object.assign({}, d._statisticsInfo));
|
|
4126
|
+
}), this._transmuxer.on(y.a.RECOMMEND_SEEKPOINT, function(c) {
|
|
4127
|
+
d._mediaElement && !d._config.accurateSeek && (d._requestSetTime = !0, d._mediaElement.currentTime = c / 1e3);
|
|
4128
4128
|
}), this._transmuxer.open()));
|
|
4129
4129
|
}, k.prototype.unload = function() {
|
|
4130
4130
|
this._mediaElement && this._mediaElement.pause(), this._msectl && this._msectl.seek(0), this._transmuxer && (this._transmuxer.close(), this._transmuxer.destroy(), this._transmuxer = null);
|
|
@@ -4156,58 +4156,58 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
4156
4156
|
return this._statisticsInfo == null && (this._statisticsInfo = {}), this._statisticsInfo = this._fillStatisticsInfo(this._statisticsInfo), Object.assign({}, this._statisticsInfo);
|
|
4157
4157
|
}, enumerable: !1, configurable: !0 }), k.prototype._fillStatisticsInfo = function(d) {
|
|
4158
4158
|
if (d.playerType = this._type, !(this._mediaElement instanceof HTMLVideoElement)) return d;
|
|
4159
|
-
var
|
|
4159
|
+
var c = !0, R = 0, Y = 0;
|
|
4160
4160
|
if (this._mediaElement.getVideoPlaybackQuality) {
|
|
4161
|
-
var
|
|
4162
|
-
R =
|
|
4163
|
-
} else this._mediaElement.webkitDecodedFrameCount != null ? (R = this._mediaElement.webkitDecodedFrameCount,
|
|
4164
|
-
return
|
|
4161
|
+
var oe = this._mediaElement.getVideoPlaybackQuality();
|
|
4162
|
+
R = oe.totalVideoFrames, Y = oe.droppedVideoFrames;
|
|
4163
|
+
} else this._mediaElement.webkitDecodedFrameCount != null ? (R = this._mediaElement.webkitDecodedFrameCount, Y = this._mediaElement.webkitDroppedFrameCount) : c = !1;
|
|
4164
|
+
return c && (d.decodedFrames = R, d.droppedFrames = Y), d;
|
|
4165
4165
|
}, k.prototype._onmseUpdateEnd = function() {
|
|
4166
|
-
var d = this._mediaElement.buffered,
|
|
4166
|
+
var d = this._mediaElement.buffered, c = this._mediaElement.currentTime;
|
|
4167
4167
|
if (this._config.isLive && this._config.liveBufferLatencyChasing && d.length > 0 && !this._mediaElement.paused) {
|
|
4168
4168
|
var R = d.end(d.length - 1);
|
|
4169
|
-
if (R > this._config.liveBufferLatencyMaxLatency && R -
|
|
4170
|
-
var
|
|
4171
|
-
this.currentTime =
|
|
4169
|
+
if (R > this._config.liveBufferLatencyMaxLatency && R - c > this._config.liveBufferLatencyMaxLatency) {
|
|
4170
|
+
var Y = R - this._config.liveBufferLatencyMinRemain;
|
|
4171
|
+
this.currentTime = Y;
|
|
4172
4172
|
}
|
|
4173
4173
|
}
|
|
4174
4174
|
if (this._config.lazyLoad && !this._config.isLive) {
|
|
4175
|
-
for (var
|
|
4175
|
+
for (var oe = 0, me = 0; me < d.length; me++) {
|
|
4176
4176
|
var Se = d.start(me), De = d.end(me);
|
|
4177
|
-
if (Se <=
|
|
4178
|
-
|
|
4177
|
+
if (Se <= c && c < De) {
|
|
4178
|
+
oe = De;
|
|
4179
4179
|
break;
|
|
4180
4180
|
}
|
|
4181
4181
|
}
|
|
4182
|
-
|
|
4182
|
+
oe >= c + this._config.lazyLoadMaxDuration && this._progressChecker == null && (C.a.v(this.TAG, "Maximum buffering duration exceeded, suspend transmuxing task"), this._suspendTransmuxer());
|
|
4183
4183
|
}
|
|
4184
4184
|
}, k.prototype._onmseBufferFull = function() {
|
|
4185
4185
|
C.a.v(this.TAG, "MSE SourceBuffer is full, suspend transmuxing task"), this._progressChecker == null && this._suspendTransmuxer();
|
|
4186
4186
|
}, k.prototype._suspendTransmuxer = function() {
|
|
4187
4187
|
this._transmuxer && (this._transmuxer.pause(), this._progressChecker == null && (this._progressChecker = window.setInterval(this._checkProgressAndResume.bind(this), 1e3)));
|
|
4188
4188
|
}, k.prototype._checkProgressAndResume = function() {
|
|
4189
|
-
for (var d = this._mediaElement.currentTime,
|
|
4190
|
-
var
|
|
4191
|
-
if (d >=
|
|
4189
|
+
for (var d = this._mediaElement.currentTime, c = this._mediaElement.buffered, R = !1, Y = 0; Y < c.length; Y++) {
|
|
4190
|
+
var oe = c.start(Y), me = c.end(Y);
|
|
4191
|
+
if (d >= oe && d < me) {
|
|
4192
4192
|
d >= me - this._config.lazyLoadRecoverDuration && (R = !0);
|
|
4193
4193
|
break;
|
|
4194
4194
|
}
|
|
4195
4195
|
}
|
|
4196
4196
|
R && (window.clearInterval(this._progressChecker), this._progressChecker = null, R && (C.a.v(this.TAG, "Continue loading from paused position"), this._transmuxer.resume()));
|
|
4197
4197
|
}, k.prototype._isTimepointBuffered = function(d) {
|
|
4198
|
-
for (var
|
|
4199
|
-
var
|
|
4200
|
-
if (d >=
|
|
4198
|
+
for (var c = this._mediaElement.buffered, R = 0; R < c.length; R++) {
|
|
4199
|
+
var Y = c.start(R), oe = c.end(R);
|
|
4200
|
+
if (d >= Y && d < oe) return !0;
|
|
4201
4201
|
}
|
|
4202
4202
|
return !1;
|
|
4203
4203
|
}, k.prototype._internalSeek = function(d) {
|
|
4204
|
-
var
|
|
4204
|
+
var c = this._isTimepointBuffered(d), R = !1, Y = 0;
|
|
4205
4205
|
if (d < 1 && this._mediaElement.buffered.length > 0) {
|
|
4206
|
-
var
|
|
4207
|
-
(
|
|
4206
|
+
var oe = this._mediaElement.buffered.start(0);
|
|
4207
|
+
(oe < 1 && d < oe || j.a.safari) && (R = !0, Y = j.a.safari ? 0.1 : oe);
|
|
4208
4208
|
}
|
|
4209
|
-
if (R) this._requestSetTime = !0, this._mediaElement.currentTime =
|
|
4210
|
-
else if (
|
|
4209
|
+
if (R) this._requestSetTime = !0, this._mediaElement.currentTime = Y;
|
|
4210
|
+
else if (c) {
|
|
4211
4211
|
if (this._alwaysSeekKeyframe) {
|
|
4212
4212
|
var me = this._msectl.getNearestKeyframe(Math.floor(1e3 * d));
|
|
4213
4213
|
this._requestSetTime = !0, this._mediaElement.currentTime = me != null ? me.dts / 1e3 : d;
|
|
@@ -4220,28 +4220,28 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
4220
4220
|
this._seekpointRecord = null, this._isTimepointBuffered(d) || (this._progressChecker != null && (window.clearTimeout(this._progressChecker), this._progressChecker = null), this._msectl.seek(d), this._transmuxer.seek(Math.floor(1e3 * d)), this._config.accurateSeek && (this._requestSetTime = !0, this._mediaElement.currentTime = d));
|
|
4221
4221
|
} else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this), 50);
|
|
4222
4222
|
}, k.prototype._checkAndResumeStuckPlayback = function(d) {
|
|
4223
|
-
var
|
|
4224
|
-
if (d || !this._receivedCanPlay ||
|
|
4225
|
-
var R =
|
|
4226
|
-
R.length > 0 &&
|
|
4223
|
+
var c = this._mediaElement;
|
|
4224
|
+
if (d || !this._receivedCanPlay || c.readyState < 2) {
|
|
4225
|
+
var R = c.buffered;
|
|
4226
|
+
R.length > 0 && c.currentTime < R.start(0) && (C.a.w(this.TAG, "Playback seems stuck at " + c.currentTime + ", seek to " + R.start(0)), this._requestSetTime = !0, this._mediaElement.currentTime = R.start(0), this._mediaElement.removeEventListener("progress", this.e.onvProgress));
|
|
4227
4227
|
} else this._mediaElement.removeEventListener("progress", this.e.onvProgress);
|
|
4228
4228
|
}, k.prototype._onvLoadedMetadata = function(d) {
|
|
4229
4229
|
this._pendingSeekTime != null && (this._mediaElement.currentTime = this._pendingSeekTime, this._pendingSeekTime = null);
|
|
4230
4230
|
}, k.prototype._onvSeeking = function(d) {
|
|
4231
|
-
var
|
|
4231
|
+
var c = this._mediaElement.currentTime, R = this._mediaElement.buffered;
|
|
4232
4232
|
if (this._requestSetTime) this._requestSetTime = !1;
|
|
4233
4233
|
else {
|
|
4234
|
-
if (
|
|
4235
|
-
var
|
|
4236
|
-
if (
|
|
4234
|
+
if (c < 1 && R.length > 0) {
|
|
4235
|
+
var Y = R.start(0);
|
|
4236
|
+
if (Y < 1 && c < Y || j.a.safari) return this._requestSetTime = !0, void (this._mediaElement.currentTime = j.a.safari ? 0.1 : Y);
|
|
4237
4237
|
}
|
|
4238
|
-
if (this._isTimepointBuffered(
|
|
4238
|
+
if (this._isTimepointBuffered(c)) {
|
|
4239
4239
|
if (this._alwaysSeekKeyframe) {
|
|
4240
|
-
var
|
|
4241
|
-
|
|
4240
|
+
var oe = this._msectl.getNearestKeyframe(Math.floor(1e3 * c));
|
|
4241
|
+
oe != null && (this._requestSetTime = !0, this._mediaElement.currentTime = oe.dts / 1e3);
|
|
4242
4242
|
}
|
|
4243
4243
|
this._progressChecker != null && this._checkProgressAndResume();
|
|
4244
|
-
} else this._seekpointRecord = { seekPoint:
|
|
4244
|
+
} else this._seekpointRecord = { seekPoint: c, recordTime: this._now() }, window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this), 50);
|
|
4245
4245
|
}
|
|
4246
4246
|
}, k.prototype._onvCanPlay = function(d) {
|
|
4247
4247
|
this._receivedCanPlay = !0, this._mediaElement.removeEventListener("canplay", this.e.onvCanPlay);
|
|
@@ -4251,8 +4251,8 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
4251
4251
|
this._checkAndResumeStuckPlayback();
|
|
4252
4252
|
}, k;
|
|
4253
4253
|
}(), pe = function() {
|
|
4254
|
-
function k(d,
|
|
4255
|
-
this.TAG = "NativePlayer", this._type = "NativePlayer", this._emitter = new
|
|
4254
|
+
function k(d, c) {
|
|
4255
|
+
this.TAG = "NativePlayer", this._type = "NativePlayer", this._emitter = new M.a(), this._config = b(), typeof c == "object" && Object.assign(this._config, c);
|
|
4256
4256
|
var R = d.type.toLowerCase();
|
|
4257
4257
|
if (R === "mse" || R === "mpegts" || R === "m2ts" || R === "flv") throw new _.b("NativePlayer does't support mse/mpegts/m2ts/flv MediaDataSource input!");
|
|
4258
4258
|
if (d.hasOwnProperty("segments")) throw new _.b("NativePlayer(" + d.type + ") doesn't support multipart playback!");
|
|
@@ -4260,15 +4260,15 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
4260
4260
|
}
|
|
4261
4261
|
return k.prototype.destroy = function() {
|
|
4262
4262
|
this._mediaElement && (this.unload(), this.detachMediaElement()), this.e = null, this._mediaDataSource = null, this._emitter.removeAllListeners(), this._emitter = null;
|
|
4263
|
-
}, k.prototype.on = function(d,
|
|
4263
|
+
}, k.prototype.on = function(d, c) {
|
|
4264
4264
|
var R = this;
|
|
4265
4265
|
d === H.MEDIA_INFO ? this._mediaElement != null && this._mediaElement.readyState !== 0 && Promise.resolve().then(function() {
|
|
4266
4266
|
R._emitter.emit(H.MEDIA_INFO, R.mediaInfo);
|
|
4267
4267
|
}) : d === H.STATISTICS_INFO && this._mediaElement != null && this._mediaElement.readyState !== 0 && Promise.resolve().then(function() {
|
|
4268
4268
|
R._emitter.emit(H.STATISTICS_INFO, R.statisticsInfo);
|
|
4269
|
-
}), this._emitter.addListener(d,
|
|
4270
|
-
}, k.prototype.off = function(d,
|
|
4271
|
-
this._emitter.removeListener(d,
|
|
4269
|
+
}), this._emitter.addListener(d, c);
|
|
4270
|
+
}, k.prototype.off = function(d, c) {
|
|
4271
|
+
this._emitter.removeListener(d, c);
|
|
4272
4272
|
}, k.prototype.attachMediaElement = function(d) {
|
|
4273
4273
|
if (this._mediaElement = d, d.addEventListener("loadedmetadata", this.e.onvLoadedMetadata), this._pendingSeekTime != null) try {
|
|
4274
4274
|
d.currentTime = this._pendingSeekTime, this._pendingSeekTime = null;
|
|
@@ -4309,12 +4309,12 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
4309
4309
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(k.prototype, "statisticsInfo", { get: function() {
|
|
4310
4310
|
var d = { playerType: this._type, url: this._mediaDataSource.url };
|
|
4311
4311
|
if (!(this._mediaElement instanceof HTMLVideoElement)) return d;
|
|
4312
|
-
var
|
|
4312
|
+
var c = !0, R = 0, Y = 0;
|
|
4313
4313
|
if (this._mediaElement.getVideoPlaybackQuality) {
|
|
4314
|
-
var
|
|
4315
|
-
R =
|
|
4316
|
-
} else this._mediaElement.webkitDecodedFrameCount != null ? (R = this._mediaElement.webkitDecodedFrameCount,
|
|
4317
|
-
return
|
|
4314
|
+
var oe = this._mediaElement.getVideoPlaybackQuality();
|
|
4315
|
+
R = oe.totalVideoFrames, Y = oe.droppedVideoFrames;
|
|
4316
|
+
} else this._mediaElement.webkitDecodedFrameCount != null ? (R = this._mediaElement.webkitDecodedFrameCount, Y = this._mediaElement.webkitDroppedFrameCount) : c = !1;
|
|
4317
|
+
return c && (d.decodedFrames = R, d.droppedFrames = Y), d;
|
|
4318
4318
|
}, enumerable: !1, configurable: !0 }), k.prototype._onvLoadedMetadata = function(d) {
|
|
4319
4319
|
this._pendingSeekTime != null && (this._mediaElement.currentTime = this._pendingSeekTime, this._pendingSeekTime = null), this._emitter.emit(H.MEDIA_INFO, this.mediaInfo);
|
|
4320
4320
|
}, k.prototype._reportStatisticsInfo = function() {
|
|
@@ -4323,24 +4323,24 @@ originalDts: ` + be + " ms, curRefDts: " + Re + " ms, dtsCorrection: " + Math.ro
|
|
|
4323
4323
|
}();
|
|
4324
4324
|
U.a.install();
|
|
4325
4325
|
var ve = { createPlayer: function(k, d) {
|
|
4326
|
-
var
|
|
4327
|
-
if (
|
|
4328
|
-
if (!
|
|
4329
|
-
switch (
|
|
4326
|
+
var c = k;
|
|
4327
|
+
if (c == null || typeof c != "object") throw new _.b("MediaDataSource must be an javascript object!");
|
|
4328
|
+
if (!c.hasOwnProperty("type")) throw new _.b("MediaDataSource must has type field to indicate video file type!");
|
|
4329
|
+
switch (c.type) {
|
|
4330
4330
|
case "mse":
|
|
4331
4331
|
case "mpegts":
|
|
4332
4332
|
case "m2ts":
|
|
4333
4333
|
case "flv":
|
|
4334
|
-
return new ee(
|
|
4334
|
+
return new ee(c, d);
|
|
4335
4335
|
default:
|
|
4336
|
-
return new pe(
|
|
4336
|
+
return new pe(c, d);
|
|
4337
4337
|
}
|
|
4338
4338
|
}, isSupported: function() {
|
|
4339
4339
|
return v.supportMSEH264Playback();
|
|
4340
4340
|
}, getFeatureList: function() {
|
|
4341
4341
|
return v.getFeatureList();
|
|
4342
4342
|
} };
|
|
4343
|
-
ve.BaseLoader = f.a, ve.LoaderStatus = f.c, ve.LoaderErrors = f.b, ve.Events = H, ve.ErrorTypes = D, ve.ErrorDetails = V, ve.MSEPlayer = ee, ve.NativePlayer = pe, ve.LoggingControl =
|
|
4343
|
+
ve.BaseLoader = f.a, ve.LoaderStatus = f.c, ve.LoaderErrors = f.b, ve.Events = H, ve.ErrorTypes = D, ve.ErrorDetails = V, ve.MSEPlayer = ee, ve.NativePlayer = pe, ve.LoggingControl = X.a, Object.defineProperty(ve, "version", { enumerable: !0, get: function() {
|
|
4344
4344
|
return "1.7.3";
|
|
4345
4345
|
} }), Z.default = ve;
|
|
4346
4346
|
}]);
|
|
@@ -4358,12 +4358,13 @@ const Rt = /* @__PURE__ */ di(ui), li = ["element-loading-text", "element-loadin
|
|
|
4358
4358
|
loadingText: {},
|
|
4359
4359
|
error: { type: Boolean },
|
|
4360
4360
|
errorText: {},
|
|
4361
|
-
retryTime: {}
|
|
4361
|
+
retryTime: {},
|
|
4362
|
+
errorTime: {}
|
|
4362
4363
|
},
|
|
4363
4364
|
emits: ["loaded", "errorClick"],
|
|
4364
4365
|
setup(Ie, { expose: Ye, emit: fe }) {
|
|
4365
|
-
Jt((
|
|
4366
|
-
"
|
|
4366
|
+
Jt((h) => ({
|
|
4367
|
+
"0ea53312": u.value
|
|
4367
4368
|
}));
|
|
4368
4369
|
const Z = Ie, O = fe;
|
|
4369
4370
|
let U;
|
|
@@ -4373,54 +4374,56 @@ const Rt = /* @__PURE__ */ di(ui), li = ["element-loading-text", "element-loadin
|
|
|
4373
4374
|
loading: b = !1,
|
|
4374
4375
|
error: v = !1,
|
|
4375
4376
|
errorText: f = At("das-ui-live-player-videoLoadFailedRetry")
|
|
4376
|
-
} = Zt(Z), L = (
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
},
|
|
4380
|
-
},
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4377
|
+
} = Zt(Z), L = (h) => {
|
|
4378
|
+
h.target, setTimeout(() => {
|
|
4379
|
+
C();
|
|
4380
|
+
}, 1e3);
|
|
4381
|
+
}, M = He(Z.errorTime || 10), C = () => {
|
|
4382
|
+
M.value !== 0 && (M.value = M.value - 1, T(), ie());
|
|
4383
|
+
}, j = ot(() => Z.src || ""), H = ot(() => {
|
|
4384
|
+
const h = j.value.split(".").pop() || void 0;
|
|
4385
|
+
return Z.type ?? h ?? "flv";
|
|
4386
|
+
}), le = ot(() => Z.config || {}), ne = He(Z.retryTime || 0), X = He(null), ie = async () => {
|
|
4387
|
+
if (!X.value) return;
|
|
4388
|
+
const h = {
|
|
4389
|
+
type: H.value,
|
|
4387
4390
|
isLive: !0,
|
|
4388
|
-
url:
|
|
4391
|
+
url: j.value
|
|
4389
4392
|
};
|
|
4390
|
-
U = Rt.createPlayer(
|
|
4391
|
-
},
|
|
4392
|
-
|
|
4393
|
-
},
|
|
4394
|
-
|
|
4395
|
-
},
|
|
4393
|
+
U = Rt.createPlayer(h, le.value), U.attachMediaElement(X.value), U.load(), U.play(), U.on(Rt.Events.ERROR, y), O("loaded", U);
|
|
4394
|
+
}, y = (h, P) => {
|
|
4395
|
+
G();
|
|
4396
|
+
}, G = () => {
|
|
4397
|
+
ne.value !== 0 && (ne.value = ne.value - 1, T(), ie());
|
|
4398
|
+
}, T = () => {
|
|
4396
4399
|
U && (U.pause(), U.unload(), U.detachMediaElement(), U.destroy(), U = null);
|
|
4397
4400
|
};
|
|
4398
4401
|
$t(() => {
|
|
4399
|
-
|
|
4402
|
+
ie();
|
|
4400
4403
|
}), Qt(() => {
|
|
4401
|
-
|
|
4404
|
+
T();
|
|
4402
4405
|
}), Ye({
|
|
4403
|
-
video:
|
|
4406
|
+
video: X
|
|
4404
4407
|
});
|
|
4405
|
-
const
|
|
4406
|
-
|
|
4408
|
+
const l = He("el-icon-loading"), u = He("rgba(0, 0, 0, 0.8)"), _ = () => {
|
|
4409
|
+
ie(), O("errorClick");
|
|
4407
4410
|
};
|
|
4408
|
-
return (
|
|
4409
|
-
const
|
|
4411
|
+
return (h, P) => {
|
|
4412
|
+
const D = si;
|
|
4410
4413
|
return ei((ut(), dt("div", {
|
|
4411
4414
|
class: "das-live-player",
|
|
4412
|
-
"element-loading-text":
|
|
4413
|
-
"element-loading-spinner":
|
|
4414
|
-
"element-loading-background":
|
|
4415
|
+
"element-loading-text": Xe(m),
|
|
4416
|
+
"element-loading-spinner": l.value,
|
|
4417
|
+
"element-loading-background": u.value
|
|
4415
4418
|
}, [
|
|
4416
|
-
|
|
4419
|
+
Xe(v) ? (ut(), dt("div", {
|
|
4417
4420
|
key: 1,
|
|
4418
4421
|
class: "error",
|
|
4419
|
-
onClick:
|
|
4422
|
+
onClick: _
|
|
4420
4423
|
}, [
|
|
4421
|
-
ii(
|
|
4424
|
+
ii(h.$slots, "error", {}, () => [
|
|
4422
4425
|
ri(
|
|
4423
|
-
ai(
|
|
4426
|
+
ai(Xe(f)),
|
|
4424
4427
|
1
|
|
4425
4428
|
/* TEXT */
|
|
4426
4429
|
)
|
|
@@ -4430,9 +4433,9 @@ const Rt = /* @__PURE__ */ di(ui), li = ["element-loading-text", "element-loadin
|
|
|
4430
4433
|
{
|
|
4431
4434
|
key: 0,
|
|
4432
4435
|
ref_key: "video",
|
|
4433
|
-
ref:
|
|
4436
|
+
ref: X,
|
|
4434
4437
|
class: "video",
|
|
4435
|
-
style: ti({ "object-fit":
|
|
4438
|
+
style: ti({ "object-fit": Xe(B) }),
|
|
4436
4439
|
muted: "",
|
|
4437
4440
|
onError: L
|
|
4438
4441
|
},
|
|
@@ -4441,7 +4444,7 @@ const Rt = /* @__PURE__ */ di(ui), li = ["element-loading-text", "element-loadin
|
|
|
4441
4444
|
/* STYLE, NEED_HYDRATION */
|
|
4442
4445
|
))
|
|
4443
4446
|
], 8, li)), [
|
|
4444
|
-
[
|
|
4447
|
+
[D, Xe(b)]
|
|
4445
4448
|
]);
|
|
4446
4449
|
};
|
|
4447
4450
|
}
|
|
@@ -4450,7 +4453,7 @@ const Rt = /* @__PURE__ */ di(ui), li = ["element-loading-text", "element-loadin
|
|
|
4450
4453
|
for (const [Z, O] of Ye)
|
|
4451
4454
|
fe[Z] = O;
|
|
4452
4455
|
return fe;
|
|
4453
|
-
}, ci = /* @__PURE__ */ hi(_i, [["__scopeId", "data-v-
|
|
4456
|
+
}, ci = /* @__PURE__ */ hi(_i, [["__scopeId", "data-v-6002a51c"]]), fi = {
|
|
4454
4457
|
加载中: { "zh-CN": "加载中", en: "Loading", _appCode: "framework" },
|
|
4455
4458
|
"das-ui-live-player-videoLoadFailedRetry": {
|
|
4456
4459
|
"zh-CN": "视频加载失败,请点击重试",
|
|
@@ -4459,7 +4462,7 @@ const Rt = /* @__PURE__ */ di(ui), li = ["element-loading-text", "element-loadin
|
|
|
4459
4462
|
}
|
|
4460
4463
|
};
|
|
4461
4464
|
oi(fi);
|
|
4462
|
-
const Si = ni(ci), Ei = () =>
|
|
4465
|
+
const Si = ni(ci), Ei = () => He(null);
|
|
4463
4466
|
export {
|
|
4464
4467
|
Si as DasLivePlayer,
|
|
4465
4468
|
Ei as getDasLivePlayerRef
|