@halibegic/react-video-player 0.0.40 → 0.0.42
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var Mn = Object.defineProperty, Nn = Object.defineProperties;
|
|
2
2
|
var Vn = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var Se = Object.getOwnPropertySymbols;
|
|
4
4
|
var vt = Object.prototype.hasOwnProperty, yt = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var pt = (e, t, n) => t in e ? Mn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, j = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
7
|
vt.call(t, n) && pt(e, n, t[n]);
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
8
|
+
if (Se)
|
|
9
|
+
for (var n of Se(t))
|
|
10
10
|
yt.call(t, n) && pt(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
12
|
}, he = (e, t) => Nn(e, Vn(t));
|
|
@@ -14,12 +14,12 @@ var ne = (e, t) => {
|
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var o in e)
|
|
16
16
|
vt.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var o of
|
|
17
|
+
if (e != null && Se)
|
|
18
|
+
for (var o of Se(e))
|
|
19
19
|
t.indexOf(o) < 0 && yt.call(e, o) && (n[o] = e[o]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
import
|
|
22
|
+
import St, { useLayoutEffect as An, useEffect as A, useRef as N, useState as X, createContext as jt, useContext as Lt, useCallback as z, forwardRef as Ne } from "react";
|
|
23
23
|
import { create as Pt, useStore as It } from "zustand";
|
|
24
24
|
import On from "mitt";
|
|
25
25
|
import re from "hls.js";
|
|
@@ -273,7 +273,7 @@ var gt;
|
|
|
273
273
|
function zn() {
|
|
274
274
|
if (gt) return ge;
|
|
275
275
|
gt = 1;
|
|
276
|
-
var e =
|
|
276
|
+
var e = St, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = 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
278
|
var v, y = {}, g = null, L = null;
|
|
279
279
|
d !== void 0 && (g = "" + d), c.key !== void 0 && (g = "" + c.key), c.ref !== void 0 && (L = c.ref);
|
|
@@ -287,8 +287,8 @@ var we = {};
|
|
|
287
287
|
var wt;
|
|
288
288
|
function Wn() {
|
|
289
289
|
return wt || (wt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
290
|
-
var e =
|
|
291
|
-
function
|
|
290
|
+
var e = St, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), a = 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"), v = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), L = Symbol.for("react.offscreen"), D = Symbol.iterator, _ = "@@iterator";
|
|
291
|
+
function S(r) {
|
|
292
292
|
if (r === null || typeof r != "object")
|
|
293
293
|
return null;
|
|
294
294
|
var h = D && r[D] || r[_];
|
|
@@ -306,10 +306,10 @@ function Wn() {
|
|
|
306
306
|
{
|
|
307
307
|
var w = M.ReactDebugCurrentFrame, E = w.getStackAddendum();
|
|
308
308
|
E !== "" && (h += "%s", m = m.concat([E]));
|
|
309
|
-
var
|
|
309
|
+
var b = m.map(function(C) {
|
|
310
310
|
return String(C);
|
|
311
311
|
});
|
|
312
|
-
|
|
312
|
+
b.unshift("Warning: " + h), Function.prototype.apply.call(console[r], console, b);
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
var x = !1, I = !1, p = !1, $ = !1, G = !1, q;
|
|
@@ -366,9 +366,9 @@ function Wn() {
|
|
|
366
366
|
var w = r.displayName || null;
|
|
367
367
|
return w !== null ? w : K(r.type) || "Memo";
|
|
368
368
|
case g: {
|
|
369
|
-
var E = r,
|
|
369
|
+
var E = r, b = E._payload, C = E._init;
|
|
370
370
|
try {
|
|
371
|
-
return K(C(
|
|
371
|
+
return K(C(b));
|
|
372
372
|
} catch (T) {
|
|
373
373
|
return null;
|
|
374
374
|
}
|
|
@@ -469,8 +469,8 @@ function Wn() {
|
|
|
469
469
|
$e = !0;
|
|
470
470
|
var E = Error.prepareStackTrace;
|
|
471
471
|
Error.prepareStackTrace = void 0;
|
|
472
|
-
var
|
|
473
|
-
|
|
472
|
+
var b;
|
|
473
|
+
b = Oe.current, Oe.current = null, ln();
|
|
474
474
|
try {
|
|
475
475
|
if (h) {
|
|
476
476
|
var C = function() {
|
|
@@ -523,7 +523,7 @@ function Wn() {
|
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
} finally {
|
|
526
|
-
$e = !1, Oe.current =
|
|
526
|
+
$e = !1, Oe.current = b, cn(), Error.prepareStackTrace = E;
|
|
527
527
|
}
|
|
528
528
|
var fe = r ? r.displayName || r.name : "", ce = fe ? Ce(fe) : "";
|
|
529
529
|
return typeof r == "function" && Ee.set(r, ce), ce;
|
|
@@ -555,9 +555,9 @@ function Wn() {
|
|
|
555
555
|
case y:
|
|
556
556
|
return Re(r.type, h, m);
|
|
557
557
|
case g: {
|
|
558
|
-
var w = r, E = w._payload,
|
|
558
|
+
var w = r, E = w._payload, b = w._init;
|
|
559
559
|
try {
|
|
560
|
-
return Re(
|
|
560
|
+
return Re(b(E), h, m);
|
|
561
561
|
} catch (C) {
|
|
562
562
|
}
|
|
563
563
|
}
|
|
@@ -565,7 +565,7 @@ function Wn() {
|
|
|
565
565
|
return "";
|
|
566
566
|
}
|
|
567
567
|
var ye = Object.prototype.hasOwnProperty, tt = {}, nt = M.ReactDebugCurrentFrame;
|
|
568
|
-
function
|
|
568
|
+
function be(r) {
|
|
569
569
|
if (r) {
|
|
570
570
|
var h = r._owner, m = Re(r.type, r._source, h ? h.type : null);
|
|
571
571
|
nt.setExtraStackFrame(m);
|
|
@@ -574,9 +574,9 @@ function Wn() {
|
|
|
574
574
|
}
|
|
575
575
|
function hn(r, h, m, w, E) {
|
|
576
576
|
{
|
|
577
|
-
var
|
|
577
|
+
var b = Function.call.bind(ye);
|
|
578
578
|
for (var C in r)
|
|
579
|
-
if (
|
|
579
|
+
if (b(r, C)) {
|
|
580
580
|
var T = void 0;
|
|
581
581
|
try {
|
|
582
582
|
if (typeof r[C] != "function") {
|
|
@@ -587,7 +587,7 @@ function Wn() {
|
|
|
587
587
|
} catch (H) {
|
|
588
588
|
T = H;
|
|
589
589
|
}
|
|
590
|
-
T && !(T instanceof Error) && (
|
|
590
|
+
T && !(T instanceof Error) && (be(E), R("%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).", w || "React class", m, C, typeof T), be(null)), T instanceof Error && !(T.message in tt) && (tt[T.message] = !0, be(E), R("Failed %s type: %s", m, T.message), be(null));
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
}
|
|
@@ -662,7 +662,7 @@ function Wn() {
|
|
|
662
662
|
});
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
var Cn = function(r, h, m, w, E,
|
|
665
|
+
var Cn = function(r, h, m, w, E, b, C) {
|
|
666
666
|
var T = {
|
|
667
667
|
// This tag allows us to uniquely identify this as a React Element
|
|
668
668
|
$$typeof: t,
|
|
@@ -672,7 +672,7 @@ function Wn() {
|
|
|
672
672
|
ref: m,
|
|
673
673
|
props: C,
|
|
674
674
|
// Record the component responsible for creating this element.
|
|
675
|
-
_owner:
|
|
675
|
+
_owner: b
|
|
676
676
|
};
|
|
677
677
|
return T._store = {}, Object.defineProperty(T._store, "validated", {
|
|
678
678
|
configurable: !1,
|
|
@@ -693,14 +693,14 @@ function Wn() {
|
|
|
693
693
|
};
|
|
694
694
|
function En(r, h, m, w, E) {
|
|
695
695
|
{
|
|
696
|
-
var
|
|
696
|
+
var b, C = {}, T = null, Y = null;
|
|
697
697
|
m !== void 0 && (ot(m), T = "" + m), wn(h) && (ot(h.key), T = "" + h.key), gn(h) && (Y = h.ref, xn(h, E));
|
|
698
|
-
for (
|
|
699
|
-
ye.call(h,
|
|
698
|
+
for (b in h)
|
|
699
|
+
ye.call(h, b) && !yn.hasOwnProperty(b) && (C[b] = h[b]);
|
|
700
700
|
if (r && r.defaultProps) {
|
|
701
701
|
var H = r.defaultProps;
|
|
702
|
-
for (
|
|
703
|
-
C[
|
|
702
|
+
for (b in H)
|
|
703
|
+
C[b] === void 0 && (C[b] = H[b]);
|
|
704
704
|
}
|
|
705
705
|
if (T || Y) {
|
|
706
706
|
var U = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
@@ -738,7 +738,7 @@ Check the render method of \`` + r + "`.";
|
|
|
738
738
|
return "";
|
|
739
739
|
}
|
|
740
740
|
var ut = {};
|
|
741
|
-
function
|
|
741
|
+
function bn(r) {
|
|
742
742
|
{
|
|
743
743
|
var h = ct();
|
|
744
744
|
if (!h) {
|
|
@@ -755,7 +755,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
755
755
|
if (!r._store || r._store.validated || r.key != null)
|
|
756
756
|
return;
|
|
757
757
|
r._store.validated = !0;
|
|
758
|
-
var m =
|
|
758
|
+
var m = bn(h);
|
|
759
759
|
if (ut[m])
|
|
760
760
|
return;
|
|
761
761
|
ut[m] = !0;
|
|
@@ -775,14 +775,14 @@ Check the top-level render call using <` + m + ">.");
|
|
|
775
775
|
else if (We(r))
|
|
776
776
|
r._store && (r._store.validated = !0);
|
|
777
777
|
else if (r) {
|
|
778
|
-
var E =
|
|
778
|
+
var E = S(r);
|
|
779
779
|
if (typeof E == "function" && E !== r.entries)
|
|
780
|
-
for (var
|
|
780
|
+
for (var b = E.call(r), C; !(C = b.next()).done; )
|
|
781
781
|
We(C.value) && dt(C.value, h);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function Sn(r) {
|
|
786
786
|
{
|
|
787
787
|
var h = r.type;
|
|
788
788
|
if (h == null || typeof h == "string")
|
|
@@ -820,7 +820,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
var ht = {};
|
|
823
|
-
function mt(r, h, m, w, E,
|
|
823
|
+
function mt(r, h, m, w, E, b) {
|
|
824
824
|
{
|
|
825
825
|
var C = O(r);
|
|
826
826
|
if (!C) {
|
|
@@ -831,7 +831,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
831
831
|
var H;
|
|
832
832
|
r === null ? H = "null" : Ue(r) ? H = "array" : r !== void 0 && r.$$typeof === t ? (H = "<" + (K(r.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : H = typeof r, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", H, T);
|
|
833
833
|
}
|
|
834
|
-
var U = En(r, h, m, E,
|
|
834
|
+
var U = En(r, h, m, E, b);
|
|
835
835
|
if (U == null)
|
|
836
836
|
return U;
|
|
837
837
|
if (C) {
|
|
@@ -861,7 +861,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
861
861
|
<%s key={someKey} {...props} />`, Ze, ce, Dn, ce), ht[ce + Ze] = !0;
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
|
-
return r === o ? jn(U) :
|
|
864
|
+
return r === o ? jn(U) : Sn(U), U;
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
function Ln(r, h, m) {
|
|
@@ -956,22 +956,22 @@ function nr(e, t) {
|
|
|
956
956
|
second: "2-digit",
|
|
957
957
|
hour12: !1
|
|
958
958
|
}).formatToParts(e), v = parseInt(
|
|
959
|
-
((n = d.find((
|
|
959
|
+
((n = d.find((S) => S.type === "year")) == null ? void 0 : n.value) || "0",
|
|
960
960
|
10
|
|
961
961
|
), y = parseInt(
|
|
962
|
-
((o = d.find((
|
|
962
|
+
((o = d.find((S) => S.type === "month")) == null ? void 0 : o.value) || "0",
|
|
963
963
|
10
|
|
964
964
|
) - 1, g = parseInt(
|
|
965
|
-
((a = d.find((
|
|
965
|
+
((a = d.find((S) => S.type === "day")) == null ? void 0 : a.value) || "0",
|
|
966
966
|
10
|
|
967
967
|
), L = parseInt(
|
|
968
|
-
((l = d.find((
|
|
968
|
+
((l = d.find((S) => S.type === "hour")) == null ? void 0 : l.value) || "0",
|
|
969
969
|
10
|
|
970
970
|
), D = parseInt(
|
|
971
|
-
((u = d.find((
|
|
971
|
+
((u = d.find((S) => S.type === "minute")) == null ? void 0 : u.value) || "0",
|
|
972
972
|
10
|
|
973
973
|
), _ = parseInt(
|
|
974
|
-
((i = d.find((
|
|
974
|
+
((i = d.find((S) => S.type === "second")) == null ? void 0 : i.value) || "0",
|
|
975
975
|
10
|
|
976
976
|
);
|
|
977
977
|
return new Date(v, y, g, L, D, _);
|
|
@@ -1340,7 +1340,7 @@ function zt({ callback: e }) {
|
|
|
1340
1340
|
}
|
|
1341
1341
|
const Wt = (e, t = 0) => parseInt(
|
|
1342
1342
|
Math.max(0, (Date.now() - (e + t * 1e3)) / 1e3).toFixed(0)
|
|
1343
|
-
), Zt = (e, t) => Math.max(0, (Date.now() - e - t * 1e3) / 1e3),
|
|
1343
|
+
), Zt = (e, t) => Math.max(0, (Date.now() - e - t * 1e3) / 1e3), br = (e, t) => Math.max(0, (t - e) / 1e3), Sr = (e, t = 0) => {
|
|
1344
1344
|
const o = t < 0 ? 0 : t, a = ["bytes", "kb", "mb", "gb", "tb", "pb", "eb", "zb", "yb"], l = Math.floor(Math.log(e) / Math.log(1024));
|
|
1345
1345
|
return `${parseFloat((e / Math.pow(1024, l)).toFixed(o))}${a[l]}`;
|
|
1346
1346
|
};
|
|
@@ -1362,7 +1362,7 @@ function jr({
|
|
|
1362
1362
|
const { bitrate: u, height: i, index: c } = l;
|
|
1363
1363
|
a.push({
|
|
1364
1364
|
sid: `quality-level-${c}`,
|
|
1365
|
-
label: i ? `${i}p` :
|
|
1365
|
+
label: i ? `${i}p` : Sr(u),
|
|
1366
1366
|
value: c,
|
|
1367
1367
|
selected: o === 1 || !e && c === t
|
|
1368
1368
|
});
|
|
@@ -1465,7 +1465,7 @@ function kr({ url: e, isLive: t, messages: n }) {
|
|
|
1465
1465
|
[l, u, i, o]
|
|
1466
1466
|
), _ = z(() => {
|
|
1467
1467
|
o.current && (console.log("[Player][HLS] MEDIA_ATTACHED"), o.current.loadSource(e));
|
|
1468
|
-
}, [e]),
|
|
1468
|
+
}, [e]), S = z(() => {
|
|
1469
1469
|
if (!o.current) return;
|
|
1470
1470
|
console.log("[Player][HLS] MANIFEST_LOADED"), d(null), y.current && (clearTimeout(y.current), y.current = null), v.current = 0;
|
|
1471
1471
|
const x = o.current.levels, I = o.current.currentLevel, p = o.current.autoLevelEnabled;
|
|
@@ -1491,7 +1491,7 @@ function kr({ url: e, isLive: t, messages: n }) {
|
|
|
1491
1491
|
if (console.error("[Player][HLS] ERROR", x, I), !!o.current && I.fatal)
|
|
1492
1492
|
switch (I.type) {
|
|
1493
1493
|
case re.ErrorTypes.NETWORK_ERROR:
|
|
1494
|
-
console.log("[Player][HLS] NETWORK_ERROR", I), t
|
|
1494
|
+
console.log("[Player][HLS] NETWORK_ERROR", I), t && I.details === "manifestLoadError" ? (v.current < g && (y.current && clearTimeout(y.current), v.current += 1, y.current = setTimeout(() => {
|
|
1495
1495
|
if (o.current)
|
|
1496
1496
|
try {
|
|
1497
1497
|
console.log("[Player][HLS] Retrying stream..."), o.current.loadSource(e);
|
|
@@ -1523,20 +1523,20 @@ function kr({ url: e, isLive: t, messages: n }) {
|
|
|
1523
1523
|
};
|
|
1524
1524
|
rr ? (x.backBufferLength = -1, x.enableWorker = !1) : t ? x.backBufferLength = 10 : x.backBufferLength = 60;
|
|
1525
1525
|
try {
|
|
1526
|
-
console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(x)), console.log("[Player][HLS] Version", re.version), o.current = new re(x), o.current.attachMedia(c.current), o.current.on(re.Events.MEDIA_ATTACHED, _), o.current.on(re.Events.MANIFEST_LOADED,
|
|
1526
|
+
console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(x)), console.log("[Player][HLS] Version", re.version), o.current = new re(x), o.current.attachMedia(c.current), o.current.on(re.Events.MEDIA_ATTACHED, _), o.current.on(re.Events.MANIFEST_LOADED, S), o.current.on(re.Events.ERROR, M);
|
|
1527
1527
|
} catch (I) {
|
|
1528
1528
|
throw new Error(`Error initializing Hls: ${I}`);
|
|
1529
1529
|
}
|
|
1530
1530
|
}, [
|
|
1531
|
-
|
|
1531
|
+
S,
|
|
1532
1532
|
_,
|
|
1533
1533
|
M,
|
|
1534
1534
|
t,
|
|
1535
1535
|
c,
|
|
1536
1536
|
e
|
|
1537
1537
|
]), P = z(() => {
|
|
1538
|
-
o.current && (o.current.off(re.Events.MEDIA_ATTACHED, _), o.current.off(re.Events.MANIFEST_LOADED,
|
|
1539
|
-
}, [
|
|
1538
|
+
o.current && (o.current.off(re.Events.MEDIA_ATTACHED, _), o.current.off(re.Events.MANIFEST_LOADED, S), o.current.off(re.Events.ERROR, M), o.current.destroy(), o.current = null), y.current && (clearTimeout(y.current), y.current = null), v.current = 0;
|
|
1539
|
+
}, [S, _, M]);
|
|
1540
1540
|
return A(() => {
|
|
1541
1541
|
a !== null && D(a);
|
|
1542
1542
|
}, [a, D]), A(() => (re.isSupported() && R(), P), [P, R]), null;
|
|
@@ -1550,7 +1550,7 @@ function Yt({
|
|
|
1550
1550
|
isMuted: n = !1,
|
|
1551
1551
|
messages: o = {}
|
|
1552
1552
|
}) {
|
|
1553
|
-
const a = f((p) => p.handleDurationChange), l = f((p) => p.handleEnd), u = f((p) => p.handleLoadedMetadata), i = f((p) => p.handleLoadStart), c = f((p) => p.handlePause), d = f((p) => p.handlePlay), v = f((p) => p.handlePlaying), y = f((p) => p.handleSeeked), g = f((p) => p.handleSeeking), L = f((p) => p.handleTimeUpdate), D = f((p) => p.handleWaiting), _ = f((p) => p.handleVolumeChange),
|
|
1553
|
+
const a = f((p) => p.handleDurationChange), l = f((p) => p.handleEnd), u = f((p) => p.handleLoadedMetadata), i = f((p) => p.handleLoadStart), c = f((p) => p.handlePause), d = f((p) => p.handlePlay), v = f((p) => p.handlePlaying), y = f((p) => p.handleSeeked), g = f((p) => p.handleSeeking), L = f((p) => p.handleTimeUpdate), D = f((p) => p.handleWaiting), _ = f((p) => p.handleVolumeChange), S = f((p) => p.handleError), M = f((p) => p.techRef), R = N(null), P = () => t ? {
|
|
1554
1554
|
onTimeUpdate: x
|
|
1555
1555
|
} : {
|
|
1556
1556
|
onDurationChange: a,
|
|
@@ -1574,7 +1574,7 @@ function Yt({
|
|
|
1574
1574
|
preload: "auto",
|
|
1575
1575
|
crossOrigin: "anonymous",
|
|
1576
1576
|
onEnded: l,
|
|
1577
|
-
onError:
|
|
1577
|
+
onError: S,
|
|
1578
1578
|
onLoadedMetadata: u,
|
|
1579
1579
|
onLoadStart: i,
|
|
1580
1580
|
onPause: c,
|
|
@@ -1728,7 +1728,7 @@ function Zr(u) {
|
|
|
1728
1728
|
single: null,
|
|
1729
1729
|
indicator: null,
|
|
1730
1730
|
accumulate: null
|
|
1731
|
-
}), v = N(null), y = N(0), g = N(null), [L, D] = X({ visible: !1, direction: null, time: 0 }), _ = f((p) => p.isIdle),
|
|
1731
|
+
}), v = N(null), y = N(0), g = N(null), [L, D] = X({ visible: !1, direction: null, time: 0 }), _ = f((p) => p.isIdle), S = f((p) => p.setIsIdle), M = f((p) => p.resetIdle), R = (p, $) => p < $ / 2 ? "backward" : "forward", P = (p) => {
|
|
1732
1732
|
if (!v.current) return;
|
|
1733
1733
|
const $ = p.changedTouches[0];
|
|
1734
1734
|
if (!$) return;
|
|
@@ -1753,7 +1753,7 @@ function Zr(u) {
|
|
|
1753
1753
|
if (g.current === null) {
|
|
1754
1754
|
d.current.single = null;
|
|
1755
1755
|
const Z = _;
|
|
1756
|
-
|
|
1756
|
+
S(!Z), Z && M();
|
|
1757
1757
|
}
|
|
1758
1758
|
c.current = null;
|
|
1759
1759
|
}, te);
|
|
@@ -1922,8 +1922,8 @@ function Me(e) {
|
|
|
1922
1922
|
}
|
|
1923
1923
|
const Tt = "vod-player-progress-bar";
|
|
1924
1924
|
function uo() {
|
|
1925
|
-
const e = N(null), t = N(null), [n, o] = X(0), [a, l] = X(0), [u, i] = X(!1), [c, d] = X(-1), [v, y] = X(-1), g = V((k) => k.delay), L = V((k) => k.startDate), D = L ? L.getTime() : 0, _ = (/* @__PURE__ */ new Date()).getTime(),
|
|
1926
|
-
o(Zt(D, g)), l(
|
|
1925
|
+
const e = N(null), t = N(null), [n, o] = X(0), [a, l] = X(0), [u, i] = X(!1), [c, d] = X(-1), [v, y] = X(-1), g = V((k) => k.delay), L = V((k) => k.startDate), D = L ? L.getTime() : 0, _ = (/* @__PURE__ */ new Date()).getTime(), S = V((k) => k.setDelay), M = f((k) => k.isPlaying), R = f((k) => k.addIdleLock), P = f((k) => k.removeIdleLock), x = z(() => {
|
|
1926
|
+
o(Zt(D, g)), l(br(D, _));
|
|
1927
1927
|
}, [g, _, D]), I = parseFloat(
|
|
1928
1928
|
(a ? (v !== -1 ? v : n) / a * 100 : 0).toFixed(1)
|
|
1929
1929
|
), p = (k) => {
|
|
@@ -1931,7 +1931,7 @@ function uo() {
|
|
|
1931
1931
|
}, $ = () => {
|
|
1932
1932
|
if (v !== -1) {
|
|
1933
1933
|
const k = Wt(D, v);
|
|
1934
|
-
|
|
1934
|
+
S(k), y(-1), P(Tt);
|
|
1935
1935
|
}
|
|
1936
1936
|
}, G = () => i(!0), q = () => i(!1), O = z(
|
|
1937
1937
|
(k) => {
|
|
@@ -2041,7 +2041,7 @@ function Qt() {
|
|
|
2041
2041
|
}
|
|
2042
2042
|
);
|
|
2043
2043
|
}
|
|
2044
|
-
const wo = "_playerContainer_146tx_1", xo = "_controlsTop_146tx_12", _o = "_controlsBottom_146tx_29", To = "_controlsContainer_146tx_45", Co = "_controlsRow_146tx_61", Eo = "_controlsSection_146tx_68", Ro = "_controlsSectionStart_146tx_78",
|
|
2044
|
+
const wo = "_playerContainer_146tx_1", xo = "_controlsTop_146tx_12", _o = "_controlsBottom_146tx_29", To = "_controlsContainer_146tx_45", Co = "_controlsRow_146tx_61", Eo = "_controlsSection_146tx_68", Ro = "_controlsSectionStart_146tx_78", bo = "_controlsSectionEnd_146tx_82", B = {
|
|
2045
2045
|
playerContainer: wo,
|
|
2046
2046
|
controlsTop: xo,
|
|
2047
2047
|
controlsBottom: _o,
|
|
@@ -2049,9 +2049,9 @@ const wo = "_playerContainer_146tx_1", xo = "_controlsTop_146tx_12", _o = "_cont
|
|
|
2049
2049
|
controlsRow: Co,
|
|
2050
2050
|
controlsSection: Eo,
|
|
2051
2051
|
controlsSectionStart: Ro,
|
|
2052
|
-
controlsSectionEnd:
|
|
2052
|
+
controlsSectionEnd: bo
|
|
2053
2053
|
};
|
|
2054
|
-
function
|
|
2054
|
+
function So() {
|
|
2055
2055
|
return /* @__PURE__ */ s.jsx(
|
|
2056
2056
|
"svg",
|
|
2057
2057
|
{
|
|
@@ -2088,7 +2088,7 @@ function en() {
|
|
|
2088
2088
|
return ar(d, i);
|
|
2089
2089
|
}, [e, i, u]), A(() => {
|
|
2090
2090
|
l(!0);
|
|
2091
|
-
}, [l]), /* @__PURE__ */ s.jsx(le, { onClick: c, children: n ? /* @__PURE__ */ s.jsx(jo, {}) : /* @__PURE__ */ s.jsx(
|
|
2091
|
+
}, [l]), /* @__PURE__ */ s.jsx(le, { onClick: c, children: n ? /* @__PURE__ */ s.jsx(jo, {}) : /* @__PURE__ */ s.jsx(So, {}) });
|
|
2092
2092
|
}
|
|
2093
2093
|
const Lo = "_idleCheckContainer_crh2s_1", Po = "_idleCheckContainerIdle_crh2s_5", Io = "_idleCheckContainerActive_crh2s_11", qe = {
|
|
2094
2094
|
idleCheckContainer: Lo,
|
|
@@ -2327,7 +2327,8 @@ function ti({ url: e, messages: t, onEvent: n }) {
|
|
|
2327
2327
|
{
|
|
2328
2328
|
url: e,
|
|
2329
2329
|
messages: {
|
|
2330
|
-
eventFinished: t == null ? void 0 : t.eventFinished
|
|
2330
|
+
eventFinished: t == null ? void 0 : t.eventFinished,
|
|
2331
|
+
unableToPlay: t == null ? void 0 : t.unableToPlay
|
|
2331
2332
|
}
|
|
2332
2333
|
}
|
|
2333
2334
|
),
|
|
@@ -2401,15 +2402,15 @@ function ri() {
|
|
|
2401
2402
|
};
|
|
2402
2403
|
return /* @__PURE__ */ s.jsx(le, { onClick: o, children: e ? /* @__PURE__ */ s.jsx(Gt, {}) : /* @__PURE__ */ s.jsx(Jt, {}) });
|
|
2403
2404
|
}
|
|
2404
|
-
const
|
|
2405
|
+
const bt = "vod-player-progress-bar";
|
|
2405
2406
|
function oi() {
|
|
2406
2407
|
const e = N(null), t = N(null), [n, o] = X(!1), [a, l] = X(-1), [u, i] = X(-1), c = f((P) => P.currentTime), d = f((P) => P.duration), v = f((P) => P.seek), y = f((P) => P.addIdleLock), g = f((P) => P.removeIdleLock), L = parseFloat(
|
|
2407
2408
|
(d ? (u !== -1 ? u : c) / d * 100 : 0).toFixed(1)
|
|
2408
2409
|
), D = (P) => {
|
|
2409
|
-
i(d * (P[0] / 100)), y(
|
|
2410
|
+
i(d * (P[0] / 100)), y(bt);
|
|
2410
2411
|
}, _ = () => {
|
|
2411
|
-
u !== -1 && (v(u), i(-1), g(
|
|
2412
|
-
},
|
|
2412
|
+
u !== -1 && (v(u), i(-1), g(bt));
|
|
2413
|
+
}, S = () => o(!0), M = () => o(!1), R = z(
|
|
2413
2414
|
(P) => {
|
|
2414
2415
|
const x = e.current, I = t.current;
|
|
2415
2416
|
if (x && I) {
|
|
@@ -2418,7 +2419,7 @@ function oi() {
|
|
|
2418
2419
|
let O = G - $.width / 2;
|
|
2419
2420
|
O < 0 && (O = 0), O > p.width - $.width && (O = -1), I.style.left = O > -1 ? `${O}px` : "auto", I.style.right = O > -1 ? "auto" : "0px", l(q * d);
|
|
2420
2421
|
}
|
|
2421
|
-
|
|
2422
|
+
S();
|
|
2422
2423
|
},
|
|
2423
2424
|
[d]
|
|
2424
2425
|
);
|