@halibegic/react-video-player 0.0.43 → 0.0.45
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/index.d.ts +2 -4
- package/dist/react-video-player.es.js +448 -445
- package/dist/react-video-player.es.js.map +1 -1
- package/dist/react-video-player.umd.js +9 -9
- package/dist/react-video-player.umd.js.map +1 -1
- package/dist/src/index.d.ts +4 -0
- package/package.json +1 -1
- /package/dist/{app.d.ts → src/app.d.ts} +0 -0
- /package/dist/{components → src/components}/icons/check-icon.d.ts +0 -0
- /package/dist/{components → src/components}/icons/fullscreen-enter-icon.d.ts +0 -0
- /package/dist/{components → src/components}/icons/fullscreen-exit-icon.d.ts +0 -0
- /package/dist/{components → src/components}/icons/hd-icon.d.ts +0 -0
- /package/dist/{components → src/components}/icons/pause-icon.d.ts +0 -0
- /package/dist/{components → src/components}/icons/play-icon.d.ts +0 -0
- /package/dist/{components → src/components}/icons/start-over-icon.d.ts +0 -0
- /package/dist/{components → src/components}/icons/volume-max-icon.d.ts +0 -0
- /package/dist/{components → src/components}/icons/volume-min-icon.d.ts +0 -0
- /package/dist/{components → src/components}/icons/volume-mute-icon.d.ts +0 -0
- /package/dist/{components → src/components}/live-player/live-player-event-check.d.ts +0 -0
- /package/dist/{components → src/components}/live-player/live-player-event-listener.d.ts +0 -0
- /package/dist/{components → src/components}/live-player/live-player-keyboard.d.ts +0 -0
- /package/dist/{components → src/components}/live-player/live-player-provider.d.ts +0 -0
- /package/dist/{components → src/components}/live-player/live-player-tech.d.ts +0 -0
- /package/dist/{components → src/components}/live-player/live-player-viewer-count.d.ts +0 -0
- /package/dist/{components → src/components}/live-player/ui/live-player-gestures.d.ts +0 -0
- /package/dist/{components → src/components}/live-player/ui/live-player-go-live.d.ts +0 -0
- /package/dist/{components → src/components}/live-player/ui/live-player-playback.d.ts +0 -0
- /package/dist/{components → src/components}/live-player/ui/live-player-progress.d.ts +0 -0
- /package/dist/{components → src/components}/live-player/ui/live-player-start-over.d.ts +0 -0
- /package/dist/{components → src/components}/live-player/ui/live-player-viewers.d.ts +0 -0
- /package/dist/{components → src/components}/live-player.d.ts +0 -0
- /package/dist/{components → src/components}/player/player-error-check.d.ts +0 -0
- /package/dist/{components → src/components}/player/player-event-listener.d.ts +0 -0
- /package/dist/{components → src/components}/player/player-hls-engine.d.ts +0 -0
- /package/dist/{components → src/components}/player/player-keyboard.d.ts +0 -0
- /package/dist/{components → src/components}/player/player-provider.d.ts +0 -0
- /package/dist/{components → src/components}/player/player-tech.d.ts +0 -0
- /package/dist/{components → src/components}/player/ui/player-button.d.ts +0 -0
- /package/dist/{components → src/components}/player/ui/player-fullscreen.d.ts +0 -0
- /package/dist/{components → src/components}/player/ui/player-gestures.d.ts +0 -0
- /package/dist/{components → src/components}/player/ui/player-idle-check.d.ts +0 -0
- /package/dist/{components → src/components}/player/ui/player-loading.d.ts +0 -0
- /package/dist/{components → src/components}/player/ui/player-menu.d.ts +0 -0
- /package/dist/{components → src/components}/player/ui/player-quality-control.d.ts +0 -0
- /package/dist/{components → src/components}/player/ui/player-slider.d.ts +0 -0
- /package/dist/{components → src/components}/player/ui/player-spinner.d.ts +0 -0
- /package/dist/{components → src/components}/player/ui/player-volume.d.ts +0 -0
- /package/dist/{components → src/components}/vod-player/ui/vod-player-gestures.d.ts +0 -0
- /package/dist/{components → src/components}/vod-player/ui/vod-player-playback.d.ts +0 -0
- /package/dist/{components → src/components}/vod-player/ui/vod-player-progress.d.ts +0 -0
- /package/dist/{components → src/components}/vod-player/ui/vod-player-remaining-time.d.ts +0 -0
- /package/dist/{components → src/components}/vod-player/vod-player-event-listener.d.ts +0 -0
- /package/dist/{components → src/components}/vod-player/vod-player-keyboard.d.ts +0 -0
- /package/dist/{components → src/components}/vod-player.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-debounce.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-interval.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-isomorphic-layout-effect.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-media-query.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-state-refresh.d.ts +0 -0
- /package/dist/{stores → src/stores}/live-player-store.d.ts +0 -0
- /package/dist/{stores → src/stores}/player-store.d.ts +0 -0
- /package/dist/{types → src/types}/player.d.ts +0 -0
- /package/dist/{utils → src/utils}/date-time.d.ts +0 -0
- /package/dist/{utils → src/utils}/device.d.ts +0 -0
- /package/dist/{utils → src/utils}/dom.d.ts +0 -0
- /package/dist/{utils → src/utils}/fullscreen.d.ts +0 -0
- /package/dist/{utils → src/utils}/hls-parser.d.ts +0 -0
- /package/dist/{utils → src/utils}/player-events.d.ts +0 -0
- /package/dist/{utils → src/utils}/player.d.ts +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Nn = Object.defineProperty, Vn = Object.defineProperties;
|
|
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, j = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
7
|
vt.call(t, n) && pt(e, n, t[n]);
|
|
8
8
|
if (Se)
|
|
9
9
|
for (var n of Se(t))
|
|
10
10
|
yt.call(t, n) && pt(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
}, he = (e, t) =>
|
|
12
|
+
}, he = (e, t) => Vn(e, An(t));
|
|
13
13
|
var ne = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var o in e)
|
|
@@ -19,13 +19,13 @@ 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
|
|
23
|
-
import { create as
|
|
24
|
-
import
|
|
22
|
+
import St, { useLayoutEffect as On, useEffect as D, useRef as V, useState as G, createContext as jt, useContext as Pt, useCallback as W, forwardRef as Ne } from "react";
|
|
23
|
+
import { create as Lt, useStore as It } from "zustand";
|
|
24
|
+
import Hn from "mitt";
|
|
25
25
|
import re from "hls.js";
|
|
26
26
|
import * as je from "@radix-ui/react-slider";
|
|
27
27
|
import * as Te from "@radix-ui/react-popover";
|
|
28
|
-
import * as
|
|
28
|
+
import * as Pe from "@radix-ui/react-scroll-area";
|
|
29
29
|
function kt(e) {
|
|
30
30
|
var t = this.constructor;
|
|
31
31
|
return this.then(
|
|
@@ -75,11 +75,11 @@ function Dt(e) {
|
|
|
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"))
|
|
@@ -90,7 +90,7 @@ function Mt(e) {
|
|
|
90
90
|
try {
|
|
91
91
|
t.resolve(a[u]).then(n).catch(function(i) {
|
|
92
92
|
l.push(i), l.length === a.length && o(
|
|
93
|
-
new
|
|
93
|
+
new Mt(
|
|
94
94
|
l,
|
|
95
95
|
"All promises were rejected"
|
|
96
96
|
)
|
|
@@ -101,19 +101,19 @@ function Mt(e) {
|
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
var
|
|
104
|
+
var $n = setTimeout;
|
|
105
105
|
function Nt(e) {
|
|
106
106
|
return !!(e && typeof e.length != "undefined");
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Un() {
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Bn(e, t) {
|
|
111
111
|
return function() {
|
|
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);
|
|
@@ -125,7 +125,7 @@ function Vt(e, t) {
|
|
|
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
131
|
(e._state === 1 ? Ke : xe)(t.promise, e._value);
|
|
@@ -147,11 +147,11 @@ 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") {
|
|
154
|
-
At(
|
|
154
|
+
At(Bn(n, t), e);
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
@@ -164,14 +164,14 @@ function xe(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
|
-
function
|
|
174
|
+
function zn(e, t, n) {
|
|
175
175
|
this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof t == "function" ? t : null, this.promise = n;
|
|
176
176
|
}
|
|
177
177
|
function At(e, t) {
|
|
@@ -190,16 +190,16 @@ function At(e, t) {
|
|
|
190
190
|
n = !0, xe(t, o);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
|
|
193
|
+
F.prototype.catch = function(e) {
|
|
194
194
|
return this.then(null, e);
|
|
195
195
|
};
|
|
196
|
-
|
|
197
|
-
var n = new this.constructor(
|
|
198
|
-
return Vt(this, new
|
|
196
|
+
F.prototype.then = function(e, t) {
|
|
197
|
+
var n = new this.constructor(Un);
|
|
198
|
+
return Vt(this, new zn(e, t, n)), n;
|
|
199
199
|
};
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
return new
|
|
200
|
+
F.prototype.finally = kt;
|
|
201
|
+
F.all = function(e) {
|
|
202
|
+
return new F(function(t, n) {
|
|
203
203
|
if (!Nt(e))
|
|
204
204
|
return n(new TypeError("Promise.all accepts an array"));
|
|
205
205
|
var o = Array.prototype.slice.call(e);
|
|
@@ -229,33 +229,33 @@ M.all = function(e) {
|
|
|
229
229
|
l(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
|
|
244
|
+
F.race = function(e) {
|
|
245
|
+
return new F(function(t, n) {
|
|
246
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,31 +267,31 @@ 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 =
|
|
271
|
-
var
|
|
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
|
+
var Le = { exports: {} }, ge = {};
|
|
272
272
|
var gt;
|
|
273
|
-
function
|
|
273
|
+
function Wn() {
|
|
274
274
|
if (gt) return ge;
|
|
275
275
|
gt = 1;
|
|
276
276
|
var e = St, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
277
277
|
function u(i, c, d) {
|
|
278
|
-
var v, y = {}, g = null,
|
|
279
|
-
d !== void 0 && (g = "" + d), c.key !== void 0 && (g = "" + c.key), c.ref !== void 0 && (
|
|
278
|
+
var v, y = {}, g = null, P = null;
|
|
279
|
+
d !== void 0 && (g = "" + d), c.key !== void 0 && (g = "" + c.key), c.ref !== void 0 && (P = c.ref);
|
|
280
280
|
for (v in c) o.call(c, v) && !l.hasOwnProperty(v) && (y[v] = c[v]);
|
|
281
281
|
if (i && i.defaultProps) for (v in c = i.defaultProps, c) y[v] === void 0 && (y[v] = c[v]);
|
|
282
|
-
return { $$typeof: t, type: i, key: g, ref:
|
|
282
|
+
return { $$typeof: t, type: i, key: g, ref: P, 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 Zn() {
|
|
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"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), i = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), g = Symbol.for("react.lazy"),
|
|
290
|
+
var e = St, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), i = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), k = Symbol.iterator, _ = "@@iterator";
|
|
291
291
|
function S(r) {
|
|
292
292
|
if (r === null || typeof r != "object")
|
|
293
293
|
return null;
|
|
294
|
-
var h =
|
|
294
|
+
var h = k && r[k] || r[_];
|
|
295
295
|
return typeof h == "function" ? h : null;
|
|
296
296
|
}
|
|
297
297
|
var N = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
@@ -299,10 +299,10 @@ function Wn() {
|
|
|
299
299
|
{
|
|
300
300
|
for (var h = arguments.length, m = new Array(h > 1 ? h - 1 : 0), w = 1; w < h; w++)
|
|
301
301
|
m[w - 1] = arguments[w];
|
|
302
|
-
|
|
302
|
+
L("error", r, m);
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function L(r, h, m) {
|
|
306
306
|
{
|
|
307
307
|
var w = N.ReactDebugCurrentFrame, E = w.getStackAddendum();
|
|
308
308
|
E !== "" && (h += "%s", m = m.concat([E]));
|
|
@@ -312,16 +312,16 @@ function Wn() {
|
|
|
312
312
|
b.unshift("Warning: " + h), Function.prototype.apply.call(console[r], console, b);
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
var x = !1,
|
|
316
|
-
|
|
317
|
-
function
|
|
318
|
-
return !!(typeof r == "string" || typeof r == "function" || r === o || r === l || Y || r === a || r === d || r === v ||
|
|
315
|
+
var x = !1, M = !1, p = !1, U = !1, Y = !1, z;
|
|
316
|
+
z = Symbol.for("react.module.reference");
|
|
317
|
+
function O(r) {
|
|
318
|
+
return !!(typeof r == "string" || typeof r == "function" || r === o || r === l || Y || r === a || r === d || r === v || U || r === P || x || M || p || typeof r == "object" && r !== null && (r.$$typeof === g || r.$$typeof === y || r.$$typeof === u || r.$$typeof === i || r.$$typeof === c || // This needs to include all possible module reference object
|
|
319
319
|
// types supported by any Flight configuration anywhere since
|
|
320
320
|
// we don't know which Flight build this will end up being used
|
|
321
321
|
// with.
|
|
322
|
-
r.$$typeof ===
|
|
322
|
+
r.$$typeof === z || r.getModuleId !== void 0));
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function I(r, h, m) {
|
|
325
325
|
var w = r.displayName;
|
|
326
326
|
if (w)
|
|
327
327
|
return w;
|
|
@@ -361,7 +361,7 @@ function Wn() {
|
|
|
361
361
|
var m = r;
|
|
362
362
|
return Q(m._context) + ".Provider";
|
|
363
363
|
case c:
|
|
364
|
-
return
|
|
364
|
+
return I(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";
|
|
@@ -380,7 +380,7 @@ function Wn() {
|
|
|
380
380
|
function Qe() {
|
|
381
381
|
}
|
|
382
382
|
Qe.__reactDisabledLog = !0;
|
|
383
|
-
function
|
|
383
|
+
function cn() {
|
|
384
384
|
{
|
|
385
385
|
if (oe === 0) {
|
|
386
386
|
ue = console.log, te = console.info, q = console.warn, ve = console.error, Xe = console.group, Ge = console.groupCollapsed, Je = console.groupEnd;
|
|
@@ -403,7 +403,7 @@ function Wn() {
|
|
|
403
403
|
oe++;
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function un() {
|
|
407
407
|
{
|
|
408
408
|
if (oe--, oe === 0) {
|
|
409
409
|
var r = {
|
|
@@ -454,8 +454,8 @@ function Wn() {
|
|
|
454
454
|
}
|
|
455
455
|
var $e = !1, Ee;
|
|
456
456
|
{
|
|
457
|
-
var
|
|
458
|
-
Ee = new
|
|
457
|
+
var dn = typeof WeakMap == "function" ? WeakMap : Map;
|
|
458
|
+
Ee = new dn();
|
|
459
459
|
}
|
|
460
460
|
function et(r, h) {
|
|
461
461
|
if (!r || $e)
|
|
@@ -470,7 +470,7 @@ function Wn() {
|
|
|
470
470
|
var E = Error.prepareStackTrace;
|
|
471
471
|
Error.prepareStackTrace = void 0;
|
|
472
472
|
var b;
|
|
473
|
-
b = Oe.current, Oe.current = null,
|
|
473
|
+
b = Oe.current, Oe.current = null, cn();
|
|
474
474
|
try {
|
|
475
475
|
if (h) {
|
|
476
476
|
var C = function() {
|
|
@@ -507,31 +507,31 @@ function Wn() {
|
|
|
507
507
|
if (J && w && typeof J.stack == "string") {
|
|
508
508
|
for (var T = J.stack.split(`
|
|
509
509
|
`), X = w.stack.split(`
|
|
510
|
-
`), H = T.length - 1,
|
|
511
|
-
|
|
512
|
-
for (; H >= 1 &&
|
|
513
|
-
if (T[H] !== X[
|
|
514
|
-
if (H !== 1 ||
|
|
510
|
+
`), H = T.length - 1, $ = X.length - 1; H >= 1 && $ >= 0 && T[H] !== X[$]; )
|
|
511
|
+
$--;
|
|
512
|
+
for (; H >= 1 && $ >= 0; H--, $--)
|
|
513
|
+
if (T[H] !== X[$]) {
|
|
514
|
+
if (H !== 1 || $ !== 1)
|
|
515
515
|
do
|
|
516
|
-
if (H--,
|
|
516
|
+
if (H--, $--, $ < 0 || T[H] !== X[$]) {
|
|
517
517
|
var ee = `
|
|
518
518
|
` + T[H].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 (H >= 1 &&
|
|
521
|
+
while (H >= 1 && $ >= 0);
|
|
522
522
|
break;
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
} finally {
|
|
526
|
-
$e = !1, Oe.current = b,
|
|
526
|
+
$e = !1, Oe.current = b, 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
|
|
531
|
+
function fn(r, h, m) {
|
|
532
532
|
return et(r, !1);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function hn(r) {
|
|
535
535
|
var h = r.prototype;
|
|
536
536
|
return !!(h && h.isReactComponent);
|
|
537
537
|
}
|
|
@@ -539,7 +539,7 @@ function Wn() {
|
|
|
539
539
|
if (r == null)
|
|
540
540
|
return "";
|
|
541
541
|
if (typeof r == "function")
|
|
542
|
-
return et(r,
|
|
542
|
+
return et(r, hn(r));
|
|
543
543
|
if (typeof r == "string")
|
|
544
544
|
return Ce(r);
|
|
545
545
|
switch (r) {
|
|
@@ -551,7 +551,7 @@ function Wn() {
|
|
|
551
551
|
if (typeof r == "object")
|
|
552
552
|
switch (r.$$typeof) {
|
|
553
553
|
case c:
|
|
554
|
-
return
|
|
554
|
+
return fn(r.render);
|
|
555
555
|
case y:
|
|
556
556
|
return Re(r.type, h, m);
|
|
557
557
|
case g: {
|
|
@@ -572,7 +572,7 @@ function Wn() {
|
|
|
572
572
|
} else
|
|
573
573
|
nt.setExtraStackFrame(null);
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function mn(r, h, m, w, E) {
|
|
576
576
|
{
|
|
577
577
|
var b = Function.call.bind(ye);
|
|
578
578
|
for (var C in r)
|
|
@@ -591,17 +591,17 @@ function Wn() {
|
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
|
-
var
|
|
594
|
+
var pn = Array.isArray;
|
|
595
595
|
function Ue(r) {
|
|
596
|
-
return
|
|
596
|
+
return pn(r);
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function vn(r) {
|
|
599
599
|
{
|
|
600
600
|
var h = typeof Symbol == "function" && Symbol.toStringTag, m = h && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
601
601
|
return m;
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function yn(r) {
|
|
605
605
|
try {
|
|
606
606
|
return rt(r), !1;
|
|
607
607
|
} catch (h) {
|
|
@@ -612,16 +612,16 @@ function Wn() {
|
|
|
612
612
|
return "" + r;
|
|
613
613
|
}
|
|
614
614
|
function ot(r) {
|
|
615
|
-
if (
|
|
616
|
-
return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
615
|
+
if (yn(r))
|
|
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 = N.ReactCurrentOwner,
|
|
618
|
+
var it = N.ReactCurrentOwner, gn = {
|
|
619
619
|
key: !0,
|
|
620
620
|
ref: !0,
|
|
621
621
|
__self: !0,
|
|
622
622
|
__source: !0
|
|
623
623
|
}, st, at;
|
|
624
|
-
function
|
|
624
|
+
function wn(r) {
|
|
625
625
|
if (ye.call(r, "ref")) {
|
|
626
626
|
var h = Object.getOwnPropertyDescriptor(r, "ref").get;
|
|
627
627
|
if (h && h.isReactWarning)
|
|
@@ -629,7 +629,7 @@ function Wn() {
|
|
|
629
629
|
}
|
|
630
630
|
return r.ref !== void 0;
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function xn(r) {
|
|
633
633
|
if (ye.call(r, "key")) {
|
|
634
634
|
var h = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
635
635
|
if (h && h.isReactWarning)
|
|
@@ -637,10 +637,10 @@ function Wn() {
|
|
|
637
637
|
}
|
|
638
638
|
return r.key !== void 0;
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function _n(r, h) {
|
|
641
641
|
typeof r.ref == "string" && it.current;
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function Tn(r, h) {
|
|
644
644
|
{
|
|
645
645
|
var m = 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));
|
|
@@ -651,7 +651,7 @@ function Wn() {
|
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function Cn(r, h) {
|
|
655
655
|
{
|
|
656
656
|
var m = 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));
|
|
@@ -662,7 +662,7 @@ function Wn() {
|
|
|
662
662
|
});
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
var
|
|
665
|
+
var En = function(r, h, m, w, E, b, C) {
|
|
666
666
|
var T = {
|
|
667
667
|
// This tag allows us to uniquely identify this as a React Element
|
|
668
668
|
$$typeof: t,
|
|
@@ -691,22 +691,22 @@ function Wn() {
|
|
|
691
691
|
value: E
|
|
692
692
|
}), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
|
|
693
693
|
};
|
|
694
|
-
function
|
|
694
|
+
function Rn(r, h, m, w, E) {
|
|
695
695
|
{
|
|
696
696
|
var b, C = {}, T = null, X = null;
|
|
697
|
-
m !== void 0 && (ot(m), T = "" + m),
|
|
697
|
+
m !== void 0 && (ot(m), T = "" + m), xn(h) && (ot(h.key), T = "" + h.key), wn(h) && (X = h.ref, _n(h, E));
|
|
698
698
|
for (b in h)
|
|
699
|
-
ye.call(h, b) && !
|
|
699
|
+
ye.call(h, b) && !gn.hasOwnProperty(b) && (C[b] = h[b]);
|
|
700
700
|
if (r && r.defaultProps) {
|
|
701
701
|
var H = r.defaultProps;
|
|
702
702
|
for (b in H)
|
|
703
703
|
C[b] === void 0 && (C[b] = H[b]);
|
|
704
704
|
}
|
|
705
705
|
if (T || X) {
|
|
706
|
-
var
|
|
707
|
-
T &&
|
|
706
|
+
var $ = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
707
|
+
T && Tn(C, $), X && Cn(C, $);
|
|
708
708
|
}
|
|
709
|
-
return
|
|
709
|
+
return En(r, T, X, E, w, it.current, C);
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
712
|
var Be = N.ReactCurrentOwner, lt = N.ReactDebugCurrentFrame;
|
|
@@ -734,11 +734,11 @@ Check the render method of \`` + r + "`.";
|
|
|
734
734
|
return "";
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
|
-
function
|
|
737
|
+
function bn(r) {
|
|
738
738
|
return "";
|
|
739
739
|
}
|
|
740
740
|
var ut = {};
|
|
741
|
-
function
|
|
741
|
+
function Sn(r) {
|
|
742
742
|
{
|
|
743
743
|
var h = ct();
|
|
744
744
|
if (!h) {
|
|
@@ -755,7 +755,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
755
755
|
if (!r._store || r._store.validated || r.key != null)
|
|
756
756
|
return;
|
|
757
757
|
r._store.validated = !0;
|
|
758
|
-
var m =
|
|
758
|
+
var m = Sn(h);
|
|
759
759
|
if (ut[m])
|
|
760
760
|
return;
|
|
761
761
|
ut[m] = !0;
|
|
@@ -782,7 +782,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function jn(r) {
|
|
786
786
|
{
|
|
787
787
|
var h = r.type;
|
|
788
788
|
if (h == null || typeof h == "string")
|
|
@@ -798,7 +798,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
798
798
|
return;
|
|
799
799
|
if (m) {
|
|
800
800
|
var w = K(h);
|
|
801
|
-
|
|
801
|
+
mn(m, r.props, "prop", w, r);
|
|
802
802
|
} else if (h.PropTypes !== void 0 && !ze) {
|
|
803
803
|
ze = !0;
|
|
804
804
|
var E = K(h);
|
|
@@ -807,7 +807,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
807
807
|
typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
|
-
function
|
|
810
|
+
function Pn(r) {
|
|
811
811
|
{
|
|
812
812
|
for (var h = Object.keys(r.props), m = 0; m < h.length; m++) {
|
|
813
813
|
var w = h[m];
|
|
@@ -822,18 +822,18 @@ Check the top-level render call using <` + m + ">.");
|
|
|
822
822
|
var ht = {};
|
|
823
823
|
function mt(r, h, m, w, E, b) {
|
|
824
824
|
{
|
|
825
|
-
var C =
|
|
825
|
+
var C = O(r);
|
|
826
826
|
if (!C) {
|
|
827
827
|
var T = "";
|
|
828
828
|
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (T += " 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 X =
|
|
829
|
+
var X = bn();
|
|
830
830
|
X ? T += X : T += ct();
|
|
831
831
|
var H;
|
|
832
832
|
r === null ? H = "null" : Ue(r) ? H = "array" : r !== void 0 && r.$$typeof === t ? (H = "<" + (K(r.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : H = typeof r, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", H, T);
|
|
833
833
|
}
|
|
834
|
-
var
|
|
835
|
-
if (
|
|
836
|
-
return
|
|
834
|
+
var $ = Rn(r, h, m, E, b);
|
|
835
|
+
if ($ == null)
|
|
836
|
+
return $;
|
|
837
837
|
if (C) {
|
|
838
838
|
var ee = h.children;
|
|
839
839
|
if (ee !== void 0)
|
|
@@ -852,44 +852,44 @@ Check the top-level render call using <` + m + ">.");
|
|
|
852
852
|
return Fn !== "key";
|
|
853
853
|
}), Ze = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
854
854
|
if (!ht[ce + Ze]) {
|
|
855
|
-
var
|
|
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} />`, Ze, ce,
|
|
861
|
+
<%s key={someKey} {...props} />`, Ze, ce, Mn, ce), ht[ce + Ze] = !0;
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
|
-
return r === o ?
|
|
864
|
+
return r === o ? Pn($) : jn($), $;
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
function Ln(r, h, m) {
|
|
868
868
|
return mt(r, h, m, !0);
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function In(r, h, m) {
|
|
871
871
|
return mt(r, h, m, !1);
|
|
872
872
|
}
|
|
873
|
-
var
|
|
874
|
-
we.Fragment = o, we.jsx =
|
|
873
|
+
var kn = In, Dn = Ln;
|
|
874
|
+
we.Fragment = o, we.jsx = kn, we.jsxs = Dn;
|
|
875
875
|
})()), we;
|
|
876
876
|
}
|
|
877
877
|
var xt;
|
|
878
|
-
function
|
|
879
|
-
return xt || (xt = 1, process.env.NODE_ENV === "production" ?
|
|
880
|
-
}
|
|
881
|
-
var s =
|
|
882
|
-
const
|
|
883
|
-
playerNotice:
|
|
884
|
-
playerNoticeTitle:
|
|
885
|
-
playerNoticeText:
|
|
886
|
-
playerNoticeLowZIndex:
|
|
887
|
-
}, Ot = typeof window != "undefined" ?
|
|
878
|
+
function qn() {
|
|
879
|
+
return xt || (xt = 1, process.env.NODE_ENV === "production" ? Le.exports = Wn() : Le.exports = Zn()), Le.exports;
|
|
880
|
+
}
|
|
881
|
+
var s = qn();
|
|
882
|
+
const Kn = "_playerNotice_x3acc_1", Yn = "_playerNoticeTitle_x3acc_19", Xn = "_playerNoticeText_x3acc_28", Gn = "_playerNoticeLowZIndex_x3acc_37", ie = {
|
|
883
|
+
playerNotice: Kn,
|
|
884
|
+
playerNoticeTitle: Yn,
|
|
885
|
+
playerNoticeText: Xn,
|
|
886
|
+
playerNoticeLowZIndex: Gn
|
|
887
|
+
}, Ot = typeof window != "undefined" ? On : D;
|
|
888
888
|
function Ve(e, t) {
|
|
889
889
|
const n = V(e);
|
|
890
890
|
Ot(() => {
|
|
891
891
|
n.current = e;
|
|
892
|
-
}, [e]),
|
|
892
|
+
}, [e]), D(() => {
|
|
893
893
|
if (t === null)
|
|
894
894
|
return;
|
|
895
895
|
const o = setInterval(() => {
|
|
@@ -900,11 +900,11 @@ function Ve(e, t) {
|
|
|
900
900
|
};
|
|
901
901
|
}, [t]);
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function Jn(e) {
|
|
904
904
|
const [, t] = G(0);
|
|
905
905
|
Ve(() => t((n) => n + 1), e);
|
|
906
906
|
}
|
|
907
|
-
const
|
|
907
|
+
const Qn = () => Lt((e) => ({
|
|
908
908
|
delay: 0,
|
|
909
909
|
startDate: null,
|
|
910
910
|
viewerCount: null,
|
|
@@ -913,18 +913,18 @@ const Jn = () => Pt((e) => ({
|
|
|
913
913
|
setViewerCount: (t) => e({ viewerCount: t })
|
|
914
914
|
})), Ht = jt(
|
|
915
915
|
null
|
|
916
|
-
),
|
|
916
|
+
), er = ({ children: e }) => {
|
|
917
917
|
const t = V(
|
|
918
918
|
null
|
|
919
919
|
);
|
|
920
|
-
return t.current || (t.current =
|
|
920
|
+
return t.current || (t.current = Qn()), /* @__PURE__ */ s.jsx(Ht.Provider, { value: t.current, children: e });
|
|
921
921
|
}, A = (e) => {
|
|
922
|
-
const t =
|
|
922
|
+
const t = Pt(Ht);
|
|
923
923
|
if (!t)
|
|
924
924
|
throw new Error("usePlayerStore must be used within PlayerStoreProvider");
|
|
925
925
|
return It(t, e);
|
|
926
926
|
};
|
|
927
|
-
function
|
|
927
|
+
function tr(e, t, n) {
|
|
928
928
|
const o = {
|
|
929
929
|
days: 86400,
|
|
930
930
|
hours: 3600,
|
|
@@ -934,15 +934,15 @@ function er(e, t, n) {
|
|
|
934
934
|
};
|
|
935
935
|
return e * (o[t] / o[n]);
|
|
936
936
|
}
|
|
937
|
-
function
|
|
938
|
-
return
|
|
937
|
+
function nr(e) {
|
|
938
|
+
return tr(e, "milliseconds", "seconds");
|
|
939
939
|
}
|
|
940
940
|
const _e = (e) => {
|
|
941
941
|
if (isNaN(e) || e === 1 / 0) return "0:00";
|
|
942
942
|
const t = (l) => (l < 10 ? "0" : "") + l, 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
|
-
function
|
|
945
|
+
function rr(e, t) {
|
|
946
946
|
var n, o, a, l, u, i;
|
|
947
947
|
if (typeof Intl != "undefined" && Intl.DateTimeFormat)
|
|
948
948
|
try {
|
|
@@ -964,17 +964,17 @@ function nr(e, t) {
|
|
|
964
964
|
) - 1, g = parseInt(
|
|
965
965
|
((a = d.find((S) => S.type === "day")) == null ? void 0 : a.value) || "0",
|
|
966
966
|
10
|
|
967
|
-
),
|
|
967
|
+
), P = parseInt(
|
|
968
968
|
((l = d.find((S) => S.type === "hour")) == null ? void 0 : l.value) || "0",
|
|
969
969
|
10
|
|
970
|
-
),
|
|
970
|
+
), k = parseInt(
|
|
971
971
|
((u = d.find((S) => S.type === "minute")) == null ? void 0 : u.value) || "0",
|
|
972
972
|
10
|
|
973
973
|
), _ = parseInt(
|
|
974
974
|
((i = d.find((S) => S.type === "second")) == null ? void 0 : i.value) || "0",
|
|
975
975
|
10
|
|
976
976
|
);
|
|
977
|
-
return new Date(v, y, g,
|
|
977
|
+
return new Date(v, y, g, P, k, _);
|
|
978
978
|
} catch (c) {
|
|
979
979
|
return console.warn(
|
|
980
980
|
`Failed to convert date to timezone ${t}, returning original date:`,
|
|
@@ -990,23 +990,23 @@ function $t(e) {
|
|
|
990
990
|
const t = typeof window != "undefined" && ((n = window.navigator) == null ? void 0 : n.userAgent) || "";
|
|
991
991
|
return e.test(t);
|
|
992
992
|
}
|
|
993
|
-
const Ut = $t(/iPhone|iPad|iPod/i),
|
|
994
|
-
function
|
|
993
|
+
const Ut = $t(/iPhone|iPad|iPod/i), or = $t(/Tizen/i);
|
|
994
|
+
function ir() {
|
|
995
995
|
const e = document;
|
|
996
996
|
return !!(e.fullscreenElement || e.mozFullScreenElement || e.webkitFullscreenElement || e.msFullscreenElement);
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function sr(e) {
|
|
999
999
|
e.requestFullscreen ? e.requestFullscreen() : e.msRequestFullscreen ? e.msRequestFullscreen() : e.webkitRequestFullScreen ? e.webkitRequestFullScreen() : e.webkitEnterFullScreen ? e.webkitEnterFullScreen() : e.mozRequestFullScreen && e.mozRequestFullScreen();
|
|
1000
1000
|
}
|
|
1001
|
-
function
|
|
1001
|
+
function ar(e) {
|
|
1002
1002
|
e.exitFullscreen ? e.exitFullscreen() : e.msExitFullscreen ? e.msExitFullscreen() : e.webkitExitFullscreen ? e.webkitExitFullscreen() : e.mozCancelFullScreen && e.mozCancelFullScreen();
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function lr(e, t) {
|
|
1005
1005
|
return e.addEventListener("fullscreenchange", t), e.addEventListener("webkitfullscreenchange", t), e.addEventListener("mozfullscreenchange", t), e.addEventListener("MSFullscreenChange", t), () => {
|
|
1006
1006
|
e.removeEventListener("fullscreenchange", t), e.removeEventListener("webkitfullscreenchange", t), e.removeEventListener("mozfullscreenchange", t), e.removeEventListener("MSFullscreenChange", t);
|
|
1007
1007
|
};
|
|
1008
1008
|
}
|
|
1009
|
-
const
|
|
1009
|
+
const cr = () => Hn(), ur = (e, t) => ({
|
|
1010
1010
|
currentTime: 0,
|
|
1011
1011
|
duration: 0,
|
|
1012
1012
|
isEnded: !1,
|
|
@@ -1118,7 +1118,7 @@ const lr = () => On(), cr = (e, t) => ({
|
|
|
1118
1118
|
}));
|
|
1119
1119
|
},
|
|
1120
1120
|
getPauseTimeDiff: () => !t().isStarted || !t().pauseTime ? 0 : parseInt(
|
|
1121
|
-
|
|
1121
|
+
nr(Date.now() - t().pauseTime).toFixed(0)
|
|
1122
1122
|
),
|
|
1123
1123
|
play: () => {
|
|
1124
1124
|
const n = t().techRef.current;
|
|
@@ -1165,11 +1165,11 @@ const lr = () => On(), cr = (e, t) => ({
|
|
|
1165
1165
|
isLoading: !1
|
|
1166
1166
|
});
|
|
1167
1167
|
}
|
|
1168
|
-
}),
|
|
1168
|
+
}), dr = (e, t) => ({
|
|
1169
1169
|
isIdle: !1,
|
|
1170
1170
|
setIsIdle: (n) => e({ isIdle: n }),
|
|
1171
1171
|
resetIdle: () => t().eventEmitter.emit("resetIdle")
|
|
1172
|
-
}),
|
|
1172
|
+
}), fr = (e) => ({
|
|
1173
1173
|
idleLocks: /* @__PURE__ */ new Set(),
|
|
1174
1174
|
addIdleLock: (t) => e((n) => ({
|
|
1175
1175
|
idleLocks: new Set(n.idleLocks).add(t)
|
|
@@ -1178,48 +1178,48 @@ const lr = () => On(), cr = (e, t) => ({
|
|
|
1178
1178
|
const o = new Set(n.idleLocks);
|
|
1179
1179
|
return o.delete(t), { idleLocks: o };
|
|
1180
1180
|
})
|
|
1181
|
-
}),
|
|
1181
|
+
}), hr = (e, t) => ({
|
|
1182
1182
|
level: null,
|
|
1183
1183
|
levels: null,
|
|
1184
1184
|
setLevels: (n) => e({ levels: n }),
|
|
1185
1185
|
setLevel: (n) => {
|
|
1186
1186
|
n && t().eventEmitter.emit("qualityChange", { level: n }), e({ level: n });
|
|
1187
1187
|
}
|
|
1188
|
-
}),
|
|
1188
|
+
}), mr = (e, t) => ({
|
|
1189
1189
|
isFullscreen: !1,
|
|
1190
1190
|
isFullscreenReady: !1,
|
|
1191
1191
|
exitFullscreen: () => {
|
|
1192
|
-
t().eventEmitter.emit("fullscreenChange", { isFullscreen: !1 }),
|
|
1192
|
+
t().eventEmitter.emit("fullscreenChange", { isFullscreen: !1 }), ar(document), e({ isFullscreen: !1 });
|
|
1193
1193
|
},
|
|
1194
1194
|
requestFullscreen: () => {
|
|
1195
1195
|
const n = t().techRef.current, o = t().containerRef.current;
|
|
1196
1196
|
if (!n || !o) return;
|
|
1197
1197
|
t().eventEmitter.emit("fullscreenChange", { isFullscreen: !0 });
|
|
1198
1198
|
const a = Ut ? n : o;
|
|
1199
|
-
a &&
|
|
1199
|
+
a && sr(a), e({ isFullscreen: !0 });
|
|
1200
1200
|
},
|
|
1201
1201
|
setIsFullscreen: (n) => e({ isFullscreen: n }),
|
|
1202
1202
|
setIsFullscreenReady: (n) => e({ isFullscreenReady: n })
|
|
1203
|
-
}),
|
|
1203
|
+
}), pr = (e) => ({
|
|
1204
1204
|
error: null,
|
|
1205
1205
|
setError: (t) => e({ error: t })
|
|
1206
|
-
}),
|
|
1207
|
-
eventEmitter:
|
|
1208
|
-
}),
|
|
1206
|
+
}), vr = () => ({
|
|
1207
|
+
eventEmitter: cr()
|
|
1208
|
+
}), yr = (e) => () => j({}, e), gr = (e, t) => Lt()((...n) => j(j(j(j(j(j(j(j({}, 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
|
-
function
|
|
1212
|
+
function wr({ children: e }) {
|
|
1213
1213
|
const t = V(null), n = V(null), o = V(null);
|
|
1214
|
-
return t.current || (t.current =
|
|
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) => {
|
|
1217
|
-
const t =
|
|
1217
|
+
const t = Pt(Bt);
|
|
1218
1218
|
if (!t)
|
|
1219
1219
|
throw new Error("usePlayerStore must be used within PlayerStoreProvider");
|
|
1220
1220
|
return It(t, e);
|
|
1221
1221
|
};
|
|
1222
|
-
function
|
|
1222
|
+
function xr(e) {
|
|
1223
1223
|
const t = e.split(`
|
|
1224
1224
|
`);
|
|
1225
1225
|
for (const n of t) {
|
|
@@ -1227,12 +1227,12 @@ function wr(e) {
|
|
|
1227
1227
|
if (o.startsWith("#EXT-X-PROGRAM-DATE-TIME:")) {
|
|
1228
1228
|
const a = o.replace("#EXT-X-PROGRAM-DATE-TIME:", "").trim(), l = new Date(a);
|
|
1229
1229
|
if (!isNaN(l.getTime()))
|
|
1230
|
-
return
|
|
1230
|
+
return rr(l, "Europe/Sarajevo");
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
1233
|
return null;
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1235
|
+
function _r(e, t) {
|
|
1236
1236
|
const n = e.split(`
|
|
1237
1237
|
`);
|
|
1238
1238
|
let o = !1;
|
|
@@ -1259,19 +1259,19 @@ function xr(e, t) {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
return null;
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1262
|
+
function Tr(e) {
|
|
1263
1263
|
return e.replace("playlist.m3u8", "playlist_fmp4_dvr.m3u8");
|
|
1264
1264
|
}
|
|
1265
|
-
async function
|
|
1265
|
+
async function Cr(e) {
|
|
1266
1266
|
try {
|
|
1267
|
-
const t =
|
|
1267
|
+
const t = Tr(e);
|
|
1268
1268
|
console.log("Converting to DVR URL:", t);
|
|
1269
1269
|
const n = await fetch(t);
|
|
1270
1270
|
if (!n.ok)
|
|
1271
1271
|
throw new Error(
|
|
1272
1272
|
`Failed to fetch master playlist: ${n.status} ${n.statusText}`
|
|
1273
1273
|
);
|
|
1274
|
-
const o = await n.text(), a =
|
|
1274
|
+
const o = await n.text(), a = _r(
|
|
1275
1275
|
o,
|
|
1276
1276
|
t
|
|
1277
1277
|
);
|
|
@@ -1283,32 +1283,32 @@ async function Tr(e) {
|
|
|
1283
1283
|
throw new Error(
|
|
1284
1284
|
`Failed to fetch chunklist: ${l.status} ${l.statusText}`
|
|
1285
1285
|
);
|
|
1286
|
-
const u = await l.text(), i =
|
|
1286
|
+
const u = await l.text(), i = xr(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;
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function Er(n) {
|
|
1293
1293
|
var o = n, { url: e } = o, t = ne(o, ["url"]);
|
|
1294
1294
|
const [a, l] = G(!0), u = A((d) => d.startDate), i = A((d) => d.setStartDate), c = W(async () => {
|
|
1295
|
-
const d = await
|
|
1295
|
+
const d = await Cr(e);
|
|
1296
1296
|
d && i(d);
|
|
1297
1297
|
}, [e, i]);
|
|
1298
|
-
return
|
|
1298
|
+
return D(() => {
|
|
1299
1299
|
(async () => {
|
|
1300
1300
|
l(!0), await c(), l(!1);
|
|
1301
1301
|
})();
|
|
1302
|
-
}, [c]), Ve(c, u ? null : 5e3), a ? null : /* @__PURE__ */ s.jsx(
|
|
1302
|
+
}, [c]), Ve(c, u ? null : 5e3), a ? null : /* @__PURE__ */ s.jsx(Rr, j({}, t));
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function Rr({
|
|
1305
1305
|
children: e,
|
|
1306
1306
|
messages: t = {}
|
|
1307
1307
|
}) {
|
|
1308
1308
|
var u, i, c;
|
|
1309
1309
|
const n = A((d) => d.startDate), o = f((d) => d.isStarted);
|
|
1310
|
-
return
|
|
1311
|
-
|
|
1310
|
+
return Jn(o ? null : 5e3), n ? Date.now() < n.getTime() ? /* @__PURE__ */ s.jsx(
|
|
1311
|
+
br,
|
|
1312
1312
|
{
|
|
1313
1313
|
startDate: n,
|
|
1314
1314
|
title: (i = t == null ? void 0 : t.eventNotStarted) != null ? i : "Event has not started yet.",
|
|
@@ -1316,7 +1316,7 @@ function Er({
|
|
|
1316
1316
|
}
|
|
1317
1317
|
) : /* @__PURE__ */ s.jsx(s.Fragment, { children: e }) : /* @__PURE__ */ s.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: (u = t == null ? void 0 : t.eventNotStarted) != null ? u : "Event has not started yet." }) });
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function br({ startDate: e, title: t, message: n }) {
|
|
1320
1320
|
const o = e.getTime() - Date.now(), a = Math.floor(o / (1e3 * 60 * 60)), l = Math.floor(
|
|
1321
1321
|
o % (1e3 * 60 * 60) / (1e3 * 60)
|
|
1322
1322
|
);
|
|
@@ -1331,20 +1331,20 @@ function Rr({ startDate: e, title: t, message: n }) {
|
|
|
1331
1331
|
}
|
|
1332
1332
|
function zt({ callback: e }) {
|
|
1333
1333
|
const t = f((n) => n.eventEmitter);
|
|
1334
|
-
return
|
|
1335
|
-
const n = () => e("play", void 0), o = () => e("pause", void 0), a = () => e("ended", void 0), l = () => e("seeking", void 0), u = () => e("seeked", void 0), i = (_) => e("volumeChange", _), c = (_) => e("fullscreenChange", _), d = (_) => e("qualityChange", _), v = (_) => e("loadedMetadata", _), y = () => e("loadStart", void 0), g = () => e("playing", void 0),
|
|
1336
|
-
return t.on("play", n), t.on("pause", o), t.on("ended", a), t.on("seeking", l), t.on("seeked", u), t.on("volumeChange", i), t.on("fullscreenChange", c), t.on("qualityChange", d), t.on("loadedMetadata", v), t.on("loadStart", y), t.on("playing", g), t.on("waiting",
|
|
1337
|
-
t.off("play", n), t.off("pause", o), t.off("ended", a), t.off("seeking", l), t.off("seeked", u), t.off("volumeChange", i), t.off("fullscreenChange", c), t.off("qualityChange", d), t.off("loadedMetadata", v), t.off("loadStart", y), t.off("playing", g), t.off("waiting",
|
|
1334
|
+
return D(() => {
|
|
1335
|
+
const n = () => e("play", void 0), o = () => e("pause", void 0), a = () => e("ended", void 0), l = () => e("seeking", void 0), u = () => e("seeked", void 0), i = (_) => e("volumeChange", _), c = (_) => e("fullscreenChange", _), d = (_) => e("qualityChange", _), v = (_) => e("loadedMetadata", _), y = () => e("loadStart", void 0), g = () => e("playing", void 0), P = () => e("waiting", void 0), k = () => e("error", void 0);
|
|
1336
|
+
return t.on("play", n), t.on("pause", o), t.on("ended", a), t.on("seeking", l), t.on("seeked", u), t.on("volumeChange", i), t.on("fullscreenChange", c), t.on("qualityChange", d), t.on("loadedMetadata", v), t.on("loadStart", y), t.on("playing", g), t.on("waiting", P), t.on("error", k), () => {
|
|
1337
|
+
t.off("play", n), t.off("pause", o), t.off("ended", a), t.off("seeking", l), t.off("seeked", u), t.off("volumeChange", i), t.off("fullscreenChange", c), t.off("qualityChange", d), t.off("loadedMetadata", v), t.off("loadStart", y), t.off("playing", g), t.off("waiting", P), t.off("error", k);
|
|
1338
1338
|
};
|
|
1339
1339
|
}, [e, t]), null;
|
|
1340
1340
|
}
|
|
1341
1341
|
const Wt = (e, t = 0) => parseInt(
|
|
1342
1342
|
Math.max(0, (Date.now() - (e + t * 1e3)) / 1e3).toFixed(0)
|
|
1343
|
-
), Zt = (e, t) => Math.max(0, (Date.now() - e - t * 1e3) / 1e3),
|
|
1343
|
+
), Zt = (e, t) => Math.max(0, (Date.now() - e - t * 1e3) / 1e3), Sr = (e, t) => Math.max(0, (t - e) / 1e3), jr = (e, t = 0) => {
|
|
1344
1344
|
const o = t < 0 ? 0 : t, a = ["bytes", "kb", "mb", "gb", "tb", "pb", "eb", "zb", "yb"], l = Math.floor(Math.log(e) / Math.log(1024));
|
|
1345
1345
|
return `${parseFloat((e / Math.pow(1024, l)).toFixed(o))}${a[l]}`;
|
|
1346
1346
|
};
|
|
1347
|
-
function
|
|
1347
|
+
function Pr({
|
|
1348
1348
|
isAuto: e,
|
|
1349
1349
|
level: t,
|
|
1350
1350
|
levels: n
|
|
@@ -1362,7 +1362,7 @@ function jr({
|
|
|
1362
1362
|
const { bitrate: u, height: i, index: c } = l;
|
|
1363
1363
|
a.push({
|
|
1364
1364
|
sid: `quality-level-${c}`,
|
|
1365
|
-
label: i ? `${i}p` :
|
|
1365
|
+
label: i ? `${i}p` : jr(u),
|
|
1366
1366
|
value: c,
|
|
1367
1367
|
selected: o === 1 || !e && c === t
|
|
1368
1368
|
});
|
|
@@ -1370,7 +1370,7 @@ function jr({
|
|
|
1370
1370
|
}
|
|
1371
1371
|
function Lr({ callback: e }) {
|
|
1372
1372
|
const t = A((l) => l.delay), n = A((l) => l.startDate), o = n ? n.getTime() : 0, a = f((l) => l.eventEmitter);
|
|
1373
|
-
return
|
|
1373
|
+
return D(() => {
|
|
1374
1374
|
const l = () => e("timeUpdate", {
|
|
1375
1375
|
currentTime: Zt(o, t),
|
|
1376
1376
|
duration: -1
|
|
@@ -1411,11 +1411,11 @@ function qt() {
|
|
|
1411
1411
|
l
|
|
1412
1412
|
]
|
|
1413
1413
|
);
|
|
1414
|
-
return
|
|
1414
|
+
return D(() => (document.addEventListener("keydown", u), () => {
|
|
1415
1415
|
document.removeEventListener("keydown", u);
|
|
1416
1416
|
}), [u]), null;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function Ir() {
|
|
1419
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), l = A((i) => i.setDelay), u = W(
|
|
1420
1420
|
(i) => {
|
|
1421
1421
|
let c = !1;
|
|
@@ -1442,24 +1442,24 @@ function Pr() {
|
|
|
1442
1442
|
},
|
|
1443
1443
|
[e, o, t, n, a, l]
|
|
1444
1444
|
);
|
|
1445
|
-
return
|
|
1445
|
+
return D(() => (document.addEventListener("keydown", u), () => {
|
|
1446
1446
|
document.removeEventListener("keydown", u);
|
|
1447
1447
|
}), [u]), /* @__PURE__ */ s.jsx(qt, {});
|
|
1448
1448
|
}
|
|
1449
1449
|
function Kt({ children: e }) {
|
|
1450
|
-
return /* @__PURE__ */ s.jsx(
|
|
1450
|
+
return /* @__PURE__ */ s.jsx(wr, { children: e });
|
|
1451
1451
|
}
|
|
1452
|
-
function
|
|
1453
|
-
return /* @__PURE__ */ s.jsx(
|
|
1452
|
+
function kr({ children: e }) {
|
|
1453
|
+
return /* @__PURE__ */ s.jsx(er, { children: /* @__PURE__ */ s.jsx(Kt, { children: e }) });
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1456
|
-
const o = V(null), a = f((x) => x.level), l = f((x) => x.levels), u = f((x) => x.setLevel), i = f((x) => x.setLevels), c = f((x) => x.techRef), d = f((x) => x.setError), v = V(0), y = V(null), g = 50,
|
|
1455
|
+
function Dr({ url: e, isLive: t, messages: n }) {
|
|
1456
|
+
const o = V(null), a = f((x) => x.level), l = f((x) => x.levels), u = f((x) => x.setLevel), i = f((x) => x.setLevels), c = f((x) => x.techRef), d = f((x) => x.setError), v = V(0), y = V(null), g = 50, P = 1e4, k = W(
|
|
1457
1457
|
(x) => {
|
|
1458
1458
|
if (o.current && (o.current.nextLevel = x, u(null), l)) {
|
|
1459
|
-
const
|
|
1459
|
+
const M = l.map((p) => he(j({}, p), {
|
|
1460
1460
|
selected: p.value === x
|
|
1461
1461
|
}));
|
|
1462
|
-
i(
|
|
1462
|
+
i(M);
|
|
1463
1463
|
}
|
|
1464
1464
|
},
|
|
1465
1465
|
[l, u, i, o]
|
|
@@ -1468,42 +1468,38 @@ function kr({ url: e, isLive: t, messages: n }) {
|
|
|
1468
1468
|
}, [e]), S = W(() => {
|
|
1469
1469
|
if (!o.current) return;
|
|
1470
1470
|
console.log("[Player][HLS] MANIFEST_LOADED"), d(null), y.current && (clearTimeout(y.current), y.current = null), v.current = 0;
|
|
1471
|
-
const x = o.current.levels,
|
|
1471
|
+
const x = o.current.levels, M = o.current.currentLevel, p = o.current.autoLevelEnabled;
|
|
1472
1472
|
i(
|
|
1473
|
-
|
|
1474
|
-
levels: x.map((
|
|
1475
|
-
const { bitrate:
|
|
1473
|
+
Pr({
|
|
1474
|
+
levels: x.map((U, Y) => {
|
|
1475
|
+
const { bitrate: z, height: O, width: I } = U;
|
|
1476
1476
|
return {
|
|
1477
|
-
bitrate:
|
|
1478
|
-
height:
|
|
1477
|
+
bitrate: z,
|
|
1478
|
+
height: O,
|
|
1479
1479
|
index: Y,
|
|
1480
|
-
width:
|
|
1480
|
+
width: I
|
|
1481
1481
|
};
|
|
1482
1482
|
}),
|
|
1483
|
-
level:
|
|
1483
|
+
level: M,
|
|
1484
1484
|
isAuto: p
|
|
1485
1485
|
})
|
|
1486
1486
|
);
|
|
1487
1487
|
}, [d, i]), N = W(
|
|
1488
1488
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1489
|
-
(x,
|
|
1490
|
-
var p
|
|
1491
|
-
if (o.current &&
|
|
1492
|
-
switch (
|
|
1489
|
+
(x, M) => {
|
|
1490
|
+
var p;
|
|
1491
|
+
if (o.current && M.fatal)
|
|
1492
|
+
switch (M.type) {
|
|
1493
1493
|
case re.ErrorTypes.NETWORK_ERROR:
|
|
1494
|
-
let
|
|
1495
|
-
console.log("[Player][HLS] NETWORK_ERROR",
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
console.error("[Player][HLS] Retry failed:", F);
|
|
1504
|
-
}
|
|
1505
|
-
}, L)), Y = ($ = n == null ? void 0 : n.eventFinished) != null ? $ : "Live event will be back shortly.", B = "LIVE_MANIFEST_LOAD_ERROR")
|
|
1506
|
-
) : o.current.startLoad(), d({ message: Y, code: B, tech: "hls" });
|
|
1494
|
+
let U = (p = n == null ? void 0 : n.unableToPlay) != null ? p : "Unable to play the video. Please try again later.", Y = "NETWORK_ERROR";
|
|
1495
|
+
console.log("[Player][HLS] NETWORK_ERROR", M), t ? (v.current < g && (y.current && clearTimeout(y.current), v.current += 1, y.current = setTimeout(() => {
|
|
1496
|
+
if (o.current)
|
|
1497
|
+
try {
|
|
1498
|
+
console.log("[Player][HLS] Retrying stream..."), o.current.loadSource(e);
|
|
1499
|
+
} catch (z) {
|
|
1500
|
+
console.error("[Player][HLS] Retry failed:", z);
|
|
1501
|
+
}
|
|
1502
|
+
}, P)), Y = "LIVE_MANIFEST_LOAD_ERROR") : o.current.startLoad(), d({ message: U, code: Y, tech: "hls" });
|
|
1507
1503
|
break;
|
|
1508
1504
|
case re.ErrorTypes.MEDIA_ERROR:
|
|
1509
1505
|
o.current.recoverMediaError();
|
|
@@ -1518,11 +1514,11 @@ function kr({ url: e, isLive: t, messages: n }) {
|
|
|
1518
1514
|
maxBufferSize: 30 * 1024 * 1024
|
|
1519
1515
|
// 30MB
|
|
1520
1516
|
};
|
|
1521
|
-
|
|
1517
|
+
or ? (x.backBufferLength = -1, x.enableWorker = !1) : t ? x.backBufferLength = 10 : x.backBufferLength = 60;
|
|
1522
1518
|
try {
|
|
1523
1519
|
console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(x)), console.log("[Player][HLS] Version", re.version), o.current = new re(x), o.current.attachMedia(c.current), o.current.on(re.Events.MEDIA_ATTACHED, _), o.current.on(re.Events.MANIFEST_LOADED, S), o.current.on(re.Events.ERROR, N);
|
|
1524
|
-
} catch (
|
|
1525
|
-
throw new Error(`Error initializing Hls: ${
|
|
1520
|
+
} catch (M) {
|
|
1521
|
+
throw new Error(`Error initializing Hls: ${M}`);
|
|
1526
1522
|
}
|
|
1527
1523
|
}, [
|
|
1528
1524
|
S,
|
|
@@ -1531,15 +1527,15 @@ function kr({ url: e, isLive: t, messages: n }) {
|
|
|
1531
1527
|
t,
|
|
1532
1528
|
c,
|
|
1533
1529
|
e
|
|
1534
|
-
]),
|
|
1530
|
+
]), L = W(() => {
|
|
1535
1531
|
o.current && (o.current.off(re.Events.MEDIA_ATTACHED, _), o.current.off(re.Events.MANIFEST_LOADED, S), o.current.off(re.Events.ERROR, N), o.current.destroy(), o.current = null), y.current && (clearTimeout(y.current), y.current = null), v.current = 0;
|
|
1536
1532
|
}, [S, _, N]);
|
|
1537
|
-
return
|
|
1538
|
-
a !== null &&
|
|
1539
|
-
}, [a,
|
|
1533
|
+
return D(() => {
|
|
1534
|
+
a !== null && k(a);
|
|
1535
|
+
}, [a, k]), D(() => (re.isSupported() && R(), L), [L, R]), null;
|
|
1540
1536
|
}
|
|
1541
|
-
const
|
|
1542
|
-
playerVideo:
|
|
1537
|
+
const Mr = "_playerVideo_wc0sm_1", Fr = {
|
|
1538
|
+
playerVideo: Mr
|
|
1543
1539
|
};
|
|
1544
1540
|
function Yt({
|
|
1545
1541
|
url: e,
|
|
@@ -1547,7 +1543,7 @@ function Yt({
|
|
|
1547
1543
|
isMuted: n = !1,
|
|
1548
1544
|
messages: o = {}
|
|
1549
1545
|
}) {
|
|
1550
|
-
const a = f((p) => p.handleDurationChange), l = f((p) => p.handleEnd), u = f((p) => p.handleLoadedMetadata), i = f((p) => p.handleLoadStart), c = f((p) => p.handlePause), d = f((p) => p.handlePlay), v = f((p) => p.handlePlaying), y = f((p) => p.handleSeeked), g = f((p) => p.handleSeeking),
|
|
1546
|
+
const a = f((p) => p.handleDurationChange), l = f((p) => p.handleEnd), u = f((p) => p.handleLoadedMetadata), i = f((p) => p.handleLoadStart), c = f((p) => p.handlePause), d = f((p) => p.handlePlay), v = f((p) => p.handlePlaying), y = f((p) => p.handleSeeked), g = f((p) => p.handleSeeking), P = f((p) => p.handleTimeUpdate), k = f((p) => p.handleWaiting), _ = f((p) => p.handleVolumeChange), S = f((p) => p.handleError), N = f((p) => p.techRef), R = V(null), L = () => t ? {
|
|
1551
1547
|
onTimeUpdate: x
|
|
1552
1548
|
} : {
|
|
1553
1549
|
onDurationChange: a,
|
|
@@ -1555,10 +1551,10 @@ function Yt({
|
|
|
1555
1551
|
onSeeking: g,
|
|
1556
1552
|
onTimeUpdate: x
|
|
1557
1553
|
}, x = () => {
|
|
1558
|
-
(!R.current || Date.now() - R.current >= 1e3) && (
|
|
1559
|
-
},
|
|
1554
|
+
(!R.current || Date.now() - R.current >= 1e3) && (P(), R.current = Date.now());
|
|
1555
|
+
}, M = L();
|
|
1560
1556
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1561
|
-
/* @__PURE__ */ s.jsx(
|
|
1557
|
+
/* @__PURE__ */ s.jsx(Dr, { isLive: t, url: e, messages: o }),
|
|
1562
1558
|
/* @__PURE__ */ s.jsx(
|
|
1563
1559
|
"video",
|
|
1564
1560
|
j({
|
|
@@ -1577,27 +1573,27 @@ function Yt({
|
|
|
1577
1573
|
onPause: c,
|
|
1578
1574
|
onPlay: d,
|
|
1579
1575
|
onPlaying: v,
|
|
1580
|
-
onWaiting:
|
|
1576
|
+
onWaiting: k,
|
|
1581
1577
|
onVolumeChange: _,
|
|
1582
1578
|
tabIndex: -1
|
|
1583
|
-
},
|
|
1579
|
+
}, M)
|
|
1584
1580
|
)
|
|
1585
1581
|
] });
|
|
1586
1582
|
}
|
|
1587
|
-
function
|
|
1583
|
+
function Nr({ url: e, messages: t = {} }) {
|
|
1588
1584
|
const [n, o] = G(null), a = A((u) => u.delay), l = W(async () => {
|
|
1589
1585
|
o(
|
|
1590
1586
|
a ? e.replace("-live", "-catchup").replace("playlist.m3u8", `playlist_fmp4_dvr_timeshift-${a}.m3u8`) : e
|
|
1591
1587
|
);
|
|
1592
1588
|
}, [a, e]);
|
|
1593
|
-
return
|
|
1589
|
+
return D(() => {
|
|
1594
1590
|
l();
|
|
1595
1591
|
}, [l]), n ? /* @__PURE__ */ s.jsx(Yt, { url: n, isLive: !0, messages: t }) : null;
|
|
1596
1592
|
}
|
|
1597
|
-
function Nr({ url: e }) {
|
|
1598
|
-
return f((n) => n.isStarted) ? /* @__PURE__ */ s.jsx(Vr, { url: e }) : null;
|
|
1599
|
-
}
|
|
1600
1593
|
function Vr({ url: e }) {
|
|
1594
|
+
return f((n) => n.isStarted) ? /* @__PURE__ */ s.jsx(Ar, { url: e }) : null;
|
|
1595
|
+
}
|
|
1596
|
+
function Ar({ url: e }) {
|
|
1601
1597
|
const t = A((l) => l.setViewerCount), n = V(null), o = (l) => {
|
|
1602
1598
|
try {
|
|
1603
1599
|
return new URL(l).pathname.split("/").filter((d) => d.length > 0)[0] || null;
|
|
@@ -1627,11 +1623,11 @@ function Vr({ url: e }) {
|
|
|
1627
1623
|
console.error("Failed to fetch viewer count:", d), t(null);
|
|
1628
1624
|
}
|
|
1629
1625
|
};
|
|
1630
|
-
return
|
|
1626
|
+
return D(() => (a(), () => {
|
|
1631
1627
|
n.current && n.current.abort();
|
|
1632
1628
|
}), [e]), Ve(a, 15e3), null;
|
|
1633
1629
|
}
|
|
1634
|
-
function
|
|
1630
|
+
function Or(e, {
|
|
1635
1631
|
defaultValue: t = !1,
|
|
1636
1632
|
initializeWithValue: n = !0
|
|
1637
1633
|
} = {}) {
|
|
@@ -1648,13 +1644,13 @@ function Ar(e, {
|
|
|
1648
1644
|
};
|
|
1649
1645
|
}, [e]), a;
|
|
1650
1646
|
}
|
|
1651
|
-
const
|
|
1652
|
-
playbackButton:
|
|
1653
|
-
seekIndicator:
|
|
1654
|
-
seekIndicatorLeft:
|
|
1655
|
-
seekIndicatorRight:
|
|
1656
|
-
seekIndicatorVisible:
|
|
1657
|
-
},
|
|
1647
|
+
const Hr = "_playbackButton_lgsgw_1", $r = "_seekIndicator_lgsgw_23", Ur = "_seekIndicatorLeft_lgsgw_49", Br = "_seekIndicatorRight_lgsgw_53", zr = "_seekIndicatorVisible_lgsgw_57", me = {
|
|
1648
|
+
playbackButton: Hr,
|
|
1649
|
+
seekIndicator: $r,
|
|
1650
|
+
seekIndicatorLeft: Ur,
|
|
1651
|
+
seekIndicatorRight: Br,
|
|
1652
|
+
seekIndicatorVisible: zr
|
|
1653
|
+
}, Wr = 10;
|
|
1658
1654
|
function Xt(i) {
|
|
1659
1655
|
var c = i, {
|
|
1660
1656
|
className: e,
|
|
@@ -1671,8 +1667,8 @@ function Xt(i) {
|
|
|
1671
1667
|
"maxForwardTime",
|
|
1672
1668
|
"maxBackwardTime"
|
|
1673
1669
|
]);
|
|
1674
|
-
return
|
|
1675
|
-
|
|
1670
|
+
return Or("(min-width: 1024px)") ? /* @__PURE__ */ s.jsx(Zr, j({ className: e, onClick: t }, u)) : /* @__PURE__ */ s.jsx(
|
|
1671
|
+
qr,
|
|
1676
1672
|
j({
|
|
1677
1673
|
className: e,
|
|
1678
1674
|
maxForwardTime: a,
|
|
@@ -1682,32 +1678,32 @@ function Xt(i) {
|
|
|
1682
1678
|
}, u)
|
|
1683
1679
|
);
|
|
1684
1680
|
}
|
|
1685
|
-
function
|
|
1681
|
+
function Zr(o) {
|
|
1686
1682
|
var a = o, { className: e, onClick: t } = a, n = ne(a, ["className", "onClick"]);
|
|
1687
1683
|
const l = V(null), u = f((_) => _.exitFullscreen), i = f((_) => _.isFullscreen), c = f((_) => _.requestFullscreen), d = f((_) => _.resetIdle), v = (_) => {
|
|
1688
|
-
|
|
1684
|
+
P() ? (g(), i ? u() : c()) : y(_);
|
|
1689
1685
|
}, y = (_) => {
|
|
1690
1686
|
l.current = window.setTimeout(() => {
|
|
1691
1687
|
t == null || t(_), g();
|
|
1692
1688
|
}, 200);
|
|
1693
1689
|
}, g = () => {
|
|
1694
1690
|
l.current !== null && (window.clearTimeout(l.current), l.current = null);
|
|
1695
|
-
},
|
|
1691
|
+
}, P = () => l.current !== null, k = () => {
|
|
1696
1692
|
d();
|
|
1697
1693
|
};
|
|
1698
|
-
return
|
|
1694
|
+
return D(() => () => {
|
|
1699
1695
|
g();
|
|
1700
1696
|
}, []), /* @__PURE__ */ s.jsx(
|
|
1701
1697
|
"button",
|
|
1702
1698
|
j({
|
|
1703
1699
|
onClick: v,
|
|
1704
|
-
onMouseMove:
|
|
1700
|
+
onMouseMove: k,
|
|
1705
1701
|
className: [me.playbackButton, e].filter(Boolean).join(" "),
|
|
1706
1702
|
"aria-label": "Player gestures"
|
|
1707
1703
|
}, n)
|
|
1708
1704
|
);
|
|
1709
1705
|
}
|
|
1710
|
-
function
|
|
1706
|
+
function qr(u) {
|
|
1711
1707
|
var i = u, {
|
|
1712
1708
|
className: e,
|
|
1713
1709
|
maxForwardTime: t,
|
|
@@ -1725,26 +1721,26 @@ function Zr(u) {
|
|
|
1725
1721
|
single: null,
|
|
1726
1722
|
indicator: null,
|
|
1727
1723
|
accumulate: null
|
|
1728
|
-
}), v = V(null), y = V(0), g = V(null), [
|
|
1724
|
+
}), v = V(null), y = V(0), g = V(null), [P, k] = G({ visible: !1, direction: null, time: 0 }), _ = f((p) => p.isIdle), S = f((p) => p.setIsIdle), N = f((p) => p.resetIdle), R = (p, U) => p < U / 2 ? "backward" : "forward", L = (p) => {
|
|
1729
1725
|
if (!v.current) return;
|
|
1730
|
-
const
|
|
1731
|
-
if (
|
|
1732
|
-
const Y = Date.now(),
|
|
1733
|
-
if (
|
|
1726
|
+
const U = p.changedTouches[0];
|
|
1727
|
+
if (!U) return;
|
|
1728
|
+
const Y = Date.now(), z = v.current.getBoundingClientRect(), O = U.clientX - z.left, I = U.clientY - z.top;
|
|
1729
|
+
if (O < 0 || O > z.width || I < 0 || I > z.height)
|
|
1734
1730
|
return;
|
|
1735
|
-
const Q = c.current, K = Q ? Y - Q.time : 1 / 0, Z = R(
|
|
1736
|
-
if (Q !== null && g.current === null && K < 300 && Math.abs(
|
|
1731
|
+
const Q = c.current, K = Q ? Y - Q.time : 1 / 0, Z = R(O, z.width), oe = g.current !== null && g.current === Z && Q !== null && K < 700 && Math.abs(O - Q.x) < 100;
|
|
1732
|
+
if (Q !== null && g.current === null && K < 300 && Math.abs(O - Q.x) < 50 || oe) {
|
|
1737
1733
|
p.preventDefault(), p.stopPropagation(), d.current.single && (window.clearTimeout(d.current.single), d.current.single = null), N(), (g.current === null || g.current !== Z) && (y.current = 0, g.current = Z);
|
|
1738
1734
|
const te = Z === "backward" ? n : t;
|
|
1739
1735
|
y.current = Math.min(
|
|
1740
|
-
y.current +
|
|
1736
|
+
y.current + Wr,
|
|
1741
1737
|
te != null ? te : 1 / 0
|
|
1742
1738
|
), x(Z, y.current), d.current.accumulate && window.clearTimeout(d.current.accumulate), d.current.accumulate = window.setTimeout(() => {
|
|
1743
1739
|
const q = y.current;
|
|
1744
|
-
q > 0 && (g.current === "backward" ? a == null || a(q) : o == null || o(q), N()), y.current = 0, g.current = null, c.current = null,
|
|
1745
|
-
}, 500), c.current = { time: Y, x:
|
|
1740
|
+
q > 0 && (g.current === "backward" ? a == null || a(q) : o == null || o(q), N()), y.current = 0, g.current = null, c.current = null, M(), d.current.accumulate = null;
|
|
1741
|
+
}, 500), c.current = { time: Y, x: O };
|
|
1746
1742
|
} else {
|
|
1747
|
-
c.current = { time: Y, x:
|
|
1743
|
+
c.current = { time: Y, x: O }, d.current.single && window.clearTimeout(d.current.single);
|
|
1748
1744
|
const te = g.current !== null ? 700 : 350;
|
|
1749
1745
|
d.current.single = window.setTimeout(() => {
|
|
1750
1746
|
if (g.current === null) {
|
|
@@ -1755,38 +1751,38 @@ function Zr(u) {
|
|
|
1755
1751
|
c.current = null;
|
|
1756
1752
|
}, te);
|
|
1757
1753
|
}
|
|
1758
|
-
}, x = (p,
|
|
1759
|
-
|
|
1760
|
-
|
|
1754
|
+
}, x = (p, U) => {
|
|
1755
|
+
U !== 0 && (k({ visible: !0, direction: p, time: U }), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.indicator = window.setTimeout(() => {
|
|
1756
|
+
M();
|
|
1761
1757
|
}, 700));
|
|
1762
|
-
},
|
|
1763
|
-
|
|
1758
|
+
}, M = () => {
|
|
1759
|
+
k({ visible: !1, direction: null, time: 0 }), d.current.indicator && (window.clearTimeout(d.current.indicator), d.current.indicator = null);
|
|
1764
1760
|
};
|
|
1765
|
-
return
|
|
1761
|
+
return D(() => () => {
|
|
1766
1762
|
d.current.single && window.clearTimeout(d.current.single), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.accumulate && window.clearTimeout(d.current.accumulate);
|
|
1767
1763
|
}, []), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1768
1764
|
/* @__PURE__ */ s.jsx(
|
|
1769
1765
|
"button",
|
|
1770
1766
|
j({
|
|
1771
1767
|
ref: v,
|
|
1772
|
-
onTouchEnd:
|
|
1768
|
+
onTouchEnd: L,
|
|
1773
1769
|
className: [me.playbackButton, e].filter(Boolean).join(" "),
|
|
1774
1770
|
"aria-label": "Player gestures"
|
|
1775
1771
|
}, l)
|
|
1776
1772
|
),
|
|
1777
|
-
|
|
1773
|
+
P.visible && /* @__PURE__ */ s.jsxs(
|
|
1778
1774
|
"div",
|
|
1779
1775
|
{
|
|
1780
|
-
className: `${me.seekIndicator} ${me.seekIndicatorVisible} ${
|
|
1776
|
+
className: `${me.seekIndicator} ${me.seekIndicatorVisible} ${P.direction === "backward" ? me.seekIndicatorLeft : me.seekIndicatorRight}`,
|
|
1781
1777
|
children: [
|
|
1782
|
-
|
|
1783
|
-
_e(
|
|
1778
|
+
P.direction === "backward" ? "-" : "+",
|
|
1779
|
+
_e(P.time)
|
|
1784
1780
|
]
|
|
1785
1781
|
}
|
|
1786
1782
|
)
|
|
1787
1783
|
] });
|
|
1788
1784
|
}
|
|
1789
|
-
function
|
|
1785
|
+
function Kr() {
|
|
1790
1786
|
const e = f((c) => c.isPlaying), t = f((c) => c.pause), n = f((c) => c.getPauseTimeDiff), o = f((c) => c.play), a = A((c) => c.delay), l = A((c) => c.setDelay), u = A((c) => c.startDate), i = u ? u.getTime() : 0;
|
|
1791
1787
|
return /* @__PURE__ */ s.jsx(
|
|
1792
1788
|
Xt,
|
|
@@ -1812,9 +1808,9 @@ function qr() {
|
|
|
1812
1808
|
}
|
|
1813
1809
|
);
|
|
1814
1810
|
}
|
|
1815
|
-
const
|
|
1816
|
-
playerButton:
|
|
1817
|
-
playerButtonCircle:
|
|
1811
|
+
const Yr = "_playerButton_izwqq_1", Xr = "_playerButtonCircle_izwqq_42", _t = {
|
|
1812
|
+
playerButton: Yr,
|
|
1813
|
+
playerButtonCircle: Xr
|
|
1818
1814
|
}, le = Ne(
|
|
1819
1815
|
(a, o) => {
|
|
1820
1816
|
var l = a, { shape: e = "circle", className: t } = l, n = ne(l, ["shape", "className"]);
|
|
@@ -1823,12 +1819,12 @@ const Kr = "_playerButton_izwqq_1", Yr = "_playerButtonCircle_izwqq_42", _t = {
|
|
|
1823
1819
|
}
|
|
1824
1820
|
);
|
|
1825
1821
|
le.displayName = "PlayerButton";
|
|
1826
|
-
const
|
|
1827
|
-
liveIndicator:
|
|
1828
|
-
liveIndicatorHasDelay:
|
|
1829
|
-
liveIndicatorNoDelay:
|
|
1822
|
+
const Gr = "_liveIndicator_1jczn_1", Jr = "_liveIndicatorHasDelay_1jczn_9", Qr = "_liveIndicatorNoDelay_1jczn_13", Ie = {
|
|
1823
|
+
liveIndicator: Gr,
|
|
1824
|
+
liveIndicatorHasDelay: Jr,
|
|
1825
|
+
liveIndicatorNoDelay: Qr
|
|
1830
1826
|
};
|
|
1831
|
-
function
|
|
1827
|
+
function eo(n) {
|
|
1832
1828
|
var o = n, { message: e } = o, t = ne(o, ["message"]);
|
|
1833
1829
|
const a = A((c) => c.delay), l = A((c) => c.setDelay), u = () => {
|
|
1834
1830
|
a && l(0);
|
|
@@ -1860,7 +1856,7 @@ function Jt() {
|
|
|
1860
1856
|
}
|
|
1861
1857
|
);
|
|
1862
1858
|
}
|
|
1863
|
-
function
|
|
1859
|
+
function to() {
|
|
1864
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), l = A((i) => i.setDelay), u = () => {
|
|
1865
1861
|
if (e)
|
|
1866
1862
|
t();
|
|
@@ -1871,17 +1867,17 @@ function eo() {
|
|
|
1871
1867
|
};
|
|
1872
1868
|
return /* @__PURE__ */ s.jsx(le, { onClick: u, children: e ? /* @__PURE__ */ s.jsx(Gt, {}) : /* @__PURE__ */ s.jsx(Jt, {}) });
|
|
1873
1869
|
}
|
|
1874
|
-
const
|
|
1875
|
-
progressSlider:
|
|
1876
|
-
tipContainer:
|
|
1877
|
-
tipContainerVisible:
|
|
1878
|
-
tipContainerHidden:
|
|
1879
|
-
tipContent:
|
|
1880
|
-
},
|
|
1881
|
-
sliderRoot:
|
|
1882
|
-
sliderTrack:
|
|
1883
|
-
sliderRange:
|
|
1884
|
-
sliderThumb:
|
|
1870
|
+
const no = "_progressSlider_hwzgf_1", ro = "_tipContainer_hwzgf_7", oo = "_tipContainerVisible_hwzgf_17", io = "_tipContainerHidden_hwzgf_22", so = "_tipContent_hwzgf_27", se = {
|
|
1871
|
+
progressSlider: no,
|
|
1872
|
+
tipContainer: ro,
|
|
1873
|
+
tipContainerVisible: oo,
|
|
1874
|
+
tipContainerHidden: io,
|
|
1875
|
+
tipContent: so
|
|
1876
|
+
}, ao = "_sliderRoot_aeak6_1", lo = "_sliderTrack_aeak6_18", co = "_sliderRange_aeak6_28", uo = "_sliderThumb_aeak6_37", ke = {
|
|
1877
|
+
sliderRoot: ao,
|
|
1878
|
+
sliderTrack: lo,
|
|
1879
|
+
sliderRange: co,
|
|
1880
|
+
sliderThumb: uo
|
|
1885
1881
|
}, Ae = Ne((l, a) => {
|
|
1886
1882
|
var u = l, { max: e = 100, min: t = 0, className: n } = u, o = ne(u, ["max", "min", "className"]);
|
|
1887
1883
|
return /* @__PURE__ */ s.jsxs(
|
|
@@ -1906,7 +1902,7 @@ const to = "_progressSlider_hwzgf_1", no = "_tipContainer_hwzgf_7", ro = "_tipCo
|
|
|
1906
1902
|
);
|
|
1907
1903
|
});
|
|
1908
1904
|
Ae.displayName = "PlayerSlider";
|
|
1909
|
-
function
|
|
1905
|
+
function Fe(e) {
|
|
1910
1906
|
const t = e.getBoundingClientRect();
|
|
1911
1907
|
return e.offsetWidth / e.offsetHeight > e.clientWidth / e.clientHeight ? {
|
|
1912
1908
|
left: t.left * 100,
|
|
@@ -1918,23 +1914,23 @@ function Me(e) {
|
|
|
1918
1914
|
} : t;
|
|
1919
1915
|
}
|
|
1920
1916
|
const Tt = "vod-player-progress-bar";
|
|
1921
|
-
function
|
|
1922
|
-
const e = V(null), t = V(null), [n, o] = G(0), [a, l] = G(0), [u, i] = G(!1), [c, d] = G(-1), [v, y] = G(-1), g = A((
|
|
1923
|
-
o(Zt(
|
|
1924
|
-
}, [g, _,
|
|
1917
|
+
function fo() {
|
|
1918
|
+
const e = V(null), t = V(null), [n, o] = G(0), [a, l] = G(0), [u, i] = G(!1), [c, d] = G(-1), [v, y] = G(-1), g = A((I) => I.delay), P = A((I) => I.startDate), k = P ? P.getTime() : 0, _ = (/* @__PURE__ */ new Date()).getTime(), S = A((I) => I.setDelay), N = f((I) => I.isPlaying), R = f((I) => I.addIdleLock), L = f((I) => I.removeIdleLock), x = W(() => {
|
|
1919
|
+
o(Zt(k, g)), l(Sr(k, _));
|
|
1920
|
+
}, [g, _, k]), M = parseFloat(
|
|
1925
1921
|
(a ? (v !== -1 ? v : n) / a * 100 : 0).toFixed(1)
|
|
1926
|
-
), p = (
|
|
1927
|
-
y(a * (
|
|
1928
|
-
},
|
|
1922
|
+
), p = (I) => {
|
|
1923
|
+
y(a * (I[0] / 100)), R(Tt);
|
|
1924
|
+
}, U = () => {
|
|
1929
1925
|
if (v !== -1) {
|
|
1930
|
-
const
|
|
1931
|
-
S(
|
|
1926
|
+
const I = Wt(k, v);
|
|
1927
|
+
S(I), y(-1), L(Tt);
|
|
1932
1928
|
}
|
|
1933
|
-
}, Y = () => i(!0),
|
|
1934
|
-
(
|
|
1929
|
+
}, Y = () => i(!0), z = () => i(!1), O = W(
|
|
1930
|
+
(I) => {
|
|
1935
1931
|
const Q = e.current, K = t.current;
|
|
1936
1932
|
if (Q && K) {
|
|
1937
|
-
const Z =
|
|
1933
|
+
const Z = Fe(Q), oe = Fe(K), ue = (I.pageX || I.clientX) - Z.left, te = ue / Z.width;
|
|
1938
1934
|
if (te < 0) return;
|
|
1939
1935
|
let q = ue - oe.width / 2;
|
|
1940
1936
|
q < 0 && (q = 0), q > Z.width - oe.width && (q = -1), K.style.left = q > -1 ? `${q}px` : "auto", K.style.right = q > -1 ? "auto" : "0px";
|
|
@@ -1945,19 +1941,19 @@ function uo() {
|
|
|
1945
1941
|
},
|
|
1946
1942
|
[a]
|
|
1947
1943
|
);
|
|
1948
|
-
return Ve(() => x(), N ? 1e3 : null),
|
|
1944
|
+
return Ve(() => x(), N ? 1e3 : null), D(() => {
|
|
1949
1945
|
x();
|
|
1950
1946
|
}, [x]), /* @__PURE__ */ s.jsxs("div", { className: se.progressSlider, children: [
|
|
1951
1947
|
/* @__PURE__ */ s.jsx(
|
|
1952
1948
|
Ae,
|
|
1953
1949
|
{
|
|
1954
1950
|
ref: e,
|
|
1955
|
-
value: [
|
|
1956
|
-
onPointerLeave:
|
|
1957
|
-
onPointerDown:
|
|
1958
|
-
onPointerMove:
|
|
1951
|
+
value: [M],
|
|
1952
|
+
onPointerLeave: z,
|
|
1953
|
+
onPointerDown: z,
|
|
1954
|
+
onPointerMove: O,
|
|
1959
1955
|
onValueChange: p,
|
|
1960
|
-
onValueCommit:
|
|
1956
|
+
onValueCommit: U,
|
|
1961
1957
|
step: 0.1
|
|
1962
1958
|
}
|
|
1963
1959
|
),
|
|
@@ -1971,7 +1967,7 @@ function uo() {
|
|
|
1971
1967
|
)
|
|
1972
1968
|
] });
|
|
1973
1969
|
}
|
|
1974
|
-
function
|
|
1970
|
+
function ho() {
|
|
1975
1971
|
return /* @__PURE__ */ s.jsx(
|
|
1976
1972
|
"svg",
|
|
1977
1973
|
{
|
|
@@ -1982,17 +1978,17 @@ function fo() {
|
|
|
1982
1978
|
}
|
|
1983
1979
|
);
|
|
1984
1980
|
}
|
|
1985
|
-
function
|
|
1981
|
+
function mo() {
|
|
1986
1982
|
const e = A((a) => a.startDate), t = A((a) => a.setDelay), n = e ? e.getTime() : 0, o = () => t(Wt(n));
|
|
1987
|
-
return /* @__PURE__ */ s.jsx(le, { onClick: o, children: /* @__PURE__ */ s.jsx(
|
|
1983
|
+
return /* @__PURE__ */ s.jsx(le, { onClick: o, children: /* @__PURE__ */ s.jsx(ho, {}) });
|
|
1988
1984
|
}
|
|
1989
|
-
const
|
|
1990
|
-
viewersContainer:
|
|
1991
|
-
viewersIndicator:
|
|
1992
|
-
viewersIcon:
|
|
1993
|
-
viewersCount:
|
|
1985
|
+
const po = "_viewersContainer_z1ihz_1", vo = "_viewersIndicator_z1ihz_16", yo = "_viewersIcon_z1ihz_24", go = "_viewersCount_z1ihz_28", De = {
|
|
1986
|
+
viewersContainer: po,
|
|
1987
|
+
viewersIndicator: vo,
|
|
1988
|
+
viewersIcon: yo,
|
|
1989
|
+
viewersCount: go
|
|
1994
1990
|
};
|
|
1995
|
-
function
|
|
1991
|
+
function wo() {
|
|
1996
1992
|
const e = A((t) => t.viewerCount);
|
|
1997
1993
|
return e ? /* @__PURE__ */ s.jsxs("div", { className: De.viewersContainer, children: [
|
|
1998
1994
|
/* @__PURE__ */ s.jsx("span", { className: De.viewersIndicator }),
|
|
@@ -2038,17 +2034,17 @@ function Qt() {
|
|
|
2038
2034
|
}
|
|
2039
2035
|
);
|
|
2040
2036
|
}
|
|
2041
|
-
const
|
|
2042
|
-
playerContainer:
|
|
2043
|
-
controlsTop:
|
|
2044
|
-
controlsBottom:
|
|
2045
|
-
controlsContainer:
|
|
2046
|
-
controlsRow:
|
|
2047
|
-
controlsSection:
|
|
2048
|
-
controlsSectionStart:
|
|
2049
|
-
controlsSectionEnd:
|
|
2037
|
+
const xo = "_playerContainer_146tx_1", _o = "_controlsTop_146tx_12", To = "_controlsBottom_146tx_29", Co = "_controlsContainer_146tx_45", Eo = "_controlsRow_146tx_61", Ro = "_controlsSection_146tx_68", bo = "_controlsSectionStart_146tx_78", So = "_controlsSectionEnd_146tx_82", B = {
|
|
2038
|
+
playerContainer: xo,
|
|
2039
|
+
controlsTop: _o,
|
|
2040
|
+
controlsBottom: To,
|
|
2041
|
+
controlsContainer: Co,
|
|
2042
|
+
controlsRow: Eo,
|
|
2043
|
+
controlsSection: Ro,
|
|
2044
|
+
controlsSectionStart: bo,
|
|
2045
|
+
controlsSectionEnd: So
|
|
2050
2046
|
};
|
|
2051
|
-
function
|
|
2047
|
+
function jo() {
|
|
2052
2048
|
return /* @__PURE__ */ s.jsx(
|
|
2053
2049
|
"svg",
|
|
2054
2050
|
{
|
|
@@ -2059,7 +2055,7 @@ function So() {
|
|
|
2059
2055
|
}
|
|
2060
2056
|
);
|
|
2061
2057
|
}
|
|
2062
|
-
function
|
|
2058
|
+
function Po() {
|
|
2063
2059
|
return /* @__PURE__ */ s.jsx(
|
|
2064
2060
|
"svg",
|
|
2065
2061
|
{
|
|
@@ -2073,34 +2069,34 @@ function jo() {
|
|
|
2073
2069
|
function en() {
|
|
2074
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), l = f((d) => d.setIsFullscreenReady), u = f((d) => d.techRef), i = W(
|
|
2075
2071
|
(d) => {
|
|
2076
|
-
d.stopPropagation(), a(
|
|
2072
|
+
d.stopPropagation(), a(ir());
|
|
2077
2073
|
},
|
|
2078
2074
|
[a]
|
|
2079
2075
|
), c = () => {
|
|
2080
2076
|
n ? t() : o();
|
|
2081
2077
|
};
|
|
2082
|
-
return
|
|
2078
|
+
return D(() => {
|
|
2083
2079
|
const d = Ut ? u.current : e.current;
|
|
2084
2080
|
if (d)
|
|
2085
|
-
return
|
|
2086
|
-
}, [e, i, u]),
|
|
2081
|
+
return lr(d, i);
|
|
2082
|
+
}, [e, i, u]), D(() => {
|
|
2087
2083
|
l(!0);
|
|
2088
|
-
}, [l]), /* @__PURE__ */ s.jsx(le, { onClick: c, children: n ? /* @__PURE__ */ s.jsx(
|
|
2084
|
+
}, [l]), /* @__PURE__ */ s.jsx(le, { onClick: c, children: n ? /* @__PURE__ */ s.jsx(Po, {}) : /* @__PURE__ */ s.jsx(jo, {}) });
|
|
2089
2085
|
}
|
|
2090
|
-
const Lo = "_idleCheckContainer_crh2s_1",
|
|
2086
|
+
const Lo = "_idleCheckContainer_crh2s_1", Io = "_idleCheckContainerIdle_crh2s_5", ko = "_idleCheckContainerActive_crh2s_11", qe = {
|
|
2091
2087
|
idleCheckContainer: Lo,
|
|
2092
|
-
idleCheckContainerIdle:
|
|
2093
|
-
idleCheckContainerActive:
|
|
2094
|
-
},
|
|
2088
|
+
idleCheckContainerIdle: Io,
|
|
2089
|
+
idleCheckContainerActive: ko
|
|
2090
|
+
}, Do = 5 * 1e3;
|
|
2095
2091
|
function tn({ children: e }) {
|
|
2096
2092
|
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), c = W(() => {
|
|
2097
2093
|
a.current !== null && (window.clearTimeout(a.current), a.current = null);
|
|
2098
2094
|
}, []), d = W(() => {
|
|
2099
|
-
c(), a.current = window.setTimeout(() => o(!0),
|
|
2095
|
+
c(), a.current = window.setTimeout(() => o(!0), Do);
|
|
2100
2096
|
}, [c]);
|
|
2101
|
-
|
|
2097
|
+
D(() => (o(!1), d(), () => {
|
|
2102
2098
|
c();
|
|
2103
|
-
}), [c, d]),
|
|
2099
|
+
}), [c, d]), D(() => {
|
|
2104
2100
|
const g = () => {
|
|
2105
2101
|
o(!1), d();
|
|
2106
2102
|
};
|
|
@@ -2111,30 +2107,30 @@ function tn({ children: e }) {
|
|
|
2111
2107
|
const v = n && !u, y = `${qe.idleCheckContainer} ${v ? qe.idleCheckContainerIdle : qe.idleCheckContainerActive}`;
|
|
2112
2108
|
return /* @__PURE__ */ s.jsx("div", { ref: t, className: y, children: e });
|
|
2113
2109
|
}
|
|
2114
|
-
const
|
|
2115
|
-
spinner:
|
|
2110
|
+
const Mo = "_spinner_oo4hi_10", Fo = {
|
|
2111
|
+
spinner: Mo
|
|
2116
2112
|
};
|
|
2117
|
-
function
|
|
2113
|
+
function No(e) {
|
|
2118
2114
|
return /* @__PURE__ */ s.jsx("div", j({ className: Fo.spinner }, e));
|
|
2119
2115
|
}
|
|
2120
|
-
function
|
|
2116
|
+
function Vo(e, t = 500) {
|
|
2121
2117
|
const [n, o] = G(e);
|
|
2122
|
-
return
|
|
2118
|
+
return D(() => {
|
|
2123
2119
|
const a = window.setTimeout(() => o(e), t);
|
|
2124
2120
|
return () => {
|
|
2125
2121
|
window.clearTimeout(a);
|
|
2126
2122
|
};
|
|
2127
2123
|
}, [e, t]), n;
|
|
2128
2124
|
}
|
|
2129
|
-
const
|
|
2130
|
-
loadingContainer:
|
|
2125
|
+
const Ao = "_loadingContainer_v9v7r_1", Oo = {
|
|
2126
|
+
loadingContainer: Ao
|
|
2131
2127
|
};
|
|
2132
2128
|
function nn(n) {
|
|
2133
2129
|
var o = n, { style: e } = o, t = ne(o, ["style"]);
|
|
2134
2130
|
const a = f((u) => u.isLoading);
|
|
2135
|
-
return
|
|
2131
|
+
return Vo(a, 100) ? /* @__PURE__ */ s.jsx("div", he(j({ className: Oo.loadingContainer, style: e }, t), { children: /* @__PURE__ */ s.jsx(No, {}) })) : null;
|
|
2136
2132
|
}
|
|
2137
|
-
function
|
|
2133
|
+
function Ho() {
|
|
2138
2134
|
return /* @__PURE__ */ s.jsx(
|
|
2139
2135
|
"svg",
|
|
2140
2136
|
{
|
|
@@ -2145,7 +2141,7 @@ function Oo() {
|
|
|
2145
2141
|
}
|
|
2146
2142
|
);
|
|
2147
2143
|
}
|
|
2148
|
-
function
|
|
2144
|
+
function $o() {
|
|
2149
2145
|
return /* @__PURE__ */ s.jsx(
|
|
2150
2146
|
"svg",
|
|
2151
2147
|
{
|
|
@@ -2156,14 +2152,14 @@ function Ho() {
|
|
|
2156
2152
|
}
|
|
2157
2153
|
);
|
|
2158
2154
|
}
|
|
2159
|
-
const
|
|
2160
|
-
dropdownMenuContent:
|
|
2161
|
-
dropdownMenuItem:
|
|
2162
|
-
scrollAreaRoot:
|
|
2163
|
-
scrollAreaViewport:
|
|
2164
|
-
scrollAreaScrollbar:
|
|
2165
|
-
scrollAreaThumb:
|
|
2166
|
-
},
|
|
2155
|
+
const Uo = "_dropdownMenuContent_b7j6b_1", Bo = "_dropdownMenuItem_b7j6b_83", zo = "_scrollAreaRoot_b7j6b_125", Wo = "_scrollAreaViewport_b7j6b_133", Zo = "_scrollAreaScrollbar_b7j6b_141", qo = "_scrollAreaThumb_b7j6b_168", pe = {
|
|
2156
|
+
dropdownMenuContent: Uo,
|
|
2157
|
+
dropdownMenuItem: Bo,
|
|
2158
|
+
scrollAreaRoot: zo,
|
|
2159
|
+
scrollAreaViewport: Wo,
|
|
2160
|
+
scrollAreaScrollbar: Zo,
|
|
2161
|
+
scrollAreaThumb: qo
|
|
2162
|
+
}, Ko = Te.Root, Yo = Te.Trigger, Xo = Te.Portal, rn = Ne((l, a) => {
|
|
2167
2163
|
var u = l, { sideOffset: e = 4, className: t, children: n } = u, o = ne(u, ["sideOffset", "className", "children"]);
|
|
2168
2164
|
return /* @__PURE__ */ s.jsx(
|
|
2169
2165
|
Te.Content,
|
|
@@ -2179,19 +2175,19 @@ const $o = "_dropdownMenuContent_b7j6b_1", Uo = "_dropdownMenuItem_b7j6b_83", Bo
|
|
|
2179
2175
|
}
|
|
2180
2176
|
}, o), {
|
|
2181
2177
|
children: /* @__PURE__ */ s.jsxs(
|
|
2182
|
-
|
|
2178
|
+
Pe.Root,
|
|
2183
2179
|
{
|
|
2184
2180
|
className: pe.scrollAreaRoot,
|
|
2185
2181
|
type: "always",
|
|
2186
2182
|
scrollHideDelay: 0,
|
|
2187
2183
|
children: [
|
|
2188
|
-
/* @__PURE__ */ s.jsx(
|
|
2184
|
+
/* @__PURE__ */ s.jsx(Pe.Viewport, { className: pe.scrollAreaViewport, children: n }),
|
|
2189
2185
|
/* @__PURE__ */ s.jsx(
|
|
2190
|
-
|
|
2186
|
+
Pe.Scrollbar,
|
|
2191
2187
|
{
|
|
2192
2188
|
className: pe.scrollAreaScrollbar,
|
|
2193
2189
|
orientation: "vertical",
|
|
2194
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2190
|
+
children: /* @__PURE__ */ s.jsx(Pe.Thumb, { className: pe.scrollAreaThumb })
|
|
2195
2191
|
}
|
|
2196
2192
|
)
|
|
2197
2193
|
]
|
|
@@ -2229,22 +2225,22 @@ function sn() {
|
|
|
2229
2225
|
},
|
|
2230
2226
|
[o, a]
|
|
2231
2227
|
);
|
|
2232
|
-
return /* @__PURE__ */ s.jsxs(
|
|
2233
|
-
/* @__PURE__ */ s.jsx(
|
|
2234
|
-
/* @__PURE__ */ s.jsx(
|
|
2228
|
+
return /* @__PURE__ */ s.jsxs(Ko, { open: e, onOpenChange: i, children: [
|
|
2229
|
+
/* @__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: l == null ? void 0 : l.map((c) => /* @__PURE__ */ s.jsxs(
|
|
2235
2231
|
on,
|
|
2236
2232
|
{
|
|
2237
2233
|
onClick: () => u(c.value),
|
|
2238
2234
|
children: [
|
|
2239
2235
|
c.label,
|
|
2240
|
-
c.selected && /* @__PURE__ */ s.jsx(
|
|
2236
|
+
c.selected && /* @__PURE__ */ s.jsx(Ho, {})
|
|
2241
2237
|
]
|
|
2242
2238
|
},
|
|
2243
2239
|
c.sid
|
|
2244
2240
|
)) }) })
|
|
2245
2241
|
] });
|
|
2246
2242
|
}
|
|
2247
|
-
function
|
|
2243
|
+
function Go() {
|
|
2248
2244
|
return /* @__PURE__ */ s.jsx(
|
|
2249
2245
|
"svg",
|
|
2250
2246
|
{
|
|
@@ -2255,7 +2251,7 @@ function Xo() {
|
|
|
2255
2251
|
}
|
|
2256
2252
|
);
|
|
2257
2253
|
}
|
|
2258
|
-
function
|
|
2254
|
+
function Jo() {
|
|
2259
2255
|
return /* @__PURE__ */ s.jsx(
|
|
2260
2256
|
"svg",
|
|
2261
2257
|
{
|
|
@@ -2266,7 +2262,7 @@ function Go() {
|
|
|
2266
2262
|
}
|
|
2267
2263
|
);
|
|
2268
2264
|
}
|
|
2269
|
-
function
|
|
2265
|
+
function Qo() {
|
|
2270
2266
|
return /* @__PURE__ */ s.jsx(
|
|
2271
2267
|
"svg",
|
|
2272
2268
|
{
|
|
@@ -2277,9 +2273,9 @@ function Jo() {
|
|
|
2277
2273
|
}
|
|
2278
2274
|
);
|
|
2279
2275
|
}
|
|
2280
|
-
const
|
|
2281
|
-
volumeContainer:
|
|
2282
|
-
volumeSlider:
|
|
2276
|
+
const ei = "_volumeContainer_4d6jg_1", ti = "_volumeSlider_4d6jg_8", Et = {
|
|
2277
|
+
volumeContainer: ei,
|
|
2278
|
+
volumeSlider: ti
|
|
2283
2279
|
}, Rt = "volume";
|
|
2284
2280
|
function an() {
|
|
2285
2281
|
const e = f((i) => i.setVolume), t = f((i) => i.volume), n = f((i) => i.addIdleLock), o = f((i) => i.removeIdleLock), a = (i) => {
|
|
@@ -2288,7 +2284,7 @@ function an() {
|
|
|
2288
2284
|
o(Rt);
|
|
2289
2285
|
}, u = () => e(t ? 0 : 100);
|
|
2290
2286
|
return /* @__PURE__ */ s.jsxs("div", { className: Et.volumeContainer, children: [
|
|
2291
|
-
/* @__PURE__ */ s.jsx(le, { onClick: u, className: "shrink-0", children: t ? t > 50 ? /* @__PURE__ */ s.jsx(
|
|
2287
|
+
/* @__PURE__ */ s.jsx(le, { onClick: u, className: "shrink-0", children: t ? t > 50 ? /* @__PURE__ */ s.jsx(Go, {}) : /* @__PURE__ */ s.jsx(Jo, {}) : /* @__PURE__ */ s.jsx(Qo, {}) }),
|
|
2292
2288
|
/* @__PURE__ */ s.jsx("div", { className: Et.volumeSlider, children: /* @__PURE__ */ s.jsx(
|
|
2293
2289
|
Ae,
|
|
2294
2290
|
{
|
|
@@ -2299,19 +2295,24 @@ function an() {
|
|
|
2299
2295
|
) })
|
|
2300
2296
|
] });
|
|
2301
2297
|
}
|
|
2302
|
-
|
|
2303
|
-
|
|
2298
|
+
const ni = "0.0.45", ln = {
|
|
2299
|
+
version: ni
|
|
2300
|
+
};
|
|
2301
|
+
function wi(e) {
|
|
2302
|
+
return /* @__PURE__ */ s.jsx(kr, { children: /* @__PURE__ */ s.jsx(ri, j({}, e)) });
|
|
2304
2303
|
}
|
|
2305
|
-
function
|
|
2304
|
+
function ri({ url: e, messages: t, onEvent: n }) {
|
|
2306
2305
|
const o = f((a) => a.containerRef);
|
|
2307
|
-
return
|
|
2306
|
+
return D(() => {
|
|
2307
|
+
console.log(`[Player][Live] Version: ${ln.version}`);
|
|
2308
|
+
}, []), /* @__PURE__ */ s.jsxs(
|
|
2308
2309
|
"div",
|
|
2309
2310
|
{
|
|
2310
2311
|
ref: o,
|
|
2311
|
-
className:
|
|
2312
|
+
className: B.playerContainer,
|
|
2312
2313
|
children: [
|
|
2313
2314
|
/* @__PURE__ */ s.jsxs(
|
|
2314
|
-
|
|
2315
|
+
Er,
|
|
2315
2316
|
{
|
|
2316
2317
|
url: e,
|
|
2317
2318
|
messages: {
|
|
@@ -2320,7 +2321,7 @@ function ti({ url: e, messages: t, onEvent: n }) {
|
|
|
2320
2321
|
},
|
|
2321
2322
|
children: [
|
|
2322
2323
|
/* @__PURE__ */ s.jsx(
|
|
2323
|
-
|
|
2324
|
+
Nr,
|
|
2324
2325
|
{
|
|
2325
2326
|
url: e,
|
|
2326
2327
|
messages: {
|
|
@@ -2331,19 +2332,19 @@ function ti({ url: e, messages: t, onEvent: n }) {
|
|
|
2331
2332
|
),
|
|
2332
2333
|
/* @__PURE__ */ s.jsx(Qt, {}),
|
|
2333
2334
|
/* @__PURE__ */ s.jsx(nn, {}),
|
|
2334
|
-
/* @__PURE__ */ s.jsx(
|
|
2335
|
+
/* @__PURE__ */ s.jsx(Kr, {}),
|
|
2335
2336
|
/* @__PURE__ */ s.jsxs(tn, { children: [
|
|
2336
|
-
/* @__PURE__ */ s.jsx("div", { className:
|
|
2337
|
-
/* @__PURE__ */ s.jsx("div", { className:
|
|
2338
|
-
/* @__PURE__ */ s.jsx(
|
|
2339
|
-
/* @__PURE__ */ s.jsxs("div", { className:
|
|
2337
|
+
/* @__PURE__ */ s.jsx("div", { className: B.controlsTop, children: /* @__PURE__ */ s.jsx("div", { className: B.controlsContainer, children: /* @__PURE__ */ s.jsx("div", { className: B.controlsRow, children: /* @__PURE__ */ s.jsx(wo, {}) }) }) }),
|
|
2338
|
+
/* @__PURE__ */ s.jsx("div", { className: B.controlsBottom, children: /* @__PURE__ */ s.jsxs("div", { className: B.controlsContainer, children: [
|
|
2339
|
+
/* @__PURE__ */ s.jsx(fo, {}),
|
|
2340
|
+
/* @__PURE__ */ s.jsxs("div", { className: B.controlsRow, children: [
|
|
2340
2341
|
/* @__PURE__ */ s.jsxs(
|
|
2341
2342
|
"div",
|
|
2342
2343
|
{
|
|
2343
|
-
className: `${
|
|
2344
|
+
className: `${B.controlsSection} ${B.controlsSectionStart}`,
|
|
2344
2345
|
children: [
|
|
2345
|
-
/* @__PURE__ */ s.jsx(
|
|
2346
|
-
/* @__PURE__ */ s.jsx(
|
|
2346
|
+
/* @__PURE__ */ s.jsx(to, {}),
|
|
2347
|
+
/* @__PURE__ */ s.jsx(mo, {}),
|
|
2347
2348
|
/* @__PURE__ */ s.jsx(an, {})
|
|
2348
2349
|
]
|
|
2349
2350
|
}
|
|
@@ -2351,9 +2352,9 @@ function ti({ url: e, messages: t, onEvent: n }) {
|
|
|
2351
2352
|
/* @__PURE__ */ s.jsxs(
|
|
2352
2353
|
"div",
|
|
2353
2354
|
{
|
|
2354
|
-
className: `${
|
|
2355
|
+
className: `${B.controlsSection} ${B.controlsSectionEnd}`,
|
|
2355
2356
|
children: [
|
|
2356
|
-
/* @__PURE__ */ s.jsx(
|
|
2357
|
+
/* @__PURE__ */ s.jsx(eo, { message: t == null ? void 0 : t.live }),
|
|
2357
2358
|
/* @__PURE__ */ s.jsx(sn, {}),
|
|
2358
2359
|
/* @__PURE__ */ s.jsx(en, {})
|
|
2359
2360
|
]
|
|
@@ -2365,14 +2366,14 @@ function ti({ url: e, messages: t, onEvent: n }) {
|
|
|
2365
2366
|
]
|
|
2366
2367
|
}
|
|
2367
2368
|
),
|
|
2368
|
-
/* @__PURE__ */ s.jsx(
|
|
2369
|
-
/* @__PURE__ */ s.jsx(
|
|
2369
|
+
/* @__PURE__ */ s.jsx(Ir, {}),
|
|
2370
|
+
/* @__PURE__ */ s.jsx(Vr, { url: e }),
|
|
2370
2371
|
n && /* @__PURE__ */ s.jsx(Lr, { callback: n })
|
|
2371
2372
|
]
|
|
2372
2373
|
}
|
|
2373
2374
|
);
|
|
2374
2375
|
}
|
|
2375
|
-
function
|
|
2376
|
+
function oi() {
|
|
2376
2377
|
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), l = f((u) => u.seek);
|
|
2377
2378
|
return /* @__PURE__ */ s.jsx(
|
|
2378
2379
|
Xt,
|
|
@@ -2393,28 +2394,28 @@ function ni() {
|
|
|
2393
2394
|
}
|
|
2394
2395
|
);
|
|
2395
2396
|
}
|
|
2396
|
-
function
|
|
2397
|
+
function ii() {
|
|
2397
2398
|
const e = f((a) => a.isPlaying), t = f((a) => a.pause), n = f((a) => a.play), o = () => {
|
|
2398
2399
|
e ? t() : n();
|
|
2399
2400
|
};
|
|
2400
2401
|
return /* @__PURE__ */ s.jsx(le, { onClick: o, children: e ? /* @__PURE__ */ s.jsx(Gt, {}) : /* @__PURE__ */ s.jsx(Jt, {}) });
|
|
2401
2402
|
}
|
|
2402
2403
|
const bt = "vod-player-progress-bar";
|
|
2403
|
-
function
|
|
2404
|
-
const e = V(null), t = V(null), [n, o] = G(!1), [a, l] = G(-1), [u, i] = G(-1), c = f((
|
|
2404
|
+
function si() {
|
|
2405
|
+
const e = V(null), t = V(null), [n, o] = G(!1), [a, l] = G(-1), [u, i] = G(-1), c = f((L) => L.currentTime), d = f((L) => L.duration), v = f((L) => L.seek), y = f((L) => L.addIdleLock), g = f((L) => L.removeIdleLock), P = parseFloat(
|
|
2405
2406
|
(d ? (u !== -1 ? u : c) / d * 100 : 0).toFixed(1)
|
|
2406
|
-
),
|
|
2407
|
-
i(d * (
|
|
2407
|
+
), k = (L) => {
|
|
2408
|
+
i(d * (L[0] / 100)), y(bt);
|
|
2408
2409
|
}, _ = () => {
|
|
2409
2410
|
u !== -1 && (v(u), i(-1), g(bt));
|
|
2410
2411
|
}, S = () => o(!0), N = () => o(!1), R = W(
|
|
2411
|
-
(
|
|
2412
|
-
const x = e.current,
|
|
2413
|
-
if (x &&
|
|
2414
|
-
const p =
|
|
2415
|
-
if (
|
|
2416
|
-
let
|
|
2417
|
-
|
|
2412
|
+
(L) => {
|
|
2413
|
+
const x = e.current, M = t.current;
|
|
2414
|
+
if (x && M) {
|
|
2415
|
+
const p = Fe(x), U = Fe(M), Y = (L.pageX || L.clientX) - p.left, z = Y / p.width;
|
|
2416
|
+
if (z < 0) return;
|
|
2417
|
+
let O = Y - U.width / 2;
|
|
2418
|
+
O < 0 && (O = 0), O > p.width - U.width && (O = -1), M.style.left = O > -1 ? `${O}px` : "auto", M.style.right = O > -1 ? "auto" : "0px", l(z * d);
|
|
2418
2419
|
}
|
|
2419
2420
|
S();
|
|
2420
2421
|
},
|
|
@@ -2425,11 +2426,11 @@ function oi() {
|
|
|
2425
2426
|
Ae,
|
|
2426
2427
|
{
|
|
2427
2428
|
ref: e,
|
|
2428
|
-
value: [
|
|
2429
|
+
value: [P],
|
|
2429
2430
|
onPointerLeave: N,
|
|
2430
2431
|
onPointerDown: N,
|
|
2431
2432
|
onPointerMove: R,
|
|
2432
|
-
onValueChange:
|
|
2433
|
+
onValueChange: k,
|
|
2433
2434
|
onValueCommit: _,
|
|
2434
2435
|
step: 0.1
|
|
2435
2436
|
}
|
|
@@ -2444,29 +2445,29 @@ function oi() {
|
|
|
2444
2445
|
)
|
|
2445
2446
|
] });
|
|
2446
2447
|
}
|
|
2447
|
-
const
|
|
2448
|
-
remainingTimeContainer:
|
|
2449
|
-
remainingTime:
|
|
2450
|
-
remainingSeparator:
|
|
2448
|
+
const ai = "_remainingTimeContainer_1yyhb_1", li = "_remainingTime_1yyhb_1", ci = "_remainingSeparator_1yyhb_17", Me = {
|
|
2449
|
+
remainingTimeContainer: ai,
|
|
2450
|
+
remainingTime: li,
|
|
2451
|
+
remainingSeparator: ci
|
|
2451
2452
|
};
|
|
2452
|
-
function
|
|
2453
|
+
function ui() {
|
|
2453
2454
|
const e = f((n) => n.currentTime), t = f((n) => n.duration);
|
|
2454
|
-
return /* @__PURE__ */ s.jsxs("div", { className:
|
|
2455
|
-
/* @__PURE__ */ s.jsx("p", { className:
|
|
2456
|
-
/* @__PURE__ */ s.jsx("p", { className:
|
|
2457
|
-
/* @__PURE__ */ s.jsx("p", { className:
|
|
2455
|
+
return /* @__PURE__ */ s.jsxs("div", { className: Me.remainingTimeContainer, children: [
|
|
2456
|
+
/* @__PURE__ */ s.jsx("p", { className: Me.remainingTime, children: _e(e) }),
|
|
2457
|
+
/* @__PURE__ */ s.jsx("p", { className: Me.remainingSeparator }),
|
|
2458
|
+
/* @__PURE__ */ s.jsx("p", { className: Me.remainingTime, children: _e(t) })
|
|
2458
2459
|
] });
|
|
2459
2460
|
}
|
|
2460
|
-
function
|
|
2461
|
+
function di({ callback: e }) {
|
|
2461
2462
|
const t = f((n) => n.eventEmitter);
|
|
2462
|
-
return
|
|
2463
|
+
return D(() => {
|
|
2463
2464
|
const n = (o) => e("timeUpdate", o);
|
|
2464
2465
|
return t.on("timeUpdate", n), () => {
|
|
2465
2466
|
t.off("timeUpdate", n);
|
|
2466
2467
|
};
|
|
2467
2468
|
}, [e, t]), /* @__PURE__ */ s.jsx(zt, { callback: e });
|
|
2468
2469
|
}
|
|
2469
|
-
function
|
|
2470
|
+
function fi() {
|
|
2470
2471
|
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), l = f((i) => i.seek), u = W(
|
|
2471
2472
|
(i) => {
|
|
2472
2473
|
let c = !1;
|
|
@@ -2487,45 +2488,47 @@ function ui() {
|
|
|
2487
2488
|
},
|
|
2488
2489
|
[e, t, n, o, a, l]
|
|
2489
2490
|
);
|
|
2490
|
-
return
|
|
2491
|
+
return D(() => (document.addEventListener("keydown", u), () => {
|
|
2491
2492
|
document.removeEventListener("keydown", u);
|
|
2492
2493
|
}), [u]), /* @__PURE__ */ s.jsx(qt, {});
|
|
2493
2494
|
}
|
|
2494
|
-
function
|
|
2495
|
-
return /* @__PURE__ */ s.jsx(Kt, { children: /* @__PURE__ */ s.jsx(
|
|
2495
|
+
function xi(e) {
|
|
2496
|
+
return /* @__PURE__ */ s.jsx(Kt, { children: /* @__PURE__ */ s.jsx(hi, j({}, e)) });
|
|
2496
2497
|
}
|
|
2497
|
-
function
|
|
2498
|
+
function hi({ url: e, messages: t, onEvent: n, startTime: o }) {
|
|
2498
2499
|
const a = f((u) => u.setStartTime), l = f((u) => u.containerRef);
|
|
2499
|
-
return
|
|
2500
|
+
return D(() => {
|
|
2500
2501
|
o && a(o);
|
|
2501
|
-
}, [o, a]),
|
|
2502
|
+
}, [o, a]), D(() => {
|
|
2503
|
+
console.log(`[Player][VOD] Version: ${ln.version}`);
|
|
2504
|
+
}, []), /* @__PURE__ */ s.jsxs(
|
|
2502
2505
|
"div",
|
|
2503
2506
|
{
|
|
2504
2507
|
ref: l,
|
|
2505
|
-
className:
|
|
2508
|
+
className: B.playerContainer,
|
|
2506
2509
|
children: [
|
|
2507
2510
|
/* @__PURE__ */ s.jsx(Yt, { url: e, isLive: !1, messages: t }),
|
|
2508
2511
|
/* @__PURE__ */ s.jsx(Qt, {}),
|
|
2509
2512
|
/* @__PURE__ */ s.jsx(nn, {}),
|
|
2510
|
-
/* @__PURE__ */ s.jsx(
|
|
2511
|
-
/* @__PURE__ */ s.jsx(tn, { children: /* @__PURE__ */ s.jsx("div", { className:
|
|
2512
|
-
/* @__PURE__ */ s.jsx(
|
|
2513
|
-
/* @__PURE__ */ s.jsxs("div", { className:
|
|
2513
|
+
/* @__PURE__ */ s.jsx(oi, {}),
|
|
2514
|
+
/* @__PURE__ */ s.jsx(tn, { children: /* @__PURE__ */ s.jsx("div", { className: B.controlsBottom, children: /* @__PURE__ */ s.jsxs("div", { className: B.controlsContainer, children: [
|
|
2515
|
+
/* @__PURE__ */ s.jsx(si, {}),
|
|
2516
|
+
/* @__PURE__ */ s.jsxs("div", { className: B.controlsRow, children: [
|
|
2514
2517
|
/* @__PURE__ */ s.jsxs(
|
|
2515
2518
|
"div",
|
|
2516
2519
|
{
|
|
2517
|
-
className: `${
|
|
2520
|
+
className: `${B.controlsSection} ${B.controlsSectionStart}`,
|
|
2518
2521
|
children: [
|
|
2519
|
-
/* @__PURE__ */ s.jsx(
|
|
2522
|
+
/* @__PURE__ */ s.jsx(ii, {}),
|
|
2520
2523
|
/* @__PURE__ */ s.jsx(an, {}),
|
|
2521
|
-
/* @__PURE__ */ s.jsx(
|
|
2524
|
+
/* @__PURE__ */ s.jsx(ui, {})
|
|
2522
2525
|
]
|
|
2523
2526
|
}
|
|
2524
2527
|
),
|
|
2525
2528
|
/* @__PURE__ */ s.jsxs(
|
|
2526
2529
|
"div",
|
|
2527
2530
|
{
|
|
2528
|
-
className: `${
|
|
2531
|
+
className: `${B.controlsSection} ${B.controlsSectionEnd}`,
|
|
2529
2532
|
children: [
|
|
2530
2533
|
/* @__PURE__ */ s.jsx(sn, {}),
|
|
2531
2534
|
/* @__PURE__ */ s.jsx(en, {})
|
|
@@ -2534,14 +2537,14 @@ function di({ url: e, messages: t, onEvent: n, startTime: o }) {
|
|
|
2534
2537
|
)
|
|
2535
2538
|
] })
|
|
2536
2539
|
] }) }) }),
|
|
2537
|
-
/* @__PURE__ */ s.jsx(
|
|
2538
|
-
n && /* @__PURE__ */ s.jsx(
|
|
2540
|
+
/* @__PURE__ */ s.jsx(fi, {}),
|
|
2541
|
+
n && /* @__PURE__ */ s.jsx(di, { callback: n })
|
|
2539
2542
|
]
|
|
2540
2543
|
}
|
|
2541
2544
|
);
|
|
2542
2545
|
}
|
|
2543
2546
|
export {
|
|
2544
|
-
|
|
2545
|
-
|
|
2547
|
+
wi as LivePlayer,
|
|
2548
|
+
xi as VodPlayer
|
|
2546
2549
|
};
|
|
2547
2550
|
//# sourceMappingURL=react-video-player.es.js.map
|