@halibegic/react-video-player 0.0.36 → 0.0.37
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.
|
@@ -19,7 +19,7 @@ var ne = (e, t) => {
|
|
|
19
19
|
t.indexOf(o) < 0 && vt.call(e, o) && (n[o] = e[o]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
import St, { useLayoutEffect as Vn, useEffect as N, useRef as O, useState as X, createContext as bt, useContext as Lt, useCallback as
|
|
22
|
+
import St, { useLayoutEffect as Vn, useEffect as N, useRef as O, useState as X, createContext as bt, useContext as Lt, useCallback as B, forwardRef as Me } from "react";
|
|
23
23
|
import { create as Pt, useStore as jt } from "zustand";
|
|
24
24
|
import An from "mitt";
|
|
25
25
|
import re from "hls.js";
|
|
@@ -171,7 +171,7 @@ function Ze(e) {
|
|
|
171
171
|
Nt(e, e._deferreds[t]);
|
|
172
172
|
e._deferreds = null;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function Un(e, t, n) {
|
|
175
175
|
this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof t == "function" ? t : null, this.promise = n;
|
|
176
176
|
}
|
|
177
177
|
function Vt(e, t) {
|
|
@@ -195,7 +195,7 @@ F.prototype.catch = function(e) {
|
|
|
195
195
|
};
|
|
196
196
|
F.prototype.then = function(e, t) {
|
|
197
197
|
var n = new this.constructor(Hn);
|
|
198
|
-
return Nt(this, new
|
|
198
|
+
return Nt(this, new Un(e, t, n)), n;
|
|
199
199
|
};
|
|
200
200
|
F.prototype.finally = kt;
|
|
201
201
|
F.all = function(e) {
|
|
@@ -270,7 +270,7 @@ var ae = (function() {
|
|
|
270
270
|
typeof ae.Promise != "function" ? ae.Promise = F : (ae.Promise.prototype.finally || (ae.Promise.prototype.finally = kt), ae.Promise.allSettled || (ae.Promise.allSettled = It), ae.Promise.any || (ae.Promise.any = Ft));
|
|
271
271
|
var je = { exports: {} }, ge = {};
|
|
272
272
|
var yt;
|
|
273
|
-
function
|
|
273
|
+
function Bn() {
|
|
274
274
|
if (yt) return ge;
|
|
275
275
|
yt = 1;
|
|
276
276
|
var e = St, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
@@ -312,10 +312,10 @@ function zn() {
|
|
|
312
312
|
b.unshift("Warning: " + h), Function.prototype.apply.call(console[r], console, b);
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
var T = !1, I = !1, p = !1,
|
|
315
|
+
var T = !1, I = !1, p = !1, H = !1, G = !1, W;
|
|
316
316
|
W = Symbol.for("react.module.reference");
|
|
317
317
|
function V(r) {
|
|
318
|
-
return !!(typeof r == "string" || typeof r == "function" || r === o || r === c || G || r === s || r === d || r === g ||
|
|
318
|
+
return !!(typeof r == "string" || typeof r == "function" || r === o || r === c || G || r === s || r === d || r === g || H || r === _ || T || I || p || typeof r == "object" && r !== null && (r.$$typeof === v || r.$$typeof === y || r.$$typeof === u || r.$$typeof === i || r.$$typeof === l || // 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.
|
|
@@ -507,18 +507,18 @@ function zn() {
|
|
|
507
507
|
if (J && w && typeof J.stack == "string") {
|
|
508
508
|
for (var x = J.stack.split(`
|
|
509
509
|
`), Y = w.stack.split(`
|
|
510
|
-
`), A = x.length - 1,
|
|
511
|
-
|
|
512
|
-
for (; A >= 1 &&
|
|
513
|
-
if (x[A] !== Y[
|
|
514
|
-
if (A !== 1 ||
|
|
510
|
+
`), A = x.length - 1, $ = Y.length - 1; A >= 1 && $ >= 0 && x[A] !== Y[$]; )
|
|
511
|
+
$--;
|
|
512
|
+
for (; A >= 1 && $ >= 0; A--, $--)
|
|
513
|
+
if (x[A] !== Y[$]) {
|
|
514
|
+
if (A !== 1 || $ !== 1)
|
|
515
515
|
do
|
|
516
|
-
if (A--,
|
|
516
|
+
if (A--, $--, $ < 0 || x[A] !== Y[$]) {
|
|
517
517
|
var ee = `
|
|
518
518
|
` + x[A].replace(" at new ", " at ");
|
|
519
519
|
return r.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", r.displayName)), typeof r == "function" && Ce.set(r, ee), ee;
|
|
520
520
|
}
|
|
521
|
-
while (A >= 1 &&
|
|
521
|
+
while (A >= 1 && $ >= 0);
|
|
522
522
|
break;
|
|
523
523
|
}
|
|
524
524
|
}
|
|
@@ -703,8 +703,8 @@ function zn() {
|
|
|
703
703
|
E[b] === void 0 && (E[b] = A[b]);
|
|
704
704
|
}
|
|
705
705
|
if (x || Y) {
|
|
706
|
-
var
|
|
707
|
-
x && Tn(E,
|
|
706
|
+
var $ = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
707
|
+
x && Tn(E, $), Y && _n(E, $);
|
|
708
708
|
}
|
|
709
709
|
return xn(r, x, Y, C, w, ot.current, E);
|
|
710
710
|
}
|
|
@@ -717,9 +717,9 @@ function zn() {
|
|
|
717
717
|
} else
|
|
718
718
|
at.setExtraStackFrame(null);
|
|
719
719
|
}
|
|
720
|
-
var
|
|
721
|
-
|
|
722
|
-
function
|
|
720
|
+
var Ue;
|
|
721
|
+
Ue = !1;
|
|
722
|
+
function Be(r) {
|
|
723
723
|
return typeof r == "object" && r !== null && r.$$typeof === t;
|
|
724
724
|
}
|
|
725
725
|
function lt() {
|
|
@@ -770,15 +770,15 @@ Check the top-level render call using <` + m + ">.");
|
|
|
770
770
|
if (He(r))
|
|
771
771
|
for (var m = 0; m < r.length; m++) {
|
|
772
772
|
var w = r[m];
|
|
773
|
-
|
|
773
|
+
Be(w) && ut(w, h);
|
|
774
774
|
}
|
|
775
|
-
else if (
|
|
775
|
+
else if (Be(r))
|
|
776
776
|
r._store && (r._store.validated = !0);
|
|
777
777
|
else if (r) {
|
|
778
778
|
var C = L(r);
|
|
779
779
|
if (typeof C == "function" && C !== r.entries)
|
|
780
780
|
for (var b = C.call(r), E; !(E = b.next()).done; )
|
|
781
|
-
|
|
781
|
+
Be(E.value) && ut(E.value, h);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
}
|
|
@@ -799,8 +799,8 @@ Check the top-level render call using <` + m + ">.");
|
|
|
799
799
|
if (m) {
|
|
800
800
|
var w = Z(h);
|
|
801
801
|
fn(m, r.props, "prop", w, r);
|
|
802
|
-
} else if (h.PropTypes !== void 0 && !
|
|
803
|
-
|
|
802
|
+
} else if (h.PropTypes !== void 0 && !Ue) {
|
|
803
|
+
Ue = !0;
|
|
804
804
|
var C = Z(h);
|
|
805
805
|
R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", C || "Unknown");
|
|
806
806
|
}
|
|
@@ -831,9 +831,9 @@ Check the top-level render call using <` + m + ">.");
|
|
|
831
831
|
var A;
|
|
832
832
|
r === null ? A = "null" : He(r) ? A = "array" : r !== void 0 && r.$$typeof === t ? (A = "<" + (Z(r.type) || "Unknown") + " />", x = " Did you accidentally export a JSX literal instead of a component?") : A = 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", A, x);
|
|
833
833
|
}
|
|
834
|
-
var
|
|
835
|
-
if (
|
|
836
|
-
return
|
|
834
|
+
var $ = En(r, h, m, C, b);
|
|
835
|
+
if ($ == null)
|
|
836
|
+
return $;
|
|
837
837
|
if (E) {
|
|
838
838
|
var ee = h.children;
|
|
839
839
|
if (ee !== void 0)
|
|
@@ -861,7 +861,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
861
861
|
<%s key={someKey} {...props} />`, ze, ce, In, ce), ft[ce + ze] = !0;
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
|
-
return r === o ? bn(
|
|
864
|
+
return r === o ? bn($) : Sn($), $;
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
function Ln(r, h, m) {
|
|
@@ -876,7 +876,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
876
876
|
}
|
|
877
877
|
var wt;
|
|
878
878
|
function qn() {
|
|
879
|
-
return wt || (wt = 1, process.env.NODE_ENV === "production" ? je.exports =
|
|
879
|
+
return wt || (wt = 1, process.env.NODE_ENV === "production" ? je.exports = Bn() : je.exports = zn()), je.exports;
|
|
880
880
|
}
|
|
881
881
|
var a = qn();
|
|
882
882
|
const Wn = "_playerNotice_lq5nz_1", Zn = "_playerNoticeTitle_lq5nz_17", Kn = "_playerNoticeText_lq5nz_26", Yn = "_playerNoticeLowZIndex_lq5nz_35", ie = {
|
|
@@ -916,7 +916,7 @@ const Gn = () => Pt((e) => ({
|
|
|
916
916
|
null
|
|
917
917
|
);
|
|
918
918
|
return t.current || (t.current = Gn()), /* @__PURE__ */ a.jsx(Ot.Provider, { value: t.current, children: e });
|
|
919
|
-
},
|
|
919
|
+
}, U = (e) => {
|
|
920
920
|
const t = Lt(Ot);
|
|
921
921
|
if (!t)
|
|
922
922
|
throw new Error("usePlayerStore must be used within PlayerStoreProvider");
|
|
@@ -1206,13 +1206,13 @@ const ar = () => An(), lr = (e, t) => ({
|
|
|
1206
1206
|
}), pr = (e) => () => P({}, e), vr = (e, t) => Pt()((...n) => P(P(P(P(P(P(P(P({}, lr(...n)), cr(...n)), ur(...n)), fr(...n)), dr(...n)), hr(...n)), mr(...n)), pr({
|
|
1207
1207
|
techRef: e,
|
|
1208
1208
|
containerRef: t
|
|
1209
|
-
})(...n))),
|
|
1209
|
+
})(...n))), Ut = bt(null);
|
|
1210
1210
|
function yr({ children: e }) {
|
|
1211
1211
|
const t = O(null), n = O(null), o = O(null);
|
|
1212
|
-
return t.current || (t.current = vr(n, o)), /* @__PURE__ */ a.jsx(
|
|
1212
|
+
return t.current || (t.current = vr(n, o)), /* @__PURE__ */ a.jsx(Ut.Provider, { value: t.current, children: e });
|
|
1213
1213
|
}
|
|
1214
1214
|
const f = (e) => {
|
|
1215
|
-
const t = Lt(
|
|
1215
|
+
const t = Lt(Ut);
|
|
1216
1216
|
if (!t)
|
|
1217
1217
|
throw new Error("usePlayerStore must be used within PlayerStoreProvider");
|
|
1218
1218
|
return jt(t, e);
|
|
@@ -1289,7 +1289,7 @@ async function _r(e) {
|
|
|
1289
1289
|
}
|
|
1290
1290
|
function xr(n) {
|
|
1291
1291
|
var o = n, { url: e } = o, t = ne(o, ["url"]);
|
|
1292
|
-
const [s, c] = X(!0), u =
|
|
1292
|
+
const [s, c] = X(!0), u = U((d) => d.startDate), i = U((d) => d.setStartDate), l = B(async () => {
|
|
1293
1293
|
const d = await _r(e);
|
|
1294
1294
|
d && i(d);
|
|
1295
1295
|
}, [e, i]);
|
|
@@ -1304,7 +1304,7 @@ function Er({
|
|
|
1304
1304
|
messages: t = {}
|
|
1305
1305
|
}) {
|
|
1306
1306
|
var u, i, l;
|
|
1307
|
-
const n =
|
|
1307
|
+
const n = U((d) => d.startDate), o = f((d) => d.isStarted);
|
|
1308
1308
|
return Xn(o ? null : 5e3), n ? Date.now() < n.getTime() ? /* @__PURE__ */ a.jsx(
|
|
1309
1309
|
Cr,
|
|
1310
1310
|
{
|
|
@@ -1327,7 +1327,7 @@ function Cr({ startDate: e, title: t, message: n }) {
|
|
|
1327
1327
|
] })
|
|
1328
1328
|
] }) : /* @__PURE__ */ a.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ a.jsx("h3", { className: ie.playerNoticeTitle, children: n }) });
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function Bt({ callback: e }) {
|
|
1331
1331
|
const t = f((n) => n.eventEmitter);
|
|
1332
1332
|
return N(() => {
|
|
1333
1333
|
const n = () => e("play", void 0), o = () => e("pause", void 0), s = () => e("ended", void 0), c = () => e("seeking", void 0), u = () => e("seeked", void 0), i = (S) => e("volumeChange", S), l = (S) => e("fullscreenChange", S), d = (S) => e("qualityChange", S), g = (S) => e("loadedMetadata", S), y = () => e("loadStart", void 0), v = () => e("playing", void 0), _ = () => e("waiting", void 0), j = () => e("error", void 0);
|
|
@@ -1367,7 +1367,7 @@ function br({
|
|
|
1367
1367
|
}), s;
|
|
1368
1368
|
}
|
|
1369
1369
|
function Lr({ callback: e }) {
|
|
1370
|
-
const t =
|
|
1370
|
+
const t = U((c) => c.delay), n = U((c) => c.startDate), o = n ? n.getTime() : 0, s = f((c) => c.eventEmitter);
|
|
1371
1371
|
return N(() => {
|
|
1372
1372
|
const c = () => e("timeUpdate", {
|
|
1373
1373
|
currentTime: qt(o, t),
|
|
@@ -1376,10 +1376,10 @@ function Lr({ callback: e }) {
|
|
|
1376
1376
|
return s.on("timeUpdate", c), () => {
|
|
1377
1377
|
s.off("timeUpdate", c);
|
|
1378
1378
|
};
|
|
1379
|
-
}, [e, s]), /* @__PURE__ */ a.jsx(
|
|
1379
|
+
}, [e, s]), /* @__PURE__ */ a.jsx(Bt, { callback: e });
|
|
1380
1380
|
}
|
|
1381
1381
|
function Wt() {
|
|
1382
|
-
const e = f((i) => i.exitFullscreen), t = f((i) => i.isFullscreen), n = f((i) => i.isFullscreenReady), o = f((i) => i.requestFullscreen), s = f((i) => i.setVolume), c = f((i) => i.volume), u =
|
|
1382
|
+
const e = f((i) => i.exitFullscreen), t = f((i) => i.isFullscreen), n = f((i) => i.isFullscreenReady), o = f((i) => i.requestFullscreen), s = f((i) => i.setVolume), c = f((i) => i.volume), u = B(
|
|
1383
1383
|
(i) => {
|
|
1384
1384
|
let l = !1;
|
|
1385
1385
|
if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
|
|
@@ -1414,7 +1414,7 @@ function Wt() {
|
|
|
1414
1414
|
}), [u]), null;
|
|
1415
1415
|
}
|
|
1416
1416
|
function Pr() {
|
|
1417
|
-
const e =
|
|
1417
|
+
const e = U((i) => i.delay), t = f((i) => i.isPlaying), n = f((i) => i.pause), o = f((i) => i.getPauseTimeDiff), s = f((i) => i.play), c = U((i) => i.setDelay), u = B(
|
|
1418
1418
|
(i) => {
|
|
1419
1419
|
let l = !1;
|
|
1420
1420
|
if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
|
|
@@ -1451,7 +1451,7 @@ function jr({ children: e }) {
|
|
|
1451
1451
|
return /* @__PURE__ */ a.jsx(Jn, { children: /* @__PURE__ */ a.jsx(Zt, { children: e }) });
|
|
1452
1452
|
}
|
|
1453
1453
|
function kr({ url: e, isLive: t, messages: n }) {
|
|
1454
|
-
const o = O(null), s = f((T) => T.level), c = f((T) => T.levels), u = f((T) => T.setLevel), i = f((T) => T.setLevels), l = f((T) => T.techRef), d = f((T) => T.setError), g = O(0), y = O(null), v = 50, _ = 1e4, j =
|
|
1454
|
+
const o = O(null), s = f((T) => T.level), c = f((T) => T.levels), u = f((T) => T.setLevel), i = f((T) => T.setLevels), l = f((T) => T.techRef), d = f((T) => T.setError), g = O(0), y = O(null), v = 50, _ = 1e4, j = B(
|
|
1455
1455
|
(T) => {
|
|
1456
1456
|
if (o.current && (o.current.nextLevel = T, u(null), c)) {
|
|
1457
1457
|
const I = c.map((p) => he(P({}, p), {
|
|
@@ -1461,16 +1461,16 @@ function kr({ url: e, isLive: t, messages: n }) {
|
|
|
1461
1461
|
}
|
|
1462
1462
|
},
|
|
1463
1463
|
[c, u, i, o]
|
|
1464
|
-
), S =
|
|
1464
|
+
), S = B(() => {
|
|
1465
1465
|
o.current && (console.log("[Player][HLS] MEDIA_ATTACHED"), o.current.loadSource(e));
|
|
1466
|
-
}, [e]), L =
|
|
1466
|
+
}, [e]), L = B(() => {
|
|
1467
1467
|
if (!o.current) return;
|
|
1468
1468
|
console.log("[Player][HLS] MANIFEST_LOADED"), d(null), y.current && (clearTimeout(y.current), y.current = null), g.current = 0;
|
|
1469
1469
|
const T = o.current.levels, I = o.current.currentLevel, p = o.current.autoLevelEnabled;
|
|
1470
1470
|
i(
|
|
1471
1471
|
br({
|
|
1472
|
-
levels: T.map((
|
|
1473
|
-
const { bitrate: W, height: V, width: D } =
|
|
1472
|
+
levels: T.map((H, G) => {
|
|
1473
|
+
const { bitrate: W, height: V, width: D } = H;
|
|
1474
1474
|
return {
|
|
1475
1475
|
bitrate: W,
|
|
1476
1476
|
height: V,
|
|
@@ -1482,10 +1482,10 @@ function kr({ url: e, isLive: t, messages: n }) {
|
|
|
1482
1482
|
isAuto: p
|
|
1483
1483
|
})
|
|
1484
1484
|
);
|
|
1485
|
-
}, [d, i]), M =
|
|
1485
|
+
}, [d, i]), M = B(
|
|
1486
1486
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1487
1487
|
(T, I) => {
|
|
1488
|
-
var p,
|
|
1488
|
+
var p, H;
|
|
1489
1489
|
if (console.error("[Player][HLS] ERROR", T, I), !!o.current && I.fatal)
|
|
1490
1490
|
switch (I.type) {
|
|
1491
1491
|
case re.ErrorTypes.NETWORK_ERROR:
|
|
@@ -1501,7 +1501,7 @@ function kr({ url: e, isLive: t, messages: n }) {
|
|
|
1501
1501
|
code: "LIVE_MANIFEST_LOAD_ERROR",
|
|
1502
1502
|
tech: "hls"
|
|
1503
1503
|
})) : (d({
|
|
1504
|
-
message: (
|
|
1504
|
+
message: (H = n == null ? void 0 : n.unableToPlay) != null ? H : "Unable to play the video. Please try again later.",
|
|
1505
1505
|
code: "NETWORK_ERROR",
|
|
1506
1506
|
tech: "hls"
|
|
1507
1507
|
}), o.current.startLoad());
|
|
@@ -1512,7 +1512,7 @@ function kr({ url: e, isLive: t, messages: n }) {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
},
|
|
1514
1514
|
[t, e, d]
|
|
1515
|
-
), R =
|
|
1515
|
+
), R = B(() => {
|
|
1516
1516
|
if (!l.current) return;
|
|
1517
1517
|
let T = {
|
|
1518
1518
|
startLevel: -1,
|
|
@@ -1532,7 +1532,7 @@ function kr({ url: e, isLive: t, messages: n }) {
|
|
|
1532
1532
|
t,
|
|
1533
1533
|
l,
|
|
1534
1534
|
e
|
|
1535
|
-
]), k =
|
|
1535
|
+
]), k = B(() => {
|
|
1536
1536
|
o.current && (o.current.off(re.Events.MEDIA_ATTACHED, S), o.current.off(re.Events.MANIFEST_LOADED, L), o.current.off(re.Events.ERROR, M), o.current.destroy(), o.current = null), y.current && (clearTimeout(y.current), y.current = null), g.current = 0;
|
|
1537
1537
|
}, [L, S, M]);
|
|
1538
1538
|
return N(() => {
|
|
@@ -1548,7 +1548,9 @@ function Kt({
|
|
|
1548
1548
|
isMuted: n = !1,
|
|
1549
1549
|
messages: o = {}
|
|
1550
1550
|
}) {
|
|
1551
|
-
const s = f((p) => p.handleDurationChange), c = f((p) => p.handleEnd), u = f((p) => p.handleLoadedMetadata), i = f((p) => p.handleLoadStart), l = f((p) => p.handlePause), d = f((p) => p.handlePlay), g = f((p) => p.handlePlaying), y = f((p) => p.handleSeeked), v = f((p) => p.handleSeeking), _ = f((p) => p.handleTimeUpdate), j = f((p) => p.handleWaiting), S = f((p) => p.handleVolumeChange), L = f((p) => p.handleError), M = f((p) => p.techRef), R = O(null), k = () => t ? {
|
|
1551
|
+
const s = f((p) => p.handleDurationChange), c = f((p) => p.handleEnd), u = f((p) => p.handleLoadedMetadata), i = f((p) => p.handleLoadStart), l = f((p) => p.handlePause), d = f((p) => p.handlePlay), g = f((p) => p.handlePlaying), y = f((p) => p.handleSeeked), v = f((p) => p.handleSeeking), _ = f((p) => p.handleTimeUpdate), j = f((p) => p.handleWaiting), S = f((p) => p.handleVolumeChange), L = f((p) => p.handleError), M = f((p) => p.techRef), R = O(null), k = () => t ? {
|
|
1552
|
+
onTimeUpdate: T
|
|
1553
|
+
} : {
|
|
1552
1554
|
onDurationChange: s,
|
|
1553
1555
|
onSeeked: y,
|
|
1554
1556
|
onSeeking: v,
|
|
@@ -1584,7 +1586,7 @@ function Kt({
|
|
|
1584
1586
|
] });
|
|
1585
1587
|
}
|
|
1586
1588
|
function Fr({ url: e, messages: t = {} }) {
|
|
1587
|
-
const [n, o] = X(null), s =
|
|
1589
|
+
const [n, o] = X(null), s = U((u) => u.delay), c = B(async () => {
|
|
1588
1590
|
o(
|
|
1589
1591
|
s ? e.replace("-live", "-catchup").replace("playlist.m3u8", `playlist_fmp4_dvr_timeshift-${s}.m3u8`) : e
|
|
1590
1592
|
);
|
|
@@ -1633,8 +1635,8 @@ function Yt(i) {
|
|
|
1633
1635
|
"maxForwardTime",
|
|
1634
1636
|
"maxBackwardTime"
|
|
1635
1637
|
]);
|
|
1636
|
-
return Mr("(min-width: 1024px)") ? /* @__PURE__ */ a.jsx(
|
|
1637
|
-
|
|
1638
|
+
return Mr("(min-width: 1024px)") ? /* @__PURE__ */ a.jsx(Ur, P({ className: e, onClick: t }, u)) : /* @__PURE__ */ a.jsx(
|
|
1639
|
+
Br,
|
|
1638
1640
|
P({
|
|
1639
1641
|
className: e,
|
|
1640
1642
|
maxForwardTime: s,
|
|
@@ -1644,7 +1646,7 @@ function Yt(i) {
|
|
|
1644
1646
|
}, u)
|
|
1645
1647
|
);
|
|
1646
1648
|
}
|
|
1647
|
-
function
|
|
1649
|
+
function Ur(o) {
|
|
1648
1650
|
var s = o, { className: e, onClick: t } = s, n = ne(s, ["className", "onClick"]);
|
|
1649
1651
|
const c = O(null), u = f((_) => _.exitFullscreen), i = f((_) => _.isFullscreen), l = f((_) => _.requestFullscreen), d = (_) => {
|
|
1650
1652
|
v() ? (y(), i ? u() : l()) : g(_);
|
|
@@ -1666,7 +1668,7 @@ function Br(o) {
|
|
|
1666
1668
|
}, n)
|
|
1667
1669
|
);
|
|
1668
1670
|
}
|
|
1669
|
-
function
|
|
1671
|
+
function Br(u) {
|
|
1670
1672
|
var i = u, {
|
|
1671
1673
|
className: e,
|
|
1672
1674
|
maxForwardTime: t,
|
|
@@ -1684,11 +1686,11 @@ function Ur(u) {
|
|
|
1684
1686
|
single: null,
|
|
1685
1687
|
indicator: null,
|
|
1686
1688
|
accumulate: null
|
|
1687
|
-
}), g = O(null), y = O(0), v = O(null), [_, j] = X({ visible: !1, direction: null, time: 0 }), S = f((p) => p.isIdle), L = f((p) => p.setIsIdle), M = f((p) => p.resetIdle), R = (p,
|
|
1689
|
+
}), g = O(null), y = O(0), v = O(null), [_, j] = X({ visible: !1, direction: null, time: 0 }), S = f((p) => p.isIdle), L = f((p) => p.setIsIdle), M = f((p) => p.resetIdle), R = (p, H) => p < H / 2 ? "backward" : "forward", k = (p) => {
|
|
1688
1690
|
if (!g.current) return;
|
|
1689
|
-
const
|
|
1690
|
-
if (!
|
|
1691
|
-
const G = Date.now(), W = g.current.getBoundingClientRect(), V =
|
|
1691
|
+
const H = p.changedTouches[0];
|
|
1692
|
+
if (!H) return;
|
|
1693
|
+
const G = Date.now(), W = g.current.getBoundingClientRect(), V = H.clientX - W.left, D = H.clientY - W.top;
|
|
1692
1694
|
if (V < 0 || V > W.width || D < 0 || D > W.height)
|
|
1693
1695
|
return;
|
|
1694
1696
|
const Q = l.current, Z = Q ? G - Q.time : 1 / 0, z = R(V, W.width), oe = v.current !== null && v.current === z && Q !== null && Z < 700 && Math.abs(V - Q.x) < 100;
|
|
@@ -1700,7 +1702,7 @@ function Ur(u) {
|
|
|
1700
1702
|
te != null ? te : 1 / 0
|
|
1701
1703
|
), T(z, y.current), d.current.accumulate && window.clearTimeout(d.current.accumulate), d.current.accumulate = window.setTimeout(() => {
|
|
1702
1704
|
const q = y.current;
|
|
1703
|
-
q > 0 && (v.current === "backward" ? s == null || s(q) : o == null || o(q), y.current = 0, v.current = null, l.current = null, I(),
|
|
1705
|
+
q > 0 && (v.current === "backward" ? s == null || s(q) : o == null || o(q), M()), y.current = 0, v.current = null, l.current = null, I(), d.current.accumulate = null;
|
|
1704
1706
|
}, 500), l.current = { time: G, x: V };
|
|
1705
1707
|
} else {
|
|
1706
1708
|
l.current = { time: G, x: V }, d.current.single && window.clearTimeout(d.current.single);
|
|
@@ -1714,10 +1716,10 @@ function Ur(u) {
|
|
|
1714
1716
|
l.current = null;
|
|
1715
1717
|
}, te);
|
|
1716
1718
|
}
|
|
1717
|
-
}, T = (p,
|
|
1718
|
-
j({ visible: !0, direction: p, time:
|
|
1719
|
+
}, T = (p, H) => {
|
|
1720
|
+
H !== 0 && (j({ visible: !0, direction: p, time: H }), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.indicator = window.setTimeout(() => {
|
|
1719
1721
|
I();
|
|
1720
|
-
}, 700);
|
|
1722
|
+
}, 700));
|
|
1721
1723
|
}, I = () => {
|
|
1722
1724
|
j({ visible: !1, direction: null, time: 0 }), d.current.indicator && (window.clearTimeout(d.current.indicator), d.current.indicator = null);
|
|
1723
1725
|
};
|
|
@@ -1746,7 +1748,7 @@ function Ur(u) {
|
|
|
1746
1748
|
] });
|
|
1747
1749
|
}
|
|
1748
1750
|
function zr() {
|
|
1749
|
-
const e = f((l) => l.isPlaying), t = f((l) => l.pause), n = f((l) => l.getPauseTimeDiff), o = f((l) => l.play), s =
|
|
1751
|
+
const e = f((l) => l.isPlaying), t = f((l) => l.pause), n = f((l) => l.getPauseTimeDiff), o = f((l) => l.play), s = U((l) => l.delay), c = U((l) => l.setDelay), u = U((l) => l.startDate), i = u ? u.getTime() : 0;
|
|
1750
1752
|
return /* @__PURE__ */ a.jsx(
|
|
1751
1753
|
Yt,
|
|
1752
1754
|
{
|
|
@@ -1789,7 +1791,7 @@ const Zr = "_liveIndicator_1jczn_1", Kr = "_liveIndicatorHasDelay_1jczn_9", Yr =
|
|
|
1789
1791
|
};
|
|
1790
1792
|
function Xr(n) {
|
|
1791
1793
|
var o = n, { message: e } = o, t = ne(o, ["message"]);
|
|
1792
|
-
const s =
|
|
1794
|
+
const s = U((l) => l.delay), c = U((l) => l.setDelay), u = () => {
|
|
1793
1795
|
s && c(0);
|
|
1794
1796
|
}, i = s ? `${ke.liveIndicator} ${ke.liveIndicatorHasDelay}` : `${ke.liveIndicator} ${ke.liveIndicatorNoDelay}`;
|
|
1795
1797
|
return /* @__PURE__ */ a.jsxs(le, he(P({ onClick: u, shape: "square" }, t), { children: [
|
|
@@ -1820,7 +1822,7 @@ function Gt() {
|
|
|
1820
1822
|
);
|
|
1821
1823
|
}
|
|
1822
1824
|
function Gr() {
|
|
1823
|
-
const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), o = f((i) => i.play), s =
|
|
1825
|
+
const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), o = f((i) => i.play), s = U((i) => i.delay), c = U((i) => i.setDelay), u = () => {
|
|
1824
1826
|
if (e)
|
|
1825
1827
|
t();
|
|
1826
1828
|
else {
|
|
@@ -1878,18 +1880,18 @@ function Fe(e) {
|
|
|
1878
1880
|
}
|
|
1879
1881
|
const _t = "vod-player-progress-bar";
|
|
1880
1882
|
function ao() {
|
|
1881
|
-
const e = O(null), t = O(null), [n, o] = X(0), [s, c] = X(0), [u, i] = X(!1), [l, d] = X(-1), [g, y] = X(-1), v =
|
|
1883
|
+
const e = O(null), t = O(null), [n, o] = X(0), [s, c] = X(0), [u, i] = X(!1), [l, d] = X(-1), [g, y] = X(-1), v = U((D) => D.delay), _ = U((D) => D.startDate), j = _ ? _.getTime() : 0, S = (/* @__PURE__ */ new Date()).getTime(), L = U((D) => D.setDelay), M = f((D) => D.isPlaying), R = f((D) => D.addIdleLock), k = f((D) => D.removeIdleLock), T = B(() => {
|
|
1882
1884
|
o(qt(j, v)), c(Rr(j, S));
|
|
1883
1885
|
}, [v, S, j]), I = parseFloat(
|
|
1884
1886
|
(s ? (g !== -1 ? g : n) / s * 100 : 0).toFixed(1)
|
|
1885
1887
|
), p = (D) => {
|
|
1886
1888
|
y(s * (D[0] / 100)), R(_t);
|
|
1887
|
-
},
|
|
1889
|
+
}, H = () => {
|
|
1888
1890
|
if (g !== -1) {
|
|
1889
1891
|
const D = zt(j, g);
|
|
1890
1892
|
L(D), y(-1), k(_t);
|
|
1891
1893
|
}
|
|
1892
|
-
}, G = () => i(!0), W = () => i(!1), V =
|
|
1894
|
+
}, G = () => i(!0), W = () => i(!1), V = B(
|
|
1893
1895
|
(D) => {
|
|
1894
1896
|
const Q = e.current, Z = t.current;
|
|
1895
1897
|
if (Q && Z) {
|
|
@@ -1916,7 +1918,7 @@ function ao() {
|
|
|
1916
1918
|
onPointerDown: W,
|
|
1917
1919
|
onPointerMove: V,
|
|
1918
1920
|
onValueChange: p,
|
|
1919
|
-
onValueCommit:
|
|
1921
|
+
onValueCommit: H,
|
|
1920
1922
|
step: 0.1
|
|
1921
1923
|
}
|
|
1922
1924
|
),
|
|
@@ -1942,7 +1944,7 @@ function lo() {
|
|
|
1942
1944
|
);
|
|
1943
1945
|
}
|
|
1944
1946
|
function co() {
|
|
1945
|
-
const e =
|
|
1947
|
+
const e = U((s) => s.startDate), t = U((s) => s.setDelay), n = e ? e.getTime() : 0, o = () => t(zt(n));
|
|
1946
1948
|
return /* @__PURE__ */ a.jsx(le, { onClick: o, children: /* @__PURE__ */ a.jsx(lo, {}) });
|
|
1947
1949
|
}
|
|
1948
1950
|
function Jt() {
|
|
@@ -1989,7 +1991,7 @@ function wo() {
|
|
|
1989
1991
|
);
|
|
1990
1992
|
}
|
|
1991
1993
|
function Qt() {
|
|
1992
|
-
const e = f((d) => d.containerRef), t = f((d) => d.exitFullscreen), n = f((d) => d.isFullscreen), o = f((d) => d.requestFullscreen), s = f((d) => d.setIsFullscreen), c = f((d) => d.setIsFullscreenReady), u = f((d) => d.techRef), i =
|
|
1994
|
+
const e = f((d) => d.containerRef), t = f((d) => d.exitFullscreen), n = f((d) => d.isFullscreen), o = f((d) => d.requestFullscreen), s = f((d) => d.setIsFullscreen), c = f((d) => d.setIsFullscreenReady), u = f((d) => d.techRef), i = B(
|
|
1993
1995
|
(d) => {
|
|
1994
1996
|
d.stopPropagation(), s(rr());
|
|
1995
1997
|
},
|
|
@@ -2011,9 +2013,9 @@ const To = "_idleCheckContainer_iz9tu_1", _o = "_idleCheckContainerIdle_iz9tu_10
|
|
|
2011
2013
|
idleCheckContainerActive: xo
|
|
2012
2014
|
}, Eo = 5 * 1e3;
|
|
2013
2015
|
function en({ children: e }) {
|
|
2014
|
-
const t = O(null), n = f((v) => v.isIdle), o = f((v) => v.setIsIdle), s = O(null), u = f((v) => v.idleLocks).size, i = f((v) => v.eventEmitter), l =
|
|
2016
|
+
const t = O(null), n = f((v) => v.isIdle), o = f((v) => v.setIsIdle), s = O(null), u = f((v) => v.idleLocks).size, i = f((v) => v.eventEmitter), l = B(() => {
|
|
2015
2017
|
s.current !== null && (window.clearTimeout(s.current), s.current = null);
|
|
2016
|
-
}, []), d =
|
|
2018
|
+
}, []), d = B(() => {
|
|
2017
2019
|
l(), s.current = window.setTimeout(() => o(!0), Eo);
|
|
2018
2020
|
}, [l]);
|
|
2019
2021
|
N(() => (o(!1), d(), () => {
|
|
@@ -2152,7 +2154,7 @@ const rn = Me((s, o) => {
|
|
|
2152
2154
|
rn.displayName = "PlayerMenuItem";
|
|
2153
2155
|
const xt = "settings";
|
|
2154
2156
|
function on() {
|
|
2155
|
-
const [e, t] = X(!1), n = f((l) => l.containerRef), o = f((l) => l.addIdleLock), s = f((l) => l.removeIdleLock), c = f((l) => l.levels), u = f((l) => l.setLevel), i =
|
|
2157
|
+
const [e, t] = X(!1), n = f((l) => l.containerRef), o = f((l) => l.addIdleLock), s = f((l) => l.removeIdleLock), c = f((l) => l.levels), u = f((l) => l.setLevel), i = B(
|
|
2156
2158
|
(l) => {
|
|
2157
2159
|
t(l), l ? o(xt) : s(xt);
|
|
2158
2160
|
},
|
|
@@ -2184,7 +2186,7 @@ function $o() {
|
|
|
2184
2186
|
}
|
|
2185
2187
|
);
|
|
2186
2188
|
}
|
|
2187
|
-
function
|
|
2189
|
+
function Uo() {
|
|
2188
2190
|
return /* @__PURE__ */ a.jsx(
|
|
2189
2191
|
"svg",
|
|
2190
2192
|
{
|
|
@@ -2195,7 +2197,7 @@ function Bo() {
|
|
|
2195
2197
|
}
|
|
2196
2198
|
);
|
|
2197
2199
|
}
|
|
2198
|
-
function
|
|
2200
|
+
function Bo() {
|
|
2199
2201
|
return /* @__PURE__ */ a.jsx(
|
|
2200
2202
|
"svg",
|
|
2201
2203
|
{
|
|
@@ -2217,7 +2219,7 @@ function sn() {
|
|
|
2217
2219
|
o(Ct);
|
|
2218
2220
|
}, u = () => e(t ? 0 : 100);
|
|
2219
2221
|
return /* @__PURE__ */ a.jsxs("div", { className: Et.volumeContainer, children: [
|
|
2220
|
-
/* @__PURE__ */ a.jsx(le, { onClick: u, className: "shrink-0", children: t ? t > 50 ? /* @__PURE__ */ a.jsx($o, {}) : /* @__PURE__ */ a.jsx(
|
|
2222
|
+
/* @__PURE__ */ a.jsx(le, { onClick: u, className: "shrink-0", children: t ? t > 50 ? /* @__PURE__ */ a.jsx($o, {}) : /* @__PURE__ */ a.jsx(Uo, {}) : /* @__PURE__ */ a.jsx(Bo, {}) }),
|
|
2221
2223
|
/* @__PURE__ */ a.jsx("div", { className: Et.volumeSlider, children: /* @__PURE__ */ a.jsx(
|
|
2222
2224
|
Ne,
|
|
2223
2225
|
{
|
|
@@ -2333,14 +2335,14 @@ function Yo() {
|
|
|
2333
2335
|
i(d * (k[0] / 100)), y(Rt);
|
|
2334
2336
|
}, S = () => {
|
|
2335
2337
|
u !== -1 && (g(u), i(-1), v(Rt));
|
|
2336
|
-
}, L = () => o(!0), M = () => o(!1), R =
|
|
2338
|
+
}, L = () => o(!0), M = () => o(!1), R = B(
|
|
2337
2339
|
(k) => {
|
|
2338
2340
|
const T = e.current, I = t.current;
|
|
2339
2341
|
if (T && I) {
|
|
2340
|
-
const p = Fe(T),
|
|
2342
|
+
const p = Fe(T), H = Fe(I), G = (k.pageX || k.clientX) - p.left, W = G / p.width;
|
|
2341
2343
|
if (W < 0) return;
|
|
2342
|
-
let V = G -
|
|
2343
|
-
V < 0 && (V = 0), V > p.width -
|
|
2344
|
+
let V = G - H.width / 2;
|
|
2345
|
+
V < 0 && (V = 0), V > p.width - H.width && (V = -1), I.style.left = V > -1 ? `${V}px` : "auto", I.style.right = V > -1 ? "auto" : "0px", c(W * d);
|
|
2344
2346
|
}
|
|
2345
2347
|
L();
|
|
2346
2348
|
},
|
|
@@ -2390,10 +2392,10 @@ function ei({ callback: e }) {
|
|
|
2390
2392
|
return t.on("timeUpdate", n), () => {
|
|
2391
2393
|
t.off("timeUpdate", n);
|
|
2392
2394
|
};
|
|
2393
|
-
}, [e, t]), /* @__PURE__ */ a.jsx(
|
|
2395
|
+
}, [e, t]), /* @__PURE__ */ a.jsx(Bt, { callback: e });
|
|
2394
2396
|
}
|
|
2395
2397
|
function ti() {
|
|
2396
|
-
const e = f((i) => i.currentTime), t = f((i) => i.duration), n = f((i) => i.isPlaying), o = f((i) => i.pause), s = f((i) => i.play), c = f((i) => i.seek), u =
|
|
2398
|
+
const e = f((i) => i.currentTime), t = f((i) => i.duration), n = f((i) => i.isPlaying), o = f((i) => i.pause), s = f((i) => i.play), c = f((i) => i.seek), u = B(
|
|
2397
2399
|
(i) => {
|
|
2398
2400
|
let l = !1;
|
|
2399
2401
|
if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
|