@halibegic/react-video-player 0.0.48 → 0.0.50
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 +589 -569
- package/dist/react-video-player.es.js.map +1 -1
- package/dist/react-video-player.umd.js +10 -10
- package/dist/react-video-player.umd.js.map +1 -1
- package/dist/src/components/live-player/live-player-event-check.d.ts +4 -4
- package/dist/src/components/live-player/live-player-tech.d.ts +2 -3
- package/dist/src/components/live-player.d.ts +5 -5
- package/dist/src/components/player/player-hls-engine.d.ts +2 -3
- package/dist/src/components/player/player-tech.d.ts +2 -3
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Nn = Object.defineProperty, Vn = 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 ? Nn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, P = (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) => Vn(e, An(t));
|
|
13
13
|
var ne = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var o in e)
|
|
@@ -19,12 +19,12 @@ 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 V, useState as X, createContext as jt, useContext as Pt, useCallback as z, forwardRef as Ne } 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";
|
|
26
26
|
import * as je from "@radix-ui/react-slider";
|
|
27
|
-
import * as
|
|
27
|
+
import * as xe from "@radix-ui/react-popover";
|
|
28
28
|
import * as Pe from "@radix-ui/react-scroll-area";
|
|
29
29
|
function kt(e) {
|
|
30
30
|
var t = this.constructor;
|
|
@@ -52,46 +52,46 @@ function Dt(e) {
|
|
|
52
52
|
);
|
|
53
53
|
var a = Array.prototype.slice.call(e);
|
|
54
54
|
if (a.length === 0) return n([]);
|
|
55
|
-
var
|
|
56
|
-
function u(
|
|
55
|
+
var c = a.length;
|
|
56
|
+
function u(l, d) {
|
|
57
57
|
if (d && (typeof d == "object" || typeof d == "function")) {
|
|
58
58
|
var v = d.then;
|
|
59
59
|
if (typeof v == "function") {
|
|
60
60
|
v.call(
|
|
61
61
|
d,
|
|
62
62
|
function(y) {
|
|
63
|
-
u(
|
|
63
|
+
u(l, y);
|
|
64
64
|
},
|
|
65
65
|
function(y) {
|
|
66
|
-
a[
|
|
66
|
+
a[l] = { status: "rejected", reason: y }, --c === 0 && n(a);
|
|
67
67
|
}
|
|
68
68
|
);
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
a[
|
|
72
|
+
a[l] = { status: "fulfilled", value: d }, --c === 0 && n(a);
|
|
73
73
|
}
|
|
74
74
|
for (var i = 0; i < a.length; i++)
|
|
75
75
|
u(i, a[i]);
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Mt(e, t) {
|
|
79
79
|
this.name = "AggregateError", this.errors = e, this.message = t || "";
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
function
|
|
81
|
+
Mt.prototype = Error.prototype;
|
|
82
|
+
function Ft(e) {
|
|
83
83
|
var t = this;
|
|
84
84
|
return new t(function(n, o) {
|
|
85
85
|
if (!(e && typeof e.length != "undefined"))
|
|
86
86
|
return o(new TypeError("Promise.any accepts an array"));
|
|
87
87
|
var a = Array.prototype.slice.call(e);
|
|
88
88
|
if (a.length === 0) return o();
|
|
89
|
-
for (var
|
|
89
|
+
for (var c = [], u = 0; u < a.length; u++)
|
|
90
90
|
try {
|
|
91
91
|
t.resolve(a[u]).then(n).catch(function(i) {
|
|
92
|
-
|
|
93
|
-
new
|
|
94
|
-
|
|
92
|
+
c.push(i), c.length === a.length && o(
|
|
93
|
+
new Mt(
|
|
94
|
+
c,
|
|
95
95
|
"All promises were rejected"
|
|
96
96
|
)
|
|
97
97
|
);
|
|
@@ -102,7 +102,7 @@ function Mt(e) {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
var $n = setTimeout;
|
|
105
|
-
function
|
|
105
|
+
function Nt(e) {
|
|
106
106
|
return !!(e && typeof e.length != "undefined");
|
|
107
107
|
}
|
|
108
108
|
function Un() {
|
|
@@ -112,30 +112,30 @@ function Bn(e, t) {
|
|
|
112
112
|
e.apply(t, arguments);
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
if (!(this instanceof
|
|
115
|
+
function F(e) {
|
|
116
|
+
if (!(this instanceof F))
|
|
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 = [], At(e, this);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function Vt(e, t) {
|
|
122
122
|
for (; e._state === 3; )
|
|
123
123
|
e = e._value;
|
|
124
124
|
if (e._state === 0) {
|
|
125
125
|
e._deferreds.push(t);
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
|
-
e._handled = !0,
|
|
128
|
+
e._handled = !0, F._immediateFn(function() {
|
|
129
129
|
var n = e._state === 1 ? t.onFulfilled : t.onRejected;
|
|
130
130
|
if (n === null) {
|
|
131
|
-
(e._state === 1 ? Ke :
|
|
131
|
+
(e._state === 1 ? Ke : Te)(t.promise, e._value);
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
134
|
var o;
|
|
135
135
|
try {
|
|
136
136
|
o = n(e._value);
|
|
137
137
|
} catch (a) {
|
|
138
|
-
|
|
138
|
+
Te(t.promise, a);
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
Ke(t.promise, o);
|
|
@@ -147,7 +147,7 @@ function Ke(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 F) {
|
|
151
151
|
e._state = 3, e._value = t, Ye(e);
|
|
152
152
|
return;
|
|
153
153
|
} else if (typeof n == "function") {
|
|
@@ -157,18 +157,18 @@ function Ke(e, t) {
|
|
|
157
157
|
}
|
|
158
158
|
e._state = 1, e._value = t, Ye(e);
|
|
159
159
|
} catch (o) {
|
|
160
|
-
|
|
160
|
+
Te(e, o);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Te(e, t) {
|
|
164
164
|
e._state = 2, e._value = t, Ye(e);
|
|
165
165
|
}
|
|
166
166
|
function Ye(e) {
|
|
167
|
-
e._state === 2 && e._deferreds.length === 0 &&
|
|
168
|
-
e._handled ||
|
|
167
|
+
e._state === 2 && e._deferreds.length === 0 && F._immediateFn(function() {
|
|
168
|
+
e._handled || F._unhandledRejectionFn(e._value);
|
|
169
169
|
});
|
|
170
170
|
for (var t = 0, n = e._deferreds.length; t < n; t++)
|
|
171
|
-
|
|
171
|
+
Vt(e, e._deferreds[t]);
|
|
172
172
|
e._deferreds = null;
|
|
173
173
|
}
|
|
174
174
|
function zn(e, t, n) {
|
|
@@ -182,80 +182,80 @@ function At(e, t) {
|
|
|
182
182
|
n || (n = !0, Ke(t, o));
|
|
183
183
|
},
|
|
184
184
|
function(o) {
|
|
185
|
-
n || (n = !0,
|
|
185
|
+
n || (n = !0, Te(t, o));
|
|
186
186
|
}
|
|
187
187
|
);
|
|
188
188
|
} catch (o) {
|
|
189
189
|
if (n) return;
|
|
190
|
-
n = !0,
|
|
190
|
+
n = !0, Te(t, o);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
|
|
193
|
+
F.prototype.catch = function(e) {
|
|
194
194
|
return this.then(null, e);
|
|
195
195
|
};
|
|
196
|
-
|
|
196
|
+
F.prototype.then = function(e, t) {
|
|
197
197
|
var n = new this.constructor(Un);
|
|
198
|
-
return
|
|
198
|
+
return Vt(this, new zn(e, t, n)), n;
|
|
199
199
|
};
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
return new
|
|
203
|
-
if (!
|
|
200
|
+
F.prototype.finally = kt;
|
|
201
|
+
F.all = function(e) {
|
|
202
|
+
return new F(function(t, n) {
|
|
203
|
+
if (!Nt(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([]);
|
|
207
207
|
var a = o.length;
|
|
208
|
-
function
|
|
208
|
+
function c(i, l) {
|
|
209
209
|
try {
|
|
210
|
-
if (
|
|
211
|
-
var d =
|
|
210
|
+
if (l && (typeof l == "object" || typeof l == "function")) {
|
|
211
|
+
var d = l.then;
|
|
212
212
|
if (typeof d == "function") {
|
|
213
213
|
d.call(
|
|
214
|
-
|
|
214
|
+
l,
|
|
215
215
|
function(v) {
|
|
216
|
-
|
|
216
|
+
c(i, v);
|
|
217
217
|
},
|
|
218
218
|
n
|
|
219
219
|
);
|
|
220
220
|
return;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
o[i] =
|
|
223
|
+
o[i] = l, --a === 0 && t(o);
|
|
224
224
|
} catch (v) {
|
|
225
225
|
n(v);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
for (var u = 0; u < o.length; u++)
|
|
229
|
-
|
|
229
|
+
c(u, o[u]);
|
|
230
230
|
});
|
|
231
231
|
};
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
return e && typeof e == "object" && e.constructor ===
|
|
232
|
+
F.any = Ft;
|
|
233
|
+
F.allSettled = Dt;
|
|
234
|
+
F.resolve = function(e) {
|
|
235
|
+
return e && typeof e == "object" && e.constructor === F ? e : new F(function(t) {
|
|
236
236
|
t(e);
|
|
237
237
|
});
|
|
238
238
|
};
|
|
239
|
-
|
|
240
|
-
return new
|
|
239
|
+
F.reject = function(e) {
|
|
240
|
+
return new F(function(t, n) {
|
|
241
241
|
n(e);
|
|
242
242
|
});
|
|
243
243
|
};
|
|
244
|
-
|
|
245
|
-
return new
|
|
246
|
-
if (!
|
|
244
|
+
F.race = function(e) {
|
|
245
|
+
return new F(function(t, n) {
|
|
246
|
+
if (!Nt(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);
|
|
250
250
|
});
|
|
251
251
|
};
|
|
252
|
-
|
|
252
|
+
F._immediateFn = // @ts-ignore
|
|
253
253
|
typeof setImmediate == "function" && function(e) {
|
|
254
254
|
setImmediate(e);
|
|
255
255
|
} || function(e) {
|
|
256
256
|
$n(e, 0);
|
|
257
257
|
};
|
|
258
|
-
|
|
258
|
+
F._unhandledRejectionFn = function(t) {
|
|
259
259
|
typeof console != "undefined" && console && console.warn("Possible Unhandled Promise Rejection:", t);
|
|
260
260
|
};
|
|
261
261
|
var ae = (function() {
|
|
@@ -267,66 +267,66 @@ 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 = F : (ae.Promise.prototype.finally || (ae.Promise.prototype.finally = kt), ae.Promise.allSettled || (ae.Promise.allSettled = Dt), ae.Promise.any || (ae.Promise.any = Ft));
|
|
271
271
|
var Le = { exports: {} }, ge = {};
|
|
272
272
|
var gt;
|
|
273
273
|
function Wn() {
|
|
274
274
|
if (gt) return ge;
|
|
275
275
|
gt = 1;
|
|
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,
|
|
277
|
-
function u(i,
|
|
278
|
-
var v, y = {}, g = null,
|
|
279
|
-
d !== void 0 && (g = "" + d),
|
|
280
|
-
for (v in
|
|
281
|
-
if (i && i.defaultProps) for (v in
|
|
282
|
-
return { $$typeof: t, type: i, key: g, ref:
|
|
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, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
277
|
+
function u(i, l, d) {
|
|
278
|
+
var v, y = {}, g = null, L = null;
|
|
279
|
+
d !== void 0 && (g = "" + d), l.key !== void 0 && (g = "" + l.key), l.ref !== void 0 && (L = l.ref);
|
|
280
|
+
for (v in l) o.call(l, v) && !c.hasOwnProperty(v) && (y[v] = l[v]);
|
|
281
|
+
if (i && i.defaultProps) for (v in l = i.defaultProps, l) y[v] === void 0 && (y[v] = l[v]);
|
|
282
|
+
return { $$typeof: t, type: i, key: g, ref: L, props: y, _owner: a.current };
|
|
283
283
|
}
|
|
284
284
|
return ge.Fragment = n, ge.jsx = u, ge.jsxs = u, ge;
|
|
285
285
|
}
|
|
286
286
|
var we = {};
|
|
287
287
|
var wt;
|
|
288
|
-
function
|
|
288
|
+
function qn() {
|
|
289
289
|
return wt || (wt = 1, process.env.NODE_ENV !== "production" && (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"),
|
|
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"), c = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), i = Symbol.for("react.context"), l = 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"), k = Symbol.iterator, _ = "@@iterator";
|
|
291
|
+
function j(r) {
|
|
292
292
|
if (r === null || typeof r != "object")
|
|
293
293
|
return null;
|
|
294
294
|
var h = k && r[k] || r[_];
|
|
295
295
|
return typeof h == "function" ? h : null;
|
|
296
296
|
}
|
|
297
|
-
var
|
|
297
|
+
var N = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
298
298
|
function R(r) {
|
|
299
299
|
{
|
|
300
|
-
for (var h = arguments.length,
|
|
301
|
-
|
|
302
|
-
|
|
300
|
+
for (var h = arguments.length, p = new Array(h > 1 ? h - 1 : 0), w = 1; w < h; w++)
|
|
301
|
+
p[w - 1] = arguments[w];
|
|
302
|
+
I("error", r, p);
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function I(r, h, p) {
|
|
306
306
|
{
|
|
307
|
-
var w =
|
|
308
|
-
E !== "" && (h += "%s",
|
|
309
|
-
var
|
|
307
|
+
var w = N.ReactDebugCurrentFrame, E = w.getStackAddendum();
|
|
308
|
+
E !== "" && (h += "%s", p = p.concat([E]));
|
|
309
|
+
var S = p.map(function(C) {
|
|
310
310
|
return String(C);
|
|
311
311
|
});
|
|
312
|
-
|
|
312
|
+
S.unshift("Warning: " + h), Function.prototype.apply.call(console[r], console, S);
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
var
|
|
316
|
-
|
|
317
|
-
function
|
|
318
|
-
return !!(typeof r == "string" || typeof r == "function" || r === o || r ===
|
|
315
|
+
var T = !1, M = !1, m = !1, O = !1, G = !1, Z;
|
|
316
|
+
Z = Symbol.for("react.module.reference");
|
|
317
|
+
function H(r) {
|
|
318
|
+
return !!(typeof r == "string" || typeof r == "function" || r === o || r === c || G || r === a || r === d || r === v || O || r === L || T || M || m || typeof r == "object" && r !== null && (r.$$typeof === g || 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.
|
|
322
|
-
r.$$typeof ===
|
|
322
|
+
r.$$typeof === Z || r.getModuleId !== void 0));
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function b(r, h, p) {
|
|
325
325
|
var w = r.displayName;
|
|
326
326
|
if (w)
|
|
327
327
|
return w;
|
|
328
328
|
var E = h.displayName || h.name || "";
|
|
329
|
-
return E !== "" ?
|
|
329
|
+
return E !== "" ? p + "(" + E + ")" : p;
|
|
330
330
|
}
|
|
331
331
|
function Q(r) {
|
|
332
332
|
return r.displayName || "Context";
|
|
@@ -343,7 +343,7 @@ function Zn() {
|
|
|
343
343
|
return "Fragment";
|
|
344
344
|
case n:
|
|
345
345
|
return "Portal";
|
|
346
|
-
case
|
|
346
|
+
case c:
|
|
347
347
|
return "Profiler";
|
|
348
348
|
case a:
|
|
349
349
|
return "StrictMode";
|
|
@@ -358,25 +358,25 @@ function Zn() {
|
|
|
358
358
|
var h = r;
|
|
359
359
|
return Q(h) + ".Consumer";
|
|
360
360
|
case u:
|
|
361
|
-
var
|
|
362
|
-
return Q(
|
|
363
|
-
case
|
|
364
|
-
return
|
|
361
|
+
var p = r;
|
|
362
|
+
return Q(p._context) + ".Provider";
|
|
363
|
+
case l:
|
|
364
|
+
return b(r, r.render, "ForwardRef");
|
|
365
365
|
case y:
|
|
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, S = E._payload, C = E._init;
|
|
370
370
|
try {
|
|
371
|
-
return K(C(
|
|
372
|
-
} catch (
|
|
371
|
+
return K(C(S));
|
|
372
|
+
} catch (x) {
|
|
373
373
|
return null;
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
return null;
|
|
378
378
|
}
|
|
379
|
-
var
|
|
379
|
+
var W = Object.assign, oe = 0, ue, te, q, ve, Xe, Ge, Je;
|
|
380
380
|
function Qe() {
|
|
381
381
|
}
|
|
382
382
|
Qe.__reactDisabledLog = !0;
|
|
@@ -412,25 +412,25 @@ function Zn() {
|
|
|
412
412
|
writable: !0
|
|
413
413
|
};
|
|
414
414
|
Object.defineProperties(console, {
|
|
415
|
-
log:
|
|
415
|
+
log: W({}, r, {
|
|
416
416
|
value: ue
|
|
417
417
|
}),
|
|
418
|
-
info:
|
|
418
|
+
info: W({}, r, {
|
|
419
419
|
value: te
|
|
420
420
|
}),
|
|
421
|
-
warn:
|
|
421
|
+
warn: W({}, r, {
|
|
422
422
|
value: q
|
|
423
423
|
}),
|
|
424
|
-
error:
|
|
424
|
+
error: W({}, r, {
|
|
425
425
|
value: ve
|
|
426
426
|
}),
|
|
427
|
-
group:
|
|
427
|
+
group: W({}, r, {
|
|
428
428
|
value: Xe
|
|
429
429
|
}),
|
|
430
|
-
groupCollapsed:
|
|
430
|
+
groupCollapsed: W({}, r, {
|
|
431
431
|
value: Ge
|
|
432
432
|
}),
|
|
433
|
-
groupEnd:
|
|
433
|
+
groupEnd: W({}, r, {
|
|
434
434
|
value: Je
|
|
435
435
|
})
|
|
436
436
|
});
|
|
@@ -438,8 +438,8 @@ 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 =
|
|
442
|
-
function Ce(r, h,
|
|
441
|
+
var Oe = N.ReactCurrentDispatcher, He;
|
|
442
|
+
function Ce(r, h, p) {
|
|
443
443
|
{
|
|
444
444
|
if (He === void 0)
|
|
445
445
|
try {
|
|
@@ -461,16 +461,16 @@ function Zn() {
|
|
|
461
461
|
if (!r || $e)
|
|
462
462
|
return "";
|
|
463
463
|
{
|
|
464
|
-
var
|
|
465
|
-
if (
|
|
466
|
-
return
|
|
464
|
+
var p = Ee.get(r);
|
|
465
|
+
if (p !== void 0)
|
|
466
|
+
return p;
|
|
467
467
|
}
|
|
468
468
|
var w;
|
|
469
469
|
$e = !0;
|
|
470
470
|
var E = Error.prepareStackTrace;
|
|
471
471
|
Error.prepareStackTrace = void 0;
|
|
472
|
-
var
|
|
473
|
-
|
|
472
|
+
var S;
|
|
473
|
+
S = Oe.current, Oe.current = null, cn();
|
|
474
474
|
try {
|
|
475
475
|
if (h) {
|
|
476
476
|
var C = function() {
|
|
@@ -505,37 +505,37 @@ function Zn() {
|
|
|
505
505
|
}
|
|
506
506
|
} catch (J) {
|
|
507
507
|
if (J && w && typeof J.stack == "string") {
|
|
508
|
-
for (var
|
|
509
|
-
`),
|
|
510
|
-
`),
|
|
511
|
-
|
|
512
|
-
for (;
|
|
513
|
-
if (
|
|
514
|
-
if (
|
|
508
|
+
for (var x = J.stack.split(`
|
|
509
|
+
`), Y = w.stack.split(`
|
|
510
|
+
`), $ = x.length - 1, U = Y.length - 1; $ >= 1 && U >= 0 && x[$] !== Y[U]; )
|
|
511
|
+
U--;
|
|
512
|
+
for (; $ >= 1 && U >= 0; $--, U--)
|
|
513
|
+
if (x[$] !== Y[U]) {
|
|
514
|
+
if ($ !== 1 || U !== 1)
|
|
515
515
|
do
|
|
516
|
-
if (
|
|
516
|
+
if ($--, U--, U < 0 || x[$] !== Y[U]) {
|
|
517
517
|
var ee = `
|
|
518
|
-
` +
|
|
518
|
+
` + x[$].replace(" at new ", " at ");
|
|
519
519
|
return r.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", r.displayName)), typeof r == "function" && Ee.set(r, ee), ee;
|
|
520
520
|
}
|
|
521
|
-
while (
|
|
521
|
+
while ($ >= 1 && U >= 0);
|
|
522
522
|
break;
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
} finally {
|
|
526
|
-
$e = !1, Oe.current =
|
|
526
|
+
$e = !1, Oe.current = S, un(), 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;
|
|
530
530
|
}
|
|
531
|
-
function fn(r, h,
|
|
531
|
+
function fn(r, h, p) {
|
|
532
532
|
return et(r, !1);
|
|
533
533
|
}
|
|
534
534
|
function hn(r) {
|
|
535
535
|
var h = r.prototype;
|
|
536
536
|
return !!(h && h.isReactComponent);
|
|
537
537
|
}
|
|
538
|
-
function Re(r, h,
|
|
538
|
+
function Re(r, h, p) {
|
|
539
539
|
if (r == null)
|
|
540
540
|
return "";
|
|
541
541
|
if (typeof r == "function")
|
|
@@ -550,44 +550,44 @@ function Zn() {
|
|
|
550
550
|
}
|
|
551
551
|
if (typeof r == "object")
|
|
552
552
|
switch (r.$$typeof) {
|
|
553
|
-
case
|
|
553
|
+
case l:
|
|
554
554
|
return fn(r.render);
|
|
555
555
|
case y:
|
|
556
|
-
return Re(r.type, h,
|
|
556
|
+
return Re(r.type, h, p);
|
|
557
557
|
case g: {
|
|
558
|
-
var w = r, E = w._payload,
|
|
558
|
+
var w = r, E = w._payload, S = w._init;
|
|
559
559
|
try {
|
|
560
|
-
return Re(
|
|
560
|
+
return Re(S(E), h, p);
|
|
561
561
|
} catch (C) {
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
565
|
return "";
|
|
566
566
|
}
|
|
567
|
-
var ye = Object.prototype.hasOwnProperty, tt = {}, nt =
|
|
567
|
+
var ye = Object.prototype.hasOwnProperty, tt = {}, nt = N.ReactDebugCurrentFrame;
|
|
568
568
|
function be(r) {
|
|
569
569
|
if (r) {
|
|
570
|
-
var h = r._owner,
|
|
571
|
-
nt.setExtraStackFrame(
|
|
570
|
+
var h = r._owner, p = Re(r.type, r._source, h ? h.type : null);
|
|
571
|
+
nt.setExtraStackFrame(p);
|
|
572
572
|
} else
|
|
573
573
|
nt.setExtraStackFrame(null);
|
|
574
574
|
}
|
|
575
|
-
function mn(r, h,
|
|
575
|
+
function mn(r, h, p, w, E) {
|
|
576
576
|
{
|
|
577
|
-
var
|
|
577
|
+
var S = Function.call.bind(ye);
|
|
578
578
|
for (var C in r)
|
|
579
|
-
if (
|
|
580
|
-
var
|
|
579
|
+
if (S(r, C)) {
|
|
580
|
+
var x = void 0;
|
|
581
581
|
try {
|
|
582
582
|
if (typeof r[C] != "function") {
|
|
583
|
-
var
|
|
584
|
-
throw
|
|
583
|
+
var Y = Error((w || "React class") + ": " + p + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
584
|
+
throw Y.name = "Invariant Violation", Y;
|
|
585
585
|
}
|
|
586
|
-
|
|
587
|
-
} catch (
|
|
588
|
-
|
|
586
|
+
x = r[C](h, C, w, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
587
|
+
} catch ($) {
|
|
588
|
+
x = $;
|
|
589
589
|
}
|
|
590
|
-
|
|
590
|
+
x && !(x 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", p, C, typeof x), be(null)), x instanceof Error && !(x.message in tt) && (tt[x.message] = !0, be(E), R("Failed %s type: %s", p, x.message), be(null));
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
}
|
|
@@ -597,8 +597,8 @@ function Zn() {
|
|
|
597
597
|
}
|
|
598
598
|
function vn(r) {
|
|
599
599
|
{
|
|
600
|
-
var h = typeof Symbol == "function" && Symbol.toStringTag,
|
|
601
|
-
return
|
|
600
|
+
var h = typeof Symbol == "function" && Symbol.toStringTag, p = h && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
601
|
+
return p;
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
function yn(r) {
|
|
@@ -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 = N.ReactCurrentOwner, gn = {
|
|
619
619
|
key: !0,
|
|
620
620
|
ref: !0,
|
|
621
621
|
__self: !0,
|
|
@@ -629,7 +629,7 @@ function Zn() {
|
|
|
629
629
|
}
|
|
630
630
|
return r.ref !== void 0;
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function Tn(r) {
|
|
633
633
|
if (ye.call(r, "key")) {
|
|
634
634
|
var h = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
635
635
|
if (h && h.isReactWarning)
|
|
@@ -640,80 +640,80 @@ function Zn() {
|
|
|
640
640
|
function _n(r, h) {
|
|
641
641
|
typeof r.ref == "string" && it.current;
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function xn(r, h) {
|
|
644
644
|
{
|
|
645
|
-
var
|
|
645
|
+
var p = function() {
|
|
646
646
|
st || (st = !0, R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
|
|
647
647
|
};
|
|
648
|
-
|
|
649
|
-
get:
|
|
648
|
+
p.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
649
|
+
get: p,
|
|
650
650
|
configurable: !0
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
654
|
function Cn(r, h) {
|
|
655
655
|
{
|
|
656
|
-
var
|
|
656
|
+
var p = function() {
|
|
657
657
|
at || (at = !0, R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
|
|
658
658
|
};
|
|
659
|
-
|
|
660
|
-
get:
|
|
659
|
+
p.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
|
660
|
+
get: p,
|
|
661
661
|
configurable: !0
|
|
662
662
|
});
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
var En = function(r, h,
|
|
666
|
-
var
|
|
665
|
+
var En = function(r, h, p, w, E, S, C) {
|
|
666
|
+
var x = {
|
|
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
|
|
670
670
|
type: r,
|
|
671
671
|
key: h,
|
|
672
|
-
ref:
|
|
672
|
+
ref: p,
|
|
673
673
|
props: C,
|
|
674
674
|
// Record the component responsible for creating this element.
|
|
675
|
-
_owner:
|
|
675
|
+
_owner: S
|
|
676
676
|
};
|
|
677
|
-
return
|
|
677
|
+
return x._store = {}, Object.defineProperty(x._store, "validated", {
|
|
678
678
|
configurable: !1,
|
|
679
679
|
enumerable: !1,
|
|
680
680
|
writable: !0,
|
|
681
681
|
value: !1
|
|
682
|
-
}), Object.defineProperty(
|
|
682
|
+
}), Object.defineProperty(x, "_self", {
|
|
683
683
|
configurable: !1,
|
|
684
684
|
enumerable: !1,
|
|
685
685
|
writable: !1,
|
|
686
686
|
value: w
|
|
687
|
-
}), Object.defineProperty(
|
|
687
|
+
}), Object.defineProperty(x, "_source", {
|
|
688
688
|
configurable: !1,
|
|
689
689
|
enumerable: !1,
|
|
690
690
|
writable: !1,
|
|
691
691
|
value: E
|
|
692
|
-
}), Object.freeze && (Object.freeze(
|
|
692
|
+
}), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
|
|
693
693
|
};
|
|
694
|
-
function Rn(r, h,
|
|
694
|
+
function Rn(r, h, p, w, E) {
|
|
695
695
|
{
|
|
696
|
-
var
|
|
697
|
-
|
|
698
|
-
for (
|
|
699
|
-
ye.call(h,
|
|
696
|
+
var S, C = {}, x = null, Y = null;
|
|
697
|
+
p !== void 0 && (ot(p), x = "" + p), Tn(h) && (ot(h.key), x = "" + h.key), wn(h) && (Y = h.ref, _n(h, E));
|
|
698
|
+
for (S in h)
|
|
699
|
+
ye.call(h, S) && !gn.hasOwnProperty(S) && (C[S] = h[S]);
|
|
700
700
|
if (r && r.defaultProps) {
|
|
701
|
-
var
|
|
702
|
-
for (
|
|
703
|
-
C[
|
|
701
|
+
var $ = r.defaultProps;
|
|
702
|
+
for (S in $)
|
|
703
|
+
C[S] === void 0 && (C[S] = $[S]);
|
|
704
704
|
}
|
|
705
|
-
if (
|
|
706
|
-
var
|
|
707
|
-
|
|
705
|
+
if (x || Y) {
|
|
706
|
+
var U = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
707
|
+
x && xn(C, U), Y && Cn(C, U);
|
|
708
708
|
}
|
|
709
|
-
return En(r,
|
|
709
|
+
return En(r, x, Y, E, w, it.current, C);
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
|
-
var Be =
|
|
712
|
+
var Be = N.ReactCurrentOwner, lt = N.ReactDebugCurrentFrame;
|
|
713
713
|
function de(r) {
|
|
714
714
|
if (r) {
|
|
715
|
-
var h = r._owner,
|
|
716
|
-
lt.setExtraStackFrame(
|
|
715
|
+
var h = r._owner, p = Re(r.type, r._source, h ? h.type : null);
|
|
716
|
+
lt.setExtraStackFrame(p);
|
|
717
717
|
} else
|
|
718
718
|
lt.setExtraStackFrame(null);
|
|
719
719
|
}
|
|
@@ -742,10 +742,10 @@ Check the render method of \`` + r + "`.";
|
|
|
742
742
|
{
|
|
743
743
|
var h = ct();
|
|
744
744
|
if (!h) {
|
|
745
|
-
var
|
|
746
|
-
|
|
745
|
+
var p = typeof r == "string" ? r : r.displayName || r.name;
|
|
746
|
+
p && (h = `
|
|
747
747
|
|
|
748
|
-
Check the top-level render call using <` +
|
|
748
|
+
Check the top-level render call using <` + p + ">.");
|
|
749
749
|
}
|
|
750
750
|
return h;
|
|
751
751
|
}
|
|
@@ -755,12 +755,12 @@ 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
|
|
759
|
-
if (ut[
|
|
758
|
+
var p = Sn(h);
|
|
759
|
+
if (ut[p])
|
|
760
760
|
return;
|
|
761
|
-
ut[
|
|
761
|
+
ut[p] = !0;
|
|
762
762
|
var w = "";
|
|
763
|
-
r && r._owner && r._owner !== Be.current && (w = " It was passed a child from " + K(r._owner.type) + "."), de(r), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',
|
|
763
|
+
r && r._owner && r._owner !== Be.current && (w = " It was passed a child from " + K(r._owner.type) + "."), de(r), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, w), de(null);
|
|
764
764
|
}
|
|
765
765
|
}
|
|
766
766
|
function ft(r, h) {
|
|
@@ -768,16 +768,16 @@ Check the top-level render call using <` + m + ">.");
|
|
|
768
768
|
if (typeof r != "object")
|
|
769
769
|
return;
|
|
770
770
|
if (Ue(r))
|
|
771
|
-
for (var
|
|
772
|
-
var w = r[
|
|
771
|
+
for (var p = 0; p < r.length; p++) {
|
|
772
|
+
var w = r[p];
|
|
773
773
|
We(w) && dt(w, h);
|
|
774
774
|
}
|
|
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 = j(r);
|
|
779
779
|
if (typeof E == "function" && E !== r.entries)
|
|
780
|
-
for (var
|
|
780
|
+
for (var S = E.call(r), C; !(C = S.next()).done; )
|
|
781
781
|
We(C.value) && dt(C.value, h);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
@@ -787,18 +787,18 @@ Check the top-level render call using <` + m + ">.");
|
|
|
787
787
|
var h = r.type;
|
|
788
788
|
if (h == null || typeof h == "string")
|
|
789
789
|
return;
|
|
790
|
-
var
|
|
790
|
+
var p;
|
|
791
791
|
if (typeof h == "function")
|
|
792
|
-
|
|
793
|
-
else if (typeof h == "object" && (h.$$typeof ===
|
|
792
|
+
p = h.propTypes;
|
|
793
|
+
else if (typeof h == "object" && (h.$$typeof === l || // Note: Memo only checks outer props here.
|
|
794
794
|
// Inner props are checked in the reconciler.
|
|
795
795
|
h.$$typeof === y))
|
|
796
|
-
|
|
796
|
+
p = h.propTypes;
|
|
797
797
|
else
|
|
798
798
|
return;
|
|
799
|
-
if (
|
|
799
|
+
if (p) {
|
|
800
800
|
var w = K(h);
|
|
801
|
-
mn(
|
|
801
|
+
mn(p, r.props, "prop", w, r);
|
|
802
802
|
} else if (h.PropTypes !== void 0 && !ze) {
|
|
803
803
|
ze = !0;
|
|
804
804
|
var E = K(h);
|
|
@@ -809,8 +809,8 @@ Check the top-level render call using <` + m + ">.");
|
|
|
809
809
|
}
|
|
810
810
|
function Pn(r) {
|
|
811
811
|
{
|
|
812
|
-
for (var h = Object.keys(r.props),
|
|
813
|
-
var w = h[
|
|
812
|
+
for (var h = Object.keys(r.props), p = 0; p < h.length; p++) {
|
|
813
|
+
var w = h[p];
|
|
814
814
|
if (w !== "children" && w !== "key") {
|
|
815
815
|
de(r), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), de(null);
|
|
816
816
|
break;
|
|
@@ -820,20 +820,20 @@ Check the top-level render call using <` + m + ">.");
|
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
var ht = {};
|
|
823
|
-
function mt(r, h,
|
|
823
|
+
function mt(r, h, p, w, E, S) {
|
|
824
824
|
{
|
|
825
|
-
var C =
|
|
825
|
+
var C = H(r);
|
|
826
826
|
if (!C) {
|
|
827
|
-
var
|
|
828
|
-
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (
|
|
829
|
-
var
|
|
830
|
-
|
|
831
|
-
var
|
|
832
|
-
r === null ?
|
|
827
|
+
var x = "";
|
|
828
|
+
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (x += " 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
|
+
var Y = bn();
|
|
830
|
+
Y ? x += Y : x += ct();
|
|
831
|
+
var $;
|
|
832
|
+
r === null ? $ = "null" : Ue(r) ? $ = "array" : r !== void 0 && r.$$typeof === t ? ($ = "<" + (K(r.type) || "Unknown") + " />", x = " Did you accidentally export a JSX literal instead of a component?") : $ = 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", $, x);
|
|
833
833
|
}
|
|
834
|
-
var
|
|
835
|
-
if (
|
|
836
|
-
return
|
|
834
|
+
var U = Rn(r, h, p, E, S);
|
|
835
|
+
if (U == null)
|
|
836
|
+
return U;
|
|
837
837
|
if (C) {
|
|
838
838
|
var ee = h.children;
|
|
839
839
|
if (ee !== void 0)
|
|
@@ -848,45 +848,45 @@ Check the top-level render call using <` + m + ">.");
|
|
|
848
848
|
ft(ee, r);
|
|
849
849
|
}
|
|
850
850
|
if (ye.call(h, "key")) {
|
|
851
|
-
var ce = K(r), J = Object.keys(h).filter(function(
|
|
852
|
-
return
|
|
853
|
-
}),
|
|
854
|
-
if (!ht[ce +
|
|
855
|
-
var
|
|
851
|
+
var ce = K(r), J = Object.keys(h).filter(function(Fn) {
|
|
852
|
+
return Fn !== "key";
|
|
853
|
+
}), qe = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
854
|
+
if (!ht[ce + qe]) {
|
|
855
|
+
var Mn = J.length > 0 ? "{" + J.join(": ..., ") + ": ...}" : "{}";
|
|
856
856
|
R(`A props object containing a "key" prop is being spread into JSX:
|
|
857
857
|
let props = %s;
|
|
858
858
|
<%s {...props} />
|
|
859
859
|
React keys must be passed directly to JSX without using spread:
|
|
860
860
|
let props = %s;
|
|
861
|
-
<%s key={someKey} {...props} />`,
|
|
861
|
+
<%s key={someKey} {...props} />`, qe, ce, Mn, ce), ht[ce + qe] = !0;
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
|
-
return r === o ? Pn(
|
|
864
|
+
return r === o ? Pn(U) : jn(U), U;
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
|
-
function Ln(r, h,
|
|
868
|
-
return mt(r, h,
|
|
867
|
+
function Ln(r, h, p) {
|
|
868
|
+
return mt(r, h, p, !0);
|
|
869
869
|
}
|
|
870
|
-
function In(r, h,
|
|
871
|
-
return mt(r, h,
|
|
870
|
+
function In(r, h, p) {
|
|
871
|
+
return mt(r, h, p, !1);
|
|
872
872
|
}
|
|
873
873
|
var kn = In, Dn = Ln;
|
|
874
874
|
we.Fragment = o, we.jsx = kn, we.jsxs = Dn;
|
|
875
875
|
})()), we;
|
|
876
876
|
}
|
|
877
|
-
var
|
|
878
|
-
function
|
|
879
|
-
return
|
|
877
|
+
var Tt;
|
|
878
|
+
function Zn() {
|
|
879
|
+
return Tt || (Tt = 1, process.env.NODE_ENV === "production" ? Le.exports = Wn() : Le.exports = qn()), Le.exports;
|
|
880
880
|
}
|
|
881
|
-
var s =
|
|
881
|
+
var s = Zn();
|
|
882
882
|
const Kn = "_playerNotice_x3acc_1", Yn = "_playerNoticeTitle_x3acc_19", Xn = "_playerNoticeText_x3acc_28", Gn = "_playerNoticeLowZIndex_x3acc_37", ie = {
|
|
883
883
|
playerNotice: Kn,
|
|
884
884
|
playerNoticeTitle: Yn,
|
|
885
885
|
playerNoticeText: Xn,
|
|
886
886
|
playerNoticeLowZIndex: Gn
|
|
887
887
|
}, Ot = typeof window != "undefined" ? On : D;
|
|
888
|
-
function
|
|
889
|
-
const n =
|
|
888
|
+
function Ve(e, t) {
|
|
889
|
+
const n = V(e);
|
|
890
890
|
Ot(() => {
|
|
891
891
|
n.current = e;
|
|
892
892
|
}, [e]), D(() => {
|
|
@@ -901,8 +901,8 @@ function Ne(e, t) {
|
|
|
901
901
|
}, [t]);
|
|
902
902
|
}
|
|
903
903
|
function Jn(e) {
|
|
904
|
-
const [, t] =
|
|
905
|
-
|
|
904
|
+
const [, t] = X(0);
|
|
905
|
+
Ve(() => 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 = V(
|
|
918
918
|
null
|
|
919
919
|
);
|
|
920
920
|
return t.current || (t.current = Qn()), /* @__PURE__ */ s.jsx(Ht.Provider, { value: t.current, children: e });
|
|
@@ -939,11 +939,11 @@ function nr(e) {
|
|
|
939
939
|
}
|
|
940
940
|
const _e = (e) => {
|
|
941
941
|
if (isNaN(e) || e === 1 / 0) return "0:00";
|
|
942
|
-
const t = (
|
|
942
|
+
const t = (c) => (c < 10 ? "0" : "") + c, n = Math.floor(e / 3600), o = Math.floor(e % 3600 / 60), a = Math.floor(e % 60);
|
|
943
943
|
return n === 0 ? `${o}:${t(a)}` : `${n}:${t(o)}:${t(a)}`;
|
|
944
944
|
};
|
|
945
945
|
function rr(e, t) {
|
|
946
|
-
var n, o, a,
|
|
946
|
+
var n, o, a, c, u, i;
|
|
947
947
|
if (typeof Intl != "undefined" && Intl.DateTimeFormat)
|
|
948
948
|
try {
|
|
949
949
|
const d = new Intl.DateTimeFormat("en-US", {
|
|
@@ -956,29 +956,29 @@ function rr(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((j) => j.type === "year")) == null ? void 0 : n.value) || "0",
|
|
960
960
|
10
|
|
961
961
|
), y = parseInt(
|
|
962
|
-
((o = d.find((
|
|
962
|
+
((o = d.find((j) => j.type === "month")) == null ? void 0 : o.value) || "0",
|
|
963
963
|
10
|
|
964
964
|
) - 1, g = parseInt(
|
|
965
|
-
((a = d.find((
|
|
965
|
+
((a = d.find((j) => j.type === "day")) == null ? void 0 : a.value) || "0",
|
|
966
966
|
10
|
|
967
|
-
),
|
|
968
|
-
((
|
|
967
|
+
), L = parseInt(
|
|
968
|
+
((c = d.find((j) => j.type === "hour")) == null ? void 0 : c.value) || "0",
|
|
969
969
|
10
|
|
970
970
|
), k = parseInt(
|
|
971
|
-
((u = d.find((
|
|
971
|
+
((u = d.find((j) => j.type === "minute")) == null ? void 0 : u.value) || "0",
|
|
972
972
|
10
|
|
973
973
|
), _ = parseInt(
|
|
974
|
-
((i = d.find((
|
|
974
|
+
((i = d.find((j) => j.type === "second")) == null ? void 0 : i.value) || "0",
|
|
975
975
|
10
|
|
976
976
|
);
|
|
977
|
-
return new Date(v, y, g,
|
|
978
|
-
} catch (
|
|
977
|
+
return new Date(v, y, g, L, k, _);
|
|
978
|
+
} catch (l) {
|
|
979
979
|
return console.warn(
|
|
980
980
|
`Failed to convert date to timezone ${t}, returning original date:`,
|
|
981
|
-
|
|
981
|
+
l
|
|
982
982
|
), e;
|
|
983
983
|
}
|
|
984
984
|
return console.warn(
|
|
@@ -1106,8 +1106,8 @@ const cr = () => Hn(), ur = (e, t) => ({
|
|
|
1106
1106
|
t().eventEmitter.emit("error", n);
|
|
1107
1107
|
const a = o.error;
|
|
1108
1108
|
if (!a) return;
|
|
1109
|
-
const
|
|
1110
|
-
e({ error: { message: u, code:
|
|
1109
|
+
const c = `${a.code}`, u = a.message || "Unknown error occurred";
|
|
1110
|
+
e({ error: { message: u, code: c, tech: "native" } });
|
|
1111
1111
|
},
|
|
1112
1112
|
pause: () => {
|
|
1113
1113
|
const n = t().techRef.current;
|
|
@@ -1205,12 +1205,12 @@ const cr = () => Hn(), ur = (e, t) => ({
|
|
|
1205
1205
|
setError: (t) => e({ error: t })
|
|
1206
1206
|
}), vr = () => ({
|
|
1207
1207
|
eventEmitter: cr()
|
|
1208
|
-
}), yr = (e) => () =>
|
|
1208
|
+
}), yr = (e) => () => P({}, e), gr = (e, t) => Lt()((...n) => P(P(P(P(P(P(P(P({}, ur(...n)), dr(...n)), fr(...n)), mr(...n)), hr(...n)), pr(...n)), vr(...n)), yr({
|
|
1209
1209
|
techRef: e,
|
|
1210
1210
|
containerRef: t
|
|
1211
1211
|
})(...n))), Bt = jt(null);
|
|
1212
1212
|
function wr({ children: e }) {
|
|
1213
|
-
const t =
|
|
1213
|
+
const t = V(null), n = V(null), o = V(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) => {
|
|
@@ -1219,15 +1219,15 @@ const f = (e) => {
|
|
|
1219
1219
|
throw new Error("usePlayerStore must be used within PlayerStoreProvider");
|
|
1220
1220
|
return It(t, e);
|
|
1221
1221
|
};
|
|
1222
|
-
function
|
|
1222
|
+
function Tr(e) {
|
|
1223
1223
|
const t = e.split(`
|
|
1224
1224
|
`);
|
|
1225
1225
|
for (const n of t) {
|
|
1226
1226
|
const o = n.trim();
|
|
1227
1227
|
if (o.startsWith("#EXT-X-PROGRAM-DATE-TIME:")) {
|
|
1228
|
-
const a = o.replace("#EXT-X-PROGRAM-DATE-TIME:", "").trim(),
|
|
1229
|
-
if (!isNaN(
|
|
1230
|
-
return rr(
|
|
1228
|
+
const a = o.replace("#EXT-X-PROGRAM-DATE-TIME:", "").trim(), c = new Date(a);
|
|
1229
|
+
if (!isNaN(c.getTime()))
|
|
1230
|
+
return rr(c, "Europe/Sarajevo");
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
1233
|
return null;
|
|
@@ -1237,18 +1237,18 @@ function _r(e, t) {
|
|
|
1237
1237
|
`);
|
|
1238
1238
|
let o = !1;
|
|
1239
1239
|
for (const a of n) {
|
|
1240
|
-
const
|
|
1241
|
-
if (
|
|
1240
|
+
const c = a.trim();
|
|
1241
|
+
if (c.startsWith("#EXT-X-STREAM-INF:")) {
|
|
1242
1242
|
o = !0;
|
|
1243
1243
|
continue;
|
|
1244
1244
|
}
|
|
1245
|
-
if (o && !
|
|
1246
|
-
if (
|
|
1247
|
-
return
|
|
1245
|
+
if (o && !c.startsWith("#")) {
|
|
1246
|
+
if (c.startsWith("http"))
|
|
1247
|
+
return c;
|
|
1248
1248
|
{
|
|
1249
1249
|
const u = new URL(t);
|
|
1250
1250
|
return new URL(
|
|
1251
|
-
|
|
1251
|
+
c,
|
|
1252
1252
|
u.origin + u.pathname.substring(
|
|
1253
1253
|
0,
|
|
1254
1254
|
u.pathname.lastIndexOf("/")
|
|
@@ -1259,12 +1259,12 @@ function _r(e, t) {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
return null;
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1262
|
+
function xr(e) {
|
|
1263
1263
|
return e.replace("playlist.m3u8", "playlist_fmp4_dvr.m3u8");
|
|
1264
1264
|
}
|
|
1265
1265
|
async function Cr(e) {
|
|
1266
1266
|
try {
|
|
1267
|
-
const t =
|
|
1267
|
+
const t = xr(e);
|
|
1268
1268
|
console.log("Converting to DVR URL:", t);
|
|
1269
1269
|
const n = await fetch(t);
|
|
1270
1270
|
if (!n.ok)
|
|
@@ -1278,12 +1278,12 @@ async function Cr(e) {
|
|
|
1278
1278
|
if (!a)
|
|
1279
1279
|
throw new Error("No chunklist URL found in master playlist");
|
|
1280
1280
|
console.log("Found chunklist URL:", a);
|
|
1281
|
-
const
|
|
1282
|
-
if (!
|
|
1281
|
+
const c = await fetch(a);
|
|
1282
|
+
if (!c.ok)
|
|
1283
1283
|
throw new Error(
|
|
1284
|
-
`Failed to fetch chunklist: ${
|
|
1284
|
+
`Failed to fetch chunklist: ${c.status} ${c.statusText}`
|
|
1285
1285
|
);
|
|
1286
|
-
const u = await
|
|
1286
|
+
const u = await c.text(), i = Tr(u);
|
|
1287
1287
|
return i ? console.log("Successfully detected start time:", i.toISOString()) : console.log(" No start time found in chunklist"), i;
|
|
1288
1288
|
} catch (t) {
|
|
1289
1289
|
return console.error("Error getting start time from HLS URL:", t), null;
|
|
@@ -1291,40 +1291,39 @@ async function Cr(e) {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
function Er(n) {
|
|
1293
1293
|
var o = n, { url: e } = o, t = ne(o, ["url"]);
|
|
1294
|
-
const [a,
|
|
1294
|
+
const [a, c] = X(!0), u = A((d) => d.startDate), i = A((d) => d.setStartDate), l = z(async () => {
|
|
1295
1295
|
const d = await Cr(e);
|
|
1296
1296
|
d && i(d);
|
|
1297
1297
|
}, [e, i]);
|
|
1298
1298
|
return D(() => {
|
|
1299
1299
|
(async () => {
|
|
1300
|
-
|
|
1300
|
+
c(!0), await l(), c(!1);
|
|
1301
1301
|
})();
|
|
1302
|
-
}, [
|
|
1302
|
+
}, [l]), Ve(l, u ? null : 5e3), a ? null : /* @__PURE__ */ s.jsx(Rr, P({}, t));
|
|
1303
1303
|
}
|
|
1304
1304
|
function Rr({
|
|
1305
1305
|
children: e,
|
|
1306
|
-
messages: t
|
|
1306
|
+
messages: t
|
|
1307
1307
|
}) {
|
|
1308
|
-
|
|
1309
|
-
const n = A((d) => d.startDate), o = f((d) => d.isStarted);
|
|
1308
|
+
const n = A((u) => u.startDate), o = f((u) => u.isStarted);
|
|
1310
1309
|
return Jn(o ? null : 5e3), n ? Date.now() < n.getTime() ? /* @__PURE__ */ s.jsx(
|
|
1311
1310
|
br,
|
|
1312
1311
|
{
|
|
1313
1312
|
startDate: n,
|
|
1314
|
-
title:
|
|
1315
|
-
message:
|
|
1313
|
+
title: t.eventNotStarted,
|
|
1314
|
+
message: t.eventStartingSoon
|
|
1316
1315
|
}
|
|
1317
|
-
) : /* @__PURE__ */ s.jsx(s.Fragment, { children: e }) : /* @__PURE__ */ s.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children:
|
|
1316
|
+
) : /* @__PURE__ */ s.jsx(s.Fragment, { children: e }) : /* @__PURE__ */ s.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: t.unableToPlay }) });
|
|
1318
1317
|
}
|
|
1319
1318
|
function br({ startDate: e, title: t, message: n }) {
|
|
1320
|
-
const o = e.getTime() - Date.now(), a = Math.floor(o / (1e3 * 60 * 60)),
|
|
1319
|
+
const o = e.getTime() - Date.now(), a = Math.floor(o / (1e3 * 60 * 60)), c = Math.floor(
|
|
1321
1320
|
o % (1e3 * 60 * 60) / (1e3 * 60)
|
|
1322
1321
|
);
|
|
1323
|
-
return a ||
|
|
1322
|
+
return a || c ? /* @__PURE__ */ s.jsxs("div", { className: ie.playerNotice, children: [
|
|
1324
1323
|
/* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: t }),
|
|
1325
1324
|
/* @__PURE__ */ s.jsxs("p", { className: ie.playerNoticeText, children: [
|
|
1326
1325
|
"(",
|
|
1327
|
-
a > 0 ? `${a}h ${
|
|
1326
|
+
a > 0 ? `${a}h ${c}m` : `${c}m`,
|
|
1328
1327
|
")"
|
|
1329
1328
|
] })
|
|
1330
1329
|
] }) : /* @__PURE__ */ s.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: n }) });
|
|
@@ -1332,17 +1331,17 @@ function br({ startDate: e, title: t, message: n }) {
|
|
|
1332
1331
|
function zt({ callback: e }) {
|
|
1333
1332
|
const t = f((n) => n.eventEmitter);
|
|
1334
1333
|
return D(() => {
|
|
1335
|
-
const n = () => e("play", void 0), o = () => e("pause", void 0), a = () => e("ended", void 0),
|
|
1336
|
-
return t.on("play", n), t.on("pause", o), t.on("ended", a), t.on("seeking",
|
|
1337
|
-
t.off("play", n), t.off("pause", o), t.off("ended", a), t.off("seeking",
|
|
1334
|
+
const n = () => e("play", void 0), o = () => e("pause", void 0), a = () => e("ended", void 0), c = () => e("seeking", void 0), u = () => e("seeked", void 0), i = (_) => e("volumeChange", _), l = (_) => e("fullscreenChange", _), d = (_) => e("qualityChange", _), v = (_) => e("loadedMetadata", _), y = () => e("loadStart", void 0), g = () => e("playing", void 0), L = () => e("waiting", void 0), k = () => e("error", void 0);
|
|
1335
|
+
return t.on("play", n), t.on("pause", o), t.on("ended", a), t.on("seeking", c), t.on("seeked", u), t.on("volumeChange", i), t.on("fullscreenChange", l), t.on("qualityChange", d), t.on("loadedMetadata", v), t.on("loadStart", y), t.on("playing", g), t.on("waiting", L), t.on("error", k), () => {
|
|
1336
|
+
t.off("play", n), t.off("pause", o), t.off("ended", a), t.off("seeking", c), t.off("seeked", u), t.off("volumeChange", i), t.off("fullscreenChange", l), t.off("qualityChange", d), t.off("loadedMetadata", v), t.off("loadStart", y), t.off("playing", g), t.off("waiting", L), t.off("error", k);
|
|
1338
1337
|
};
|
|
1339
1338
|
}, [e, t]), null;
|
|
1340
1339
|
}
|
|
1341
1340
|
const Wt = (e, t = 0) => parseInt(
|
|
1342
1341
|
Math.max(0, (Date.now() - (e + t * 1e3)) / 1e3).toFixed(0)
|
|
1343
|
-
),
|
|
1344
|
-
const o = t < 0 ? 0 : t, a = ["bytes", "kb", "mb", "gb", "tb", "pb", "eb", "zb", "yb"],
|
|
1345
|
-
return `${parseFloat((e / Math.pow(1024,
|
|
1342
|
+
), qt = (e, t) => Math.max(0, (Date.now() - e - t * 1e3) / 1e3), Sr = (e, t) => Math.max(0, (t - e) / 1e3), jr = (e, t = 0) => {
|
|
1343
|
+
const o = t < 0 ? 0 : t, a = ["bytes", "kb", "mb", "gb", "tb", "pb", "eb", "zb", "yb"], c = Math.floor(Math.log(e) / Math.log(1024));
|
|
1344
|
+
return `${parseFloat((e / Math.pow(1024, c)).toFixed(o))}${a[c]}`;
|
|
1346
1345
|
};
|
|
1347
1346
|
function Pr({
|
|
1348
1347
|
isAuto: e,
|
|
@@ -1355,51 +1354,51 @@ function Pr({
|
|
|
1355
1354
|
label: "Auto",
|
|
1356
1355
|
value: -1,
|
|
1357
1356
|
selected: e || t === -1
|
|
1358
|
-
}), n.sort(function(
|
|
1359
|
-
const i =
|
|
1360
|
-
return i ===
|
|
1361
|
-
}), n.map((
|
|
1362
|
-
const { bitrate: u, height: i, index:
|
|
1357
|
+
}), n.sort(function(c, u) {
|
|
1358
|
+
const i = c.height || c.bitrate || 0, l = u.height || u.bitrate || 0;
|
|
1359
|
+
return i === l ? 0 : i > l ? 1 : -1;
|
|
1360
|
+
}), n.map((c) => {
|
|
1361
|
+
const { bitrate: u, height: i, index: l } = c;
|
|
1363
1362
|
a.push({
|
|
1364
|
-
sid: `quality-level-${
|
|
1363
|
+
sid: `quality-level-${l}`,
|
|
1365
1364
|
label: i ? `${i}p` : jr(u),
|
|
1366
|
-
value:
|
|
1367
|
-
selected: o === 1 || !e &&
|
|
1365
|
+
value: l,
|
|
1366
|
+
selected: o === 1 || !e && l === t
|
|
1368
1367
|
});
|
|
1369
1368
|
}), a;
|
|
1370
1369
|
}
|
|
1371
1370
|
function Lr({ callback: e }) {
|
|
1372
|
-
const t = A((
|
|
1371
|
+
const t = A((c) => c.delay), n = A((c) => c.startDate), o = n ? n.getTime() : 0, a = f((c) => c.eventEmitter);
|
|
1373
1372
|
return D(() => {
|
|
1374
|
-
const
|
|
1375
|
-
currentTime:
|
|
1373
|
+
const c = () => e("timeUpdate", {
|
|
1374
|
+
currentTime: qt(o, t),
|
|
1376
1375
|
duration: -1
|
|
1377
1376
|
});
|
|
1378
|
-
return a.on("timeUpdate",
|
|
1379
|
-
a.off("timeUpdate",
|
|
1377
|
+
return a.on("timeUpdate", c), () => {
|
|
1378
|
+
a.off("timeUpdate", c);
|
|
1380
1379
|
};
|
|
1381
|
-
}, [e, a]), /* @__PURE__ */ s.jsx(zt, { callback: e });
|
|
1380
|
+
}, [e, t, a, o]), /* @__PURE__ */ s.jsx(zt, { callback: e });
|
|
1382
1381
|
}
|
|
1383
|
-
function
|
|
1384
|
-
const e = f((i) => i.exitFullscreen), t = f((i) => i.isFullscreen), n = f((i) => i.isFullscreenReady), o = f((i) => i.requestFullscreen), a = f((i) => i.setVolume),
|
|
1382
|
+
function Zt() {
|
|
1383
|
+
const e = f((i) => i.exitFullscreen), t = f((i) => i.isFullscreen), n = f((i) => i.isFullscreenReady), o = f((i) => i.requestFullscreen), a = f((i) => i.setVolume), c = f((i) => i.volume), u = z(
|
|
1385
1384
|
(i) => {
|
|
1386
|
-
let
|
|
1385
|
+
let l = !1;
|
|
1387
1386
|
if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
|
|
1388
1387
|
switch (i.code) {
|
|
1389
1388
|
case "ArrowUp":
|
|
1390
|
-
a(
|
|
1389
|
+
a(c + 10 < 100 ? c + 10 : 100), l = !0;
|
|
1391
1390
|
break;
|
|
1392
1391
|
case "ArrowDown":
|
|
1393
|
-
a(
|
|
1392
|
+
a(c - 10 > 0 ? c - 10 : 0), l = !0;
|
|
1394
1393
|
break;
|
|
1395
1394
|
case "KeyM":
|
|
1396
|
-
a(
|
|
1395
|
+
a(c === 0 ? 100 : 0), l = !0;
|
|
1397
1396
|
break;
|
|
1398
1397
|
case "KeyF":
|
|
1399
|
-
n && (t ? e() : o(),
|
|
1398
|
+
n && (t ? e() : o(), l = !0);
|
|
1400
1399
|
break;
|
|
1401
1400
|
}
|
|
1402
|
-
|
|
1401
|
+
l && i.preventDefault();
|
|
1403
1402
|
}
|
|
1404
1403
|
},
|
|
1405
1404
|
[
|
|
@@ -1408,7 +1407,7 @@ function qt() {
|
|
|
1408
1407
|
n,
|
|
1409
1408
|
o,
|
|
1410
1409
|
a,
|
|
1411
|
-
|
|
1410
|
+
c
|
|
1412
1411
|
]
|
|
1413
1412
|
);
|
|
1414
1413
|
return D(() => (document.addEventListener("keydown", u), () => {
|
|
@@ -1416,35 +1415,35 @@ function qt() {
|
|
|
1416
1415
|
}), [u]), null;
|
|
1417
1416
|
}
|
|
1418
1417
|
function Ir() {
|
|
1419
|
-
const e = A((i) => i.delay), t = f((i) => i.isPlaying), n = f((i) => i.pause), o = f((i) => i.getPauseTimeDiff), a = f((i) => i.play),
|
|
1418
|
+
const e = A((i) => i.delay), t = f((i) => i.isPlaying), n = f((i) => i.pause), o = f((i) => i.getPauseTimeDiff), a = f((i) => i.play), c = A((i) => i.setDelay), u = z(
|
|
1420
1419
|
(i) => {
|
|
1421
|
-
let
|
|
1420
|
+
let l = !1;
|
|
1422
1421
|
if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
|
|
1423
1422
|
switch (i.code) {
|
|
1424
1423
|
case "ArrowLeft":
|
|
1425
|
-
|
|
1424
|
+
c(e + 10), l = !0;
|
|
1426
1425
|
break;
|
|
1427
1426
|
case "ArrowRight":
|
|
1428
|
-
|
|
1427
|
+
c(e - 10 > 0 ? e - 10 : 0), l = !0;
|
|
1429
1428
|
break;
|
|
1430
1429
|
case "Space":
|
|
1431
1430
|
if (t)
|
|
1432
1431
|
n();
|
|
1433
1432
|
else {
|
|
1434
1433
|
const d = o();
|
|
1435
|
-
d &&
|
|
1434
|
+
d && c(e + d), a();
|
|
1436
1435
|
}
|
|
1437
|
-
|
|
1436
|
+
l = !0;
|
|
1438
1437
|
break;
|
|
1439
1438
|
}
|
|
1440
|
-
|
|
1439
|
+
l && i.preventDefault();
|
|
1441
1440
|
}
|
|
1442
1441
|
},
|
|
1443
|
-
[e, o, t, n, a,
|
|
1442
|
+
[e, o, t, n, a, c]
|
|
1444
1443
|
);
|
|
1445
1444
|
return D(() => (document.addEventListener("keydown", u), () => {
|
|
1446
1445
|
document.removeEventListener("keydown", u);
|
|
1447
|
-
}), [u]), /* @__PURE__ */ s.jsx(
|
|
1446
|
+
}), [u]), /* @__PURE__ */ s.jsx(Zt, {});
|
|
1448
1447
|
}
|
|
1449
1448
|
function Kt({ children: e }) {
|
|
1450
1449
|
return /* @__PURE__ */ s.jsx(wr, { children: e });
|
|
@@ -1453,187 +1452,188 @@ function kr({ children: e }) {
|
|
|
1453
1452
|
return /* @__PURE__ */ s.jsx(er, { children: /* @__PURE__ */ s.jsx(Kt, { children: e }) });
|
|
1454
1453
|
}
|
|
1455
1454
|
function Dr({ url: e, isLive: t, messages: n }) {
|
|
1456
|
-
const o =
|
|
1457
|
-
(
|
|
1458
|
-
if (o.current && (o.current.nextLevel =
|
|
1459
|
-
const
|
|
1460
|
-
selected:
|
|
1455
|
+
const o = V(null), a = 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), v = V(0), y = V(null), g = 50, L = 1e4, k = z(
|
|
1456
|
+
(T) => {
|
|
1457
|
+
if (o.current && (o.current.nextLevel = T, u(null), c)) {
|
|
1458
|
+
const M = c.map((m) => he(P({}, m), {
|
|
1459
|
+
selected: m.value === T
|
|
1461
1460
|
}));
|
|
1462
|
-
i(
|
|
1461
|
+
i(M);
|
|
1463
1462
|
}
|
|
1464
1463
|
},
|
|
1465
|
-
[
|
|
1466
|
-
), _ =
|
|
1464
|
+
[c, u, i, o]
|
|
1465
|
+
), _ = z(() => {
|
|
1467
1466
|
o.current && (console.log("[Player][HLS] MEDIA_ATTACHED"), o.current.loadSource(e));
|
|
1468
|
-
}, [e]),
|
|
1467
|
+
}, [e]), j = z(() => {
|
|
1469
1468
|
if (!o.current) return;
|
|
1470
1469
|
console.log("[Player][HLS] MANIFEST_LOADED"), d(null), y.current && (clearTimeout(y.current), y.current = null), v.current = 0;
|
|
1471
|
-
const
|
|
1470
|
+
const T = o.current.levels, M = o.current.currentLevel, m = o.current.autoLevelEnabled;
|
|
1472
1471
|
i(
|
|
1473
1472
|
Pr({
|
|
1474
|
-
levels:
|
|
1475
|
-
const { bitrate:
|
|
1473
|
+
levels: T.map((O, G) => {
|
|
1474
|
+
const { bitrate: Z, height: H, width: b } = O;
|
|
1476
1475
|
return {
|
|
1477
|
-
bitrate:
|
|
1478
|
-
height:
|
|
1479
|
-
index:
|
|
1480
|
-
width:
|
|
1476
|
+
bitrate: Z,
|
|
1477
|
+
height: H,
|
|
1478
|
+
index: G,
|
|
1479
|
+
width: b
|
|
1481
1480
|
};
|
|
1482
1481
|
}),
|
|
1483
|
-
level:
|
|
1484
|
-
isAuto:
|
|
1482
|
+
level: M,
|
|
1483
|
+
isAuto: m
|
|
1485
1484
|
})
|
|
1486
1485
|
);
|
|
1487
|
-
}, [d, i]),
|
|
1486
|
+
}, [d, i]), N = z(
|
|
1488
1487
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1489
|
-
(
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
switch (
|
|
1488
|
+
(T, M) => {
|
|
1489
|
+
if (o.current && M.fatal) {
|
|
1490
|
+
let m, O = "UNKNOWN_ERROR";
|
|
1491
|
+
switch (M.type) {
|
|
1493
1492
|
case re.ErrorTypes.NETWORK_ERROR:
|
|
1494
|
-
|
|
1495
|
-
console.log("[Player][HLS] NETWORK_ERROR", F), t ? (v.current < g && (y.current && clearTimeout(y.current), v.current += 1, y.current = setTimeout(() => {
|
|
1493
|
+
m = n.unableToPlay, console.log("[Player][HLS] NETWORK_ERROR", M), t ? (v.current < g && (y.current && clearTimeout(y.current), v.current += 1, y.current = setTimeout(() => {
|
|
1496
1494
|
if (o.current)
|
|
1497
1495
|
try {
|
|
1498
1496
|
console.log("[Player][HLS] Retrying stream..."), o.current.loadSource(e);
|
|
1499
|
-
} catch (
|
|
1500
|
-
console.error("[Player][HLS] Retry failed:",
|
|
1497
|
+
} catch (G) {
|
|
1498
|
+
console.error("[Player][HLS] Retry failed:", G);
|
|
1501
1499
|
}
|
|
1502
|
-
},
|
|
1500
|
+
}, L)), O = "LIVE_MANIFEST_LOAD_ERROR") : (o.current.startLoad(), O = "NETWORK_ERROR"), d({ message: m, code: O, tech: "hls" });
|
|
1503
1501
|
break;
|
|
1504
1502
|
case re.ErrorTypes.MEDIA_ERROR:
|
|
1505
1503
|
o.current.recoverMediaError();
|
|
1506
1504
|
break;
|
|
1507
1505
|
}
|
|
1506
|
+
}
|
|
1508
1507
|
},
|
|
1509
|
-
[t, e, d]
|
|
1510
|
-
), R =
|
|
1511
|
-
if (!
|
|
1512
|
-
|
|
1508
|
+
[t, e, d, n]
|
|
1509
|
+
), R = z(() => {
|
|
1510
|
+
if (!l.current) return;
|
|
1511
|
+
const T = {
|
|
1513
1512
|
startLevel: -1,
|
|
1514
1513
|
maxBufferSize: 30 * 1024 * 1024
|
|
1515
1514
|
// 30MB
|
|
1516
1515
|
};
|
|
1517
|
-
or ? (
|
|
1516
|
+
or ? (T.backBufferLength = -1, T.enableWorker = !1) : t ? T.backBufferLength = 10 : T.backBufferLength = 60;
|
|
1518
1517
|
try {
|
|
1519
|
-
console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(
|
|
1520
|
-
} catch (
|
|
1521
|
-
throw new Error(`Error initializing Hls: ${
|
|
1518
|
+
console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(T)), console.log("[Player][HLS] Version", re.version), o.current = new re(T), o.current.attachMedia(l.current), o.current.on(re.Events.MEDIA_ATTACHED, _), o.current.on(re.Events.MANIFEST_LOADED, j), o.current.on(re.Events.ERROR, N);
|
|
1519
|
+
} catch (M) {
|
|
1520
|
+
throw new Error(`Error initializing Hls: ${M}`);
|
|
1522
1521
|
}
|
|
1523
1522
|
}, [
|
|
1524
|
-
|
|
1523
|
+
j,
|
|
1525
1524
|
_,
|
|
1526
|
-
|
|
1525
|
+
N,
|
|
1527
1526
|
t,
|
|
1528
|
-
|
|
1527
|
+
l,
|
|
1529
1528
|
e
|
|
1530
|
-
]),
|
|
1531
|
-
o.current && (o.current.off(re.Events.MEDIA_ATTACHED, _), o.current.off(re.Events.MANIFEST_LOADED,
|
|
1532
|
-
}, [
|
|
1529
|
+
]), I = z(() => {
|
|
1530
|
+
o.current && (o.current.off(re.Events.MEDIA_ATTACHED, _), o.current.off(re.Events.MANIFEST_LOADED, j), o.current.off(re.Events.ERROR, N), o.current.destroy(), o.current = null), y.current && (clearTimeout(y.current), y.current = null), v.current = 0;
|
|
1531
|
+
}, [j, _, N]);
|
|
1533
1532
|
return D(() => {
|
|
1534
1533
|
a !== null && k(a);
|
|
1535
|
-
}, [a, k]), D(() => (re.isSupported() && R(),
|
|
1534
|
+
}, [a, k]), D(() => (re.isSupported() && R(), I), [I, R]), null;
|
|
1536
1535
|
}
|
|
1537
|
-
const
|
|
1538
|
-
playerVideo:
|
|
1536
|
+
const Mr = "_playerVideo_wc0sm_1", Fr = {
|
|
1537
|
+
playerVideo: Mr
|
|
1539
1538
|
};
|
|
1540
1539
|
function Yt({
|
|
1541
1540
|
url: e,
|
|
1542
1541
|
isLive: t,
|
|
1543
1542
|
isMuted: n = !1,
|
|
1544
|
-
messages: o
|
|
1543
|
+
messages: o
|
|
1545
1544
|
}) {
|
|
1546
|
-
const a = f((
|
|
1547
|
-
onTimeUpdate:
|
|
1545
|
+
const a = f((m) => m.handleDurationChange), c = f((m) => m.handleEnd), u = f((m) => m.handleLoadedMetadata), i = f((m) => m.handleLoadStart), l = f((m) => m.handlePause), d = f((m) => m.handlePlay), v = f((m) => m.handlePlaying), y = f((m) => m.handleSeeked), g = f((m) => m.handleSeeking), L = f((m) => m.handleTimeUpdate), k = f((m) => m.handleWaiting), _ = f((m) => m.handleVolumeChange), j = f((m) => m.handleError), N = f((m) => m.techRef), R = V(null), I = () => t ? {
|
|
1546
|
+
onTimeUpdate: T
|
|
1548
1547
|
} : {
|
|
1549
1548
|
onDurationChange: a,
|
|
1550
1549
|
onSeeked: y,
|
|
1551
1550
|
onSeeking: g,
|
|
1552
|
-
onTimeUpdate:
|
|
1553
|
-
},
|
|
1554
|
-
(!R.current || Date.now() - R.current >= 1e3) && (
|
|
1555
|
-
},
|
|
1551
|
+
onTimeUpdate: T
|
|
1552
|
+
}, T = () => {
|
|
1553
|
+
(!R.current || Date.now() - R.current >= 1e3) && (L(), R.current = Date.now());
|
|
1554
|
+
}, M = I();
|
|
1556
1555
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1557
1556
|
/* @__PURE__ */ s.jsx(Dr, { isLive: t, url: e, messages: o }),
|
|
1558
1557
|
/* @__PURE__ */ s.jsx(
|
|
1559
1558
|
"video",
|
|
1560
|
-
|
|
1561
|
-
ref:
|
|
1562
|
-
className:
|
|
1559
|
+
P({
|
|
1560
|
+
ref: N,
|
|
1561
|
+
className: Fr.playerVideo,
|
|
1563
1562
|
playsInline: !0,
|
|
1564
1563
|
autoPlay: !0,
|
|
1565
1564
|
controls: !1,
|
|
1566
1565
|
muted: n,
|
|
1567
1566
|
preload: "auto",
|
|
1568
1567
|
crossOrigin: "anonymous",
|
|
1569
|
-
onEnded:
|
|
1570
|
-
onError:
|
|
1568
|
+
onEnded: c,
|
|
1569
|
+
onError: j,
|
|
1571
1570
|
onLoadedMetadata: u,
|
|
1572
1571
|
onLoadStart: i,
|
|
1573
|
-
onPause:
|
|
1572
|
+
onPause: l,
|
|
1574
1573
|
onPlay: d,
|
|
1575
1574
|
onPlaying: v,
|
|
1576
1575
|
onWaiting: k,
|
|
1577
1576
|
onVolumeChange: _,
|
|
1578
1577
|
tabIndex: -1
|
|
1579
|
-
},
|
|
1578
|
+
}, M)
|
|
1580
1579
|
)
|
|
1581
1580
|
] });
|
|
1582
1581
|
}
|
|
1583
|
-
function
|
|
1584
|
-
const [n, o] =
|
|
1582
|
+
function Nr({ url: e, messages: t }) {
|
|
1583
|
+
const [n, o] = X(null), a = A((u) => u.delay), c = z(async () => {
|
|
1585
1584
|
o(
|
|
1586
1585
|
a ? e.replace("-live", "-catchup").replace("playlist.m3u8", `playlist_fmp4_dvr_timeshift-${a}.m3u8`) : e
|
|
1587
1586
|
);
|
|
1588
1587
|
}, [a, e]);
|
|
1589
1588
|
return D(() => {
|
|
1590
|
-
|
|
1591
|
-
|
|
1589
|
+
const u = requestAnimationFrame(() => c());
|
|
1590
|
+
return () => cancelAnimationFrame(u);
|
|
1591
|
+
}, [c]), n ? /* @__PURE__ */ s.jsx(Yt, { url: n, isLive: !0, messages: t }) : null;
|
|
1592
1592
|
}
|
|
1593
|
-
function
|
|
1593
|
+
function Vr({ 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((
|
|
1597
|
+
const t = A((c) => c.setViewerCount), n = V(null), o = (c) => {
|
|
1598
1598
|
try {
|
|
1599
|
-
return new URL(
|
|
1599
|
+
return new URL(c).pathname.split("/").filter((d) => d.length > 0)[0] || null;
|
|
1600
1600
|
} catch (u) {
|
|
1601
1601
|
return console.error("Failed to extract URI from player URL:", u), null;
|
|
1602
1602
|
}
|
|
1603
|
-
}, a = async () => {
|
|
1604
|
-
var
|
|
1605
|
-
const
|
|
1606
|
-
if (!
|
|
1603
|
+
}, a = z(async () => {
|
|
1604
|
+
var l;
|
|
1605
|
+
const c = o(e);
|
|
1606
|
+
if (!c) {
|
|
1607
1607
|
console.error("Could not extract URI from URL:", e);
|
|
1608
1608
|
return;
|
|
1609
1609
|
}
|
|
1610
1610
|
n.current && n.current.abort(), n.current = new AbortController();
|
|
1611
|
-
const i = `https://${e.includes("staging") ? "stg" : "prd"}-fitnessanny.spectar.tv/analytics-api/v1/token-info/uri/${
|
|
1611
|
+
const i = `https://${e.includes("staging") ? "stg" : "prd"}-fitnessanny.spectar.tv/analytics-api/v1/token-info/uri/${c}`;
|
|
1612
1612
|
try {
|
|
1613
1613
|
const d = await fetch(i, {
|
|
1614
1614
|
signal: n.current.signal
|
|
1615
1615
|
});
|
|
1616
1616
|
if (!d.ok)
|
|
1617
1617
|
throw new Error(`HTTP error! status: ${d.status}`);
|
|
1618
|
-
const y = (
|
|
1618
|
+
const y = (l = (await d.json()).count) != null ? l : 0;
|
|
1619
1619
|
t(y);
|
|
1620
1620
|
} catch (d) {
|
|
1621
1621
|
if (d.name === "AbortError")
|
|
1622
1622
|
return;
|
|
1623
1623
|
console.error("Failed to fetch viewer count:", d), t(null);
|
|
1624
1624
|
}
|
|
1625
|
-
};
|
|
1625
|
+
}, [t, e]);
|
|
1626
1626
|
return D(() => (a(), () => {
|
|
1627
1627
|
n.current && n.current.abort();
|
|
1628
|
-
}), [e]),
|
|
1628
|
+
}), [a, e]), Ve(a, 15e3), null;
|
|
1629
1629
|
}
|
|
1630
1630
|
function Or(e, {
|
|
1631
1631
|
defaultValue: t = !1,
|
|
1632
1632
|
initializeWithValue: n = !0
|
|
1633
1633
|
} = {}) {
|
|
1634
|
-
const o = (i) => typeof window == "undefined" ? t : window.matchMedia(i).matches, [a,
|
|
1634
|
+
const o = (i) => typeof window == "undefined" ? t : window.matchMedia(i).matches, [a, c] = X(() => n ? o(e) : t);
|
|
1635
1635
|
function u() {
|
|
1636
|
-
|
|
1636
|
+
c(o(e));
|
|
1637
1637
|
}
|
|
1638
1638
|
return Ot(() => {
|
|
1639
1639
|
if (typeof window == "undefined")
|
|
@@ -1652,14 +1652,14 @@ const Hr = "_playbackButton_lgsgw_1", $r = "_seekIndicator_lgsgw_23", Ur = "_see
|
|
|
1652
1652
|
seekIndicatorVisible: zr
|
|
1653
1653
|
}, Wr = 10;
|
|
1654
1654
|
function Xt(i) {
|
|
1655
|
-
var
|
|
1655
|
+
var l = i, {
|
|
1656
1656
|
className: e,
|
|
1657
1657
|
onClick: t,
|
|
1658
1658
|
onForwardSeek: n,
|
|
1659
1659
|
onBackwardSeek: o,
|
|
1660
1660
|
maxForwardTime: a,
|
|
1661
|
-
maxBackwardTime:
|
|
1662
|
-
} =
|
|
1661
|
+
maxBackwardTime: c
|
|
1662
|
+
} = l, u = ne(l, [
|
|
1663
1663
|
"className",
|
|
1664
1664
|
"onClick",
|
|
1665
1665
|
"onForwardSeek",
|
|
@@ -1667,123 +1667,126 @@ function Xt(i) {
|
|
|
1667
1667
|
"maxForwardTime",
|
|
1668
1668
|
"maxBackwardTime"
|
|
1669
1669
|
]);
|
|
1670
|
-
return Or("(
|
|
1671
|
-
|
|
1672
|
-
|
|
1670
|
+
return Or("(pointer: coarse)") ? /* @__PURE__ */ s.jsx(
|
|
1671
|
+
Zr,
|
|
1672
|
+
P({
|
|
1673
1673
|
className: e,
|
|
1674
1674
|
maxForwardTime: a,
|
|
1675
|
-
maxBackwardTime:
|
|
1675
|
+
maxBackwardTime: c,
|
|
1676
1676
|
onForwardSeek: n,
|
|
1677
1677
|
onBackwardSeek: o
|
|
1678
1678
|
}, u)
|
|
1679
|
-
);
|
|
1679
|
+
) : /* @__PURE__ */ s.jsx(qr, P({ className: e, onClick: t }, u));
|
|
1680
1680
|
}
|
|
1681
|
-
function
|
|
1681
|
+
function qr(o) {
|
|
1682
1682
|
var a = o, { className: e, onClick: t } = a, n = ne(a, ["className", "onClick"]);
|
|
1683
|
-
const
|
|
1684
|
-
|
|
1683
|
+
const c = V(null), u = f((_) => _.exitFullscreen), i = f((_) => _.isFullscreen), l = f((_) => _.requestFullscreen), d = f((_) => _.resetIdle), v = (_) => {
|
|
1684
|
+
L() ? (g(), i ? u() : l()) : y(_);
|
|
1685
1685
|
}, y = (_) => {
|
|
1686
|
-
|
|
1686
|
+
c.current = window.setTimeout(() => {
|
|
1687
1687
|
t == null || t(_), g();
|
|
1688
1688
|
}, 200);
|
|
1689
1689
|
}, g = () => {
|
|
1690
|
-
|
|
1691
|
-
},
|
|
1690
|
+
c.current !== null && (window.clearTimeout(c.current), c.current = null);
|
|
1691
|
+
}, L = () => c.current !== null, k = () => {
|
|
1692
1692
|
d();
|
|
1693
1693
|
};
|
|
1694
1694
|
return D(() => () => {
|
|
1695
1695
|
g();
|
|
1696
1696
|
}, []), /* @__PURE__ */ s.jsx(
|
|
1697
1697
|
"button",
|
|
1698
|
-
|
|
1698
|
+
P({
|
|
1699
1699
|
onClick: v,
|
|
1700
|
-
|
|
1700
|
+
onMouseMove: k,
|
|
1701
1701
|
className: [me.playbackButton, e].filter(Boolean).join(" "),
|
|
1702
1702
|
"aria-label": "Player gestures"
|
|
1703
1703
|
}, n)
|
|
1704
1704
|
);
|
|
1705
1705
|
}
|
|
1706
|
-
function
|
|
1706
|
+
function Zr(u) {
|
|
1707
1707
|
var i = u, {
|
|
1708
1708
|
className: e,
|
|
1709
1709
|
maxForwardTime: t,
|
|
1710
1710
|
maxBackwardTime: n,
|
|
1711
1711
|
onForwardSeek: o,
|
|
1712
1712
|
onBackwardSeek: a
|
|
1713
|
-
} = i,
|
|
1713
|
+
} = i, c = ne(i, [
|
|
1714
1714
|
"className",
|
|
1715
1715
|
"maxForwardTime",
|
|
1716
1716
|
"maxBackwardTime",
|
|
1717
1717
|
"onForwardSeek",
|
|
1718
1718
|
"onBackwardSeek"
|
|
1719
1719
|
]);
|
|
1720
|
-
const
|
|
1720
|
+
const l = V(null), d = V({
|
|
1721
1721
|
single: null,
|
|
1722
1722
|
indicator: null,
|
|
1723
1723
|
accumulate: null
|
|
1724
|
-
}), v =
|
|
1724
|
+
}), v = V(null), y = V(0), g = V(null), [L, k] = X({ visible: !1, direction: null, time: 0 }), _ = f((m) => m.isIdle), j = f((m) => m.setIsIdle), N = f((m) => m.resetIdle), R = (m, O) => m < O / 2 ? "backward" : "forward", I = (m) => {
|
|
1725
1725
|
if (!v.current) return;
|
|
1726
|
-
const
|
|
1727
|
-
if (!
|
|
1728
|
-
const
|
|
1729
|
-
if (
|
|
1726
|
+
const O = m.changedTouches[0];
|
|
1727
|
+
if (!O) return;
|
|
1728
|
+
const G = Date.now(), Z = v.current.getBoundingClientRect(), H = O.clientX - Z.left, b = O.clientY - Z.top;
|
|
1729
|
+
if (H < 0 || H > Z.width || b < 0 || b > Z.height)
|
|
1730
1730
|
return;
|
|
1731
|
-
const Q =
|
|
1732
|
-
if (Q !== null && g.current === null && K < 300 && Math.abs(
|
|
1733
|
-
|
|
1734
|
-
const te =
|
|
1731
|
+
const Q = l.current, K = Q ? G - Q.time : 1 / 0, W = R(H, Z.width), oe = g.current !== null && g.current === W && Q !== null && K < 700 && Math.abs(H - Q.x) < 100;
|
|
1732
|
+
if (Q !== null && g.current === null && K < 300 && Math.abs(H - Q.x) < 50 || oe) {
|
|
1733
|
+
m.preventDefault(), m.stopPropagation(), d.current.single && (window.clearTimeout(d.current.single), d.current.single = null), N(), (g.current === null || g.current !== W) && (y.current = 0, g.current = W);
|
|
1734
|
+
const te = W === "backward" ? n : t;
|
|
1735
1735
|
y.current = Math.min(
|
|
1736
1736
|
y.current + Wr,
|
|
1737
1737
|
te != null ? te : 1 / 0
|
|
1738
|
-
),
|
|
1738
|
+
), T(W, 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),
|
|
1741
|
-
}, 500),
|
|
1740
|
+
q > 0 && (g.current === "backward" ? a == null || a(q) : o == null || o(q), N()), y.current = 0, g.current = null, l.current = null, M(), d.current.accumulate = null;
|
|
1741
|
+
}, 500), l.current = { time: G, x: H };
|
|
1742
1742
|
} else {
|
|
1743
|
-
|
|
1743
|
+
l.current = { time: G, x: H }, d.current.single && window.clearTimeout(d.current.single);
|
|
1744
1744
|
const te = g.current !== null ? 700 : 350;
|
|
1745
1745
|
d.current.single = window.setTimeout(() => {
|
|
1746
1746
|
if (g.current === null) {
|
|
1747
1747
|
d.current.single = null;
|
|
1748
1748
|
const q = _;
|
|
1749
|
-
|
|
1749
|
+
j(!q), q && N();
|
|
1750
1750
|
}
|
|
1751
|
-
|
|
1751
|
+
l.current = null;
|
|
1752
1752
|
}, te);
|
|
1753
1753
|
}
|
|
1754
|
-
},
|
|
1755
|
-
|
|
1756
|
-
|
|
1754
|
+
}, T = (m, O) => {
|
|
1755
|
+
O !== 0 && (k({ visible: !0, direction: m, time: O }), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.indicator = window.setTimeout(() => {
|
|
1756
|
+
M();
|
|
1757
1757
|
}, 700));
|
|
1758
|
-
},
|
|
1758
|
+
}, M = () => {
|
|
1759
1759
|
k({ visible: !1, direction: null, time: 0 }), d.current.indicator && (window.clearTimeout(d.current.indicator), d.current.indicator = null);
|
|
1760
1760
|
};
|
|
1761
|
-
return D(() =>
|
|
1762
|
-
|
|
1761
|
+
return D(() => {
|
|
1762
|
+
const m = d.current;
|
|
1763
|
+
return () => {
|
|
1764
|
+
m != null && m.single && window.clearTimeout(m.single), m != null && m.indicator && window.clearTimeout(m.indicator), m != null && m.accumulate && window.clearTimeout(m.accumulate);
|
|
1765
|
+
};
|
|
1763
1766
|
}, []), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1764
1767
|
/* @__PURE__ */ s.jsx(
|
|
1765
1768
|
"button",
|
|
1766
|
-
|
|
1769
|
+
P({
|
|
1767
1770
|
ref: v,
|
|
1768
|
-
onTouchEnd:
|
|
1771
|
+
onTouchEnd: I,
|
|
1769
1772
|
className: [me.playbackButton, e].filter(Boolean).join(" "),
|
|
1770
1773
|
"aria-label": "Player gestures"
|
|
1771
|
-
},
|
|
1774
|
+
}, c)
|
|
1772
1775
|
),
|
|
1773
|
-
|
|
1776
|
+
L.visible && /* @__PURE__ */ s.jsxs(
|
|
1774
1777
|
"div",
|
|
1775
1778
|
{
|
|
1776
|
-
className: `${me.seekIndicator} ${me.seekIndicatorVisible} ${
|
|
1779
|
+
className: `${me.seekIndicator} ${me.seekIndicatorVisible} ${L.direction === "backward" ? me.seekIndicatorLeft : me.seekIndicatorRight}`,
|
|
1777
1780
|
children: [
|
|
1778
|
-
|
|
1779
|
-
_e(
|
|
1781
|
+
L.direction === "backward" ? "-" : "+",
|
|
1782
|
+
_e(L.time)
|
|
1780
1783
|
]
|
|
1781
1784
|
}
|
|
1782
1785
|
)
|
|
1783
1786
|
] });
|
|
1784
1787
|
}
|
|
1785
1788
|
function Kr() {
|
|
1786
|
-
const e = f((
|
|
1789
|
+
const e = f((l) => l.isPlaying), t = f((l) => l.pause), n = f((l) => l.getPauseTimeDiff), o = f((l) => l.play), a = A((l) => l.delay), c = A((l) => l.setDelay), u = A((l) => l.startDate), i = u ? u.getTime() : 0;
|
|
1787
1790
|
return /* @__PURE__ */ s.jsx(
|
|
1788
1791
|
Xt,
|
|
1789
1792
|
{
|
|
@@ -1791,17 +1794,17 @@ function Kr() {
|
|
|
1791
1794
|
if (e)
|
|
1792
1795
|
t();
|
|
1793
1796
|
else {
|
|
1794
|
-
const
|
|
1795
|
-
|
|
1797
|
+
const l = n();
|
|
1798
|
+
l && c(a + l), o();
|
|
1796
1799
|
}
|
|
1797
1800
|
},
|
|
1798
|
-
onBackwardSeek: (
|
|
1799
|
-
const d = a +
|
|
1800
|
-
|
|
1801
|
+
onBackwardSeek: (l) => {
|
|
1802
|
+
const d = a + l;
|
|
1803
|
+
c(d);
|
|
1801
1804
|
},
|
|
1802
|
-
onForwardSeek: (
|
|
1803
|
-
const d = Math.max(0, a -
|
|
1804
|
-
|
|
1805
|
+
onForwardSeek: (l) => {
|
|
1806
|
+
const d = Math.max(0, a - l);
|
|
1807
|
+
c(d);
|
|
1805
1808
|
},
|
|
1806
1809
|
maxBackwardTime: Math.floor(i),
|
|
1807
1810
|
maxForwardTime: Math.floor(a)
|
|
@@ -1811,11 +1814,11 @@ function Kr() {
|
|
|
1811
1814
|
const Yr = "_playerButton_izwqq_1", Xr = "_playerButtonCircle_izwqq_42", _t = {
|
|
1812
1815
|
playerButton: Yr,
|
|
1813
1816
|
playerButtonCircle: Xr
|
|
1814
|
-
}, le =
|
|
1817
|
+
}, le = Ne(
|
|
1815
1818
|
(a, o) => {
|
|
1816
|
-
var
|
|
1819
|
+
var c = a, { shape: e = "circle", className: t } = c, n = ne(c, ["shape", "className"]);
|
|
1817
1820
|
const u = e === "circle" ? _t.playerButtonCircle : "", i = [_t.playerButton, u, t].filter(Boolean).join(" ");
|
|
1818
|
-
return /* @__PURE__ */ s.jsx("button",
|
|
1821
|
+
return /* @__PURE__ */ s.jsx("button", P({ ref: o, className: i }, n));
|
|
1819
1822
|
}
|
|
1820
1823
|
);
|
|
1821
1824
|
le.displayName = "PlayerButton";
|
|
@@ -1826,10 +1829,10 @@ const Gr = "_liveIndicator_1jczn_1", Jr = "_liveIndicatorHasDelay_1jczn_9", Qr =
|
|
|
1826
1829
|
};
|
|
1827
1830
|
function eo(n) {
|
|
1828
1831
|
var o = n, { message: e } = o, t = ne(o, ["message"]);
|
|
1829
|
-
const a = A((
|
|
1830
|
-
a &&
|
|
1832
|
+
const a = A((l) => l.delay), c = A((l) => l.setDelay), u = () => {
|
|
1833
|
+
a && c(0);
|
|
1831
1834
|
}, i = a ? `${Ie.liveIndicator} ${Ie.liveIndicatorHasDelay}` : `${Ie.liveIndicator} ${Ie.liveIndicatorNoDelay}`;
|
|
1832
|
-
return /* @__PURE__ */ s.jsxs(le, he(
|
|
1835
|
+
return /* @__PURE__ */ s.jsxs(le, he(P({ onClick: u, shape: "square" }, t), { children: [
|
|
1833
1836
|
/* @__PURE__ */ s.jsx("div", { className: i }),
|
|
1834
1837
|
e || "Live"
|
|
1835
1838
|
] }));
|
|
@@ -1857,12 +1860,12 @@ function Jt() {
|
|
|
1857
1860
|
);
|
|
1858
1861
|
}
|
|
1859
1862
|
function to() {
|
|
1860
|
-
const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), o = f((i) => i.play), a = A((i) => i.delay),
|
|
1863
|
+
const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), o = f((i) => i.play), a = A((i) => i.delay), c = A((i) => i.setDelay), u = () => {
|
|
1861
1864
|
if (e)
|
|
1862
1865
|
t();
|
|
1863
1866
|
else {
|
|
1864
1867
|
const i = n();
|
|
1865
|
-
i &&
|
|
1868
|
+
i && c(a + i), o();
|
|
1866
1869
|
}
|
|
1867
1870
|
};
|
|
1868
1871
|
return /* @__PURE__ */ s.jsx(le, { onClick: u, children: e ? /* @__PURE__ */ s.jsx(Gt, {}) : /* @__PURE__ */ s.jsx(Jt, {}) });
|
|
@@ -1878,11 +1881,11 @@ const no = "_progressSlider_hwzgf_1", ro = "_tipContainer_hwzgf_7", oo = "_tipCo
|
|
|
1878
1881
|
sliderTrack: lo,
|
|
1879
1882
|
sliderRange: co,
|
|
1880
1883
|
sliderThumb: uo
|
|
1881
|
-
}, Ae =
|
|
1882
|
-
var u =
|
|
1884
|
+
}, Ae = Ne((c, a) => {
|
|
1885
|
+
var u = c, { max: e = 100, min: t = 0, className: n } = u, o = ne(u, ["max", "min", "className"]);
|
|
1883
1886
|
return /* @__PURE__ */ s.jsxs(
|
|
1884
1887
|
je.Root,
|
|
1885
|
-
he(
|
|
1888
|
+
he(P({
|
|
1886
1889
|
ref: a,
|
|
1887
1890
|
min: t,
|
|
1888
1891
|
max: e,
|
|
@@ -1902,7 +1905,7 @@ const no = "_progressSlider_hwzgf_1", ro = "_tipContainer_hwzgf_7", oo = "_tipCo
|
|
|
1902
1905
|
);
|
|
1903
1906
|
});
|
|
1904
1907
|
Ae.displayName = "PlayerSlider";
|
|
1905
|
-
function
|
|
1908
|
+
function Fe(e) {
|
|
1906
1909
|
const t = e.getBoundingClientRect();
|
|
1907
1910
|
return e.offsetWidth / e.offsetHeight > e.clientWidth / e.clientHeight ? {
|
|
1908
1911
|
left: t.left * 100,
|
|
@@ -1913,47 +1916,48 @@ function Me(e) {
|
|
|
1913
1916
|
height: t.height * 100
|
|
1914
1917
|
} : t;
|
|
1915
1918
|
}
|
|
1916
|
-
const
|
|
1919
|
+
const xt = "vod-player-progress-bar";
|
|
1917
1920
|
function fo() {
|
|
1918
|
-
const e =
|
|
1919
|
-
o(
|
|
1920
|
-
}, [g, _, k]),
|
|
1921
|
+
const e = V(null), t = V(null), [n, o] = X(0), [a, c] = X(0), [u, i] = X(!1), [l, d] = X(-1), [v, y] = X(-1), g = A((b) => b.delay), L = A((b) => b.startDate), k = L ? L.getTime() : 0, _ = (/* @__PURE__ */ new Date()).getTime(), j = A((b) => b.setDelay), N = f((b) => b.isPlaying), R = f((b) => b.addIdleLock), I = f((b) => b.removeIdleLock), T = z(() => {
|
|
1922
|
+
o(qt(k, g)), c(Sr(k, _));
|
|
1923
|
+
}, [g, _, k]), M = parseFloat(
|
|
1921
1924
|
(a ? (v !== -1 ? v : n) / a * 100 : 0).toFixed(1)
|
|
1922
|
-
),
|
|
1923
|
-
y(a * (
|
|
1924
|
-
},
|
|
1925
|
+
), m = (b) => {
|
|
1926
|
+
y(a * (b[0] / 100)), R(xt);
|
|
1927
|
+
}, O = () => {
|
|
1925
1928
|
if (v !== -1) {
|
|
1926
|
-
const
|
|
1927
|
-
|
|
1929
|
+
const b = Wt(k, v);
|
|
1930
|
+
j(b), y(-1), I(xt);
|
|
1928
1931
|
}
|
|
1929
|
-
},
|
|
1930
|
-
(
|
|
1932
|
+
}, G = () => i(!0), Z = () => i(!1), H = z(
|
|
1933
|
+
(b) => {
|
|
1931
1934
|
const Q = e.current, K = t.current;
|
|
1932
1935
|
if (Q && K) {
|
|
1933
|
-
const
|
|
1936
|
+
const W = Fe(Q), oe = Fe(K), ue = (b.pageX || b.clientX) - W.left, te = ue / W.width;
|
|
1934
1937
|
if (te < 0) return;
|
|
1935
1938
|
let q = ue - oe.width / 2;
|
|
1936
|
-
q < 0 && (q = 0), q >
|
|
1939
|
+
q < 0 && (q = 0), q > W.width - oe.width && (q = -1), K.style.left = q > -1 ? `${q}px` : "auto", K.style.right = q > -1 ? "auto" : "0px";
|
|
1937
1940
|
const ve = a - te * a;
|
|
1938
1941
|
d(ve > 0 ? ve : 0);
|
|
1939
1942
|
}
|
|
1940
|
-
|
|
1943
|
+
G();
|
|
1941
1944
|
},
|
|
1942
1945
|
[a]
|
|
1943
1946
|
);
|
|
1944
|
-
return
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
+
return Ve(() => T(), N ? 1e3 : null), D(() => {
|
|
1948
|
+
const b = requestAnimationFrame(() => T());
|
|
1949
|
+
return () => cancelAnimationFrame(b);
|
|
1950
|
+
}, [T]), /* @__PURE__ */ s.jsxs("div", { className: se.progressSlider, children: [
|
|
1947
1951
|
/* @__PURE__ */ s.jsx(
|
|
1948
1952
|
Ae,
|
|
1949
1953
|
{
|
|
1950
1954
|
ref: e,
|
|
1951
|
-
value: [
|
|
1952
|
-
onPointerLeave:
|
|
1953
|
-
onPointerDown:
|
|
1954
|
-
onPointerMove:
|
|
1955
|
-
onValueChange:
|
|
1956
|
-
onValueCommit:
|
|
1955
|
+
value: [M],
|
|
1956
|
+
onPointerLeave: Z,
|
|
1957
|
+
onPointerDown: Z,
|
|
1958
|
+
onPointerMove: H,
|
|
1959
|
+
onValueChange: m,
|
|
1960
|
+
onValueCommit: O,
|
|
1957
1961
|
step: 0.1
|
|
1958
1962
|
}
|
|
1959
1963
|
),
|
|
@@ -1962,7 +1966,7 @@ function fo() {
|
|
|
1962
1966
|
{
|
|
1963
1967
|
ref: t,
|
|
1964
1968
|
className: `${se.tipContainer} ${u ? se.tipContainerVisible : se.tipContainerHidden}`,
|
|
1965
|
-
children: /* @__PURE__ */ s.jsx("p", { className: se.tipContent, children: `-${_e(
|
|
1969
|
+
children: /* @__PURE__ */ s.jsx("p", { className: se.tipContent, children: `-${_e(l)}` })
|
|
1966
1970
|
}
|
|
1967
1971
|
)
|
|
1968
1972
|
] });
|
|
@@ -2034,10 +2038,10 @@ function Qt() {
|
|
|
2034
2038
|
}
|
|
2035
2039
|
);
|
|
2036
2040
|
}
|
|
2037
|
-
const
|
|
2038
|
-
playerContainer:
|
|
2041
|
+
const To = "_playerContainer_146tx_1", _o = "_controlsTop_146tx_12", xo = "_controlsBottom_146tx_29", Co = "_controlsContainer_146tx_45", Eo = "_controlsRow_146tx_61", Ro = "_controlsSection_146tx_68", bo = "_controlsSectionStart_146tx_78", So = "_controlsSectionEnd_146tx_82", B = {
|
|
2042
|
+
playerContainer: To,
|
|
2039
2043
|
controlsTop: _o,
|
|
2040
|
-
controlsBottom:
|
|
2044
|
+
controlsBottom: xo,
|
|
2041
2045
|
controlsContainer: Co,
|
|
2042
2046
|
controlsRow: Eo,
|
|
2043
2047
|
controlsSection: Ro,
|
|
@@ -2067,12 +2071,12 @@ function Po() {
|
|
|
2067
2071
|
);
|
|
2068
2072
|
}
|
|
2069
2073
|
function en() {
|
|
2070
|
-
const e = f((d) => d.containerRef), t = f((d) => d.exitFullscreen), n = f((d) => d.isFullscreen), o = f((d) => d.requestFullscreen), a = f((d) => d.setIsFullscreen),
|
|
2074
|
+
const e = f((d) => d.containerRef), t = f((d) => d.exitFullscreen), n = f((d) => d.isFullscreen), o = f((d) => d.requestFullscreen), a = f((d) => d.setIsFullscreen), c = f((d) => d.setIsFullscreenReady), u = f((d) => d.techRef), i = z(
|
|
2071
2075
|
(d) => {
|
|
2072
2076
|
d.stopPropagation(), a(ir());
|
|
2073
2077
|
},
|
|
2074
2078
|
[a]
|
|
2075
|
-
),
|
|
2079
|
+
), l = () => {
|
|
2076
2080
|
n ? t() : o();
|
|
2077
2081
|
};
|
|
2078
2082
|
return D(() => {
|
|
@@ -2080,23 +2084,23 @@ function en() {
|
|
|
2080
2084
|
if (d)
|
|
2081
2085
|
return lr(d, i);
|
|
2082
2086
|
}, [e, i, u]), D(() => {
|
|
2083
|
-
|
|
2084
|
-
}, [
|
|
2087
|
+
c(!0);
|
|
2088
|
+
}, [c]), /* @__PURE__ */ s.jsx(le, { onClick: l, children: n ? /* @__PURE__ */ s.jsx(Po, {}) : /* @__PURE__ */ s.jsx(jo, {}) });
|
|
2085
2089
|
}
|
|
2086
|
-
const Lo = "_idleCheckContainer_crh2s_1", Io = "_idleCheckContainerIdle_crh2s_5", ko = "_idleCheckContainerActive_crh2s_11",
|
|
2090
|
+
const Lo = "_idleCheckContainer_crh2s_1", Io = "_idleCheckContainerIdle_crh2s_5", ko = "_idleCheckContainerActive_crh2s_11", Ze = {
|
|
2087
2091
|
idleCheckContainer: Lo,
|
|
2088
2092
|
idleCheckContainerIdle: Io,
|
|
2089
2093
|
idleCheckContainerActive: ko
|
|
2090
2094
|
}, Do = 5 * 1e3;
|
|
2091
2095
|
function tn({ children: e }) {
|
|
2092
|
-
const t =
|
|
2096
|
+
const t = V(null), n = f((g) => g.isIdle), o = f((g) => g.setIsIdle), a = V(null), u = f((g) => g.idleLocks).size, i = f((g) => g.eventEmitter), l = z(() => {
|
|
2093
2097
|
a.current !== null && (window.clearTimeout(a.current), a.current = null);
|
|
2094
|
-
}, []), d =
|
|
2095
|
-
|
|
2096
|
-
}, [
|
|
2098
|
+
}, []), d = z(() => {
|
|
2099
|
+
l(), a.current = window.setTimeout(() => o(!0), Do);
|
|
2100
|
+
}, [l, o]);
|
|
2097
2101
|
D(() => (o(!1), d(), () => {
|
|
2098
|
-
|
|
2099
|
-
}), [
|
|
2102
|
+
l();
|
|
2103
|
+
}), [l, o, d]), D(() => {
|
|
2100
2104
|
const g = () => {
|
|
2101
2105
|
o(!1), d();
|
|
2102
2106
|
};
|
|
@@ -2104,17 +2108,17 @@ function tn({ children: e }) {
|
|
|
2104
2108
|
i.off("resetIdle", g);
|
|
2105
2109
|
};
|
|
2106
2110
|
}, [i, o, d]);
|
|
2107
|
-
const v = n && !u, y = `${
|
|
2111
|
+
const v = n && !u, y = `${Ze.idleCheckContainer} ${v ? Ze.idleCheckContainerIdle : Ze.idleCheckContainerActive}`;
|
|
2108
2112
|
return /* @__PURE__ */ s.jsx("div", { ref: t, className: y, children: e });
|
|
2109
2113
|
}
|
|
2110
|
-
const
|
|
2111
|
-
spinner:
|
|
2114
|
+
const Mo = "_spinner_oo4hi_10", Fo = {
|
|
2115
|
+
spinner: Mo
|
|
2112
2116
|
};
|
|
2113
|
-
function
|
|
2114
|
-
return /* @__PURE__ */ s.jsx("div",
|
|
2117
|
+
function No(e) {
|
|
2118
|
+
return /* @__PURE__ */ s.jsx("div", P({ className: Fo.spinner }, e));
|
|
2115
2119
|
}
|
|
2116
|
-
function
|
|
2117
|
-
const [n, o] =
|
|
2120
|
+
function Vo(e, t = 500) {
|
|
2121
|
+
const [n, o] = X(e);
|
|
2118
2122
|
return D(() => {
|
|
2119
2123
|
const a = window.setTimeout(() => o(e), t);
|
|
2120
2124
|
return () => {
|
|
@@ -2128,7 +2132,7 @@ const Ao = "_loadingContainer_v9v7r_1", Oo = {
|
|
|
2128
2132
|
function nn(n) {
|
|
2129
2133
|
var o = n, { style: e } = o, t = ne(o, ["style"]);
|
|
2130
2134
|
const a = f((u) => u.isLoading);
|
|
2131
|
-
return
|
|
2135
|
+
return Vo(a, 100) ? /* @__PURE__ */ s.jsx("div", he(P({ className: Oo.loadingContainer, style: e }, t), { children: /* @__PURE__ */ s.jsx(No, {}) })) : null;
|
|
2132
2136
|
}
|
|
2133
2137
|
function Ho() {
|
|
2134
2138
|
return /* @__PURE__ */ s.jsx(
|
|
@@ -2152,18 +2156,18 @@ function $o() {
|
|
|
2152
2156
|
}
|
|
2153
2157
|
);
|
|
2154
2158
|
}
|
|
2155
|
-
const Uo = "_dropdownMenuContent_b7j6b_1", Bo = "_dropdownMenuItem_b7j6b_83", zo = "_scrollAreaRoot_b7j6b_125", Wo = "_scrollAreaViewport_b7j6b_133",
|
|
2159
|
+
const Uo = "_dropdownMenuContent_b7j6b_1", Bo = "_dropdownMenuItem_b7j6b_83", zo = "_scrollAreaRoot_b7j6b_125", Wo = "_scrollAreaViewport_b7j6b_133", qo = "_scrollAreaScrollbar_b7j6b_141", Zo = "_scrollAreaThumb_b7j6b_168", pe = {
|
|
2156
2160
|
dropdownMenuContent: Uo,
|
|
2157
2161
|
dropdownMenuItem: Bo,
|
|
2158
2162
|
scrollAreaRoot: zo,
|
|
2159
2163
|
scrollAreaViewport: Wo,
|
|
2160
|
-
scrollAreaScrollbar:
|
|
2161
|
-
scrollAreaThumb:
|
|
2162
|
-
}, Ko =
|
|
2163
|
-
var u =
|
|
2164
|
+
scrollAreaScrollbar: qo,
|
|
2165
|
+
scrollAreaThumb: Zo
|
|
2166
|
+
}, Ko = xe.Root, Yo = xe.Trigger, Xo = xe.Portal, rn = Ne((c, a) => {
|
|
2167
|
+
var u = c, { sideOffset: e = 4, className: t, children: n } = u, o = ne(u, ["sideOffset", "className", "children"]);
|
|
2164
2168
|
return /* @__PURE__ */ s.jsx(
|
|
2165
|
-
|
|
2166
|
-
he(
|
|
2169
|
+
xe.Content,
|
|
2170
|
+
he(P({
|
|
2167
2171
|
ref: a,
|
|
2168
2172
|
sideOffset: e,
|
|
2169
2173
|
className: [pe.dropdownMenuContent, t].filter(Boolean).join(" "),
|
|
@@ -2197,16 +2201,16 @@ const Uo = "_dropdownMenuContent_b7j6b_1", Bo = "_dropdownMenuItem_b7j6b_83", zo
|
|
|
2197
2201
|
);
|
|
2198
2202
|
});
|
|
2199
2203
|
rn.displayName = "PlayerMenuContent";
|
|
2200
|
-
const on =
|
|
2201
|
-
var
|
|
2202
|
-
const u = (
|
|
2203
|
-
t == null || t(
|
|
2204
|
-
}, i = (
|
|
2205
|
-
(
|
|
2204
|
+
const on = Ne((a, o) => {
|
|
2205
|
+
var c = a, { className: e, onClick: t } = c, n = ne(c, ["className", "onClick"]);
|
|
2206
|
+
const u = (l) => {
|
|
2207
|
+
t == null || t(l);
|
|
2208
|
+
}, i = (l) => {
|
|
2209
|
+
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), t == null || t(l));
|
|
2206
2210
|
};
|
|
2207
|
-
return /* @__PURE__ */ s.jsx(
|
|
2211
|
+
return /* @__PURE__ */ s.jsx(xe.Close, { asChild: !0, children: /* @__PURE__ */ s.jsx(
|
|
2208
2212
|
"div",
|
|
2209
|
-
|
|
2213
|
+
P({
|
|
2210
2214
|
ref: o,
|
|
2211
2215
|
className: [pe.dropdownMenuItem, e].filter(Boolean).join(" "),
|
|
2212
2216
|
role: "menuitem",
|
|
@@ -2219,24 +2223,24 @@ const on = Ve((a, o) => {
|
|
|
2219
2223
|
on.displayName = "PlayerMenuItem";
|
|
2220
2224
|
const Ct = "settings";
|
|
2221
2225
|
function sn() {
|
|
2222
|
-
const [e, t] =
|
|
2223
|
-
(
|
|
2224
|
-
t(
|
|
2226
|
+
const [e, t] = X(!1), n = f((l) => l.containerRef), o = f((l) => l.addIdleLock), a = f((l) => l.removeIdleLock), c = f((l) => l.levels), u = f((l) => l.setLevel), i = z(
|
|
2227
|
+
(l) => {
|
|
2228
|
+
t(l), l ? o(Ct) : a(Ct);
|
|
2225
2229
|
},
|
|
2226
2230
|
[o, a]
|
|
2227
2231
|
);
|
|
2228
2232
|
return /* @__PURE__ */ s.jsxs(Ko, { open: e, onOpenChange: i, children: [
|
|
2229
2233
|
/* @__PURE__ */ s.jsx(Yo, { asChild: !0, children: /* @__PURE__ */ s.jsx(le, { children: /* @__PURE__ */ s.jsx($o, {}) }) }),
|
|
2230
|
-
/* @__PURE__ */ s.jsx(Xo, { container: n.current, children: /* @__PURE__ */ s.jsx(rn, { side: "top", align: "end", children:
|
|
2234
|
+
/* @__PURE__ */ s.jsx(Xo, { container: n.current, children: /* @__PURE__ */ s.jsx(rn, { side: "top", align: "end", children: c == null ? void 0 : c.map((l) => /* @__PURE__ */ s.jsxs(
|
|
2231
2235
|
on,
|
|
2232
2236
|
{
|
|
2233
|
-
onClick: () => u(
|
|
2237
|
+
onClick: () => u(l.value),
|
|
2234
2238
|
children: [
|
|
2235
|
-
|
|
2236
|
-
|
|
2239
|
+
l.label,
|
|
2240
|
+
l.selected && /* @__PURE__ */ s.jsx(Ho, {})
|
|
2237
2241
|
]
|
|
2238
2242
|
},
|
|
2239
|
-
|
|
2243
|
+
l.sid
|
|
2240
2244
|
)) }) })
|
|
2241
2245
|
] });
|
|
2242
2246
|
}
|
|
@@ -2280,7 +2284,7 @@ const ei = "_volumeContainer_4d6jg_1", ti = "_volumeSlider_4d6jg_8", Et = {
|
|
|
2280
2284
|
function an() {
|
|
2281
2285
|
const e = f((i) => i.setVolume), t = f((i) => i.volume), n = f((i) => i.addIdleLock), o = f((i) => i.removeIdleLock), a = (i) => {
|
|
2282
2286
|
e(i[0]), n(Rt);
|
|
2283
|
-
},
|
|
2287
|
+
}, c = () => {
|
|
2284
2288
|
o(Rt);
|
|
2285
2289
|
}, u = () => e(t ? 0 : 100);
|
|
2286
2290
|
return /* @__PURE__ */ s.jsxs("div", { className: Et.volumeContainer, children: [
|
|
@@ -2290,19 +2294,24 @@ function an() {
|
|
|
2290
2294
|
{
|
|
2291
2295
|
value: [t],
|
|
2292
2296
|
onValueChange: a,
|
|
2293
|
-
onValueCommit:
|
|
2297
|
+
onValueCommit: c
|
|
2294
2298
|
}
|
|
2295
2299
|
) })
|
|
2296
2300
|
] });
|
|
2297
2301
|
}
|
|
2298
|
-
const ni = "0.0.
|
|
2302
|
+
const ni = "0.0.50", ln = {
|
|
2299
2303
|
version: ni
|
|
2300
2304
|
};
|
|
2301
2305
|
function wi(e) {
|
|
2302
|
-
return /* @__PURE__ */ s.jsx(kr, { children: /* @__PURE__ */ s.jsx(ri,
|
|
2303
|
-
}
|
|
2304
|
-
function ri({ url: e, messages: t, onEvent: n }) {
|
|
2305
|
-
|
|
2306
|
+
return /* @__PURE__ */ s.jsx(kr, { children: /* @__PURE__ */ s.jsx(ri, P({}, e)) });
|
|
2307
|
+
}
|
|
2308
|
+
function ri({ url: e, messages: t = {}, onEvent: n }) {
|
|
2309
|
+
var c, u, i, l;
|
|
2310
|
+
const o = f((d) => d.containerRef), a = {
|
|
2311
|
+
eventNotStarted: "Event has not started yet.",
|
|
2312
|
+
eventStartingSoon: "Starting in few seconds...",
|
|
2313
|
+
unableToPlay: "Unable to play the live stream. Please try again later."
|
|
2314
|
+
};
|
|
2306
2315
|
return D(() => {
|
|
2307
2316
|
console.log(`[Player][Live] Version: ${ln.version}`);
|
|
2308
2317
|
}, []), /* @__PURE__ */ s.jsxs(
|
|
@@ -2316,18 +2325,17 @@ function ri({ url: e, messages: t, onEvent: n }) {
|
|
|
2316
2325
|
{
|
|
2317
2326
|
url: e,
|
|
2318
2327
|
messages: {
|
|
2319
|
-
eventNotStarted: t == null ? void 0 : t.eventNotStarted,
|
|
2320
|
-
eventStartingSoon: t == null ? void 0 : t.eventStartingSoon,
|
|
2321
|
-
unableToPlay: t == null ? void 0 : t.unableToPlay
|
|
2328
|
+
eventNotStarted: (c = t == null ? void 0 : t.eventNotStarted) != null ? c : a.eventNotStarted,
|
|
2329
|
+
eventStartingSoon: (u = t == null ? void 0 : t.eventStartingSoon) != null ? u : a.eventStartingSoon,
|
|
2330
|
+
unableToPlay: (i = t == null ? void 0 : t.unableToPlay) != null ? i : a.unableToPlay
|
|
2322
2331
|
},
|
|
2323
2332
|
children: [
|
|
2324
2333
|
/* @__PURE__ */ s.jsx(
|
|
2325
|
-
|
|
2334
|
+
Nr,
|
|
2326
2335
|
{
|
|
2327
2336
|
url: e,
|
|
2328
2337
|
messages: {
|
|
2329
|
-
|
|
2330
|
-
unableToPlay: t == null ? void 0 : t.unableToPlay
|
|
2338
|
+
unableToPlay: (l = t == null ? void 0 : t.unableToPlay) != null ? l : a.unableToPlay
|
|
2331
2339
|
}
|
|
2332
2340
|
}
|
|
2333
2341
|
),
|
|
@@ -2368,14 +2376,14 @@ function ri({ url: e, messages: t, onEvent: n }) {
|
|
|
2368
2376
|
}
|
|
2369
2377
|
),
|
|
2370
2378
|
/* @__PURE__ */ s.jsx(Ir, {}),
|
|
2371
|
-
/* @__PURE__ */ s.jsx(
|
|
2379
|
+
/* @__PURE__ */ s.jsx(Vr, { url: e }),
|
|
2372
2380
|
n && /* @__PURE__ */ s.jsx(Lr, { callback: n })
|
|
2373
2381
|
]
|
|
2374
2382
|
}
|
|
2375
2383
|
);
|
|
2376
2384
|
}
|
|
2377
2385
|
function oi() {
|
|
2378
|
-
const e = f((u) => u.isPlaying), t = f((u) => u.pause), n = f((u) => u.play), o = f((u) => u.currentTime), a = f((u) => u.duration),
|
|
2386
|
+
const e = f((u) => u.isPlaying), t = f((u) => u.pause), n = f((u) => u.play), o = f((u) => u.currentTime), a = f((u) => u.duration), c = f((u) => u.seek);
|
|
2379
2387
|
return /* @__PURE__ */ s.jsx(
|
|
2380
2388
|
Xt,
|
|
2381
2389
|
{
|
|
@@ -2384,11 +2392,11 @@ function oi() {
|
|
|
2384
2392
|
},
|
|
2385
2393
|
onBackwardSeek: (u) => {
|
|
2386
2394
|
const i = Math.max(0, o - u);
|
|
2387
|
-
|
|
2395
|
+
c(i);
|
|
2388
2396
|
},
|
|
2389
2397
|
onForwardSeek: (u) => {
|
|
2390
2398
|
const i = Math.min(o + u, a);
|
|
2391
|
-
|
|
2399
|
+
c(i);
|
|
2392
2400
|
},
|
|
2393
2401
|
maxBackwardTime: Math.floor(o),
|
|
2394
2402
|
maxForwardTime: Math.floor(a - o)
|
|
@@ -2403,22 +2411,22 @@ function ii() {
|
|
|
2403
2411
|
}
|
|
2404
2412
|
const bt = "vod-player-progress-bar";
|
|
2405
2413
|
function si() {
|
|
2406
|
-
const e =
|
|
2407
|
-
(d ? (u !== -1 ? u :
|
|
2408
|
-
), k = (
|
|
2409
|
-
i(d * (
|
|
2414
|
+
const e = V(null), t = V(null), [n, o] = X(!1), [a, c] = X(-1), [u, i] = X(-1), l = f((I) => I.currentTime), d = f((I) => I.duration), v = f((I) => I.seek), y = f((I) => I.addIdleLock), g = f((I) => I.removeIdleLock), L = parseFloat(
|
|
2415
|
+
(d ? (u !== -1 ? u : l) / d * 100 : 0).toFixed(1)
|
|
2416
|
+
), k = (I) => {
|
|
2417
|
+
i(d * (I[0] / 100)), y(bt);
|
|
2410
2418
|
}, _ = () => {
|
|
2411
2419
|
u !== -1 && (v(u), i(-1), g(bt));
|
|
2412
|
-
},
|
|
2413
|
-
(
|
|
2414
|
-
const
|
|
2415
|
-
if (
|
|
2416
|
-
const
|
|
2417
|
-
if (
|
|
2418
|
-
let
|
|
2419
|
-
|
|
2420
|
+
}, j = () => o(!0), N = () => o(!1), R = z(
|
|
2421
|
+
(I) => {
|
|
2422
|
+
const T = e.current, M = t.current;
|
|
2423
|
+
if (T && M) {
|
|
2424
|
+
const m = Fe(T), O = Fe(M), G = (I.pageX || I.clientX) - m.left, Z = G / m.width;
|
|
2425
|
+
if (Z < 0) return;
|
|
2426
|
+
let H = G - O.width / 2;
|
|
2427
|
+
H < 0 && (H = 0), H > m.width - O.width && (H = -1), M.style.left = H > -1 ? `${H}px` : "auto", M.style.right = H > -1 ? "auto" : "0px", c(Z * d);
|
|
2420
2428
|
}
|
|
2421
|
-
|
|
2429
|
+
j();
|
|
2422
2430
|
},
|
|
2423
2431
|
[d]
|
|
2424
2432
|
);
|
|
@@ -2427,9 +2435,9 @@ function si() {
|
|
|
2427
2435
|
Ae,
|
|
2428
2436
|
{
|
|
2429
2437
|
ref: e,
|
|
2430
|
-
value: [
|
|
2431
|
-
onPointerLeave:
|
|
2432
|
-
onPointerDown:
|
|
2438
|
+
value: [L],
|
|
2439
|
+
onPointerLeave: N,
|
|
2440
|
+
onPointerDown: N,
|
|
2433
2441
|
onPointerMove: R,
|
|
2434
2442
|
onValueChange: k,
|
|
2435
2443
|
onValueCommit: _,
|
|
@@ -2446,17 +2454,17 @@ function si() {
|
|
|
2446
2454
|
)
|
|
2447
2455
|
] });
|
|
2448
2456
|
}
|
|
2449
|
-
const ai = "_remainingTimeContainer_1yyhb_1", li = "_remainingTime_1yyhb_1", ci = "_remainingSeparator_1yyhb_17",
|
|
2457
|
+
const ai = "_remainingTimeContainer_1yyhb_1", li = "_remainingTime_1yyhb_1", ci = "_remainingSeparator_1yyhb_17", Me = {
|
|
2450
2458
|
remainingTimeContainer: ai,
|
|
2451
2459
|
remainingTime: li,
|
|
2452
2460
|
remainingSeparator: ci
|
|
2453
2461
|
};
|
|
2454
2462
|
function ui() {
|
|
2455
2463
|
const e = f((n) => n.currentTime), t = f((n) => n.duration);
|
|
2456
|
-
return /* @__PURE__ */ s.jsxs("div", { className:
|
|
2457
|
-
/* @__PURE__ */ s.jsx("p", { className:
|
|
2458
|
-
/* @__PURE__ */ s.jsx("p", { className:
|
|
2459
|
-
/* @__PURE__ */ s.jsx("p", { className:
|
|
2464
|
+
return /* @__PURE__ */ s.jsxs("div", { className: Me.remainingTimeContainer, children: [
|
|
2465
|
+
/* @__PURE__ */ s.jsx("p", { className: Me.remainingTime, children: _e(e) }),
|
|
2466
|
+
/* @__PURE__ */ s.jsx("p", { className: Me.remainingSeparator }),
|
|
2467
|
+
/* @__PURE__ */ s.jsx("p", { className: Me.remainingTime, children: _e(t) })
|
|
2460
2468
|
] });
|
|
2461
2469
|
}
|
|
2462
2470
|
function di({ callback: e }) {
|
|
@@ -2469,35 +2477,38 @@ function di({ callback: e }) {
|
|
|
2469
2477
|
}, [e, t]), /* @__PURE__ */ s.jsx(zt, { callback: e });
|
|
2470
2478
|
}
|
|
2471
2479
|
function fi() {
|
|
2472
|
-
const e = f((i) => i.currentTime), t = f((i) => i.duration), n = f((i) => i.isPlaying), o = f((i) => i.pause), a = f((i) => i.play),
|
|
2480
|
+
const e = f((i) => i.currentTime), t = f((i) => i.duration), n = f((i) => i.isPlaying), o = f((i) => i.pause), a = f((i) => i.play), c = f((i) => i.seek), u = z(
|
|
2473
2481
|
(i) => {
|
|
2474
|
-
let
|
|
2482
|
+
let l = !1;
|
|
2475
2483
|
if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
|
|
2476
2484
|
switch (i.code) {
|
|
2477
2485
|
case "ArrowLeft":
|
|
2478
|
-
|
|
2486
|
+
c(e - 10 >= 0 ? e - 10 : 0), l = !0;
|
|
2479
2487
|
break;
|
|
2480
2488
|
case "ArrowRight":
|
|
2481
|
-
|
|
2489
|
+
c(e + 10 < t ? e + 10 : t), l = !0;
|
|
2482
2490
|
break;
|
|
2483
2491
|
case "Space":
|
|
2484
|
-
n ? o() : a(),
|
|
2492
|
+
n ? o() : a(), l = !0;
|
|
2485
2493
|
break;
|
|
2486
2494
|
}
|
|
2487
|
-
|
|
2495
|
+
l && i.preventDefault();
|
|
2488
2496
|
}
|
|
2489
2497
|
},
|
|
2490
|
-
[e, t, n, o, a,
|
|
2498
|
+
[e, t, n, o, a, c]
|
|
2491
2499
|
);
|
|
2492
2500
|
return D(() => (document.addEventListener("keydown", u), () => {
|
|
2493
2501
|
document.removeEventListener("keydown", u);
|
|
2494
|
-
}), [u]), /* @__PURE__ */ s.jsx(
|
|
2502
|
+
}), [u]), /* @__PURE__ */ s.jsx(Zt, {});
|
|
2495
2503
|
}
|
|
2496
|
-
function
|
|
2497
|
-
return /* @__PURE__ */ s.jsx(Kt, { children: /* @__PURE__ */ s.jsx(hi,
|
|
2504
|
+
function Ti(e) {
|
|
2505
|
+
return /* @__PURE__ */ s.jsx(Kt, { children: /* @__PURE__ */ s.jsx(hi, P({}, e)) });
|
|
2498
2506
|
}
|
|
2499
2507
|
function hi({ url: e, messages: t, onEvent: n, startTime: o }) {
|
|
2500
|
-
|
|
2508
|
+
var i;
|
|
2509
|
+
const a = f((l) => l.setStartTime), c = f((l) => l.containerRef), u = {
|
|
2510
|
+
unableToPlay: "Unable to play the video. Please try again later."
|
|
2511
|
+
};
|
|
2501
2512
|
return D(() => {
|
|
2502
2513
|
o && a(o);
|
|
2503
2514
|
}, [o, a]), D(() => {
|
|
@@ -2505,10 +2516,19 @@ function hi({ url: e, messages: t, onEvent: n, startTime: o }) {
|
|
|
2505
2516
|
}, []), /* @__PURE__ */ s.jsxs(
|
|
2506
2517
|
"div",
|
|
2507
2518
|
{
|
|
2508
|
-
ref:
|
|
2519
|
+
ref: c,
|
|
2509
2520
|
className: B.playerContainer,
|
|
2510
2521
|
children: [
|
|
2511
|
-
/* @__PURE__ */ s.jsx(
|
|
2522
|
+
/* @__PURE__ */ s.jsx(
|
|
2523
|
+
Yt,
|
|
2524
|
+
{
|
|
2525
|
+
url: e,
|
|
2526
|
+
isLive: !1,
|
|
2527
|
+
messages: {
|
|
2528
|
+
unableToPlay: (i = t == null ? void 0 : t.unableToPlay) != null ? i : u.unableToPlay
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
),
|
|
2512
2532
|
/* @__PURE__ */ s.jsx(Qt, {}),
|
|
2513
2533
|
/* @__PURE__ */ s.jsx(nn, {}),
|
|
2514
2534
|
/* @__PURE__ */ s.jsx(oi, {}),
|
|
@@ -2546,6 +2566,6 @@ function hi({ url: e, messages: t, onEvent: n, startTime: o }) {
|
|
|
2546
2566
|
}
|
|
2547
2567
|
export {
|
|
2548
2568
|
wi as LivePlayer,
|
|
2549
|
-
|
|
2569
|
+
Ti as VodPlayer
|
|
2550
2570
|
};
|
|
2551
2571
|
//# sourceMappingURL=react-video-player.es.js.map
|