@halibegic/react-video-player 0.0.51 → 0.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-video-player.es.js +358 -364
- package/dist/react-video-player.es.js.map +1 -1
- package/dist/react-video-player.umd.js +8 -8
- package/dist/react-video-player.umd.js.map +1 -1
- package/dist/src/components/live-player/live-player-activity-listener.d.ts +1 -1
- package/dist/src/components/vod-player/vod-player-activity-listener.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ var $n = Object.defineProperty, Un = Object.defineProperties;
|
|
|
2
2
|
var Bn = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var Pe = Object.getOwnPropertySymbols;
|
|
4
4
|
var wt = Object.prototype.hasOwnProperty, _t = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var gt = (e, t, n) => t in e ? $n(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n,
|
|
5
|
+
var gt = (e, t, n) => t in e ? $n(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, F = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
7
|
wt.call(t, n) && gt(e, n, t[n]);
|
|
8
8
|
if (Pe)
|
|
@@ -19,7 +19,7 @@ var re = (e, t) => {
|
|
|
19
19
|
t.indexOf(r) < 0 && _t.call(e, r) && (n[r] = e[r]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
import jt, { useLayoutEffect as Wn, useEffect as
|
|
22
|
+
import jt, { useLayoutEffect as Wn, useEffect as V, useRef as A, createContext as It, useContext as kt, useState as G, useCallback as H, forwardRef as Ve } from "react";
|
|
23
23
|
import { useStore as Dt, create as Mt } from "zustand";
|
|
24
24
|
import zn from "mitt";
|
|
25
25
|
import ee from "hls.js";
|
|
@@ -59,11 +59,11 @@ function Ft(e) {
|
|
|
59
59
|
if (typeof g == "function") {
|
|
60
60
|
g.call(
|
|
61
61
|
d,
|
|
62
|
-
function(
|
|
63
|
-
u(c,
|
|
62
|
+
function(_) {
|
|
63
|
+
u(c, _);
|
|
64
64
|
},
|
|
65
|
-
function(
|
|
66
|
-
s[c] = { status: "rejected", reason:
|
|
65
|
+
function(_) {
|
|
66
|
+
s[c] = { status: "rejected", reason: _ }, --l === 0 && n(s);
|
|
67
67
|
}
|
|
68
68
|
);
|
|
69
69
|
return;
|
|
@@ -112,8 +112,8 @@ function Zn(e, t) {
|
|
|
112
112
|
e.apply(t, arguments);
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
if (!(this instanceof
|
|
115
|
+
function $(e) {
|
|
116
|
+
if (!(this instanceof $))
|
|
117
117
|
throw new TypeError("Promises must be constructed via new");
|
|
118
118
|
if (typeof e != "function") throw new TypeError("not a function");
|
|
119
119
|
this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], $t(e, this);
|
|
@@ -125,7 +125,7 @@ function Ht(e, t) {
|
|
|
125
125
|
e._deferreds.push(t);
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
|
-
e._handled = !0,
|
|
128
|
+
e._handled = !0, $._immediateFn(function() {
|
|
129
129
|
var n = e._state === 1 ? t.onFulfilled : t.onRejected;
|
|
130
130
|
if (n === null) {
|
|
131
131
|
(e._state === 1 ? Ge : _e)(t.promise, e._value);
|
|
@@ -147,7 +147,7 @@ function Ge(e, t) {
|
|
|
147
147
|
throw new TypeError("A promise cannot be resolved with itself.");
|
|
148
148
|
if (t && (typeof t == "object" || typeof t == "function")) {
|
|
149
149
|
var n = t.then;
|
|
150
|
-
if (t instanceof
|
|
150
|
+
if (t instanceof $) {
|
|
151
151
|
e._state = 3, e._value = t, Xe(e);
|
|
152
152
|
return;
|
|
153
153
|
} else if (typeof n == "function") {
|
|
@@ -164,8 +164,8 @@ function _e(e, t) {
|
|
|
164
164
|
e._state = 2, e._value = t, Xe(e);
|
|
165
165
|
}
|
|
166
166
|
function Xe(e) {
|
|
167
|
-
e._state === 2 && e._deferreds.length === 0 &&
|
|
168
|
-
e._handled ||
|
|
167
|
+
e._state === 2 && e._deferreds.length === 0 && $._immediateFn(function() {
|
|
168
|
+
e._handled || $._unhandledRejectionFn(e._value);
|
|
169
169
|
});
|
|
170
170
|
for (var t = 0, n = e._deferreds.length; t < n; t++)
|
|
171
171
|
Ht(e, e._deferreds[t]);
|
|
@@ -190,16 +190,16 @@ function $t(e, t) {
|
|
|
190
190
|
n = !0, _e(t, r);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
|
|
193
|
+
$.prototype.catch = function(e) {
|
|
194
194
|
return this.then(null, e);
|
|
195
195
|
};
|
|
196
|
-
|
|
196
|
+
$.prototype.then = function(e, t) {
|
|
197
197
|
var n = new this.constructor(Yn);
|
|
198
198
|
return Ht(this, new Kn(e, t, n)), n;
|
|
199
199
|
};
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
return new
|
|
200
|
+
$.prototype.finally = Nt;
|
|
201
|
+
$.all = function(e) {
|
|
202
|
+
return new $(function(t, n) {
|
|
203
203
|
if (!Ot(e))
|
|
204
204
|
return n(new TypeError("Promise.all accepts an array"));
|
|
205
205
|
var r = Array.prototype.slice.call(e);
|
|
@@ -229,33 +229,33 @@ H.all = function(e) {
|
|
|
229
229
|
l(u, r[u]);
|
|
230
230
|
});
|
|
231
231
|
};
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
return e && typeof e == "object" && e.constructor ===
|
|
232
|
+
$.any = At;
|
|
233
|
+
$.allSettled = Ft;
|
|
234
|
+
$.resolve = function(e) {
|
|
235
|
+
return e && typeof e == "object" && e.constructor === $ ? e : new $(function(t) {
|
|
236
236
|
t(e);
|
|
237
237
|
});
|
|
238
238
|
};
|
|
239
|
-
|
|
240
|
-
return new
|
|
239
|
+
$.reject = function(e) {
|
|
240
|
+
return new $(function(t, n) {
|
|
241
241
|
n(e);
|
|
242
242
|
});
|
|
243
243
|
};
|
|
244
|
-
|
|
245
|
-
return new
|
|
244
|
+
$.race = function(e) {
|
|
245
|
+
return new $(function(t, n) {
|
|
246
246
|
if (!Ot(e))
|
|
247
247
|
return n(new TypeError("Promise.race accepts an array"));
|
|
248
248
|
for (var r = 0, s = e.length; r < s; r++)
|
|
249
|
-
|
|
249
|
+
$.resolve(e[r]).then(t, n);
|
|
250
250
|
});
|
|
251
251
|
};
|
|
252
|
-
|
|
252
|
+
$._immediateFn = // @ts-ignore
|
|
253
253
|
typeof setImmediate == "function" && function(e) {
|
|
254
254
|
setImmediate(e);
|
|
255
255
|
} || function(e) {
|
|
256
256
|
qn(e, 0);
|
|
257
257
|
};
|
|
258
|
-
|
|
258
|
+
$._unhandledRejectionFn = function(t) {
|
|
259
259
|
typeof console != "undefined" && console && console.warn("Possible Unhandled Promise Rejection:", t);
|
|
260
260
|
};
|
|
261
261
|
var ae = (function() {
|
|
@@ -267,7 +267,7 @@ var ae = (function() {
|
|
|
267
267
|
return global;
|
|
268
268
|
throw new Error("unable to locate global object");
|
|
269
269
|
})();
|
|
270
|
-
typeof ae.Promise != "function" ? ae.Promise =
|
|
270
|
+
typeof ae.Promise != "function" ? ae.Promise = $ : (ae.Promise.prototype.finally || (ae.Promise.prototype.finally = Nt), ae.Promise.allSettled || (ae.Promise.allSettled = Ft), ae.Promise.any || (ae.Promise.any = At));
|
|
271
271
|
var Ie = { exports: {} }, ge = {};
|
|
272
272
|
var Tt;
|
|
273
273
|
function Gn() {
|
|
@@ -275,11 +275,11 @@ function Gn() {
|
|
|
275
275
|
Tt = 1;
|
|
276
276
|
var e = jt, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
277
277
|
function u(i, c, d) {
|
|
278
|
-
var g,
|
|
279
|
-
d !== void 0 && (y = "" + d), c.key !== void 0 && (y = "" + c.key), c.ref !== void 0 && (
|
|
280
|
-
for (g in c) r.call(c, g) && !l.hasOwnProperty(g) && (
|
|
281
|
-
if (i && i.defaultProps) for (g in c = i.defaultProps, c)
|
|
282
|
-
return { $$typeof: t, type: i, key: y, ref:
|
|
278
|
+
var g, _ = {}, y = null, I = null;
|
|
279
|
+
d !== void 0 && (y = "" + d), c.key !== void 0 && (y = "" + c.key), c.ref !== void 0 && (I = c.ref);
|
|
280
|
+
for (g in c) r.call(c, g) && !l.hasOwnProperty(g) && (_[g] = c[g]);
|
|
281
|
+
if (i && i.defaultProps) for (g in c = i.defaultProps, c) _[g] === void 0 && (_[g] = c[g]);
|
|
282
|
+
return { $$typeof: t, type: i, key: y, ref: I, props: _, _owner: s.current };
|
|
283
283
|
}
|
|
284
284
|
return ge.Fragment = n, ge.jsx = u, ge.jsxs = u, ge;
|
|
285
285
|
}
|
|
@@ -287,44 +287,44 @@ var we = {};
|
|
|
287
287
|
var xt;
|
|
288
288
|
function Xn() {
|
|
289
289
|
return xt || (xt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
290
|
-
var e = jt, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), i = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"),
|
|
291
|
-
function
|
|
290
|
+
var e = jt, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), i = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), E = Symbol.iterator, x = "@@iterator";
|
|
291
|
+
function S(o) {
|
|
292
292
|
if (o === null || typeof o != "object")
|
|
293
293
|
return null;
|
|
294
|
-
var h =
|
|
294
|
+
var h = E && o[E] || o[x];
|
|
295
295
|
return typeof h == "function" ? h : null;
|
|
296
296
|
}
|
|
297
|
-
var
|
|
297
|
+
var w = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
298
298
|
function P(o) {
|
|
299
299
|
{
|
|
300
|
-
for (var h = arguments.length, p = new Array(h > 1 ? h - 1 : 0),
|
|
301
|
-
p[
|
|
300
|
+
for (var h = arguments.length, p = new Array(h > 1 ? h - 1 : 0), T = 1; T < h; T++)
|
|
301
|
+
p[T - 1] = arguments[T];
|
|
302
302
|
R("error", o, p);
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
function R(o, h, p) {
|
|
306
306
|
{
|
|
307
|
-
var
|
|
307
|
+
var T = w.ReactDebugCurrentFrame, j = T.getStackAddendum();
|
|
308
308
|
j !== "" && (h += "%s", p = p.concat([j]));
|
|
309
|
-
var
|
|
309
|
+
var M = p.map(function(b) {
|
|
310
310
|
return String(b);
|
|
311
311
|
});
|
|
312
|
-
|
|
312
|
+
M.unshift("Warning: " + h), Function.prototype.apply.call(console[o], console, M);
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
var B = !1,
|
|
316
|
-
|
|
317
|
-
function
|
|
318
|
-
return !!(typeof o == "string" || typeof o == "function" || o === r || o === l ||
|
|
315
|
+
var B = !1, O = !1, m = !1, v = !1, L = !1, k;
|
|
316
|
+
k = Symbol.for("react.module.reference");
|
|
317
|
+
function N(o) {
|
|
318
|
+
return !!(typeof o == "string" || typeof o == "function" || o === r || o === l || L || o === s || o === d || o === g || v || o === I || B || O || m || typeof o == "object" && o !== null && (o.$$typeof === y || o.$$typeof === _ || o.$$typeof === u || o.$$typeof === i || o.$$typeof === c || // This needs to include all possible module reference object
|
|
319
319
|
// types supported by any Flight configuration anywhere since
|
|
320
320
|
// we don't know which Flight build this will end up being used
|
|
321
321
|
// with.
|
|
322
|
-
o.$$typeof ===
|
|
322
|
+
o.$$typeof === k || o.getModuleId !== void 0));
|
|
323
323
|
}
|
|
324
|
-
function
|
|
325
|
-
var
|
|
326
|
-
if (
|
|
327
|
-
return
|
|
324
|
+
function D(o, h, p) {
|
|
325
|
+
var T = o.displayName;
|
|
326
|
+
if (T)
|
|
327
|
+
return T;
|
|
328
328
|
var j = h.displayName || h.name || "";
|
|
329
329
|
return j !== "" ? p + "(" + j + ")" : p;
|
|
330
330
|
}
|
|
@@ -361,15 +361,15 @@ function Xn() {
|
|
|
361
361
|
var p = o;
|
|
362
362
|
return J(p._context) + ".Provider";
|
|
363
363
|
case c:
|
|
364
|
-
return
|
|
365
|
-
case
|
|
366
|
-
var
|
|
367
|
-
return
|
|
364
|
+
return D(o, o.render, "ForwardRef");
|
|
365
|
+
case _:
|
|
366
|
+
var T = o.displayName || null;
|
|
367
|
+
return T !== null ? T : Y(o.type) || "Memo";
|
|
368
368
|
case y: {
|
|
369
|
-
var j = o,
|
|
369
|
+
var j = o, M = j._payload, b = j._init;
|
|
370
370
|
try {
|
|
371
|
-
return Y(b(
|
|
372
|
-
} catch (
|
|
371
|
+
return Y(b(M));
|
|
372
|
+
} catch (C) {
|
|
373
373
|
return null;
|
|
374
374
|
}
|
|
375
375
|
}
|
|
@@ -438,15 +438,15 @@ function Xn() {
|
|
|
438
438
|
oe < 0 && P("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
var Oe =
|
|
441
|
+
var Oe = w.ReactCurrentDispatcher, He;
|
|
442
442
|
function Ee(o, h, p) {
|
|
443
443
|
{
|
|
444
444
|
if (He === void 0)
|
|
445
445
|
try {
|
|
446
446
|
throw Error();
|
|
447
447
|
} catch (j) {
|
|
448
|
-
var
|
|
449
|
-
He =
|
|
448
|
+
var T = j.stack.trim().match(/\n( *(at )?)/);
|
|
449
|
+
He = T && T[1] || "";
|
|
450
450
|
}
|
|
451
451
|
return `
|
|
452
452
|
` + He + o;
|
|
@@ -465,12 +465,12 @@ function Xn() {
|
|
|
465
465
|
if (p !== void 0)
|
|
466
466
|
return p;
|
|
467
467
|
}
|
|
468
|
-
var
|
|
468
|
+
var T;
|
|
469
469
|
$e = !0;
|
|
470
470
|
var j = Error.prepareStackTrace;
|
|
471
471
|
Error.prepareStackTrace = void 0;
|
|
472
|
-
var
|
|
473
|
-
|
|
472
|
+
var M;
|
|
473
|
+
M = Oe.current, Oe.current = null, mn();
|
|
474
474
|
try {
|
|
475
475
|
if (h) {
|
|
476
476
|
var b = function() {
|
|
@@ -484,14 +484,14 @@ function Xn() {
|
|
|
484
484
|
try {
|
|
485
485
|
Reflect.construct(b, []);
|
|
486
486
|
} catch (Q) {
|
|
487
|
-
|
|
487
|
+
T = Q;
|
|
488
488
|
}
|
|
489
489
|
Reflect.construct(o, [], b);
|
|
490
490
|
} else {
|
|
491
491
|
try {
|
|
492
492
|
b.call();
|
|
493
493
|
} catch (Q) {
|
|
494
|
-
|
|
494
|
+
T = Q;
|
|
495
495
|
}
|
|
496
496
|
o.call(b.prototype);
|
|
497
497
|
}
|
|
@@ -499,23 +499,23 @@ function Xn() {
|
|
|
499
499
|
try {
|
|
500
500
|
throw Error();
|
|
501
501
|
} catch (Q) {
|
|
502
|
-
|
|
502
|
+
T = Q;
|
|
503
503
|
}
|
|
504
504
|
o();
|
|
505
505
|
}
|
|
506
506
|
} catch (Q) {
|
|
507
|
-
if (Q &&
|
|
508
|
-
for (var
|
|
509
|
-
`), X =
|
|
510
|
-
`), W =
|
|
507
|
+
if (Q && T && typeof Q.stack == "string") {
|
|
508
|
+
for (var C = Q.stack.split(`
|
|
509
|
+
`), X = T.stack.split(`
|
|
510
|
+
`), W = C.length - 1, z = X.length - 1; W >= 1 && z >= 0 && C[W] !== X[z]; )
|
|
511
511
|
z--;
|
|
512
512
|
for (; W >= 1 && z >= 0; W--, z--)
|
|
513
|
-
if (
|
|
513
|
+
if (C[W] !== X[z]) {
|
|
514
514
|
if (W !== 1 || z !== 1)
|
|
515
515
|
do
|
|
516
|
-
if (W--, z--, z < 0 ||
|
|
516
|
+
if (W--, z--, z < 0 || C[W] !== X[z]) {
|
|
517
517
|
var te = `
|
|
518
|
-
` +
|
|
518
|
+
` + C[W].replace(" at new ", " at ");
|
|
519
519
|
return o.displayName && te.includes("<anonymous>") && (te = te.replace("<anonymous>", o.displayName)), typeof o == "function" && Se.set(o, te), te;
|
|
520
520
|
}
|
|
521
521
|
while (W >= 1 && z >= 0);
|
|
@@ -523,7 +523,7 @@ function Xn() {
|
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
} finally {
|
|
526
|
-
$e = !1, Oe.current =
|
|
526
|
+
$e = !1, Oe.current = M, vn(), Error.prepareStackTrace = j;
|
|
527
527
|
}
|
|
528
528
|
var fe = o ? o.displayName || o.name : "", ce = fe ? Ee(fe) : "";
|
|
529
529
|
return typeof o == "function" && Se.set(o, ce), ce;
|
|
@@ -552,19 +552,19 @@ function Xn() {
|
|
|
552
552
|
switch (o.$$typeof) {
|
|
553
553
|
case c:
|
|
554
554
|
return yn(o.render);
|
|
555
|
-
case
|
|
555
|
+
case _:
|
|
556
556
|
return Re(o.type, h, p);
|
|
557
557
|
case y: {
|
|
558
|
-
var
|
|
558
|
+
var T = o, j = T._payload, M = T._init;
|
|
559
559
|
try {
|
|
560
|
-
return Re(
|
|
560
|
+
return Re(M(j), h, p);
|
|
561
561
|
} catch (b) {
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
565
|
return "";
|
|
566
566
|
}
|
|
567
|
-
var ye = Object.prototype.hasOwnProperty, ot = {}, it =
|
|
567
|
+
var ye = Object.prototype.hasOwnProperty, ot = {}, it = w.ReactDebugCurrentFrame;
|
|
568
568
|
function be(o) {
|
|
569
569
|
if (o) {
|
|
570
570
|
var h = o._owner, p = Re(o.type, o._source, h ? h.type : null);
|
|
@@ -572,22 +572,22 @@ function Xn() {
|
|
|
572
572
|
} else
|
|
573
573
|
it.setExtraStackFrame(null);
|
|
574
574
|
}
|
|
575
|
-
function wn(o, h, p,
|
|
575
|
+
function wn(o, h, p, T, j) {
|
|
576
576
|
{
|
|
577
|
-
var
|
|
577
|
+
var M = Function.call.bind(ye);
|
|
578
578
|
for (var b in o)
|
|
579
|
-
if (
|
|
580
|
-
var
|
|
579
|
+
if (M(o, b)) {
|
|
580
|
+
var C = void 0;
|
|
581
581
|
try {
|
|
582
582
|
if (typeof o[b] != "function") {
|
|
583
|
-
var X = Error((
|
|
583
|
+
var X = Error((T || "React class") + ": " + p + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
584
584
|
throw X.name = "Invariant Violation", X;
|
|
585
585
|
}
|
|
586
|
-
|
|
586
|
+
C = o[b](h, b, T, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
587
587
|
} catch (W) {
|
|
588
|
-
|
|
588
|
+
C = W;
|
|
589
589
|
}
|
|
590
|
-
|
|
590
|
+
C && !(C instanceof Error) && (be(j), P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", T || "React class", p, b, typeof C), be(null)), C instanceof Error && !(C.message in ot) && (ot[C.message] = !0, be(j), P("Failed %s type: %s", p, C.message), be(null));
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
}
|
|
@@ -615,7 +615,7 @@ function Xn() {
|
|
|
615
615
|
if (xn(o))
|
|
616
616
|
return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Tn(o)), st(o);
|
|
617
617
|
}
|
|
618
|
-
var lt =
|
|
618
|
+
var lt = w.ReactCurrentOwner, Cn = {
|
|
619
619
|
key: !0,
|
|
620
620
|
ref: !0,
|
|
621
621
|
__self: !0,
|
|
@@ -662,8 +662,8 @@ function Xn() {
|
|
|
662
662
|
});
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
var Ln = function(o, h, p,
|
|
666
|
-
var
|
|
665
|
+
var Ln = function(o, h, p, T, j, M, b) {
|
|
666
|
+
var C = {
|
|
667
667
|
// This tag allows us to uniquely identify this as a React Element
|
|
668
668
|
$$typeof: t,
|
|
669
669
|
// Built-in properties that belong on the element
|
|
@@ -672,44 +672,44 @@ function Xn() {
|
|
|
672
672
|
ref: p,
|
|
673
673
|
props: b,
|
|
674
674
|
// Record the component responsible for creating this element.
|
|
675
|
-
_owner:
|
|
675
|
+
_owner: M
|
|
676
676
|
};
|
|
677
|
-
return
|
|
677
|
+
return C._store = {}, Object.defineProperty(C._store, "validated", {
|
|
678
678
|
configurable: !1,
|
|
679
679
|
enumerable: !1,
|
|
680
680
|
writable: !0,
|
|
681
681
|
value: !1
|
|
682
|
-
}), Object.defineProperty(
|
|
682
|
+
}), Object.defineProperty(C, "_self", {
|
|
683
683
|
configurable: !1,
|
|
684
684
|
enumerable: !1,
|
|
685
685
|
writable: !1,
|
|
686
|
-
value:
|
|
687
|
-
}), Object.defineProperty(
|
|
686
|
+
value: T
|
|
687
|
+
}), Object.defineProperty(C, "_source", {
|
|
688
688
|
configurable: !1,
|
|
689
689
|
enumerable: !1,
|
|
690
690
|
writable: !1,
|
|
691
691
|
value: j
|
|
692
|
-
}), Object.freeze && (Object.freeze(
|
|
692
|
+
}), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
|
|
693
693
|
};
|
|
694
|
-
function jn(o, h, p,
|
|
694
|
+
function jn(o, h, p, T, j) {
|
|
695
695
|
{
|
|
696
|
-
var
|
|
697
|
-
p !== void 0 && (at(p),
|
|
698
|
-
for (
|
|
699
|
-
ye.call(h,
|
|
696
|
+
var M, b = {}, C = null, X = null;
|
|
697
|
+
p !== void 0 && (at(p), C = "" + p), Sn(h) && (at(h.key), C = "" + h.key), En(h) && (X = h.ref, Rn(h, j));
|
|
698
|
+
for (M in h)
|
|
699
|
+
ye.call(h, M) && !Cn.hasOwnProperty(M) && (b[M] = h[M]);
|
|
700
700
|
if (o && o.defaultProps) {
|
|
701
701
|
var W = o.defaultProps;
|
|
702
|
-
for (
|
|
703
|
-
b[
|
|
702
|
+
for (M in W)
|
|
703
|
+
b[M] === void 0 && (b[M] = W[M]);
|
|
704
704
|
}
|
|
705
|
-
if (
|
|
705
|
+
if (C || X) {
|
|
706
706
|
var z = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
|
|
707
|
-
|
|
707
|
+
C && bn(b, z), X && Pn(b, z);
|
|
708
708
|
}
|
|
709
|
-
return Ln(o,
|
|
709
|
+
return Ln(o, C, X, j, T, lt.current, b);
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
|
-
var Be =
|
|
712
|
+
var Be = w.ReactCurrentOwner, dt = w.ReactDebugCurrentFrame;
|
|
713
713
|
function de(o) {
|
|
714
714
|
if (o) {
|
|
715
715
|
var h = o._owner, p = Re(o.type, o._source, h ? h.type : null);
|
|
@@ -759,8 +759,8 @@ Check the top-level render call using <` + p + ">.");
|
|
|
759
759
|
if (ht[p])
|
|
760
760
|
return;
|
|
761
761
|
ht[p] = !0;
|
|
762
|
-
var
|
|
763
|
-
o && o._owner && o._owner !== Be.current && (
|
|
762
|
+
var T = "";
|
|
763
|
+
o && o._owner && o._owner !== Be.current && (T = " It was passed a child from " + Y(o._owner.type) + "."), de(o), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, T), de(null);
|
|
764
764
|
}
|
|
765
765
|
}
|
|
766
766
|
function vt(o, h) {
|
|
@@ -769,15 +769,15 @@ Check the top-level render call using <` + p + ">.");
|
|
|
769
769
|
return;
|
|
770
770
|
if (Ue(o))
|
|
771
771
|
for (var p = 0; p < o.length; p++) {
|
|
772
|
-
var
|
|
773
|
-
ze(
|
|
772
|
+
var T = o[p];
|
|
773
|
+
ze(T) && mt(T, h);
|
|
774
774
|
}
|
|
775
775
|
else if (ze(o))
|
|
776
776
|
o._store && (o._store.validated = !0);
|
|
777
777
|
else if (o) {
|
|
778
|
-
var j =
|
|
778
|
+
var j = S(o);
|
|
779
779
|
if (typeof j == "function" && j !== o.entries)
|
|
780
|
-
for (var
|
|
780
|
+
for (var M = j.call(o), b; !(b = M.next()).done; )
|
|
781
781
|
ze(b.value) && mt(b.value, h);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
@@ -792,13 +792,13 @@ Check the top-level render call using <` + p + ">.");
|
|
|
792
792
|
p = h.propTypes;
|
|
793
793
|
else if (typeof h == "object" && (h.$$typeof === c || // Note: Memo only checks outer props here.
|
|
794
794
|
// Inner props are checked in the reconciler.
|
|
795
|
-
h.$$typeof ===
|
|
795
|
+
h.$$typeof === _))
|
|
796
796
|
p = h.propTypes;
|
|
797
797
|
else
|
|
798
798
|
return;
|
|
799
799
|
if (p) {
|
|
800
|
-
var
|
|
801
|
-
wn(p, o.props, "prop",
|
|
800
|
+
var T = Y(h);
|
|
801
|
+
wn(p, o.props, "prop", T, o);
|
|
802
802
|
} else if (h.PropTypes !== void 0 && !We) {
|
|
803
803
|
We = !0;
|
|
804
804
|
var j = Y(h);
|
|
@@ -810,9 +810,9 @@ Check the top-level render call using <` + p + ">.");
|
|
|
810
810
|
function Mn(o) {
|
|
811
811
|
{
|
|
812
812
|
for (var h = Object.keys(o.props), p = 0; p < h.length; p++) {
|
|
813
|
-
var
|
|
814
|
-
if (
|
|
815
|
-
de(o), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
813
|
+
var T = h[p];
|
|
814
|
+
if (T !== "children" && T !== "key") {
|
|
815
|
+
de(o), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", T), de(null);
|
|
816
816
|
break;
|
|
817
817
|
}
|
|
818
818
|
}
|
|
@@ -820,24 +820,24 @@ Check the top-level render call using <` + p + ">.");
|
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
var pt = {};
|
|
823
|
-
function yt(o, h, p,
|
|
823
|
+
function yt(o, h, p, T, j, M) {
|
|
824
824
|
{
|
|
825
|
-
var b =
|
|
825
|
+
var b = N(o);
|
|
826
826
|
if (!b) {
|
|
827
|
-
var
|
|
828
|
-
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (
|
|
827
|
+
var C = "";
|
|
828
|
+
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
829
829
|
var X = In();
|
|
830
|
-
X ?
|
|
830
|
+
X ? C += X : C += ft();
|
|
831
831
|
var W;
|
|
832
|
-
o === null ? W = "null" : Ue(o) ? W = "array" : o !== void 0 && o.$$typeof === t ? (W = "<" + (Y(o.type) || "Unknown") + " />",
|
|
832
|
+
o === null ? W = "null" : Ue(o) ? W = "array" : o !== void 0 && o.$$typeof === t ? (W = "<" + (Y(o.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : W = typeof o, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, C);
|
|
833
833
|
}
|
|
834
|
-
var z = jn(o, h, p, j,
|
|
834
|
+
var z = jn(o, h, p, j, M);
|
|
835
835
|
if (z == null)
|
|
836
836
|
return z;
|
|
837
837
|
if (b) {
|
|
838
838
|
var te = h.children;
|
|
839
839
|
if (te !== void 0)
|
|
840
|
-
if (
|
|
840
|
+
if (T)
|
|
841
841
|
if (Ue(te)) {
|
|
842
842
|
for (var fe = 0; fe < te.length; fe++)
|
|
843
843
|
vt(te[fe], o);
|
|
@@ -879,12 +879,12 @@ function Jn() {
|
|
|
879
879
|
return Ct || (Ct = 1, process.env.NODE_ENV === "production" ? Ie.exports = Gn() : Ie.exports = Xn()), Ie.exports;
|
|
880
880
|
}
|
|
881
881
|
var a = Jn();
|
|
882
|
-
const Ut = typeof window != "undefined" ? Wn :
|
|
882
|
+
const Ut = typeof window != "undefined" ? Wn : V;
|
|
883
883
|
function Ce(e, t) {
|
|
884
|
-
const n =
|
|
884
|
+
const n = A(e);
|
|
885
885
|
Ut(() => {
|
|
886
886
|
n.current = e;
|
|
887
|
-
}, [e]),
|
|
887
|
+
}, [e]), V(() => {
|
|
888
888
|
if (t === null)
|
|
889
889
|
return;
|
|
890
890
|
const r = setInterval(() => {
|
|
@@ -909,25 +909,25 @@ function Qn(e, t) {
|
|
|
909
909
|
second: "2-digit",
|
|
910
910
|
hour12: !1
|
|
911
911
|
}).formatToParts(e), g = parseInt(
|
|
912
|
-
((n = d.find((
|
|
912
|
+
((n = d.find((S) => S.type === "year")) == null ? void 0 : n.value) || "0",
|
|
913
913
|
10
|
|
914
|
-
),
|
|
915
|
-
((r = d.find((
|
|
914
|
+
), _ = parseInt(
|
|
915
|
+
((r = d.find((S) => S.type === "month")) == null ? void 0 : r.value) || "0",
|
|
916
916
|
10
|
|
917
917
|
) - 1, y = parseInt(
|
|
918
|
-
((s = d.find((
|
|
918
|
+
((s = d.find((S) => S.type === "day")) == null ? void 0 : s.value) || "0",
|
|
919
919
|
10
|
|
920
|
-
),
|
|
921
|
-
((l = d.find((
|
|
920
|
+
), I = parseInt(
|
|
921
|
+
((l = d.find((S) => S.type === "hour")) == null ? void 0 : l.value) || "0",
|
|
922
922
|
10
|
|
923
|
-
),
|
|
924
|
-
((u = d.find((
|
|
923
|
+
), E = parseInt(
|
|
924
|
+
((u = d.find((S) => S.type === "minute")) == null ? void 0 : u.value) || "0",
|
|
925
925
|
10
|
|
926
|
-
),
|
|
927
|
-
((i = d.find((
|
|
926
|
+
), x = parseInt(
|
|
927
|
+
((i = d.find((S) => S.type === "second")) == null ? void 0 : i.value) || "0",
|
|
928
928
|
10
|
|
929
929
|
);
|
|
930
|
-
return new Date(g,
|
|
930
|
+
return new Date(g, _, y, I, E, x);
|
|
931
931
|
} catch (c) {
|
|
932
932
|
return console.warn(
|
|
933
933
|
`Failed to convert date to timezone ${t}, returning original date:`,
|
|
@@ -1215,12 +1215,12 @@ const cr = () => zn(), ur = (e, t) => ({
|
|
|
1215
1215
|
setError: (t) => e({ error: t })
|
|
1216
1216
|
}), pr = () => ({
|
|
1217
1217
|
eventEmitter: cr()
|
|
1218
|
-
}), yr = (e) => () =>
|
|
1218
|
+
}), yr = (e) => () => F({}, e), gr = (e, t) => Mt()((...n) => F(F(F(F(F(F(F(F({}, ur(...n)), dr(...n)), fr(...n)), mr(...n)), hr(...n)), vr(...n)), pr(...n)), yr({
|
|
1219
1219
|
techRef: e,
|
|
1220
1220
|
containerRef: t
|
|
1221
1221
|
})(...n))), qt = It(null);
|
|
1222
1222
|
function wr({ children: e }) {
|
|
1223
|
-
const t =
|
|
1223
|
+
const t = A(null), n = A(null), r = A(null);
|
|
1224
1224
|
return t.current || (t.current = gr(n, r)), /* @__PURE__ */ a.jsx(qt.Provider, { value: t.current, children: e });
|
|
1225
1225
|
}
|
|
1226
1226
|
const f = (e) => {
|
|
@@ -1228,7 +1228,7 @@ const f = (e) => {
|
|
|
1228
1228
|
if (!t)
|
|
1229
1229
|
throw new Error("usePlayerStore must be used within PlayerStoreProvider");
|
|
1230
1230
|
return Dt(t, e);
|
|
1231
|
-
}, _r = "0.0.
|
|
1231
|
+
}, _r = "0.0.53", Je = {
|
|
1232
1232
|
version: _r
|
|
1233
1233
|
}, Ye = 11e3, Ze = {
|
|
1234
1234
|
DEBUG: 2,
|
|
@@ -1242,80 +1242,81 @@ function Yt({
|
|
|
1242
1242
|
delay: r,
|
|
1243
1243
|
url: s
|
|
1244
1244
|
}) {
|
|
1245
|
-
const l =
|
|
1245
|
+
const l = A(null), u = A(!1), [i, c] = G(null), d = f((w) => w.eventEmitter), g = f((w) => w.isPlaying), _ = s.includes("staging") ? "stg" : "prd", y = _ === "stg" ? "https://collector-staging.spectar.tv/ingest" : "https://collector.spectar.tv/ingest", I = _ === "stg" ? "spectar_fitnessanny_staging" : "spectar_fitnessanny_production";
|
|
1246
1246
|
u.current = g;
|
|
1247
|
-
const
|
|
1247
|
+
const E = H(
|
|
1248
1248
|
async ({
|
|
1249
1249
|
type: w,
|
|
1250
|
-
message:
|
|
1251
|
-
level:
|
|
1252
|
-
duration:
|
|
1253
|
-
valueStr1:
|
|
1254
|
-
valueStr2:
|
|
1250
|
+
message: P,
|
|
1251
|
+
level: R = Ze.INFO,
|
|
1252
|
+
duration: B,
|
|
1253
|
+
valueStr1: O,
|
|
1254
|
+
valueStr2: m
|
|
1255
1255
|
}) => {
|
|
1256
|
-
const
|
|
1256
|
+
const v = {
|
|
1257
1257
|
content_kind: n,
|
|
1258
1258
|
datetime: {
|
|
1259
1259
|
date: tr(),
|
|
1260
1260
|
timezone: nr()
|
|
1261
1261
|
},
|
|
1262
|
-
|
|
1262
|
+
installation: I,
|
|
1263
|
+
level_num: R,
|
|
1263
1264
|
log_source: "fitnessanny_player",
|
|
1264
1265
|
capp_version: Je.version,
|
|
1265
|
-
message:
|
|
1266
|
+
message: P,
|
|
1266
1267
|
target_index: w === "client" ? "client_log" : "watching_activity_log"
|
|
1267
1268
|
};
|
|
1268
|
-
e && (
|
|
1269
|
-
const
|
|
1269
|
+
e && (v.title = e), t && (v.value_int1 = t), O && (v.value_str1 = O), m && (v.value_str2 = m), w === "watch" && (B && (v.interval_duration = B), r && (v.catchup_time = r));
|
|
1270
|
+
const L = await fetch(y, {
|
|
1270
1271
|
method: "POST",
|
|
1271
|
-
body: JSON.stringify(
|
|
1272
|
+
body: JSON.stringify(v)
|
|
1272
1273
|
});
|
|
1273
|
-
if (!
|
|
1274
|
-
throw new Error(`HTTP error! status: ${
|
|
1274
|
+
if (!L.ok)
|
|
1275
|
+
throw new Error(`HTTP error! status: ${L.status}`);
|
|
1275
1276
|
},
|
|
1276
|
-
[y, r, t, n, e]
|
|
1277
|
-
),
|
|
1277
|
+
[y, r, t, I, n, e]
|
|
1278
|
+
), x = H((w) => {
|
|
1278
1279
|
l.current = w != null ? w : /* @__PURE__ */ new Date();
|
|
1279
|
-
}, []),
|
|
1280
|
+
}, []), S = H(
|
|
1280
1281
|
async (w) => {
|
|
1281
|
-
!w && l.current && (w = er(l.current, /* @__PURE__ */ new Date(), "milliseconds")), console.log("[Player][Activity]", "Watching", w), await
|
|
1282
|
+
!w && l.current && (w = er(l.current, /* @__PURE__ */ new Date(), "milliseconds")), console.log("[Player][Activity]", "Watching", w), await E({ type: "watch", message: "WATCHING", duration: w });
|
|
1282
1283
|
},
|
|
1283
|
-
[
|
|
1284
|
+
[E]
|
|
1284
1285
|
);
|
|
1285
1286
|
return Ce(() => {
|
|
1286
|
-
|
|
1287
|
-
}, i),
|
|
1287
|
+
S(i), x();
|
|
1288
|
+
}, i), V(() => {
|
|
1288
1289
|
const w = () => {
|
|
1289
|
-
c(Ye),
|
|
1290
|
-
}, S = () => {
|
|
1291
|
-
c(null), x({ type: "watch", message: "PAUSE" }), C(), L();
|
|
1290
|
+
c(Ye), E({ type: "watch", message: "PLAY" }), x();
|
|
1292
1291
|
}, P = () => {
|
|
1293
|
-
c(
|
|
1292
|
+
c(null), E({ type: "watch", message: "PAUSE" }), S(), x();
|
|
1294
1293
|
}, R = () => {
|
|
1295
|
-
c(
|
|
1294
|
+
c(Ye), E({ type: "watch", message: "RESUME" }), x();
|
|
1296
1295
|
}, B = () => {
|
|
1297
|
-
c(null),
|
|
1298
|
-
},
|
|
1299
|
-
|
|
1296
|
+
c(null), u.current && (E({ type: "watch", message: "STOP" }), S()), c(Ye), E({ type: "watch", message: "PLAY" }), x();
|
|
1297
|
+
}, O = () => {
|
|
1298
|
+
c(null), E({ type: "watch", message: "STOP" }), u.current && S(), x();
|
|
1299
|
+
}, m = ({ level: L }) => {
|
|
1300
|
+
L && E({
|
|
1300
1301
|
type: "client",
|
|
1301
1302
|
message: "QUALITY_CHANGE",
|
|
1302
1303
|
level: Ze.DEBUG,
|
|
1303
|
-
valueStr1:
|
|
1304
|
+
valueStr1: L
|
|
1304
1305
|
});
|
|
1305
|
-
},
|
|
1306
|
-
let
|
|
1307
|
-
|
|
1306
|
+
}, v = (L) => {
|
|
1307
|
+
let k = "UNKNOWN_ERROR", N = "Unknown error occurred";
|
|
1308
|
+
L instanceof MediaError && (L.code && (k = `${L.code}`), L.message && (N = `${L.message}`)), E({
|
|
1308
1309
|
type: "client",
|
|
1309
1310
|
message: "ERROR",
|
|
1310
1311
|
level: Ze.WARNING,
|
|
1311
|
-
valueStr1:
|
|
1312
|
-
valueStr2:
|
|
1312
|
+
valueStr1: k,
|
|
1313
|
+
valueStr2: N
|
|
1313
1314
|
});
|
|
1314
1315
|
};
|
|
1315
|
-
return d.on("play", w), d.on("pause",
|
|
1316
|
-
d.off("play", w), d.off("pause",
|
|
1316
|
+
return d.on("play", w), d.on("pause", P), d.on("resume", R), d.on("restart", B), d.on("ended", O), d.on("qualityChange", m), d.on("error", v), () => {
|
|
1317
|
+
d.off("play", w), d.off("pause", P), d.off("resume", R), d.off("restart", B), d.off("ended", O), d.off("qualityChange", m), d.off("error", v);
|
|
1317
1318
|
};
|
|
1318
|
-
}, [d,
|
|
1319
|
+
}, [d, E, x, S]), null;
|
|
1319
1320
|
}
|
|
1320
1321
|
const Tr = () => Mt((e) => ({
|
|
1321
1322
|
delay: 0,
|
|
@@ -1327,11 +1328,11 @@ const Tr = () => Mt((e) => ({
|
|
|
1327
1328
|
})), Zt = It(
|
|
1328
1329
|
null
|
|
1329
1330
|
), xr = ({ children: e }) => {
|
|
1330
|
-
const t =
|
|
1331
|
+
const t = A(
|
|
1331
1332
|
null
|
|
1332
1333
|
);
|
|
1333
1334
|
return t.current || (t.current = Tr()), /* @__PURE__ */ a.jsx(Zt.Provider, { value: t.current, children: e });
|
|
1334
|
-
},
|
|
1335
|
+
}, U = (e) => {
|
|
1335
1336
|
const t = kt(Zt);
|
|
1336
1337
|
if (!t)
|
|
1337
1338
|
throw new Error(
|
|
@@ -1350,16 +1351,16 @@ function Kt(e) {
|
|
|
1350
1351
|
}
|
|
1351
1352
|
}
|
|
1352
1353
|
function Cr({ url: e }) {
|
|
1353
|
-
const { video_id: t } = Kt(e), n =
|
|
1354
|
-
return /* @__PURE__ */ a.jsx(
|
|
1354
|
+
const { video_id: t } = Kt(e), n = U((s) => s.delay), r = t ? Number(t) : void 0;
|
|
1355
|
+
return r ? /* @__PURE__ */ a.jsx(
|
|
1355
1356
|
Yt,
|
|
1356
1357
|
{
|
|
1357
1358
|
kind: n ? "catchup" : "live",
|
|
1358
1359
|
delay: n,
|
|
1359
1360
|
url: e,
|
|
1360
|
-
id:
|
|
1361
|
+
id: r
|
|
1361
1362
|
}
|
|
1362
|
-
);
|
|
1363
|
+
) : null;
|
|
1363
1364
|
}
|
|
1364
1365
|
const Er = "_playerNotice_x3acc_1", Sr = "_playerNoticeTitle_x3acc_19", Rr = "_playerNoticeText_x3acc_28", br = "_playerNoticeLowZIndex_x3acc_37", ie = {
|
|
1365
1366
|
playerNotice: Er,
|
|
@@ -1443,21 +1444,21 @@ async function kr(e) {
|
|
|
1443
1444
|
}
|
|
1444
1445
|
function Dr(n) {
|
|
1445
1446
|
var r = n, { url: e } = r, t = re(r, ["url"]);
|
|
1446
|
-
const [s, l] = G(!0), u =
|
|
1447
|
+
const [s, l] = G(!0), u = U((d) => d.startDate), i = U((d) => d.setStartDate), c = H(async () => {
|
|
1447
1448
|
const d = await kr(e);
|
|
1448
1449
|
d && i(d);
|
|
1449
1450
|
}, [e, i]);
|
|
1450
|
-
return
|
|
1451
|
+
return V(() => {
|
|
1451
1452
|
(async () => {
|
|
1452
1453
|
l(!0), await c(), l(!1);
|
|
1453
1454
|
})();
|
|
1454
|
-
}, [c]), Ce(c, u ? null : 5e3), s ? null : /* @__PURE__ */ a.jsx(Mr,
|
|
1455
|
+
}, [c]), Ce(c, u ? null : 5e3), s ? null : /* @__PURE__ */ a.jsx(Mr, F({}, t));
|
|
1455
1456
|
}
|
|
1456
1457
|
function Mr({
|
|
1457
1458
|
children: e,
|
|
1458
1459
|
messages: t
|
|
1459
1460
|
}) {
|
|
1460
|
-
const n =
|
|
1461
|
+
const n = U((u) => u.startDate), r = f((u) => u.isStarted);
|
|
1461
1462
|
return Pr(r ? null : 5e3), n ? Date.now() < n.getTime() ? /* @__PURE__ */ a.jsx(
|
|
1462
1463
|
Nr,
|
|
1463
1464
|
{
|
|
@@ -1482,10 +1483,10 @@ function Nr({ startDate: e, title: t, message: n }) {
|
|
|
1482
1483
|
}
|
|
1483
1484
|
function Gt({ callback: e }) {
|
|
1484
1485
|
const t = f((n) => n.eventEmitter);
|
|
1485
|
-
return
|
|
1486
|
-
const n = () => e("play", void 0), r = () => e("pause", void 0), s = () => e("resume", void 0), l = () => e("restart", void 0), u = () => e("ended", void 0), i = () => e("seeking", void 0), c = () => e("seeked", void 0), d = (
|
|
1487
|
-
return t.on("play", n), t.on("pause", r), t.on("resume", s), t.on("restart", l), t.on("ended", u), t.on("seeking", i), t.on("seeked", c), t.on("volumeChange", d), t.on("fullscreenChange", g), t.on("qualityChange",
|
|
1488
|
-
t.off("play", n), t.off("pause", r), t.off("resume", s), t.off("restart", l), t.off("ended", u), t.off("seeking", i), t.off("seeked", c), t.off("volumeChange", d), t.off("fullscreenChange", g), t.off("qualityChange",
|
|
1486
|
+
return V(() => {
|
|
1487
|
+
const n = () => e("play", void 0), r = () => e("pause", void 0), s = () => e("resume", void 0), l = () => e("restart", void 0), u = () => e("ended", void 0), i = () => e("seeking", void 0), c = () => e("seeked", void 0), d = (w) => e("volumeChange", w), g = (w) => e("fullscreenChange", w), _ = (w) => e("qualityChange", w), y = (w) => e("loadedMetadata", w), I = () => e("loadStart", void 0), E = () => e("playing", void 0), x = () => e("waiting", void 0), S = () => e("error", void 0);
|
|
1488
|
+
return t.on("play", n), t.on("pause", r), t.on("resume", s), t.on("restart", l), t.on("ended", u), t.on("seeking", i), t.on("seeked", c), t.on("volumeChange", d), t.on("fullscreenChange", g), t.on("qualityChange", _), t.on("loadedMetadata", y), t.on("loadStart", I), t.on("playing", E), t.on("waiting", x), t.on("error", S), () => {
|
|
1489
|
+
t.off("play", n), t.off("pause", r), t.off("resume", s), t.off("restart", l), t.off("ended", u), t.off("seeking", i), t.off("seeked", c), t.off("volumeChange", d), t.off("fullscreenChange", g), t.off("qualityChange", _), t.off("loadedMetadata", y), t.off("loadStart", I), t.off("playing", E), t.off("waiting", x), t.off("error", S);
|
|
1489
1490
|
};
|
|
1490
1491
|
}, [e, t]), null;
|
|
1491
1492
|
}
|
|
@@ -1520,8 +1521,8 @@ function Ar({
|
|
|
1520
1521
|
}), s;
|
|
1521
1522
|
}
|
|
1522
1523
|
function Or({ callback: e }) {
|
|
1523
|
-
const t =
|
|
1524
|
-
return
|
|
1524
|
+
const t = U((l) => l.delay), n = U((l) => l.startDate), r = n ? n.getTime() : 0, s = f((l) => l.eventEmitter);
|
|
1525
|
+
return V(() => {
|
|
1525
1526
|
const l = () => e("timeUpdate", {
|
|
1526
1527
|
currentTime: Jt(r, t),
|
|
1527
1528
|
duration: -1
|
|
@@ -1532,7 +1533,7 @@ function Or({ callback: e }) {
|
|
|
1532
1533
|
}, [e, t, s, r]), /* @__PURE__ */ a.jsx(Gt, { callback: e });
|
|
1533
1534
|
}
|
|
1534
1535
|
function Qt() {
|
|
1535
|
-
const e = f((i) => i.exitFullscreen), t = f((i) => i.isFullscreen), n = f((i) => i.isFullscreenReady), r = f((i) => i.requestFullscreen), s = f((i) => i.setVolume), l = f((i) => i.volume), u =
|
|
1536
|
+
const e = f((i) => i.exitFullscreen), t = f((i) => i.isFullscreen), n = f((i) => i.isFullscreenReady), r = f((i) => i.requestFullscreen), s = f((i) => i.setVolume), l = f((i) => i.volume), u = H(
|
|
1536
1537
|
(i) => {
|
|
1537
1538
|
let c = !1;
|
|
1538
1539
|
if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
|
|
@@ -1562,12 +1563,12 @@ function Qt() {
|
|
|
1562
1563
|
l
|
|
1563
1564
|
]
|
|
1564
1565
|
);
|
|
1565
|
-
return
|
|
1566
|
+
return V(() => (document.addEventListener("keydown", u), () => {
|
|
1566
1567
|
document.removeEventListener("keydown", u);
|
|
1567
1568
|
}), [u]), null;
|
|
1568
1569
|
}
|
|
1569
1570
|
function Hr() {
|
|
1570
|
-
const e =
|
|
1571
|
+
const e = U((i) => i.delay), t = f((i) => i.isPlaying), n = f((i) => i.pause), r = f((i) => i.getPauseTimeDiff), s = f((i) => i.play), l = U((i) => i.setDelay), u = H(
|
|
1571
1572
|
(i) => {
|
|
1572
1573
|
let c = !1;
|
|
1573
1574
|
if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
|
|
@@ -1593,7 +1594,7 @@ function Hr() {
|
|
|
1593
1594
|
},
|
|
1594
1595
|
[e, r, t, n, s, l]
|
|
1595
1596
|
);
|
|
1596
|
-
return
|
|
1597
|
+
return V(() => (document.addEventListener("keydown", u), () => {
|
|
1597
1598
|
document.removeEventListener("keydown", u);
|
|
1598
1599
|
}), [u]), /* @__PURE__ */ a.jsx(Qt, {});
|
|
1599
1600
|
}
|
|
@@ -1604,60 +1605,60 @@ function $r({ children: e }) {
|
|
|
1604
1605
|
return /* @__PURE__ */ a.jsx(xr, { children: /* @__PURE__ */ a.jsx(en, { children: e }) });
|
|
1605
1606
|
}
|
|
1606
1607
|
function Ur({ url: e, isLive: t, messages: n }) {
|
|
1607
|
-
const r =
|
|
1608
|
+
const r = A(null), s = f((m) => m.level), l = f((m) => m.levels), u = f((m) => m.setLevel), i = f((m) => m.setLevels), c = f((m) => m.logLevel), d = f((m) => m.techRef), g = f((m) => m.setError), _ = A(0), y = A(null), I = 50, E = 1e4, x = H(
|
|
1608
1609
|
(m) => {
|
|
1609
1610
|
if (r.current && (r.current.nextLevel = m, u(null), l)) {
|
|
1610
|
-
const v = l.map((
|
|
1611
|
-
selected:
|
|
1611
|
+
const v = l.map((L) => he(F({}, L), {
|
|
1612
|
+
selected: L.value === m
|
|
1612
1613
|
}));
|
|
1613
1614
|
i(v);
|
|
1614
1615
|
}
|
|
1615
1616
|
},
|
|
1616
1617
|
[l, u, i]
|
|
1617
|
-
),
|
|
1618
|
+
), S = H(() => {
|
|
1618
1619
|
r.current && (console.log("[Player][HLS] MEDIA_ATTACHED"), r.current.loadSource(e));
|
|
1619
|
-
}, [e]),
|
|
1620
|
+
}, [e]), w = H(() => {
|
|
1620
1621
|
if (!r.current) return;
|
|
1621
|
-
console.log("[Player][HLS] MANIFEST_LOADED"), g(null), y.current && (clearTimeout(y.current), y.current = null),
|
|
1622
|
-
const m = r.current.levels, v = r.current.currentLevel,
|
|
1622
|
+
console.log("[Player][HLS] MANIFEST_LOADED"), g(null), y.current && (clearTimeout(y.current), y.current = null), _.current = 0;
|
|
1623
|
+
const m = r.current.levels, v = r.current.currentLevel, L = r.current.autoLevelEnabled;
|
|
1623
1624
|
i(
|
|
1624
1625
|
Ar({
|
|
1625
|
-
levels: m.map((
|
|
1626
|
-
const { bitrate:
|
|
1626
|
+
levels: m.map((k, N) => {
|
|
1627
|
+
const { bitrate: D, height: J, width: Y } = k;
|
|
1627
1628
|
return {
|
|
1628
|
-
bitrate:
|
|
1629
|
+
bitrate: D,
|
|
1629
1630
|
height: J,
|
|
1630
|
-
index:
|
|
1631
|
+
index: N,
|
|
1631
1632
|
width: Y
|
|
1632
1633
|
};
|
|
1633
1634
|
}),
|
|
1634
1635
|
level: v,
|
|
1635
|
-
isAuto:
|
|
1636
|
+
isAuto: L
|
|
1636
1637
|
})
|
|
1637
1638
|
);
|
|
1638
|
-
}, [g, i]), P =
|
|
1639
|
+
}, [g, i]), P = H(() => {
|
|
1639
1640
|
if (!r.current) return;
|
|
1640
1641
|
console.log("[Player][HLS] LEVEL_SWITCHED");
|
|
1641
1642
|
const m = r.current.levels, v = r.current.currentLevel;
|
|
1642
1643
|
if (m[v] ? JSON.stringify(m[v]) : null) {
|
|
1643
|
-
let
|
|
1644
|
-
m[v].height ?
|
|
1644
|
+
let k = "";
|
|
1645
|
+
m[v].height ? k = `${m[v].height}p` : m[v].bitrate && (k = `${m[v].bitrate}bps`), c(k);
|
|
1645
1646
|
}
|
|
1646
|
-
}, [c]), R =
|
|
1647
|
+
}, [c]), R = H(
|
|
1647
1648
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1648
1649
|
(m, v) => {
|
|
1649
1650
|
if (r.current && v.fatal) {
|
|
1650
|
-
let
|
|
1651
|
+
let L, k = "UNKNOWN_ERROR";
|
|
1651
1652
|
switch (v.type) {
|
|
1652
1653
|
case ee.ErrorTypes.NETWORK_ERROR:
|
|
1653
|
-
|
|
1654
|
+
L = n.unableToPlay, console.log("[Player][HLS] NETWORK_ERROR", v), t ? (_.current < I && (y.current && clearTimeout(y.current), _.current += 1, y.current = setTimeout(() => {
|
|
1654
1655
|
if (r.current)
|
|
1655
1656
|
try {
|
|
1656
1657
|
console.log("[Player][HLS] Retrying stream..."), r.current.loadSource(e);
|
|
1657
|
-
} catch (
|
|
1658
|
-
console.error("[Player][HLS] Retry failed:",
|
|
1658
|
+
} catch (N) {
|
|
1659
|
+
console.error("[Player][HLS] Retry failed:", N);
|
|
1659
1660
|
}
|
|
1660
|
-
},
|
|
1661
|
+
}, E)), k = "LIVE_MANIFEST_LOAD_ERROR") : (r.current.startLoad(), k = "NETWORK_ERROR"), g({ message: L, code: k, tech: "hls" });
|
|
1661
1662
|
break;
|
|
1662
1663
|
case ee.ErrorTypes.MEDIA_ERROR:
|
|
1663
1664
|
r.current.recoverMediaError();
|
|
@@ -1666,7 +1667,7 @@ function Ur({ url: e, isLive: t, messages: n }) {
|
|
|
1666
1667
|
}
|
|
1667
1668
|
},
|
|
1668
1669
|
[t, e, g, n]
|
|
1669
|
-
), B =
|
|
1670
|
+
), B = H(() => {
|
|
1670
1671
|
if (!d.current) return;
|
|
1671
1672
|
const m = {
|
|
1672
1673
|
startLevel: -1,
|
|
@@ -1675,29 +1676,29 @@ function Ur({ url: e, isLive: t, messages: n }) {
|
|
|
1675
1676
|
};
|
|
1676
1677
|
or ? (m.backBufferLength = -1, m.enableWorker = !1) : t ? m.backBufferLength = 10 : m.backBufferLength = 60;
|
|
1677
1678
|
try {
|
|
1678
|
-
console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(m)), console.log("[Player][HLS] Version", ee.version), r.current = new ee(m), r.current.attachMedia(d.current), r.current.on(ee.Events.MEDIA_ATTACHED,
|
|
1679
|
+
console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(m)), console.log("[Player][HLS] Version", ee.version), r.current = new ee(m), r.current.attachMedia(d.current), r.current.on(ee.Events.MEDIA_ATTACHED, S), r.current.on(ee.Events.MANIFEST_LOADED, w), r.current.on(ee.Events.LEVEL_SWITCHED, P), r.current.on(ee.Events.ERROR, R);
|
|
1679
1680
|
} catch (v) {
|
|
1680
1681
|
throw new Error(`Error initializing Hls: ${v}`);
|
|
1681
1682
|
}
|
|
1682
1683
|
}, [
|
|
1683
|
-
S,
|
|
1684
1684
|
w,
|
|
1685
|
+
S,
|
|
1685
1686
|
P,
|
|
1686
1687
|
R,
|
|
1687
1688
|
t,
|
|
1688
1689
|
d,
|
|
1689
1690
|
e
|
|
1690
|
-
]),
|
|
1691
|
-
r.current && (r.current.off(ee.Events.MEDIA_ATTACHED,
|
|
1691
|
+
]), O = H(() => {
|
|
1692
|
+
r.current && (r.current.off(ee.Events.MEDIA_ATTACHED, S), r.current.off(ee.Events.MANIFEST_LOADED, w), r.current.off(ee.Events.LEVEL_SWITCHED, P), r.current.off(ee.Events.ERROR, R), r.current.destroy(), r.current = null), y.current && (clearTimeout(y.current), y.current = null), _.current = 0;
|
|
1692
1693
|
}, [
|
|
1693
1694
|
P,
|
|
1694
|
-
S,
|
|
1695
1695
|
w,
|
|
1696
|
+
S,
|
|
1696
1697
|
R
|
|
1697
1698
|
]);
|
|
1698
|
-
return
|
|
1699
|
-
s !== null &&
|
|
1700
|
-
}, [s,
|
|
1699
|
+
return V(() => {
|
|
1700
|
+
s !== null && x(s);
|
|
1701
|
+
}, [s, x]), V(() => (ee.isSupported() && B(), O), [O, B]), null;
|
|
1701
1702
|
}
|
|
1702
1703
|
const Br = "_playerVideo_wc0sm_1", Wr = {
|
|
1703
1704
|
playerVideo: Br
|
|
@@ -1708,23 +1709,23 @@ function tn({
|
|
|
1708
1709
|
isMuted: n = !1,
|
|
1709
1710
|
messages: r
|
|
1710
1711
|
}) {
|
|
1711
|
-
const s = f((v) => v.destroy), l = f((v) => v.handleDurationChange), u = f((v) => v.handleEnd), i = f((v) => v.handleLoadedMetadata), c = f((v) => v.handleLoadStart), d = f((v) => v.handlePause), g = f((v) => v.handlePlay),
|
|
1712
|
-
onTimeUpdate:
|
|
1712
|
+
const s = f((v) => v.destroy), l = f((v) => v.handleDurationChange), u = f((v) => v.handleEnd), i = f((v) => v.handleLoadedMetadata), c = f((v) => v.handleLoadStart), d = f((v) => v.handlePause), g = f((v) => v.handlePlay), _ = f((v) => v.handlePlaying), y = f((v) => v.handleSeeked), I = f((v) => v.handleSeeking), E = f((v) => v.handleTimeUpdate), x = f((v) => v.handleWaiting), S = f((v) => v.handleVolumeChange), w = f((v) => v.handleError), P = f((v) => v.techRef), R = A(null), B = () => t ? {
|
|
1713
|
+
onTimeUpdate: O
|
|
1713
1714
|
} : {
|
|
1714
1715
|
onDurationChange: l,
|
|
1715
1716
|
onSeeked: y,
|
|
1716
|
-
onSeeking:
|
|
1717
|
-
onTimeUpdate:
|
|
1718
|
-
},
|
|
1719
|
-
(!R.current || Date.now() - R.current >= 1e3) && (
|
|
1717
|
+
onSeeking: I,
|
|
1718
|
+
onTimeUpdate: O
|
|
1719
|
+
}, O = () => {
|
|
1720
|
+
(!R.current || Date.now() - R.current >= 1e3) && (E(), R.current = Date.now());
|
|
1720
1721
|
}, m = B();
|
|
1721
|
-
return
|
|
1722
|
+
return V(() => () => {
|
|
1722
1723
|
s();
|
|
1723
1724
|
}, [s]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1724
1725
|
/* @__PURE__ */ a.jsx(Ur, { isLive: t, url: e, messages: r }),
|
|
1725
1726
|
/* @__PURE__ */ a.jsx(
|
|
1726
1727
|
"video",
|
|
1727
|
-
|
|
1728
|
+
F({
|
|
1728
1729
|
ref: P,
|
|
1729
1730
|
className: Wr.playerVideo,
|
|
1730
1731
|
playsInline: !0,
|
|
@@ -1734,26 +1735,26 @@ function tn({
|
|
|
1734
1735
|
preload: "auto",
|
|
1735
1736
|
crossOrigin: "anonymous",
|
|
1736
1737
|
onEnded: u,
|
|
1737
|
-
onError:
|
|
1738
|
+
onError: w,
|
|
1738
1739
|
onLoadedMetadata: i,
|
|
1739
1740
|
onLoadStart: c,
|
|
1740
1741
|
onPause: d,
|
|
1741
1742
|
onPlay: g,
|
|
1742
|
-
onPlaying:
|
|
1743
|
-
onWaiting:
|
|
1744
|
-
onVolumeChange:
|
|
1743
|
+
onPlaying: _,
|
|
1744
|
+
onWaiting: x,
|
|
1745
|
+
onVolumeChange: S,
|
|
1745
1746
|
tabIndex: -1
|
|
1746
1747
|
}, m)
|
|
1747
1748
|
)
|
|
1748
1749
|
] });
|
|
1749
1750
|
}
|
|
1750
1751
|
function zr({ url: e, messages: t }) {
|
|
1751
|
-
const [n, r] = G(null), s =
|
|
1752
|
+
const [n, r] = G(null), s = U((u) => u.delay), l = H(async () => {
|
|
1752
1753
|
r(
|
|
1753
1754
|
s ? e.replace("-live", "-catchup").replace("playlist.m3u8", `playlist_fmp4_dvr_timeshift-${s}.m3u8`) : e
|
|
1754
1755
|
);
|
|
1755
1756
|
}, [s, e]);
|
|
1756
|
-
return
|
|
1757
|
+
return V(() => {
|
|
1757
1758
|
const u = requestAnimationFrame(() => l());
|
|
1758
1759
|
return () => cancelAnimationFrame(u);
|
|
1759
1760
|
}, [l]), n ? /* @__PURE__ */ a.jsx(tn, { url: n, isLive: !0, messages: t }) : null;
|
|
@@ -1762,13 +1763,13 @@ function qr({ url: e }) {
|
|
|
1762
1763
|
return f((n) => n.isStarted) ? /* @__PURE__ */ a.jsx(Yr, { url: e }) : null;
|
|
1763
1764
|
}
|
|
1764
1765
|
function Yr({ url: e }) {
|
|
1765
|
-
const t =
|
|
1766
|
+
const t = U((l) => l.setViewerCount), n = A(null), r = (l) => {
|
|
1766
1767
|
try {
|
|
1767
1768
|
return new URL(l).pathname.split("/").filter((d) => d.length > 0)[0] || null;
|
|
1768
1769
|
} catch (u) {
|
|
1769
1770
|
return console.error("Failed to extract URI from player URL:", u), null;
|
|
1770
1771
|
}
|
|
1771
|
-
}, s =
|
|
1772
|
+
}, s = H(async () => {
|
|
1772
1773
|
var c;
|
|
1773
1774
|
const l = r(e);
|
|
1774
1775
|
if (!l) {
|
|
@@ -1783,15 +1784,15 @@ function Yr({ url: e }) {
|
|
|
1783
1784
|
});
|
|
1784
1785
|
if (!d.ok)
|
|
1785
1786
|
throw new Error(`HTTP error! status: ${d.status}`);
|
|
1786
|
-
const
|
|
1787
|
-
t(
|
|
1787
|
+
const _ = (c = (await d.json()).count) != null ? c : 0;
|
|
1788
|
+
t(_);
|
|
1788
1789
|
} catch (d) {
|
|
1789
1790
|
if (d.name === "AbortError")
|
|
1790
1791
|
return;
|
|
1791
1792
|
console.error("Failed to fetch viewer count:", d), t(null);
|
|
1792
1793
|
}
|
|
1793
1794
|
}, [t, e]);
|
|
1794
|
-
return
|
|
1795
|
+
return V(() => (s(), () => {
|
|
1795
1796
|
n.current && n.current.abort();
|
|
1796
1797
|
}), [s, e]), Ce(s, 15e3), null;
|
|
1797
1798
|
}
|
|
@@ -1837,35 +1838,35 @@ function nn(i) {
|
|
|
1837
1838
|
]);
|
|
1838
1839
|
return Zr("(pointer: coarse)") ? /* @__PURE__ */ a.jsx(
|
|
1839
1840
|
no,
|
|
1840
|
-
|
|
1841
|
+
F({
|
|
1841
1842
|
className: e,
|
|
1842
1843
|
maxForwardTime: s,
|
|
1843
1844
|
maxBackwardTime: l,
|
|
1844
1845
|
onForwardSeek: n,
|
|
1845
1846
|
onBackwardSeek: r
|
|
1846
1847
|
}, u)
|
|
1847
|
-
) : /* @__PURE__ */ a.jsx(to,
|
|
1848
|
+
) : /* @__PURE__ */ a.jsx(to, F({ className: e, onClick: t }, u));
|
|
1848
1849
|
}
|
|
1849
1850
|
function to(r) {
|
|
1850
1851
|
var s = r, { className: e, onClick: t } = s, n = re(s, ["className", "onClick"]);
|
|
1851
|
-
const l =
|
|
1852
|
-
|
|
1853
|
-
},
|
|
1852
|
+
const l = A(null), u = f((x) => x.exitFullscreen), i = f((x) => x.isFullscreen), c = f((x) => x.requestFullscreen), d = f((x) => x.resetIdle), g = (x) => {
|
|
1853
|
+
I() ? (y(), i ? u() : c()) : _(x);
|
|
1854
|
+
}, _ = (x) => {
|
|
1854
1855
|
l.current = window.setTimeout(() => {
|
|
1855
|
-
t == null || t(
|
|
1856
|
+
t == null || t(x), y();
|
|
1856
1857
|
}, 200);
|
|
1857
1858
|
}, y = () => {
|
|
1858
1859
|
l.current !== null && (window.clearTimeout(l.current), l.current = null);
|
|
1859
|
-
},
|
|
1860
|
+
}, I = () => l.current !== null, E = () => {
|
|
1860
1861
|
d();
|
|
1861
1862
|
};
|
|
1862
|
-
return
|
|
1863
|
+
return V(() => () => {
|
|
1863
1864
|
y();
|
|
1864
1865
|
}, []), /* @__PURE__ */ a.jsx(
|
|
1865
1866
|
"button",
|
|
1866
|
-
|
|
1867
|
+
F({
|
|
1867
1868
|
onClick: g,
|
|
1868
|
-
onMouseMove:
|
|
1869
|
+
onMouseMove: E,
|
|
1869
1870
|
className: [me.playbackButton, e].filter(Boolean).join(" "),
|
|
1870
1871
|
"aria-label": "Player gestures"
|
|
1871
1872
|
}, n)
|
|
@@ -1885,48 +1886,48 @@ function no(u) {
|
|
|
1885
1886
|
"onForwardSeek",
|
|
1886
1887
|
"onBackwardSeek"
|
|
1887
1888
|
]);
|
|
1888
|
-
const c =
|
|
1889
|
+
const c = A(null), d = A({
|
|
1889
1890
|
single: null,
|
|
1890
1891
|
indicator: null,
|
|
1891
1892
|
accumulate: null
|
|
1892
|
-
}), g =
|
|
1893
|
+
}), g = A(null), _ = A(0), y = A(null), [I, E] = G({ visible: !1, direction: null, time: 0 }), x = f((m) => m.isIdle), S = f((m) => m.setIsIdle), w = f((m) => m.resetIdle), P = (m, v) => m < v / 2 ? "backward" : "forward", R = (m) => {
|
|
1893
1894
|
if (!g.current) return;
|
|
1894
1895
|
const v = m.changedTouches[0];
|
|
1895
1896
|
if (!v) return;
|
|
1896
|
-
const
|
|
1897
|
-
if (
|
|
1897
|
+
const L = Date.now(), k = g.current.getBoundingClientRect(), N = v.clientX - k.left, D = v.clientY - k.top;
|
|
1898
|
+
if (N < 0 || N > k.width || D < 0 || D > k.height)
|
|
1898
1899
|
return;
|
|
1899
|
-
const J = c.current, Y = J ?
|
|
1900
|
-
if (J !== null && y.current === null && Y < 300 && Math.abs(
|
|
1901
|
-
m.preventDefault(), m.stopPropagation(), d.current.single && (window.clearTimeout(d.current.single), d.current.single = null),
|
|
1900
|
+
const J = c.current, Y = J ? L - J.time : 1 / 0, Z = P(N, k.width), oe = y.current !== null && y.current === Z && J !== null && Y < 700 && Math.abs(N - J.x) < 100;
|
|
1901
|
+
if (J !== null && y.current === null && Y < 300 && Math.abs(N - J.x) < 50 || oe) {
|
|
1902
|
+
m.preventDefault(), m.stopPropagation(), d.current.single && (window.clearTimeout(d.current.single), d.current.single = null), w(), (y.current === null || y.current !== Z) && (_.current = 0, y.current = Z);
|
|
1902
1903
|
const ne = Z === "backward" ? n : t;
|
|
1903
|
-
|
|
1904
|
-
|
|
1904
|
+
_.current = Math.min(
|
|
1905
|
+
_.current + eo,
|
|
1905
1906
|
ne != null ? ne : 1 / 0
|
|
1906
|
-
), B(Z,
|
|
1907
|
-
const K =
|
|
1908
|
-
K > 0 && (y.current === "backward" ? s == null || s(K) : r == null || r(K),
|
|
1909
|
-
}, 500), c.current = { time:
|
|
1907
|
+
), B(Z, _.current), d.current.accumulate && window.clearTimeout(d.current.accumulate), d.current.accumulate = window.setTimeout(() => {
|
|
1908
|
+
const K = _.current;
|
|
1909
|
+
K > 0 && (y.current === "backward" ? s == null || s(K) : r == null || r(K), w()), _.current = 0, y.current = null, c.current = null, O(), d.current.accumulate = null;
|
|
1910
|
+
}, 500), c.current = { time: L, x: N };
|
|
1910
1911
|
} else {
|
|
1911
|
-
c.current = { time:
|
|
1912
|
+
c.current = { time: L, x: N }, d.current.single && window.clearTimeout(d.current.single);
|
|
1912
1913
|
const ne = y.current !== null ? 700 : 350;
|
|
1913
1914
|
d.current.single = window.setTimeout(() => {
|
|
1914
1915
|
if (y.current === null) {
|
|
1915
1916
|
d.current.single = null;
|
|
1916
|
-
const K =
|
|
1917
|
-
|
|
1917
|
+
const K = x;
|
|
1918
|
+
S(!K), K && w();
|
|
1918
1919
|
}
|
|
1919
1920
|
c.current = null;
|
|
1920
1921
|
}, ne);
|
|
1921
1922
|
}
|
|
1922
1923
|
}, B = (m, v) => {
|
|
1923
|
-
v !== 0 && (
|
|
1924
|
-
|
|
1924
|
+
v !== 0 && (E({ visible: !0, direction: m, time: v }), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.indicator = window.setTimeout(() => {
|
|
1925
|
+
O();
|
|
1925
1926
|
}, 700));
|
|
1926
|
-
},
|
|
1927
|
-
|
|
1927
|
+
}, O = () => {
|
|
1928
|
+
E({ visible: !1, direction: null, time: 0 }), d.current.indicator && (window.clearTimeout(d.current.indicator), d.current.indicator = null);
|
|
1928
1929
|
};
|
|
1929
|
-
return
|
|
1930
|
+
return V(() => {
|
|
1930
1931
|
const m = d.current;
|
|
1931
1932
|
return () => {
|
|
1932
1933
|
m != null && m.single && window.clearTimeout(m.single), m != null && m.indicator && window.clearTimeout(m.indicator), m != null && m.accumulate && window.clearTimeout(m.accumulate);
|
|
@@ -1934,27 +1935,27 @@ function no(u) {
|
|
|
1934
1935
|
}, []), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1935
1936
|
/* @__PURE__ */ a.jsx(
|
|
1936
1937
|
"button",
|
|
1937
|
-
|
|
1938
|
+
F({
|
|
1938
1939
|
ref: g,
|
|
1939
1940
|
onTouchEnd: R,
|
|
1940
1941
|
className: [me.playbackButton, e].filter(Boolean).join(" "),
|
|
1941
1942
|
"aria-label": "Player gestures"
|
|
1942
1943
|
}, l)
|
|
1943
1944
|
),
|
|
1944
|
-
|
|
1945
|
+
I.visible && /* @__PURE__ */ a.jsxs(
|
|
1945
1946
|
"div",
|
|
1946
1947
|
{
|
|
1947
|
-
className: `${me.seekIndicator} ${me.seekIndicatorVisible} ${
|
|
1948
|
+
className: `${me.seekIndicator} ${me.seekIndicatorVisible} ${I.direction === "backward" ? me.seekIndicatorLeft : me.seekIndicatorRight}`,
|
|
1948
1949
|
children: [
|
|
1949
|
-
|
|
1950
|
-
Te(
|
|
1950
|
+
I.direction === "backward" ? "-" : "+",
|
|
1951
|
+
Te(I.time)
|
|
1951
1952
|
]
|
|
1952
1953
|
}
|
|
1953
1954
|
)
|
|
1954
1955
|
] });
|
|
1955
1956
|
}
|
|
1956
1957
|
function ro() {
|
|
1957
|
-
const e = f((c) => c.isPlaying), t = f((c) => c.pause), n = f((c) => c.getPauseTimeDiff), r = f((c) => c.play), s =
|
|
1958
|
+
const e = f((c) => c.isPlaying), t = f((c) => c.pause), n = f((c) => c.getPauseTimeDiff), r = f((c) => c.play), s = U((c) => c.delay), l = U((c) => c.setDelay), u = U((c) => c.startDate), i = u ? u.getTime() : 0;
|
|
1958
1959
|
return /* @__PURE__ */ a.jsx(
|
|
1959
1960
|
nn,
|
|
1960
1961
|
{
|
|
@@ -1986,7 +1987,7 @@ const oo = "_playerButton_izwqq_1", io = "_playerButtonCircle_izwqq_42", Et = {
|
|
|
1986
1987
|
(s, r) => {
|
|
1987
1988
|
var l = s, { shape: e = "circle", className: t } = l, n = re(l, ["shape", "className"]);
|
|
1988
1989
|
const u = e === "circle" ? Et.playerButtonCircle : "", i = [Et.playerButton, u, t].filter(Boolean).join(" ");
|
|
1989
|
-
return /* @__PURE__ */ a.jsx("button",
|
|
1990
|
+
return /* @__PURE__ */ a.jsx("button", F({ ref: r, className: i }, n));
|
|
1990
1991
|
}
|
|
1991
1992
|
);
|
|
1992
1993
|
le.displayName = "PlayerButton";
|
|
@@ -1997,10 +1998,10 @@ const so = "_liveIndicator_1jczn_1", ao = "_liveIndicatorHasDelay_1jczn_9", lo =
|
|
|
1997
1998
|
};
|
|
1998
1999
|
function co(n) {
|
|
1999
2000
|
var r = n, { message: e } = r, t = re(r, ["message"]);
|
|
2000
|
-
const s = f((d) => d.restart), l =
|
|
2001
|
+
const s = f((d) => d.restart), l = U((d) => d.delay), u = U((d) => d.setDelay), i = () => {
|
|
2001
2002
|
l && (s(), u(0));
|
|
2002
2003
|
}, c = l ? `${ke.liveIndicator} ${ke.liveIndicatorHasDelay}` : `${ke.liveIndicator} ${ke.liveIndicatorNoDelay}`;
|
|
2003
|
-
return /* @__PURE__ */ a.jsxs(le, he(
|
|
2004
|
+
return /* @__PURE__ */ a.jsxs(le, he(F({ onClick: i, shape: "square" }, t), { children: [
|
|
2004
2005
|
/* @__PURE__ */ a.jsx("div", { className: c }),
|
|
2005
2006
|
e || "Live"
|
|
2006
2007
|
] }));
|
|
@@ -2028,7 +2029,7 @@ function on() {
|
|
|
2028
2029
|
);
|
|
2029
2030
|
}
|
|
2030
2031
|
function uo() {
|
|
2031
|
-
const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), r = f((i) => i.play), s =
|
|
2032
|
+
const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), r = f((i) => i.play), s = U((i) => i.delay), l = U((i) => i.setDelay), u = () => {
|
|
2032
2033
|
if (e)
|
|
2033
2034
|
t();
|
|
2034
2035
|
else {
|
|
@@ -2053,7 +2054,7 @@ const fo = "_progressSlider_hwzgf_1", ho = "_tipContainer_hwzgf_7", mo = "_tipCo
|
|
|
2053
2054
|
var u = l, { max: e = 100, min: t = 0, className: n } = u, r = re(u, ["max", "min", "className"]);
|
|
2054
2055
|
return /* @__PURE__ */ a.jsxs(
|
|
2055
2056
|
Le.Root,
|
|
2056
|
-
he(
|
|
2057
|
+
he(F({
|
|
2057
2058
|
ref: s,
|
|
2058
2059
|
min: t,
|
|
2059
2060
|
max: e,
|
|
@@ -2086,44 +2087,44 @@ function Fe(e) {
|
|
|
2086
2087
|
}
|
|
2087
2088
|
const St = "vod-player-progress-bar";
|
|
2088
2089
|
function To() {
|
|
2089
|
-
const e =
|
|
2090
|
-
r(Jt(
|
|
2091
|
-
}, [y,
|
|
2090
|
+
const e = A(null), t = A(null), [n, r] = G(0), [s, l] = G(0), [u, i] = G(!1), [c, d] = G(-1), [g, _] = G(-1), y = U((D) => D.delay), I = U((D) => D.startDate), E = I ? I.getTime() : 0, x = (/* @__PURE__ */ new Date()).getTime(), S = U((D) => D.setDelay), w = f((D) => D.isPlaying), P = f((D) => D.addIdleLock), R = f((D) => D.removeIdleLock), B = H(() => {
|
|
2091
|
+
r(Jt(E, y)), l(Fr(E, x));
|
|
2092
|
+
}, [y, x, E]), O = parseFloat(
|
|
2092
2093
|
(s ? (g !== -1 ? g : n) / s * 100 : 0).toFixed(1)
|
|
2093
|
-
), m = (
|
|
2094
|
-
|
|
2094
|
+
), m = (D) => {
|
|
2095
|
+
_(s * (D[0] / 100)), P(St);
|
|
2095
2096
|
}, v = () => {
|
|
2096
2097
|
if (g !== -1) {
|
|
2097
|
-
const
|
|
2098
|
-
|
|
2098
|
+
const D = Xt(E, g);
|
|
2099
|
+
S(D), _(-1), R(St);
|
|
2099
2100
|
}
|
|
2100
|
-
},
|
|
2101
|
-
(
|
|
2101
|
+
}, L = () => i(!0), k = () => i(!1), N = H(
|
|
2102
|
+
(D) => {
|
|
2102
2103
|
const J = e.current, Y = t.current;
|
|
2103
2104
|
if (J && Y) {
|
|
2104
|
-
const Z = Fe(J), oe = Fe(Y), ue = (
|
|
2105
|
+
const Z = Fe(J), oe = Fe(Y), ue = (D.pageX || D.clientX) - Z.left, ne = ue / Z.width;
|
|
2105
2106
|
if (ne < 0) return;
|
|
2106
2107
|
let K = ue - oe.width / 2;
|
|
2107
2108
|
K < 0 && (K = 0), K > Z.width - oe.width && (K = -1), Y.style.left = K > -1 ? `${K}px` : "auto", Y.style.right = K > -1 ? "auto" : "0px";
|
|
2108
2109
|
const pe = s - ne * s;
|
|
2109
2110
|
d(pe > 0 ? pe : 0);
|
|
2110
2111
|
}
|
|
2111
|
-
|
|
2112
|
+
L();
|
|
2112
2113
|
},
|
|
2113
2114
|
[s]
|
|
2114
2115
|
);
|
|
2115
|
-
return Ce(() => B(),
|
|
2116
|
-
const
|
|
2117
|
-
return () => cancelAnimationFrame(
|
|
2116
|
+
return Ce(() => B(), w ? 1e3 : null), V(() => {
|
|
2117
|
+
const D = requestAnimationFrame(() => B());
|
|
2118
|
+
return () => cancelAnimationFrame(D);
|
|
2118
2119
|
}, [B]), /* @__PURE__ */ a.jsxs("div", { className: se.progressSlider, children: [
|
|
2119
2120
|
/* @__PURE__ */ a.jsx(
|
|
2120
2121
|
Ae,
|
|
2121
2122
|
{
|
|
2122
2123
|
ref: e,
|
|
2123
|
-
value: [
|
|
2124
|
-
onPointerLeave:
|
|
2125
|
-
onPointerDown:
|
|
2126
|
-
onPointerMove:
|
|
2124
|
+
value: [O],
|
|
2125
|
+
onPointerLeave: k,
|
|
2126
|
+
onPointerDown: k,
|
|
2127
|
+
onPointerMove: N,
|
|
2127
2128
|
onValueChange: m,
|
|
2128
2129
|
onValueCommit: v,
|
|
2129
2130
|
step: 0.1
|
|
@@ -2151,7 +2152,7 @@ function xo() {
|
|
|
2151
2152
|
);
|
|
2152
2153
|
}
|
|
2153
2154
|
function Co() {
|
|
2154
|
-
const e =
|
|
2155
|
+
const e = U((s) => s.startDate), t = U((s) => s.setDelay), n = e ? e.getTime() : 0, r = () => t(Xt(n));
|
|
2155
2156
|
return /* @__PURE__ */ a.jsx(le, { onClick: r, children: /* @__PURE__ */ a.jsx(xo, {}) });
|
|
2156
2157
|
}
|
|
2157
2158
|
const Eo = "_viewersContainer_z1ihz_1", So = "_viewersIndicator_z1ihz_16", Ro = "_viewersIcon_z1ihz_24", bo = "_viewersCount_z1ihz_28", Me = {
|
|
@@ -2161,7 +2162,7 @@ const Eo = "_viewersContainer_z1ihz_1", So = "_viewersIndicator_z1ihz_16", Ro =
|
|
|
2161
2162
|
viewersCount: bo
|
|
2162
2163
|
};
|
|
2163
2164
|
function Po() {
|
|
2164
|
-
const e =
|
|
2165
|
+
const e = U((t) => t.viewerCount);
|
|
2165
2166
|
return e ? /* @__PURE__ */ a.jsxs("div", { className: Me.viewersContainer, children: [
|
|
2166
2167
|
/* @__PURE__ */ a.jsx("span", { className: Me.viewersIndicator }),
|
|
2167
2168
|
/* @__PURE__ */ a.jsxs(
|
|
@@ -2239,7 +2240,7 @@ function Ao() {
|
|
|
2239
2240
|
);
|
|
2240
2241
|
}
|
|
2241
2242
|
function an() {
|
|
2242
|
-
const e = f((d) => d.containerRef), t = f((d) => d.exitFullscreen), n = f((d) => d.isFullscreen), r = f((d) => d.requestFullscreen), s = f((d) => d.setIsFullscreen), l = f((d) => d.setIsFullscreenReady), u = f((d) => d.techRef), i =
|
|
2243
|
+
const e = f((d) => d.containerRef), t = f((d) => d.exitFullscreen), n = f((d) => d.isFullscreen), r = f((d) => d.requestFullscreen), s = f((d) => d.setIsFullscreen), l = f((d) => d.setIsFullscreenReady), u = f((d) => d.techRef), i = H(
|
|
2243
2244
|
(d) => {
|
|
2244
2245
|
d.stopPropagation(), s(ir());
|
|
2245
2246
|
},
|
|
@@ -2247,11 +2248,11 @@ function an() {
|
|
|
2247
2248
|
), c = () => {
|
|
2248
2249
|
n ? t() : r();
|
|
2249
2250
|
};
|
|
2250
|
-
return
|
|
2251
|
+
return V(() => {
|
|
2251
2252
|
const d = zt ? u.current : e.current;
|
|
2252
2253
|
if (d)
|
|
2253
2254
|
return lr(d, i);
|
|
2254
|
-
}, [e, i, u]),
|
|
2255
|
+
}, [e, i, u]), V(() => {
|
|
2255
2256
|
l(!0);
|
|
2256
2257
|
}, [l]), /* @__PURE__ */ a.jsx(le, { onClick: c, children: n ? /* @__PURE__ */ a.jsx(Ao, {}) : /* @__PURE__ */ a.jsx(Vo, {}) });
|
|
2257
2258
|
}
|
|
@@ -2261,14 +2262,14 @@ const Oo = "_idleCheckContainer_crh2s_1", Ho = "_idleCheckContainerIdle_crh2s_5"
|
|
|
2261
2262
|
idleCheckContainerActive: $o
|
|
2262
2263
|
}, Uo = 5 * 1e3;
|
|
2263
2264
|
function ln({ children: e }) {
|
|
2264
|
-
const t =
|
|
2265
|
+
const t = A(null), n = f((y) => y.isIdle), r = f((y) => y.setIsIdle), s = A(null), u = f((y) => y.idleLocks).size, i = f((y) => y.eventEmitter), c = H(() => {
|
|
2265
2266
|
s.current !== null && (window.clearTimeout(s.current), s.current = null);
|
|
2266
|
-
}, []), d =
|
|
2267
|
+
}, []), d = H(() => {
|
|
2267
2268
|
c(), s.current = window.setTimeout(() => r(!0), Uo);
|
|
2268
2269
|
}, [c, r]);
|
|
2269
|
-
|
|
2270
|
+
V(() => (r(!1), d(), () => {
|
|
2270
2271
|
c();
|
|
2271
|
-
}), [c, r, d]),
|
|
2272
|
+
}), [c, r, d]), V(() => {
|
|
2272
2273
|
const y = () => {
|
|
2273
2274
|
r(!1), d();
|
|
2274
2275
|
};
|
|
@@ -2276,18 +2277,18 @@ function ln({ children: e }) {
|
|
|
2276
2277
|
i.off("resetIdle", y);
|
|
2277
2278
|
};
|
|
2278
2279
|
}, [i, r, d]);
|
|
2279
|
-
const g = n && !u,
|
|
2280
|
-
return /* @__PURE__ */ a.jsx("div", { ref: t, className:
|
|
2280
|
+
const g = n && !u, _ = `${Ke.idleCheckContainer} ${g ? Ke.idleCheckContainerIdle : Ke.idleCheckContainerActive}`;
|
|
2281
|
+
return /* @__PURE__ */ a.jsx("div", { ref: t, className: _, children: e });
|
|
2281
2282
|
}
|
|
2282
2283
|
const Bo = "_spinner_oo4hi_10", Wo = {
|
|
2283
2284
|
spinner: Bo
|
|
2284
2285
|
};
|
|
2285
2286
|
function zo(e) {
|
|
2286
|
-
return /* @__PURE__ */ a.jsx("div",
|
|
2287
|
+
return /* @__PURE__ */ a.jsx("div", F({ className: Wo.spinner }, e));
|
|
2287
2288
|
}
|
|
2288
2289
|
function qo(e, t = 500) {
|
|
2289
2290
|
const [n, r] = G(e);
|
|
2290
|
-
return
|
|
2291
|
+
return V(() => {
|
|
2291
2292
|
const s = window.setTimeout(() => r(e), t);
|
|
2292
2293
|
return () => {
|
|
2293
2294
|
window.clearTimeout(s);
|
|
@@ -2300,7 +2301,7 @@ const Yo = "_loadingContainer_v9v7r_1", Zo = {
|
|
|
2300
2301
|
function cn(n) {
|
|
2301
2302
|
var r = n, { style: e } = r, t = re(r, ["style"]);
|
|
2302
2303
|
const s = f((u) => u.isLoading);
|
|
2303
|
-
return qo(s, 100) ? /* @__PURE__ */ a.jsx("div", he(
|
|
2304
|
+
return qo(s, 100) ? /* @__PURE__ */ a.jsx("div", he(F({ className: Zo.loadingContainer, style: e }, t), { children: /* @__PURE__ */ a.jsx(zo, {}) })) : null;
|
|
2304
2305
|
}
|
|
2305
2306
|
function Ko() {
|
|
2306
2307
|
return /* @__PURE__ */ a.jsx(
|
|
@@ -2335,7 +2336,7 @@ const Xo = "_dropdownMenuContent_b7j6b_1", Jo = "_dropdownMenuItem_b7j6b_83", Qo
|
|
|
2335
2336
|
var u = l, { sideOffset: e = 4, className: t, children: n } = u, r = re(u, ["sideOffset", "className", "children"]);
|
|
2336
2337
|
return /* @__PURE__ */ a.jsx(
|
|
2337
2338
|
xe.Content,
|
|
2338
|
-
he(
|
|
2339
|
+
he(F({
|
|
2339
2340
|
ref: s,
|
|
2340
2341
|
sideOffset: e,
|
|
2341
2342
|
className: [ve.dropdownMenuContent, t].filter(Boolean).join(" "),
|
|
@@ -2378,7 +2379,7 @@ const dn = Ve((s, r) => {
|
|
|
2378
2379
|
};
|
|
2379
2380
|
return /* @__PURE__ */ a.jsx(xe.Close, { asChild: !0, children: /* @__PURE__ */ a.jsx(
|
|
2380
2381
|
"div",
|
|
2381
|
-
|
|
2382
|
+
F({
|
|
2382
2383
|
ref: r,
|
|
2383
2384
|
className: [ve.dropdownMenuItem, e].filter(Boolean).join(" "),
|
|
2384
2385
|
role: "menuitem",
|
|
@@ -2391,7 +2392,7 @@ const dn = Ve((s, r) => {
|
|
|
2391
2392
|
dn.displayName = "PlayerMenuItem";
|
|
2392
2393
|
const Rt = "settings";
|
|
2393
2394
|
function fn() {
|
|
2394
|
-
const [e, t] = G(!1), n = f((c) => c.containerRef), r = f((c) => c.addIdleLock), s = f((c) => c.removeIdleLock), l = f((c) => c.levels), u = f((c) => c.setLevel), i =
|
|
2395
|
+
const [e, t] = G(!1), n = f((c) => c.containerRef), r = f((c) => c.addIdleLock), s = f((c) => c.removeIdleLock), l = f((c) => c.levels), u = f((c) => c.setLevel), i = H(
|
|
2395
2396
|
(c) => {
|
|
2396
2397
|
t(c), c ? r(Rt) : s(Rt);
|
|
2397
2398
|
},
|
|
@@ -2468,7 +2469,7 @@ function hn() {
|
|
|
2468
2469
|
] });
|
|
2469
2470
|
}
|
|
2470
2471
|
function Pi(e) {
|
|
2471
|
-
return /* @__PURE__ */ a.jsx($r, { children: /* @__PURE__ */ a.jsx(di,
|
|
2472
|
+
return /* @__PURE__ */ a.jsx($r, { children: /* @__PURE__ */ a.jsx(di, F({}, e)) });
|
|
2472
2473
|
}
|
|
2473
2474
|
function di({ url: e, messages: t = {}, onEvent: n }) {
|
|
2474
2475
|
var l, u, i, c;
|
|
@@ -2477,7 +2478,7 @@ function di({ url: e, messages: t = {}, onEvent: n }) {
|
|
|
2477
2478
|
eventStartingSoon: "Starting in few seconds...",
|
|
2478
2479
|
unableToPlay: "Unable to play the live stream. Please try again later."
|
|
2479
2480
|
};
|
|
2480
|
-
return
|
|
2481
|
+
return V(() => {
|
|
2481
2482
|
console.log(`[Player][Live] Version: ${Je.version}`);
|
|
2482
2483
|
}, []), /* @__PURE__ */ a.jsxs(
|
|
2483
2484
|
"div",
|
|
@@ -2577,22 +2578,22 @@ function hi() {
|
|
|
2577
2578
|
}
|
|
2578
2579
|
const Lt = "vod-player-progress-bar";
|
|
2579
2580
|
function mi() {
|
|
2580
|
-
const e =
|
|
2581
|
+
const e = A(null), t = A(null), [n, r] = G(!1), [s, l] = G(-1), [u, i] = G(-1), c = f((R) => R.currentTime), d = f((R) => R.duration), g = f((R) => R.seek), _ = f((R) => R.addIdleLock), y = f((R) => R.removeIdleLock), I = parseFloat(
|
|
2581
2582
|
(d ? (u !== -1 ? u : c) / d * 100 : 0).toFixed(1)
|
|
2582
|
-
),
|
|
2583
|
-
i(d * (R[0] / 100)),
|
|
2584
|
-
},
|
|
2583
|
+
), E = (R) => {
|
|
2584
|
+
i(d * (R[0] / 100)), _(Lt);
|
|
2585
|
+
}, x = () => {
|
|
2585
2586
|
u !== -1 && (g(u), i(-1), y(Lt));
|
|
2586
|
-
},
|
|
2587
|
+
}, S = () => r(!0), w = () => r(!1), P = H(
|
|
2587
2588
|
(R) => {
|
|
2588
|
-
const B = e.current,
|
|
2589
|
-
if (B &&
|
|
2590
|
-
const m = Fe(B), v = Fe(
|
|
2591
|
-
if (
|
|
2592
|
-
let
|
|
2593
|
-
|
|
2589
|
+
const B = e.current, O = t.current;
|
|
2590
|
+
if (B && O) {
|
|
2591
|
+
const m = Fe(B), v = Fe(O), L = (R.pageX || R.clientX) - m.left, k = L / m.width;
|
|
2592
|
+
if (k < 0) return;
|
|
2593
|
+
let N = L - v.width / 2;
|
|
2594
|
+
N < 0 && (N = 0), N > m.width - v.width && (N = -1), O.style.left = N > -1 ? `${N}px` : "auto", O.style.right = N > -1 ? "auto" : "0px", l(k * d);
|
|
2594
2595
|
}
|
|
2595
|
-
|
|
2596
|
+
S();
|
|
2596
2597
|
},
|
|
2597
2598
|
[d]
|
|
2598
2599
|
);
|
|
@@ -2601,12 +2602,12 @@ function mi() {
|
|
|
2601
2602
|
Ae,
|
|
2602
2603
|
{
|
|
2603
2604
|
ref: e,
|
|
2604
|
-
value: [
|
|
2605
|
-
onPointerLeave:
|
|
2606
|
-
onPointerDown:
|
|
2605
|
+
value: [I],
|
|
2606
|
+
onPointerLeave: w,
|
|
2607
|
+
onPointerDown: w,
|
|
2607
2608
|
onPointerMove: P,
|
|
2608
|
-
onValueChange:
|
|
2609
|
-
onValueCommit:
|
|
2609
|
+
onValueChange: E,
|
|
2610
|
+
onValueCommit: x,
|
|
2610
2611
|
step: 0.1
|
|
2611
2612
|
}
|
|
2612
2613
|
),
|
|
@@ -2634,19 +2635,12 @@ function gi() {
|
|
|
2634
2635
|
] });
|
|
2635
2636
|
}
|
|
2636
2637
|
function wi({ url: e }) {
|
|
2637
|
-
const { video_id: t } = Kt(e);
|
|
2638
|
-
return /* @__PURE__ */ a.jsx(
|
|
2639
|
-
Yt,
|
|
2640
|
-
{
|
|
2641
|
-
kind: "vod",
|
|
2642
|
-
url: e,
|
|
2643
|
-
id: t ? Number(t) : void 0
|
|
2644
|
-
}
|
|
2645
|
-
);
|
|
2638
|
+
const { video_id: t } = Kt(e), n = t ? Number(t) : void 0;
|
|
2639
|
+
return n ? /* @__PURE__ */ a.jsx(Yt, { kind: "vod", url: e, id: n }) : null;
|
|
2646
2640
|
}
|
|
2647
2641
|
function _i({ callback: e }) {
|
|
2648
2642
|
const t = f((n) => n.eventEmitter);
|
|
2649
|
-
return
|
|
2643
|
+
return V(() => {
|
|
2650
2644
|
const n = (r) => e("timeUpdate", r);
|
|
2651
2645
|
return t.on("timeUpdate", n), () => {
|
|
2652
2646
|
t.off("timeUpdate", n);
|
|
@@ -2654,7 +2648,7 @@ function _i({ callback: e }) {
|
|
|
2654
2648
|
}, [e, t]), /* @__PURE__ */ a.jsx(Gt, { callback: e });
|
|
2655
2649
|
}
|
|
2656
2650
|
function Ti() {
|
|
2657
|
-
const e = f((i) => i.currentTime), t = f((i) => i.duration), n = f((i) => i.isPlaying), r = f((i) => i.pause), s = f((i) => i.play), l = f((i) => i.seek), u =
|
|
2651
|
+
const e = f((i) => i.currentTime), t = f((i) => i.duration), n = f((i) => i.isPlaying), r = f((i) => i.pause), s = f((i) => i.play), l = f((i) => i.seek), u = H(
|
|
2658
2652
|
(i) => {
|
|
2659
2653
|
let c = !1;
|
|
2660
2654
|
if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
|
|
@@ -2674,21 +2668,21 @@ function Ti() {
|
|
|
2674
2668
|
},
|
|
2675
2669
|
[e, t, n, r, s, l]
|
|
2676
2670
|
);
|
|
2677
|
-
return
|
|
2671
|
+
return V(() => (document.addEventListener("keydown", u), () => {
|
|
2678
2672
|
document.removeEventListener("keydown", u);
|
|
2679
2673
|
}), [u]), /* @__PURE__ */ a.jsx(Qt, {});
|
|
2680
2674
|
}
|
|
2681
2675
|
function Li(e) {
|
|
2682
|
-
return /* @__PURE__ */ a.jsx(en, { children: /* @__PURE__ */ a.jsx(xi,
|
|
2676
|
+
return /* @__PURE__ */ a.jsx(en, { children: /* @__PURE__ */ a.jsx(xi, F({}, e)) });
|
|
2683
2677
|
}
|
|
2684
2678
|
function xi({ url: e, messages: t, onEvent: n, startTime: r }) {
|
|
2685
2679
|
var i;
|
|
2686
2680
|
const s = f((c) => c.setStartTime), l = f((c) => c.containerRef), u = {
|
|
2687
2681
|
unableToPlay: "Unable to play the video. Please try again later."
|
|
2688
2682
|
};
|
|
2689
|
-
return
|
|
2683
|
+
return V(() => {
|
|
2690
2684
|
r && s(r);
|
|
2691
|
-
}, [r, s]),
|
|
2685
|
+
}, [r, s]), V(() => {
|
|
2692
2686
|
console.log(`[Player][VOD] Version: ${Je.version}`);
|
|
2693
2687
|
}, []), /* @__PURE__ */ a.jsxs(
|
|
2694
2688
|
"div",
|