@halibegic/react-video-player 0.0.45 → 0.0.47
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,15 +1,15 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Vn = Object.defineProperty, Nn = Object.defineProperties;
|
|
2
2
|
var An = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var Se = Object.getOwnPropertySymbols;
|
|
4
4
|
var vt = Object.prototype.hasOwnProperty, yt = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var pt = (e, t, n) => t in e ?
|
|
5
|
+
var pt = (e, t, n) => t in e ? Vn(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
8
|
if (Se)
|
|
9
9
|
for (var n of Se(t))
|
|
10
10
|
yt.call(t, n) && pt(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
}, he = (e, t) =>
|
|
12
|
+
}, he = (e, t) => Nn(e, An(t));
|
|
13
13
|
var ne = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var o in e)
|
|
@@ -19,7 +19,7 @@ var ne = (e, t) => {
|
|
|
19
19
|
t.indexOf(o) < 0 && yt.call(e, o) && (n[o] = e[o]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
import St, { useLayoutEffect as On, useEffect as D, useRef as
|
|
22
|
+
import St, { useLayoutEffect as On, useEffect as D, useRef as N, useState as G, createContext as jt, useContext as Pt, useCallback as W, forwardRef as Ve } from "react";
|
|
23
23
|
import { create as Lt, useStore as It } from "zustand";
|
|
24
24
|
import Hn from "mitt";
|
|
25
25
|
import re from "hls.js";
|
|
@@ -102,7 +102,7 @@ function Ft(e) {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
var $n = setTimeout;
|
|
105
|
-
function
|
|
105
|
+
function Vt(e) {
|
|
106
106
|
return !!(e && typeof e.length != "undefined");
|
|
107
107
|
}
|
|
108
108
|
function Un() {
|
|
@@ -118,7 +118,7 @@ function F(e) {
|
|
|
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 = [], At(e, this);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function Nt(e, t) {
|
|
122
122
|
for (; e._state === 3; )
|
|
123
123
|
e = e._value;
|
|
124
124
|
if (e._state === 0) {
|
|
@@ -168,7 +168,7 @@ function Ye(e) {
|
|
|
168
168
|
e._handled || F._unhandledRejectionFn(e._value);
|
|
169
169
|
});
|
|
170
170
|
for (var t = 0, n = e._deferreds.length; t < n; t++)
|
|
171
|
-
|
|
171
|
+
Nt(e, e._deferreds[t]);
|
|
172
172
|
e._deferreds = null;
|
|
173
173
|
}
|
|
174
174
|
function zn(e, t, n) {
|
|
@@ -195,12 +195,12 @@ F.prototype.catch = function(e) {
|
|
|
195
195
|
};
|
|
196
196
|
F.prototype.then = function(e, t) {
|
|
197
197
|
var n = new this.constructor(Un);
|
|
198
|
-
return
|
|
198
|
+
return Nt(this, new zn(e, t, n)), n;
|
|
199
199
|
};
|
|
200
200
|
F.prototype.finally = kt;
|
|
201
201
|
F.all = function(e) {
|
|
202
202
|
return new F(function(t, n) {
|
|
203
|
-
if (!
|
|
203
|
+
if (!Vt(e))
|
|
204
204
|
return n(new TypeError("Promise.all accepts an array"));
|
|
205
205
|
var o = Array.prototype.slice.call(e);
|
|
206
206
|
if (o.length === 0) return t([]);
|
|
@@ -243,7 +243,7 @@ F.reject = function(e) {
|
|
|
243
243
|
};
|
|
244
244
|
F.race = function(e) {
|
|
245
245
|
return new F(function(t, n) {
|
|
246
|
-
if (!
|
|
246
|
+
if (!Vt(e))
|
|
247
247
|
return n(new TypeError("Promise.race accepts an array"));
|
|
248
248
|
for (var o = 0, a = e.length; o < a; o++)
|
|
249
249
|
F.resolve(e[o]).then(t, n);
|
|
@@ -294,7 +294,7 @@ function Zn() {
|
|
|
294
294
|
var h = k && r[k] || r[_];
|
|
295
295
|
return typeof h == "function" ? h : null;
|
|
296
296
|
}
|
|
297
|
-
var
|
|
297
|
+
var V = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
298
298
|
function R(r) {
|
|
299
299
|
{
|
|
300
300
|
for (var h = arguments.length, m = new Array(h > 1 ? h - 1 : 0), w = 1; w < h; w++)
|
|
@@ -304,7 +304,7 @@ function Zn() {
|
|
|
304
304
|
}
|
|
305
305
|
function L(r, h, m) {
|
|
306
306
|
{
|
|
307
|
-
var w =
|
|
307
|
+
var w = V.ReactDebugCurrentFrame, E = w.getStackAddendum();
|
|
308
308
|
E !== "" && (h += "%s", m = m.concat([E]));
|
|
309
309
|
var b = m.map(function(C) {
|
|
310
310
|
return String(C);
|
|
@@ -438,7 +438,7 @@ function Zn() {
|
|
|
438
438
|
oe < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
var Oe =
|
|
441
|
+
var Oe = V.ReactCurrentDispatcher, He;
|
|
442
442
|
function Ce(r, h, m) {
|
|
443
443
|
{
|
|
444
444
|
if (He === void 0)
|
|
@@ -564,7 +564,7 @@ function Zn() {
|
|
|
564
564
|
}
|
|
565
565
|
return "";
|
|
566
566
|
}
|
|
567
|
-
var ye = Object.prototype.hasOwnProperty, tt = {}, nt =
|
|
567
|
+
var ye = Object.prototype.hasOwnProperty, tt = {}, nt = V.ReactDebugCurrentFrame;
|
|
568
568
|
function be(r) {
|
|
569
569
|
if (r) {
|
|
570
570
|
var h = r._owner, m = Re(r.type, r._source, h ? h.type : null);
|
|
@@ -615,7 +615,7 @@ function Zn() {
|
|
|
615
615
|
if (yn(r))
|
|
616
616
|
return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vn(r)), rt(r);
|
|
617
617
|
}
|
|
618
|
-
var it =
|
|
618
|
+
var it = V.ReactCurrentOwner, gn = {
|
|
619
619
|
key: !0,
|
|
620
620
|
ref: !0,
|
|
621
621
|
__self: !0,
|
|
@@ -709,7 +709,7 @@ function Zn() {
|
|
|
709
709
|
return En(r, T, X, E, w, it.current, C);
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
|
-
var Be =
|
|
712
|
+
var Be = V.ReactCurrentOwner, lt = V.ReactDebugCurrentFrame;
|
|
713
713
|
function de(r) {
|
|
714
714
|
if (r) {
|
|
715
715
|
var h = r._owner, m = Re(r.type, r._source, h ? h.type : null);
|
|
@@ -885,8 +885,8 @@ const Kn = "_playerNotice_x3acc_1", Yn = "_playerNoticeTitle_x3acc_19", Xn = "_p
|
|
|
885
885
|
playerNoticeText: Xn,
|
|
886
886
|
playerNoticeLowZIndex: Gn
|
|
887
887
|
}, Ot = typeof window != "undefined" ? On : D;
|
|
888
|
-
function
|
|
889
|
-
const n =
|
|
888
|
+
function Ne(e, t) {
|
|
889
|
+
const n = N(e);
|
|
890
890
|
Ot(() => {
|
|
891
891
|
n.current = e;
|
|
892
892
|
}, [e]), D(() => {
|
|
@@ -902,7 +902,7 @@ function Ve(e, t) {
|
|
|
902
902
|
}
|
|
903
903
|
function Jn(e) {
|
|
904
904
|
const [, t] = G(0);
|
|
905
|
-
|
|
905
|
+
Ne(() => t((n) => n + 1), e);
|
|
906
906
|
}
|
|
907
907
|
const Qn = () => Lt((e) => ({
|
|
908
908
|
delay: 0,
|
|
@@ -914,7 +914,7 @@ const Qn = () => Lt((e) => ({
|
|
|
914
914
|
})), Ht = jt(
|
|
915
915
|
null
|
|
916
916
|
), er = ({ children: e }) => {
|
|
917
|
-
const t =
|
|
917
|
+
const t = N(
|
|
918
918
|
null
|
|
919
919
|
);
|
|
920
920
|
return t.current || (t.current = Qn()), /* @__PURE__ */ s.jsx(Ht.Provider, { value: t.current, children: e });
|
|
@@ -1210,7 +1210,7 @@ const cr = () => Hn(), ur = (e, t) => ({
|
|
|
1210
1210
|
containerRef: t
|
|
1211
1211
|
})(...n))), Bt = jt(null);
|
|
1212
1212
|
function wr({ children: e }) {
|
|
1213
|
-
const t =
|
|
1213
|
+
const t = N(null), n = N(null), o = N(null);
|
|
1214
1214
|
return t.current || (t.current = gr(n, o)), /* @__PURE__ */ s.jsx(Bt.Provider, { value: t.current, children: e });
|
|
1215
1215
|
}
|
|
1216
1216
|
const f = (e) => {
|
|
@@ -1299,7 +1299,7 @@ function Er(n) {
|
|
|
1299
1299
|
(async () => {
|
|
1300
1300
|
l(!0), await c(), l(!1);
|
|
1301
1301
|
})();
|
|
1302
|
-
}, [c]),
|
|
1302
|
+
}, [c]), Ne(c, u ? null : 5e3), a ? null : /* @__PURE__ */ s.jsx(Rr, j({}, t));
|
|
1303
1303
|
}
|
|
1304
1304
|
function Rr({
|
|
1305
1305
|
children: e,
|
|
@@ -1314,7 +1314,7 @@ function Rr({
|
|
|
1314
1314
|
title: (i = t == null ? void 0 : t.eventNotStarted) != null ? i : "Event has not started yet.",
|
|
1315
1315
|
message: (c = t == null ? void 0 : t.eventStartingSoon) != null ? c : "Starting in few seconds..."
|
|
1316
1316
|
}
|
|
1317
|
-
) : /* @__PURE__ */ s.jsx(s.Fragment, { children: e }) : /* @__PURE__ */ s.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: (u = t == null ? void 0 : t.
|
|
1317
|
+
) : /* @__PURE__ */ s.jsx(s.Fragment, { children: e }) : /* @__PURE__ */ s.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: (u = t == null ? void 0 : t.unableToPlay) != null ? u : "Unable to play the video. Please try again later." }) });
|
|
1318
1318
|
}
|
|
1319
1319
|
function br({ startDate: e, title: t, message: n }) {
|
|
1320
1320
|
const o = e.getTime() - Date.now(), a = Math.floor(o / (1e3 * 60 * 60)), l = Math.floor(
|
|
@@ -1453,7 +1453,7 @@ function kr({ children: e }) {
|
|
|
1453
1453
|
return /* @__PURE__ */ s.jsx(er, { children: /* @__PURE__ */ s.jsx(Kt, { children: e }) });
|
|
1454
1454
|
}
|
|
1455
1455
|
function Dr({ url: e, isLive: t, messages: n }) {
|
|
1456
|
-
const o =
|
|
1456
|
+
const o = N(null), a = f((x) => x.level), l = f((x) => x.levels), u = f((x) => x.setLevel), i = f((x) => x.setLevels), c = f((x) => x.techRef), d = f((x) => x.setError), v = N(0), y = N(null), g = 50, P = 1e4, k = W(
|
|
1457
1457
|
(x) => {
|
|
1458
1458
|
if (o.current && (o.current.nextLevel = x, u(null), l)) {
|
|
1459
1459
|
const M = l.map((p) => he(j({}, p), {
|
|
@@ -1484,7 +1484,7 @@ function Dr({ url: e, isLive: t, messages: n }) {
|
|
|
1484
1484
|
isAuto: p
|
|
1485
1485
|
})
|
|
1486
1486
|
);
|
|
1487
|
-
}, [d, i]),
|
|
1487
|
+
}, [d, i]), V = W(
|
|
1488
1488
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1489
1489
|
(x, M) => {
|
|
1490
1490
|
var p;
|
|
@@ -1516,20 +1516,20 @@ function Dr({ url: e, isLive: t, messages: n }) {
|
|
|
1516
1516
|
};
|
|
1517
1517
|
or ? (x.backBufferLength = -1, x.enableWorker = !1) : t ? x.backBufferLength = 10 : x.backBufferLength = 60;
|
|
1518
1518
|
try {
|
|
1519
|
-
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,
|
|
1519
|
+
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, V);
|
|
1520
1520
|
} catch (M) {
|
|
1521
1521
|
throw new Error(`Error initializing Hls: ${M}`);
|
|
1522
1522
|
}
|
|
1523
1523
|
}, [
|
|
1524
1524
|
S,
|
|
1525
1525
|
_,
|
|
1526
|
-
|
|
1526
|
+
V,
|
|
1527
1527
|
t,
|
|
1528
1528
|
c,
|
|
1529
1529
|
e
|
|
1530
1530
|
]), L = W(() => {
|
|
1531
|
-
o.current && (o.current.off(re.Events.MEDIA_ATTACHED, _), o.current.off(re.Events.MANIFEST_LOADED, S), o.current.off(re.Events.ERROR,
|
|
1532
|
-
}, [S, _,
|
|
1531
|
+
o.current && (o.current.off(re.Events.MEDIA_ATTACHED, _), o.current.off(re.Events.MANIFEST_LOADED, S), o.current.off(re.Events.ERROR, V), o.current.destroy(), o.current = null), y.current && (clearTimeout(y.current), y.current = null), v.current = 0;
|
|
1532
|
+
}, [S, _, V]);
|
|
1533
1533
|
return D(() => {
|
|
1534
1534
|
a !== null && k(a);
|
|
1535
1535
|
}, [a, k]), D(() => (re.isSupported() && R(), L), [L, R]), null;
|
|
@@ -1543,7 +1543,7 @@ function Yt({
|
|
|
1543
1543
|
isMuted: n = !1,
|
|
1544
1544
|
messages: o = {}
|
|
1545
1545
|
}) {
|
|
1546
|
-
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), P = f((p) => p.handleTimeUpdate), k = f((p) => p.handleWaiting), _ = f((p) => p.handleVolumeChange), S = f((p) => p.handleError),
|
|
1546
|
+
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), P = f((p) => p.handleTimeUpdate), k = f((p) => p.handleWaiting), _ = f((p) => p.handleVolumeChange), S = f((p) => p.handleError), V = f((p) => p.techRef), R = N(null), L = () => t ? {
|
|
1547
1547
|
onTimeUpdate: x
|
|
1548
1548
|
} : {
|
|
1549
1549
|
onDurationChange: a,
|
|
@@ -1558,7 +1558,7 @@ function Yt({
|
|
|
1558
1558
|
/* @__PURE__ */ s.jsx(
|
|
1559
1559
|
"video",
|
|
1560
1560
|
j({
|
|
1561
|
-
ref:
|
|
1561
|
+
ref: V,
|
|
1562
1562
|
className: Fr.playerVideo,
|
|
1563
1563
|
playsInline: !0,
|
|
1564
1564
|
autoPlay: !0,
|
|
@@ -1580,7 +1580,7 @@ function Yt({
|
|
|
1580
1580
|
)
|
|
1581
1581
|
] });
|
|
1582
1582
|
}
|
|
1583
|
-
function
|
|
1583
|
+
function Vr({ url: e, messages: t = {} }) {
|
|
1584
1584
|
const [n, o] = G(null), a = A((u) => u.delay), l = W(async () => {
|
|
1585
1585
|
o(
|
|
1586
1586
|
a ? e.replace("-live", "-catchup").replace("playlist.m3u8", `playlist_fmp4_dvr_timeshift-${a}.m3u8`) : e
|
|
@@ -1590,11 +1590,11 @@ function Nr({ url: e, messages: t = {} }) {
|
|
|
1590
1590
|
l();
|
|
1591
1591
|
}, [l]), n ? /* @__PURE__ */ s.jsx(Yt, { url: n, isLive: !0, messages: t }) : null;
|
|
1592
1592
|
}
|
|
1593
|
-
function
|
|
1593
|
+
function Nr({ url: e }) {
|
|
1594
1594
|
return f((n) => n.isStarted) ? /* @__PURE__ */ s.jsx(Ar, { url: e }) : null;
|
|
1595
1595
|
}
|
|
1596
1596
|
function Ar({ url: e }) {
|
|
1597
|
-
const t = A((l) => l.setViewerCount), n =
|
|
1597
|
+
const t = A((l) => l.setViewerCount), n = N(null), o = (l) => {
|
|
1598
1598
|
try {
|
|
1599
1599
|
return new URL(l).pathname.split("/").filter((d) => d.length > 0)[0] || null;
|
|
1600
1600
|
} catch (u) {
|
|
@@ -1625,7 +1625,7 @@ function Ar({ url: e }) {
|
|
|
1625
1625
|
};
|
|
1626
1626
|
return D(() => (a(), () => {
|
|
1627
1627
|
n.current && n.current.abort();
|
|
1628
|
-
}), [e]),
|
|
1628
|
+
}), [e]), Ne(a, 15e3), null;
|
|
1629
1629
|
}
|
|
1630
1630
|
function Or(e, {
|
|
1631
1631
|
defaultValue: t = !1,
|
|
@@ -1680,7 +1680,7 @@ function Xt(i) {
|
|
|
1680
1680
|
}
|
|
1681
1681
|
function Zr(o) {
|
|
1682
1682
|
var a = o, { className: e, onClick: t } = a, n = ne(a, ["className", "onClick"]);
|
|
1683
|
-
const l =
|
|
1683
|
+
const l = N(null), u = f((_) => _.exitFullscreen), i = f((_) => _.isFullscreen), c = f((_) => _.requestFullscreen), d = f((_) => _.resetIdle), v = (_) => {
|
|
1684
1684
|
P() ? (g(), i ? u() : c()) : y(_);
|
|
1685
1685
|
}, y = (_) => {
|
|
1686
1686
|
l.current = window.setTimeout(() => {
|
|
@@ -1717,11 +1717,11 @@ function qr(u) {
|
|
|
1717
1717
|
"onForwardSeek",
|
|
1718
1718
|
"onBackwardSeek"
|
|
1719
1719
|
]);
|
|
1720
|
-
const c =
|
|
1720
|
+
const c = N(null), d = N({
|
|
1721
1721
|
single: null,
|
|
1722
1722
|
indicator: null,
|
|
1723
1723
|
accumulate: null
|
|
1724
|
-
}), v =
|
|
1724
|
+
}), v = N(null), y = N(0), g = N(null), [P, k] = G({ visible: !1, direction: null, time: 0 }), _ = f((p) => p.isIdle), S = f((p) => p.setIsIdle), V = f((p) => p.resetIdle), R = (p, U) => p < U / 2 ? "backward" : "forward", L = (p) => {
|
|
1725
1725
|
if (!v.current) return;
|
|
1726
1726
|
const U = p.changedTouches[0];
|
|
1727
1727
|
if (!U) return;
|
|
@@ -1730,14 +1730,14 @@ function qr(u) {
|
|
|
1730
1730
|
return;
|
|
1731
1731
|
const Q = c.current, K = Q ? Y - Q.time : 1 / 0, Z = R(O, z.width), oe = g.current !== null && g.current === Z && Q !== null && K < 700 && Math.abs(O - Q.x) < 100;
|
|
1732
1732
|
if (Q !== null && g.current === null && K < 300 && Math.abs(O - Q.x) < 50 || oe) {
|
|
1733
|
-
p.preventDefault(), p.stopPropagation(), d.current.single && (window.clearTimeout(d.current.single), d.current.single = null),
|
|
1733
|
+
p.preventDefault(), p.stopPropagation(), d.current.single && (window.clearTimeout(d.current.single), d.current.single = null), V(), (g.current === null || g.current !== Z) && (y.current = 0, g.current = Z);
|
|
1734
1734
|
const te = Z === "backward" ? n : t;
|
|
1735
1735
|
y.current = Math.min(
|
|
1736
1736
|
y.current + Wr,
|
|
1737
1737
|
te != null ? te : 1 / 0
|
|
1738
1738
|
), x(Z, y.current), d.current.accumulate && window.clearTimeout(d.current.accumulate), d.current.accumulate = window.setTimeout(() => {
|
|
1739
1739
|
const q = y.current;
|
|
1740
|
-
q > 0 && (g.current === "backward" ? a == null || a(q) : o == null || o(q),
|
|
1740
|
+
q > 0 && (g.current === "backward" ? a == null || a(q) : o == null || o(q), V()), y.current = 0, g.current = null, c.current = null, M(), d.current.accumulate = null;
|
|
1741
1741
|
}, 500), c.current = { time: Y, x: O };
|
|
1742
1742
|
} else {
|
|
1743
1743
|
c.current = { time: Y, x: O }, d.current.single && window.clearTimeout(d.current.single);
|
|
@@ -1746,7 +1746,7 @@ function qr(u) {
|
|
|
1746
1746
|
if (g.current === null) {
|
|
1747
1747
|
d.current.single = null;
|
|
1748
1748
|
const q = _;
|
|
1749
|
-
S(!q), q &&
|
|
1749
|
+
S(!q), q && V();
|
|
1750
1750
|
}
|
|
1751
1751
|
c.current = null;
|
|
1752
1752
|
}, te);
|
|
@@ -1811,7 +1811,7 @@ function Kr() {
|
|
|
1811
1811
|
const Yr = "_playerButton_izwqq_1", Xr = "_playerButtonCircle_izwqq_42", _t = {
|
|
1812
1812
|
playerButton: Yr,
|
|
1813
1813
|
playerButtonCircle: Xr
|
|
1814
|
-
}, le =
|
|
1814
|
+
}, le = Ve(
|
|
1815
1815
|
(a, o) => {
|
|
1816
1816
|
var l = a, { shape: e = "circle", className: t } = l, n = ne(l, ["shape", "className"]);
|
|
1817
1817
|
const u = e === "circle" ? _t.playerButtonCircle : "", i = [_t.playerButton, u, t].filter(Boolean).join(" ");
|
|
@@ -1878,7 +1878,7 @@ const no = "_progressSlider_hwzgf_1", ro = "_tipContainer_hwzgf_7", oo = "_tipCo
|
|
|
1878
1878
|
sliderTrack: lo,
|
|
1879
1879
|
sliderRange: co,
|
|
1880
1880
|
sliderThumb: uo
|
|
1881
|
-
}, Ae =
|
|
1881
|
+
}, Ae = Ve((l, a) => {
|
|
1882
1882
|
var u = l, { max: e = 100, min: t = 0, className: n } = u, o = ne(u, ["max", "min", "className"]);
|
|
1883
1883
|
return /* @__PURE__ */ s.jsxs(
|
|
1884
1884
|
je.Root,
|
|
@@ -1915,7 +1915,7 @@ function Fe(e) {
|
|
|
1915
1915
|
}
|
|
1916
1916
|
const Tt = "vod-player-progress-bar";
|
|
1917
1917
|
function fo() {
|
|
1918
|
-
const e =
|
|
1918
|
+
const e = N(null), t = N(null), [n, o] = G(0), [a, l] = G(0), [u, i] = G(!1), [c, d] = G(-1), [v, y] = G(-1), g = A((I) => I.delay), P = A((I) => I.startDate), k = P ? P.getTime() : 0, _ = (/* @__PURE__ */ new Date()).getTime(), S = A((I) => I.setDelay), V = f((I) => I.isPlaying), R = f((I) => I.addIdleLock), L = f((I) => I.removeIdleLock), x = W(() => {
|
|
1919
1919
|
o(Zt(k, g)), l(Sr(k, _));
|
|
1920
1920
|
}, [g, _, k]), M = parseFloat(
|
|
1921
1921
|
(a ? (v !== -1 ? v : n) / a * 100 : 0).toFixed(1)
|
|
@@ -1941,7 +1941,7 @@ function fo() {
|
|
|
1941
1941
|
},
|
|
1942
1942
|
[a]
|
|
1943
1943
|
);
|
|
1944
|
-
return
|
|
1944
|
+
return Ne(() => x(), V ? 1e3 : null), D(() => {
|
|
1945
1945
|
x();
|
|
1946
1946
|
}, [x]), /* @__PURE__ */ s.jsxs("div", { className: se.progressSlider, children: [
|
|
1947
1947
|
/* @__PURE__ */ s.jsx(
|
|
@@ -2089,7 +2089,7 @@ const Lo = "_idleCheckContainer_crh2s_1", Io = "_idleCheckContainerIdle_crh2s_5"
|
|
|
2089
2089
|
idleCheckContainerActive: ko
|
|
2090
2090
|
}, Do = 5 * 1e3;
|
|
2091
2091
|
function tn({ children: e }) {
|
|
2092
|
-
const t =
|
|
2092
|
+
const t = N(null), n = f((g) => g.isIdle), o = f((g) => g.setIsIdle), a = N(null), u = f((g) => g.idleLocks).size, i = f((g) => g.eventEmitter), c = W(() => {
|
|
2093
2093
|
a.current !== null && (window.clearTimeout(a.current), a.current = null);
|
|
2094
2094
|
}, []), d = W(() => {
|
|
2095
2095
|
c(), a.current = window.setTimeout(() => o(!0), Do);
|
|
@@ -2110,10 +2110,10 @@ function tn({ children: e }) {
|
|
|
2110
2110
|
const Mo = "_spinner_oo4hi_10", Fo = {
|
|
2111
2111
|
spinner: Mo
|
|
2112
2112
|
};
|
|
2113
|
-
function
|
|
2113
|
+
function Vo(e) {
|
|
2114
2114
|
return /* @__PURE__ */ s.jsx("div", j({ className: Fo.spinner }, e));
|
|
2115
2115
|
}
|
|
2116
|
-
function
|
|
2116
|
+
function No(e, t = 500) {
|
|
2117
2117
|
const [n, o] = G(e);
|
|
2118
2118
|
return D(() => {
|
|
2119
2119
|
const a = window.setTimeout(() => o(e), t);
|
|
@@ -2128,7 +2128,7 @@ const Ao = "_loadingContainer_v9v7r_1", Oo = {
|
|
|
2128
2128
|
function nn(n) {
|
|
2129
2129
|
var o = n, { style: e } = o, t = ne(o, ["style"]);
|
|
2130
2130
|
const a = f((u) => u.isLoading);
|
|
2131
|
-
return
|
|
2131
|
+
return No(a, 100) ? /* @__PURE__ */ s.jsx("div", he(j({ className: Oo.loadingContainer, style: e }, t), { children: /* @__PURE__ */ s.jsx(Vo, {}) })) : null;
|
|
2132
2132
|
}
|
|
2133
2133
|
function Ho() {
|
|
2134
2134
|
return /* @__PURE__ */ s.jsx(
|
|
@@ -2159,7 +2159,7 @@ const Uo = "_dropdownMenuContent_b7j6b_1", Bo = "_dropdownMenuItem_b7j6b_83", zo
|
|
|
2159
2159
|
scrollAreaViewport: Wo,
|
|
2160
2160
|
scrollAreaScrollbar: Zo,
|
|
2161
2161
|
scrollAreaThumb: qo
|
|
2162
|
-
}, Ko = Te.Root, Yo = Te.Trigger, Xo = Te.Portal, rn =
|
|
2162
|
+
}, Ko = Te.Root, Yo = Te.Trigger, Xo = Te.Portal, rn = Ve((l, a) => {
|
|
2163
2163
|
var u = l, { sideOffset: e = 4, className: t, children: n } = u, o = ne(u, ["sideOffset", "className", "children"]);
|
|
2164
2164
|
return /* @__PURE__ */ s.jsx(
|
|
2165
2165
|
Te.Content,
|
|
@@ -2197,7 +2197,7 @@ const Uo = "_dropdownMenuContent_b7j6b_1", Bo = "_dropdownMenuItem_b7j6b_83", zo
|
|
|
2197
2197
|
);
|
|
2198
2198
|
});
|
|
2199
2199
|
rn.displayName = "PlayerMenuContent";
|
|
2200
|
-
const on =
|
|
2200
|
+
const on = Ve((a, o) => {
|
|
2201
2201
|
var l = a, { className: e, onClick: t } = l, n = ne(l, ["className", "onClick"]);
|
|
2202
2202
|
const u = (c) => {
|
|
2203
2203
|
t == null || t(c);
|
|
@@ -2295,7 +2295,7 @@ function an() {
|
|
|
2295
2295
|
) })
|
|
2296
2296
|
] });
|
|
2297
2297
|
}
|
|
2298
|
-
const ni = "0.0.
|
|
2298
|
+
const ni = "0.0.47", ln = {
|
|
2299
2299
|
version: ni
|
|
2300
2300
|
};
|
|
2301
2301
|
function wi(e) {
|
|
@@ -2317,11 +2317,12 @@ function ri({ url: e, messages: t, onEvent: n }) {
|
|
|
2317
2317
|
url: e,
|
|
2318
2318
|
messages: {
|
|
2319
2319
|
eventNotStarted: t == null ? void 0 : t.eventNotStarted,
|
|
2320
|
-
eventStartingSoon: t == null ? void 0 : t.eventStartingSoon
|
|
2320
|
+
eventStartingSoon: t == null ? void 0 : t.eventStartingSoon,
|
|
2321
|
+
unableToPlay: t == null ? void 0 : t.unableToPlay
|
|
2321
2322
|
},
|
|
2322
2323
|
children: [
|
|
2323
2324
|
/* @__PURE__ */ s.jsx(
|
|
2324
|
-
|
|
2325
|
+
Vr,
|
|
2325
2326
|
{
|
|
2326
2327
|
url: e,
|
|
2327
2328
|
messages: {
|
|
@@ -2367,7 +2368,7 @@ function ri({ url: e, messages: t, onEvent: n }) {
|
|
|
2367
2368
|
}
|
|
2368
2369
|
),
|
|
2369
2370
|
/* @__PURE__ */ s.jsx(Ir, {}),
|
|
2370
|
-
/* @__PURE__ */ s.jsx(
|
|
2371
|
+
/* @__PURE__ */ s.jsx(Nr, { url: e }),
|
|
2371
2372
|
n && /* @__PURE__ */ s.jsx(Lr, { callback: n })
|
|
2372
2373
|
]
|
|
2373
2374
|
}
|
|
@@ -2402,13 +2403,13 @@ function ii() {
|
|
|
2402
2403
|
}
|
|
2403
2404
|
const bt = "vod-player-progress-bar";
|
|
2404
2405
|
function si() {
|
|
2405
|
-
const e =
|
|
2406
|
+
const e = N(null), t = N(null), [n, o] = G(!1), [a, l] = G(-1), [u, i] = G(-1), c = f((L) => L.currentTime), d = f((L) => L.duration), v = f((L) => L.seek), y = f((L) => L.addIdleLock), g = f((L) => L.removeIdleLock), P = parseFloat(
|
|
2406
2407
|
(d ? (u !== -1 ? u : c) / d * 100 : 0).toFixed(1)
|
|
2407
2408
|
), k = (L) => {
|
|
2408
2409
|
i(d * (L[0] / 100)), y(bt);
|
|
2409
2410
|
}, _ = () => {
|
|
2410
2411
|
u !== -1 && (v(u), i(-1), g(bt));
|
|
2411
|
-
}, S = () => o(!0),
|
|
2412
|
+
}, S = () => o(!0), V = () => o(!1), R = W(
|
|
2412
2413
|
(L) => {
|
|
2413
2414
|
const x = e.current, M = t.current;
|
|
2414
2415
|
if (x && M) {
|
|
@@ -2427,8 +2428,8 @@ function si() {
|
|
|
2427
2428
|
{
|
|
2428
2429
|
ref: e,
|
|
2429
2430
|
value: [P],
|
|
2430
|
-
onPointerLeave:
|
|
2431
|
-
onPointerDown:
|
|
2431
|
+
onPointerLeave: V,
|
|
2432
|
+
onPointerDown: V,
|
|
2432
2433
|
onPointerMove: R,
|
|
2433
2434
|
onValueChange: k,
|
|
2434
2435
|
onValueCommit: _,
|