playron 1.0.35 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/PlayerCore.d.ts.map +1 -1
- package/dist/core/StateManager.d.ts.map +1 -1
- package/dist/playron.cjs.js +16 -16
- package/dist/playron.es.js +409 -398
- package/dist/types/config.d.ts +2 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.types.d.ts +2 -0
- package/dist/types/config.types.d.ts.map +1 -1
- package/dist/ui/Overlay/VideoOverlay.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/playron.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s, jsxs as u, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as
|
|
2
|
+
import { createContext as de, useState as b, useEffect as k, useMemo as Ue, useContext as re, memo as kt, useRef as O, useCallback as $ } from "react";
|
|
3
3
|
class St {
|
|
4
4
|
listeners = /* @__PURE__ */ new Map();
|
|
5
5
|
/**
|
|
@@ -47,7 +47,7 @@ class St {
|
|
|
47
47
|
return this.listeners.get(e)?.size || 0;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
const ge = new St(),
|
|
50
|
+
const ge = new St(), x = {
|
|
51
51
|
// Playback events
|
|
52
52
|
PLAY: "play",
|
|
53
53
|
PAUSE: "pause",
|
|
@@ -88,8 +88,8 @@ const ge = new St(), C = {
|
|
|
88
88
|
MEDIA_ERR_SRC_NOT_SUPPORTED: 4
|
|
89
89
|
// Source format not supported
|
|
90
90
|
};
|
|
91
|
-
function
|
|
92
|
-
return Object.values(
|
|
91
|
+
function Ei(a) {
|
|
92
|
+
return Object.values(x).includes(a);
|
|
93
93
|
}
|
|
94
94
|
class At {
|
|
95
95
|
videoElement = null;
|
|
@@ -106,19 +106,19 @@ class At {
|
|
|
106
106
|
* Video element'inin native event'lerini dinle
|
|
107
107
|
*/
|
|
108
108
|
setupEventListeners() {
|
|
109
|
-
this.videoElement && (this.videoElement.addEventListener(
|
|
109
|
+
this.videoElement && (this.videoElement.addEventListener(x.PLAY, () => {
|
|
110
110
|
this.isPlaying = !0, this.emitPlayEvent();
|
|
111
|
-
}), this.videoElement.addEventListener(
|
|
111
|
+
}), this.videoElement.addEventListener(x.PAUSE, () => {
|
|
112
112
|
this.isPlaying = !1, this.emitPauseEvent();
|
|
113
|
-
}), this.videoElement.addEventListener(
|
|
113
|
+
}), this.videoElement.addEventListener(x.VOLUME_CHANGE, () => {
|
|
114
114
|
this.videoElement && (this.volume = this.videoElement.volume, this.isMuted = this.videoElement.muted, this.emitVolumeChangeEvent());
|
|
115
|
-
}), this.videoElement.addEventListener(
|
|
115
|
+
}), this.videoElement.addEventListener(x.TIME_UPDATE, () => {
|
|
116
116
|
this.videoElement && (this.currentTime = this.videoElement.currentTime);
|
|
117
|
-
}), this.videoElement.addEventListener(
|
|
117
|
+
}), this.videoElement.addEventListener(x.LOADED_METADATA, () => {
|
|
118
118
|
this.videoElement && (this.duration = this.videoElement.duration);
|
|
119
|
-
}), this.videoElement.addEventListener(
|
|
119
|
+
}), this.videoElement.addEventListener(x.RATE_CHANGE, () => {
|
|
120
120
|
this.videoElement && (this.playbackRate = this.videoElement.playbackRate);
|
|
121
|
-
}), this.videoElement.addEventListener(
|
|
121
|
+
}), this.videoElement.addEventListener(x.ERROR, (e) => {
|
|
122
122
|
console.error("Video error:", e), this.videoElement?.error && console.error("Video error details:", {
|
|
123
123
|
code: this.videoElement.error.code,
|
|
124
124
|
message: this.videoElement.error.message,
|
|
@@ -451,8 +451,9 @@ class Tt {
|
|
|
451
451
|
volume: 1,
|
|
452
452
|
currentTime: 0,
|
|
453
453
|
duration: 0,
|
|
454
|
-
playbackRate: 1
|
|
455
|
-
|
|
454
|
+
playbackRate: 1,
|
|
455
|
+
isBuffering: !1,
|
|
456
|
+
isSeeking: !1
|
|
456
457
|
}, ...e };
|
|
457
458
|
}
|
|
458
459
|
/**
|
|
@@ -928,7 +929,7 @@ async function nt(a, e, t, r, i) {
|
|
|
928
929
|
}
|
|
929
930
|
throw n;
|
|
930
931
|
}
|
|
931
|
-
async function
|
|
932
|
+
async function Bt(a, e = {}) {
|
|
932
933
|
const t = Oe.get(a);
|
|
933
934
|
if (t)
|
|
934
935
|
return console.debug("[LicenseManager] Using cached FairPlay certificate:", a), t;
|
|
@@ -943,7 +944,7 @@ async function $t(a, e = {}) {
|
|
|
943
944
|
);
|
|
944
945
|
return Oe.set(a, r), r;
|
|
945
946
|
}
|
|
946
|
-
function
|
|
947
|
+
function $t() {
|
|
947
948
|
Oe.clear();
|
|
948
949
|
}
|
|
949
950
|
async function Ft(a, e, t = {}, r = !1, i = {}) {
|
|
@@ -1016,7 +1017,7 @@ class Ot {
|
|
|
1016
1017
|
this.mediaKeys = await t.createMediaKeys();
|
|
1017
1018
|
let r;
|
|
1018
1019
|
try {
|
|
1019
|
-
r = await
|
|
1020
|
+
r = await Bt(this.config.certificateUrl, this.config.headers);
|
|
1020
1021
|
} catch (i) {
|
|
1021
1022
|
throw new Error(
|
|
1022
1023
|
`FairPlay: Failed to fetch server certificate from ${this.config.certificateUrl}: ` + (i instanceof Error ? i.message : String(i))
|
|
@@ -1153,7 +1154,7 @@ class Ht {
|
|
|
1153
1154
|
this.destroyed = !0, console.debug("[WidevineAdapter] Destroyed");
|
|
1154
1155
|
}
|
|
1155
1156
|
}
|
|
1156
|
-
const
|
|
1157
|
+
const Be = "com.microsoft.playready", Ke = "com.microsoft.playready.hardware", zt = [
|
|
1157
1158
|
{
|
|
1158
1159
|
initDataTypes: ["cenc"],
|
|
1159
1160
|
videoCapabilities: [
|
|
@@ -1170,7 +1171,7 @@ class qt {
|
|
|
1170
1171
|
config;
|
|
1171
1172
|
destroyed = !1;
|
|
1172
1173
|
constructor(e) {
|
|
1173
|
-
this.config = e, this.keySystem = e.preferHardware ? Ke :
|
|
1174
|
+
this.config = e, this.keySystem = e.preferHardware ? Ke : Be;
|
|
1174
1175
|
}
|
|
1175
1176
|
/**
|
|
1176
1177
|
* Probe PlayReady support and signal readiness.
|
|
@@ -1178,7 +1179,7 @@ class qt {
|
|
|
1178
1179
|
*/
|
|
1179
1180
|
async initialize(e) {
|
|
1180
1181
|
if (this.destroyed) return;
|
|
1181
|
-
const t = this.config.preferHardware ? [Ke,
|
|
1182
|
+
const t = this.config.preferHardware ? [Ke, Be] : [Be];
|
|
1182
1183
|
let r = !1;
|
|
1183
1184
|
for (const i of t)
|
|
1184
1185
|
try {
|
|
@@ -1256,7 +1257,7 @@ class Kt {
|
|
|
1256
1257
|
}
|
|
1257
1258
|
/** Destroy the adapter and release all resources. */
|
|
1258
1259
|
destroy() {
|
|
1259
|
-
this.destroyed || (this.destroyed = !0, this.adapter?.destroy(), this.adapter = null, this.selectedKeySystem = null,
|
|
1260
|
+
this.destroyed || (this.destroyed = !0, this.adapter?.destroy(), this.adapter = null, this.selectedKeySystem = null, $t(), console.debug("[DrmManager] Destroyed"));
|
|
1260
1261
|
}
|
|
1261
1262
|
// ── Private ────────────────────────────────────────────────────────────────
|
|
1262
1263
|
createAdapter(e) {
|
|
@@ -1514,27 +1515,37 @@ class fe {
|
|
|
1514
1515
|
* State değişikliklerini dinle
|
|
1515
1516
|
*/
|
|
1516
1517
|
setupStateListeners() {
|
|
1517
|
-
!this.stateManager || !this.videoElement || (this.videoElement.addEventListener(
|
|
1518
|
+
!this.stateManager || !this.videoElement || (this.videoElement.addEventListener(x.PLAY, () => {
|
|
1518
1519
|
this.events.emit("play", { timestamp: Date.now() });
|
|
1519
|
-
}), this.videoElement.addEventListener(
|
|
1520
|
+
}), this.videoElement.addEventListener(x.PAUSE, () => {
|
|
1520
1521
|
this.events.emit("pause", { timestamp: Date.now() });
|
|
1521
|
-
}), this.videoElement.addEventListener(
|
|
1522
|
+
}), this.videoElement.addEventListener(x.TIME_UPDATE, () => {
|
|
1522
1523
|
this.events.emit("timeupdate", {
|
|
1523
1524
|
currentTime: this.videoElement?.currentTime || 0,
|
|
1524
1525
|
duration: this.videoElement?.duration || 0
|
|
1525
1526
|
});
|
|
1526
|
-
}), this.videoElement.addEventListener(
|
|
1527
|
+
}), this.videoElement.addEventListener(x.ENDED, () => {
|
|
1527
1528
|
this.events.emit("ended", { timestamp: Date.now() });
|
|
1528
|
-
}), this.videoElement.addEventListener(
|
|
1529
|
+
}), this.videoElement.addEventListener(x.LOADED_METADATA, () => {
|
|
1529
1530
|
this.events.emit("loadedmetadata", {
|
|
1530
1531
|
duration: this.videoElement?.duration || 0,
|
|
1531
1532
|
videoWidth: this.videoElement?.videoWidth || 0,
|
|
1532
1533
|
videoHeight: this.videoElement?.videoHeight || 0
|
|
1533
1534
|
});
|
|
1534
|
-
}), this.videoElement.addEventListener(
|
|
1535
|
+
}), this.videoElement.addEventListener(x.RATE_CHANGE, () => {
|
|
1535
1536
|
const e = this.videoElement?.playbackRate || 1;
|
|
1536
1537
|
this.stateManager?.set("playbackRate", e), this.events.emit("ratechange", { playbackRate: e });
|
|
1537
|
-
}), this.videoElement.addEventListener(
|
|
1538
|
+
}), this.videoElement.addEventListener(x.SEEKING, () => {
|
|
1539
|
+
this.stateManager?.set("isSeeking", !0), this.stateManager?.set("isBuffering", !0), this.events.emit("seeking", { targetTime: this.videoElement?.currentTime ?? 0 }), this.events.emit("buffering", { isBuffering: !0 });
|
|
1540
|
+
}), this.videoElement.addEventListener(x.SEEKED, () => {
|
|
1541
|
+
this.stateManager?.set("isSeeking", !1), this.events.emit("seeked", { currentTime: this.videoElement?.currentTime ?? 0 });
|
|
1542
|
+
}), this.videoElement.addEventListener(x.WAITING, () => {
|
|
1543
|
+
this.stateManager?.set("isBuffering", !0), this.events.emit("buffering", { isBuffering: !0 });
|
|
1544
|
+
}), this.videoElement.addEventListener(x.PLAYING, () => {
|
|
1545
|
+
this.stateManager?.set("isBuffering", !1), this.stateManager?.set("isSeeking", !1), this.events.emit("buffering", { isBuffering: !1 });
|
|
1546
|
+
}), this.videoElement.addEventListener(x.CAN_PLAY, () => {
|
|
1547
|
+
this.stateManager?.set("isBuffering", !1), this.events.emit("buffering", { isBuffering: !1 });
|
|
1548
|
+
}), this.videoElement.addEventListener(x.ERROR, () => {
|
|
1538
1549
|
const e = this.videoElement?.error;
|
|
1539
1550
|
if (e) {
|
|
1540
1551
|
const t = `MEDIA_ERR_${e.code === 1 ? "ABORTED" : e.code === 2 ? "NETWORK" : e.code === 3 ? "DECODE" : e.code === 4 ? "SRC_NOT_SUPPORTED" : "UNKNOWN"}`;
|
|
@@ -2057,7 +2068,7 @@ class fe {
|
|
|
2057
2068
|
this.stallDetector?.destroy(), this.stallDetector = null, this.destroyAirPlay(), this.destroyChromecast(), this.destroyStreamingEngines(), this.videoEngine && (this.videoEngine.destroy(), this.videoEngine = null), this.stateManager && (this.stateManager.reset(), this.stateManager = null), this.configManager && (this.configManager.reset(), this.configManager = null), this.videoElement = null, this.container = null;
|
|
2058
2069
|
}
|
|
2059
2070
|
}
|
|
2060
|
-
const st =
|
|
2071
|
+
const st = de(null), ot = {
|
|
2061
2072
|
isPlaying: !1,
|
|
2062
2073
|
isMuted: !1,
|
|
2063
2074
|
volume: 1,
|
|
@@ -2066,7 +2077,7 @@ const st = ce(null), ot = {
|
|
|
2066
2077
|
isLive: !1,
|
|
2067
2078
|
isAtLiveEdge: !1,
|
|
2068
2079
|
liveLatency: 0
|
|
2069
|
-
}, at =
|
|
2080
|
+
}, at = de(ot), lt = de(null);
|
|
2070
2081
|
function Gt({ children: a, playerInstance: e }) {
|
|
2071
2082
|
const [t, r] = b(ot);
|
|
2072
2083
|
k(() => {
|
|
@@ -2101,8 +2112,8 @@ function Gt({ children: a, playerInstance: e }) {
|
|
|
2101
2112
|
isLive: !0
|
|
2102
2113
|
});
|
|
2103
2114
|
};
|
|
2104
|
-
return e.events.on("livelatencyupdate", p), l.addEventListener(
|
|
2105
|
-
e.events.off("livelatencyupdate", p), l.removeEventListener(
|
|
2115
|
+
return e.events.on("livelatencyupdate", p), l.addEventListener(x.TIME_UPDATE, d), l.addEventListener(x.PLAY, c), l.addEventListener(x.PAUSE, c), l.addEventListener(x.VOLUME_CHANGE, h), l.addEventListener(x.LOADED_METADATA, d), () => {
|
|
2116
|
+
e.events.off("livelatencyupdate", p), l.removeEventListener(x.TIME_UPDATE, d), l.removeEventListener(x.PLAY, c), l.removeEventListener(x.PAUSE, c), l.removeEventListener(x.VOLUME_CHANGE, h), l.removeEventListener(x.LOADED_METADATA, d), n.unsubscribe(o);
|
|
2106
2117
|
};
|
|
2107
2118
|
}
|
|
2108
2119
|
return () => {
|
|
@@ -2185,7 +2196,7 @@ function Gt({ children: a, playerInstance: e }) {
|
|
|
2185
2196
|
} : null, [e]);
|
|
2186
2197
|
return /* @__PURE__ */ s(st.Provider, { value: e, children: /* @__PURE__ */ s(lt.Provider, { value: i, children: /* @__PURE__ */ s(at.Provider, { value: t, children: a }) }) });
|
|
2187
2198
|
}
|
|
2188
|
-
function
|
|
2199
|
+
function Y(a) {
|
|
2189
2200
|
const e = re(at);
|
|
2190
2201
|
if (!e)
|
|
2191
2202
|
throw new Error("usePlayerState must be used within PlayerProvider");
|
|
@@ -2262,74 +2273,74 @@ const Zt = "_overlay_3mfq6_3", Jt = "_iconContainer_3mfq6_17", er = "_loading_3m
|
|
|
2262
2273
|
customIcon: rr
|
|
2263
2274
|
};
|
|
2264
2275
|
function ir({ config: a, isAdLoading: e }) {
|
|
2265
|
-
const t =
|
|
2276
|
+
const t = Y((D) => D.isPlaying), { togglePlay: r, toggleFullscreen: i, getPlayer: n } = q(), [o, l] = b(!1), [d, c] = b("play"), [h, p] = b(!1), g = O(null);
|
|
2266
2277
|
k(() => {
|
|
2267
2278
|
console.log("[VideoOverlay] isAdLoading changed:", e), e ? (console.log("[VideoOverlay] ✅ Showing ad loading icon"), p(!0), c("loading"), l(!0)) : (console.log("[VideoOverlay] ❌ Hiding ad loading icon"), p(!1), l(!1));
|
|
2268
2279
|
}, [e]);
|
|
2269
|
-
const m = a?.ui?.showOverlayIcons !== !1, S = a?.ui?.overlayIcons?.playIcon,
|
|
2280
|
+
const m = a?.ui?.showOverlayIcons !== !1, S = a?.ui?.showPlayPauseIcons !== !1, I = a?.ui?.overlayIcons?.playIcon, C = a?.ui?.overlayIcons?.pauseIcon, T = a?.ui?.overlayIcons?.iconSize || 40, w = a?.ui?.overlayIcons?.containerSize || 80;
|
|
2270
2281
|
k(() => {
|
|
2271
|
-
const
|
|
2272
|
-
if (!
|
|
2273
|
-
const A =
|
|
2282
|
+
const D = n();
|
|
2283
|
+
if (!D) return;
|
|
2284
|
+
const A = D.video || D.videoElement;
|
|
2274
2285
|
if (!A) return;
|
|
2275
|
-
const
|
|
2286
|
+
const _ = () => {
|
|
2276
2287
|
p(!0), c("loading"), l(!0), g.current && clearTimeout(g.current);
|
|
2277
|
-
},
|
|
2288
|
+
}, W = () => {
|
|
2278
2289
|
g.current = window.setTimeout(() => {
|
|
2279
2290
|
p(!1), l(!1);
|
|
2280
2291
|
}, 300);
|
|
2281
|
-
},
|
|
2292
|
+
}, E = () => {
|
|
2282
2293
|
p(!0), c("loading"), l(!0);
|
|
2283
|
-
},
|
|
2294
|
+
}, M = () => {
|
|
2284
2295
|
h && (g.current = window.setTimeout(() => {
|
|
2285
2296
|
p(!1), l(!1);
|
|
2286
2297
|
}, 300));
|
|
2287
|
-
},
|
|
2298
|
+
}, N = () => {
|
|
2288
2299
|
h && (g.current = window.setTimeout(() => {
|
|
2289
2300
|
p(!1), l(!1);
|
|
2290
2301
|
}, 300));
|
|
2291
|
-
},
|
|
2302
|
+
}, H = () => {
|
|
2292
2303
|
p(!0), c("loading"), l(!0);
|
|
2293
2304
|
};
|
|
2294
|
-
return A.addEventListener(
|
|
2295
|
-
A.removeEventListener(
|
|
2305
|
+
return A.addEventListener(x.SEEKING, _), A.addEventListener(x.SEEKED, W), A.addEventListener(x.WAITING, E), A.addEventListener(x.PLAYING, M), A.addEventListener(x.CAN_PLAY, N), A.addEventListener(x.LOAD_START, H), () => {
|
|
2306
|
+
A.removeEventListener(x.SEEKING, _), A.removeEventListener(x.SEEKED, W), A.removeEventListener(x.WAITING, E), A.removeEventListener(x.PLAYING, M), A.removeEventListener(x.CAN_PLAY, N), A.removeEventListener(x.LOAD_START, H), g.current && clearTimeout(g.current);
|
|
2296
2307
|
};
|
|
2297
2308
|
}, [n, h]), k(() => {
|
|
2298
2309
|
if (!h) {
|
|
2299
2310
|
c(t ? "pause" : "play"), l(!0);
|
|
2300
|
-
const
|
|
2311
|
+
const D = setTimeout(() => {
|
|
2301
2312
|
l(!1);
|
|
2302
2313
|
}, 600);
|
|
2303
|
-
return () => clearTimeout(
|
|
2314
|
+
return () => clearTimeout(D);
|
|
2304
2315
|
}
|
|
2305
2316
|
}, [t, h]);
|
|
2306
|
-
const
|
|
2317
|
+
const y = $(async () => {
|
|
2307
2318
|
await r();
|
|
2308
|
-
}, [r]),
|
|
2319
|
+
}, [r]), G = $(() => {
|
|
2309
2320
|
i();
|
|
2310
|
-
}, [i]),
|
|
2311
|
-
const A =
|
|
2321
|
+
}, [i]), X = (D) => {
|
|
2322
|
+
const A = D === "play" ? I : C;
|
|
2312
2323
|
return A ? /^https?:\/\//.test(A) || /\.(jpg|jpeg|png|svg|gif|webp)$/i.test(A) ? /* @__PURE__ */ s(
|
|
2313
2324
|
"img",
|
|
2314
2325
|
{
|
|
2315
2326
|
src: A,
|
|
2316
|
-
alt:
|
|
2327
|
+
alt: D === "play" ? "Play" : "Pause",
|
|
2317
2328
|
className: ne.customIcon,
|
|
2318
|
-
style: { "--icon-size": `${
|
|
2329
|
+
style: { "--icon-size": `${T}px` }
|
|
2319
2330
|
}
|
|
2320
2331
|
) : /* @__PURE__ */ s(
|
|
2321
2332
|
"div",
|
|
2322
2333
|
{
|
|
2323
2334
|
dangerouslySetInnerHTML: { __html: A },
|
|
2324
2335
|
className: ne.customIcon,
|
|
2325
|
-
style: { "--icon-size": `${
|
|
2336
|
+
style: { "--icon-size": `${T}px` }
|
|
2326
2337
|
}
|
|
2327
|
-
) :
|
|
2338
|
+
) : D === "play" ? /* @__PURE__ */ s(
|
|
2328
2339
|
"svg",
|
|
2329
2340
|
{
|
|
2330
2341
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2331
2342
|
className: ne.icon,
|
|
2332
|
-
style: { "--icon-size": `${
|
|
2343
|
+
style: { "--icon-size": `${T}px` },
|
|
2333
2344
|
viewBox: "0 0 24 24",
|
|
2334
2345
|
children: /* @__PURE__ */ s(
|
|
2335
2346
|
"path",
|
|
@@ -2345,7 +2356,7 @@ function ir({ config: a, isAdLoading: e }) {
|
|
|
2345
2356
|
{
|
|
2346
2357
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2347
2358
|
className: ne.icon,
|
|
2348
|
-
style: { "--icon-size": `${
|
|
2359
|
+
style: { "--icon-size": `${T}px` },
|
|
2349
2360
|
viewBox: "0 0 24 24",
|
|
2350
2361
|
children: /* @__PURE__ */ s(
|
|
2351
2362
|
"path",
|
|
@@ -2364,27 +2375,27 @@ function ir({ config: a, isAdLoading: e }) {
|
|
|
2364
2375
|
{
|
|
2365
2376
|
className: `${ne.iconContainer} ${ne.loading}`,
|
|
2366
2377
|
style: {
|
|
2367
|
-
"--icon-container-size": `${
|
|
2368
|
-
"--icon-size": `${
|
|
2378
|
+
"--icon-container-size": `${w}px`,
|
|
2379
|
+
"--icon-size": `${T}px`
|
|
2369
2380
|
},
|
|
2370
|
-
children: /* @__PURE__ */ s(Xe, { size:
|
|
2381
|
+
children: /* @__PURE__ */ s(Xe, { size: T })
|
|
2371
2382
|
}
|
|
2372
2383
|
) }),
|
|
2373
2384
|
/* @__PURE__ */ s(
|
|
2374
2385
|
"div",
|
|
2375
2386
|
{
|
|
2376
2387
|
className: `virtus-video-overlay ${ne.overlay}`,
|
|
2377
|
-
onClick:
|
|
2378
|
-
onDoubleClick:
|
|
2379
|
-
children: m && o && !e && /* @__PURE__ */ s(
|
|
2388
|
+
onClick: y,
|
|
2389
|
+
onDoubleClick: G,
|
|
2390
|
+
children: m && o && !e && (d === "loading" || S) && /* @__PURE__ */ s(
|
|
2380
2391
|
"div",
|
|
2381
2392
|
{
|
|
2382
2393
|
className: `${ne.iconContainer} ${h ? ne.loading : ""}`,
|
|
2383
2394
|
style: {
|
|
2384
|
-
"--icon-container-size": `${
|
|
2385
|
-
"--icon-size": `${
|
|
2395
|
+
"--icon-container-size": `${w}px`,
|
|
2396
|
+
"--icon-size": `${T}px`
|
|
2386
2397
|
},
|
|
2387
|
-
children: d === "loading" ? /* @__PURE__ */ s(Xe, { size:
|
|
2398
|
+
children: d === "loading" ? /* @__PURE__ */ s(Xe, { size: T }) : X(d)
|
|
2388
2399
|
}
|
|
2389
2400
|
)
|
|
2390
2401
|
}
|
|
@@ -2398,13 +2409,13 @@ function Ce() {
|
|
|
2398
2409
|
throw new Error("usePlayer must be used within PlayerProvider");
|
|
2399
2410
|
return a;
|
|
2400
2411
|
}
|
|
2401
|
-
const sr = "_errorOverlay_4djr8_5", or = "_variant_drm_4djr8_19", ar = "_variant_network_4djr8_23", lr = "_variant_decode_4djr8_27",
|
|
2412
|
+
const sr = "_errorOverlay_4djr8_5", or = "_variant_drm_4djr8_19", ar = "_variant_network_4djr8_23", lr = "_variant_decode_4djr8_27", dr = "_variant_generic_4djr8_31", cr = "_errorContent_4djr8_37", ur = "_errorIcon_4djr8_51", hr = "_iconPulse_4djr8_1", pr = "_drmGlow_4djr8_1", gr = "_netGlow_4djr8_1", fr = "_errorTitle_4djr8_86", mr = "_errorMessage_4djr8_100", yr = "_errorHint_4djr8_109", vr = "_browserList_4djr8_117", br = "_browserItem_4djr8_126", Er = "_errorCode_4djr8_142", wr = "_retryButton_4djr8_152", te = {
|
|
2402
2413
|
errorOverlay: sr,
|
|
2403
2414
|
variant_drm: or,
|
|
2404
2415
|
variant_network: ar,
|
|
2405
2416
|
variant_decode: lr,
|
|
2406
|
-
variant_generic:
|
|
2407
|
-
errorContent:
|
|
2417
|
+
variant_generic: dr,
|
|
2418
|
+
errorContent: cr,
|
|
2408
2419
|
errorIcon: ur,
|
|
2409
2420
|
iconPulse: hr,
|
|
2410
2421
|
drmGlow: pr,
|
|
@@ -2414,8 +2425,8 @@ const sr = "_errorOverlay_4djr8_5", or = "_variant_drm_4djr8_19", ar = "_variant
|
|
|
2414
2425
|
errorHint: yr,
|
|
2415
2426
|
browserList: vr,
|
|
2416
2427
|
browserItem: br,
|
|
2417
|
-
errorCode:
|
|
2418
|
-
retryButton:
|
|
2428
|
+
errorCode: Er,
|
|
2429
|
+
retryButton: wr
|
|
2419
2430
|
};
|
|
2420
2431
|
function xr(a, e) {
|
|
2421
2432
|
const t = a.code.toUpperCase(), r = (a.message ?? "").toUpperCase();
|
|
@@ -2499,7 +2510,7 @@ function kr(a) {
|
|
|
2499
2510
|
}
|
|
2500
2511
|
const Sr = 12e3;
|
|
2501
2512
|
function Ar({ onRetry: a, drmConfig: e }) {
|
|
2502
|
-
const t = Ce(), [r, i] = b(null), [n, o] = b(null), l =
|
|
2513
|
+
const t = Ce(), [r, i] = b(null), [n, o] = b(null), l = O(null), d = O(null);
|
|
2503
2514
|
d.current = r, k(() => {
|
|
2504
2515
|
it().then((g) => {
|
|
2505
2516
|
o(g);
|
|
@@ -2523,9 +2534,9 @@ function Ar({ onRetry: a, drmConfig: e }) {
|
|
|
2523
2534
|
const m = () => {
|
|
2524
2535
|
g.currentTime > 0.5 || (l.current = setTimeout(() => {
|
|
2525
2536
|
if (d.current) return;
|
|
2526
|
-
const
|
|
2537
|
+
const I = n, C = I ? I.fairplay && !I.widevine && !I.playready ? "drm_fairplay_needed" : !I.widevine && !I.fairplay && !I.playready ? "drm_browser_unsupported" : "drm_generic" : "drm_generic";
|
|
2527
2538
|
i({
|
|
2528
|
-
type:
|
|
2539
|
+
type: C,
|
|
2529
2540
|
code: "DRM_TIMEOUT",
|
|
2530
2541
|
rawMessage: "Playback stalled — possible DRM or network issue.",
|
|
2531
2542
|
persistent: !0
|
|
@@ -2555,7 +2566,7 @@ function Ar({ onRetry: a, drmConfig: e }) {
|
|
|
2555
2566
|
t.events.off("play", g), t.events.off("loadedmetadata", g);
|
|
2556
2567
|
};
|
|
2557
2568
|
}, [t]);
|
|
2558
|
-
const c =
|
|
2569
|
+
const c = $(() => {
|
|
2559
2570
|
if (i(null), a) {
|
|
2560
2571
|
a();
|
|
2561
2572
|
return;
|
|
@@ -2633,7 +2644,7 @@ const se = {
|
|
|
2633
2644
|
{ key: "Esc", description: "Close overlays", icon: se.close }
|
|
2634
2645
|
];
|
|
2635
2646
|
function Tr({ isOpen: a, onClose: e }) {
|
|
2636
|
-
const t =
|
|
2647
|
+
const t = $((r) => {
|
|
2637
2648
|
r.key === "Escape" && e();
|
|
2638
2649
|
}, [e]);
|
|
2639
2650
|
return k(() => {
|
|
@@ -2796,7 +2807,7 @@ function Mr({
|
|
|
2796
2807
|
nextTitle: i,
|
|
2797
2808
|
thumbnail: n
|
|
2798
2809
|
}) {
|
|
2799
|
-
const [o, l] = b(r), d =
|
|
2810
|
+
const [o, l] = b(r), d = O(null), c = $(() => {
|
|
2800
2811
|
d.current && (clearInterval(d.current), d.current = null);
|
|
2801
2812
|
}, []);
|
|
2802
2813
|
if (k(() => {
|
|
@@ -3034,26 +3045,26 @@ function Pr({ type: a, value: e }) {
|
|
|
3034
3045
|
);
|
|
3035
3046
|
}
|
|
3036
3047
|
function Lr({ player: a, skipSec: e = 10 }) {
|
|
3037
|
-
const [t, r] = b(null), i =
|
|
3048
|
+
const [t, r] = b(null), i = O(null), n = $((p) => {
|
|
3038
3049
|
r(p), i.current && clearTimeout(i.current), i.current = setTimeout(() => r(null), 900);
|
|
3039
|
-
}, []), o =
|
|
3050
|
+
}, []), o = O(null), l = 300, d = $((p) => {
|
|
3040
3051
|
if (!a) return;
|
|
3041
3052
|
const g = p.touches[0], m = Date.now(), S = o.current;
|
|
3042
3053
|
if (S && m - S.time < l) {
|
|
3043
|
-
const
|
|
3044
|
-
if (g.clientX -
|
|
3045
|
-
const
|
|
3046
|
-
|
|
3054
|
+
const C = p.currentTarget.getBoundingClientRect();
|
|
3055
|
+
if (g.clientX - C.left > C.width / 2) {
|
|
3056
|
+
const w = a.getVideoElement();
|
|
3057
|
+
w && a.seekTo(Math.min(w.duration || 0, w.currentTime + e)), n({ type: "seek-forward", value: `+${e}s` });
|
|
3047
3058
|
} else {
|
|
3048
|
-
const
|
|
3049
|
-
|
|
3059
|
+
const w = a.getVideoElement();
|
|
3060
|
+
w && a.seekTo(Math.max(0, w.currentTime - e)), n({ type: "seek-backward", value: `-${e}s` });
|
|
3050
3061
|
}
|
|
3051
3062
|
o.current = null;
|
|
3052
3063
|
return;
|
|
3053
3064
|
}
|
|
3054
3065
|
o.current = { time: m, x: g.clientX };
|
|
3055
|
-
}, [a, e, n]), c =
|
|
3056
|
-
}, []), h =
|
|
3066
|
+
}, [a, e, n]), c = $((p) => {
|
|
3067
|
+
}, []), h = $(() => {
|
|
3057
3068
|
}, []);
|
|
3058
3069
|
return { onTouchStart: d, onTouchMove: c, onTouchEnd: h, gestureHint: t };
|
|
3059
3070
|
}
|
|
@@ -3067,7 +3078,7 @@ function Dr({
|
|
|
3067
3078
|
timeout: a = 3e3,
|
|
3068
3079
|
initialVisible: e = !0
|
|
3069
3080
|
} = {}) {
|
|
3070
|
-
const [t, r] = b(e), i =
|
|
3081
|
+
const [t, r] = b(e), i = O(null), n = $(() => {
|
|
3071
3082
|
i.current && clearTimeout(i.current), r(!0), i.current = window.setTimeout(() => {
|
|
3072
3083
|
r(!1);
|
|
3073
3084
|
}, a);
|
|
@@ -3251,12 +3262,12 @@ class _r {
|
|
|
3251
3262
|
parseAdElement(e, t) {
|
|
3252
3263
|
const r = e.getAttribute("sequence"), i = r !== null ? parseInt(r, 10) : void 0, n = e.querySelector("InLine") ?? e.querySelector("Inline") ?? e.querySelector("inline") ?? t.querySelector("InLine") ?? t.querySelector("Inline");
|
|
3253
3264
|
if (!n) {
|
|
3254
|
-
const
|
|
3255
|
-
throw
|
|
3265
|
+
const T = Array.from(e.children).map((w) => w.tagName);
|
|
3266
|
+
throw T.length === 0 ? new Error("VAST Ad element is empty (no ads available)") : new Error(`VAST InLine not found. Found: ${T.join(", ")}`);
|
|
3256
3267
|
}
|
|
3257
3268
|
const o = e.getAttribute("id") || `ad-${Date.now()}`, l = n.querySelector("AdTitle")?.textContent?.trim(), d = n.querySelector("Duration")?.textContent?.trim(), c = this.parseDuration(d || "00:00:00"), { mediaFile: h, isVpaid: p, vpaidUrl: g } = this.getMediaFileInfo(n);
|
|
3258
3269
|
if (!h) throw new Error("VAST MediaFile not found");
|
|
3259
|
-
const m = n.querySelector("ClickThrough")?.textContent?.trim(), S = this.parseTrackingEvents(n, t),
|
|
3270
|
+
const m = n.querySelector("ClickThrough")?.textContent?.trim(), S = this.parseTrackingEvents(n, t), I = this.getErrorUrls(t), C = this.parseCompanions(n);
|
|
3260
3271
|
return {
|
|
3261
3272
|
id: o,
|
|
3262
3273
|
title: l,
|
|
@@ -3264,8 +3275,8 @@ class _r {
|
|
|
3264
3275
|
mediaFile: h,
|
|
3265
3276
|
clickThrough: m,
|
|
3266
3277
|
trackingEvents: S,
|
|
3267
|
-
errorUrls:
|
|
3268
|
-
companions:
|
|
3278
|
+
errorUrls: I,
|
|
3279
|
+
companions: C.length > 0 ? C : void 0,
|
|
3269
3280
|
isVpaid: p,
|
|
3270
3281
|
vpaidUrl: g,
|
|
3271
3282
|
podSequence: i
|
|
@@ -3275,10 +3286,10 @@ class _r {
|
|
|
3275
3286
|
parseCompanions(e) {
|
|
3276
3287
|
const t = [];
|
|
3277
3288
|
return e.querySelectorAll("CompanionAds > Companion").forEach((i) => {
|
|
3278
|
-
const n = parseInt(i.getAttribute("width") || "0", 10), o = parseInt(i.getAttribute("height") || "0", 10), l = i.getAttribute("id") ?? void 0, d = i.querySelector("StaticResource"), c = i.querySelector("HTMLResource"), h = i.querySelector("IFrameResource"), p = d?.textContent?.trim() ?? void 0, g = c?.textContent?.trim() ?? void 0, m = h?.textContent?.trim() ?? void 0, S = d?.getAttribute("creativeType") ?? void 0,
|
|
3279
|
-
i.querySelectorAll('TrackingEvents > Tracking[event="creativeView"]').forEach((
|
|
3280
|
-
const y =
|
|
3281
|
-
y &&
|
|
3289
|
+
const n = parseInt(i.getAttribute("width") || "0", 10), o = parseInt(i.getAttribute("height") || "0", 10), l = i.getAttribute("id") ?? void 0, d = i.querySelector("StaticResource"), c = i.querySelector("HTMLResource"), h = i.querySelector("IFrameResource"), p = d?.textContent?.trim() ?? void 0, g = c?.textContent?.trim() ?? void 0, m = h?.textContent?.trim() ?? void 0, S = d?.getAttribute("creativeType") ?? void 0, I = i.querySelector("CompanionClickThrough")?.textContent?.trim() ?? void 0, C = i.querySelector("AltText")?.textContent?.trim() ?? void 0, T = [];
|
|
3290
|
+
i.querySelectorAll('TrackingEvents > Tracking[event="creativeView"]').forEach((w) => {
|
|
3291
|
+
const y = w.textContent?.trim();
|
|
3292
|
+
y && T.push(y);
|
|
3282
3293
|
}), (p || g || m) && t.push({
|
|
3283
3294
|
id: l,
|
|
3284
3295
|
width: n,
|
|
@@ -3287,9 +3298,9 @@ class _r {
|
|
|
3287
3298
|
htmlResource: g,
|
|
3288
3299
|
iFrameResource: m,
|
|
3289
3300
|
type: S,
|
|
3290
|
-
clickThrough:
|
|
3291
|
-
altText:
|
|
3292
|
-
viewTrackingUrls:
|
|
3301
|
+
clickThrough: I,
|
|
3302
|
+
altText: C,
|
|
3303
|
+
viewTrackingUrls: T.length > 0 ? T : void 0
|
|
3293
3304
|
});
|
|
3294
3305
|
}), t;
|
|
3295
3306
|
}
|
|
@@ -3565,7 +3576,7 @@ class Nr {
|
|
|
3565
3576
|
reset() {
|
|
3566
3577
|
}
|
|
3567
3578
|
}
|
|
3568
|
-
class
|
|
3579
|
+
class Br {
|
|
3569
3580
|
player;
|
|
3570
3581
|
config;
|
|
3571
3582
|
tracker;
|
|
@@ -3900,7 +3911,7 @@ class $r {
|
|
|
3900
3911
|
};
|
|
3901
3912
|
}
|
|
3902
3913
|
}
|
|
3903
|
-
class
|
|
3914
|
+
class $r {
|
|
3904
3915
|
player;
|
|
3905
3916
|
config;
|
|
3906
3917
|
vastParser;
|
|
@@ -3917,7 +3928,7 @@ class Br {
|
|
|
3917
3928
|
this.player = e, this.config = t, this.onLoadingChange = r, this.vastParser = new _r(
|
|
3918
3929
|
t.timeout || 5e3,
|
|
3919
3930
|
t.maxWrapperDepth || 5
|
|
3920
|
-
), this.vmapParser = new Vr(t.timeout || 5e3), this.adPlayer = new
|
|
3931
|
+
), this.vmapParser = new Vr(t.timeout || 5e3), this.adPlayer = new Br(e, t, () => this.hideAdLoading()), console.log("[AdManager] Initialized with config:", t);
|
|
3921
3932
|
}
|
|
3922
3933
|
/**
|
|
3923
3934
|
* Wait for video element to be ready (with retry logic)
|
|
@@ -4194,25 +4205,25 @@ class Br {
|
|
|
4194
4205
|
this.hideAdLoading(), this.adPlayer.destroy(), this.preRollPlayed = !1, this.midRollsPlayed.clear(), this.postRollPlayed = !1, this.vmapData = null, console.log("[AdManager] Destroyed");
|
|
4195
4206
|
}
|
|
4196
4207
|
}
|
|
4197
|
-
const
|
|
4208
|
+
const dt = {
|
|
4198
4209
|
bottomOffset: 110,
|
|
4199
4210
|
fontSize: 18,
|
|
4200
4211
|
color: "#ffffff",
|
|
4201
4212
|
background: "rgba(0,0,0,0.75)"
|
|
4202
|
-
},
|
|
4203
|
-
style:
|
|
4213
|
+
}, ct = de({
|
|
4214
|
+
style: dt,
|
|
4204
4215
|
setStyle: () => {
|
|
4205
4216
|
}
|
|
4206
4217
|
});
|
|
4207
4218
|
function Fr({ children: a }) {
|
|
4208
|
-
const [e, t] = b(
|
|
4209
|
-
return /* @__PURE__ */ s(
|
|
4219
|
+
const [e, t] = b(dt), r = (i) => t((n) => ({ ...n, ...i }));
|
|
4220
|
+
return /* @__PURE__ */ s(ct.Provider, { value: { style: e, setStyle: r }, children: a });
|
|
4210
4221
|
}
|
|
4211
4222
|
function ut() {
|
|
4212
|
-
return re(
|
|
4223
|
+
return re(ct);
|
|
4213
4224
|
}
|
|
4214
4225
|
function Ur({ videoElement: a }) {
|
|
4215
|
-
const { style: e } = ut(), [t, r] = b([]), i =
|
|
4226
|
+
const { style: e } = ut(), [t, r] = b([]), i = O(""), n = O(0);
|
|
4216
4227
|
return k(() => {
|
|
4217
4228
|
if (!a) return;
|
|
4218
4229
|
const o = () => {
|
|
@@ -4274,8 +4285,8 @@ function Ur({ videoElement: a }) {
|
|
|
4274
4285
|
}
|
|
4275
4286
|
);
|
|
4276
4287
|
}
|
|
4277
|
-
const He =
|
|
4278
|
-
function
|
|
4288
|
+
const He = de(!0);
|
|
4289
|
+
function wi({
|
|
4279
4290
|
src: a = "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
|
|
4280
4291
|
defaultControls: e = !1,
|
|
4281
4292
|
autoplay: t = !1,
|
|
@@ -4291,18 +4302,18 @@ function Ei({
|
|
|
4291
4302
|
endCardCountdown: g = 5,
|
|
4292
4303
|
crossOrigin: m
|
|
4293
4304
|
}) {
|
|
4294
|
-
const S =
|
|
4295
|
-
player:
|
|
4305
|
+
const S = O(null), I = O(null), [C, T] = b(null), w = O(null), [y, G] = b(!1), [X, D] = b(!1), A = $(() => D(!0), []), _ = $(() => D(!1), []), [W, E] = b(!1), { onTouchStart: M, onTouchMove: N, onTouchEnd: H, gestureHint: Q } = Lr({
|
|
4306
|
+
player: C,
|
|
4296
4307
|
skipSec: 10
|
|
4297
|
-
}), { isActive:
|
|
4308
|
+
}), { isActive: L } = Dr({
|
|
4298
4309
|
timeout: 3e3,
|
|
4299
4310
|
initialVisible: !0
|
|
4300
4311
|
});
|
|
4301
4312
|
Ir({
|
|
4302
|
-
player:
|
|
4313
|
+
player: C,
|
|
4303
4314
|
seekStep: 10,
|
|
4304
4315
|
enabled: !0,
|
|
4305
|
-
onShowShortcuts:
|
|
4316
|
+
onShowShortcuts: A
|
|
4306
4317
|
});
|
|
4307
4318
|
const B = Ue(() => !l?.ads?.enabled || !l.ads.vastUrl && !l.ads.vmapUrl ? null : {
|
|
4308
4319
|
enabled: !0,
|
|
@@ -4320,40 +4331,40 @@ function Ei({
|
|
|
4320
4331
|
l?.ads?.maxWrapperDepth
|
|
4321
4332
|
]);
|
|
4322
4333
|
k(() => {
|
|
4323
|
-
if (!
|
|
4334
|
+
if (!I.current || !S.current) return;
|
|
4324
4335
|
console.log("[Player] Initializing PlayerCore");
|
|
4325
|
-
const
|
|
4326
|
-
return fe.preloadEngines(),
|
|
4327
|
-
console.log("[Player] Cleanup called - destroying PlayerCore"),
|
|
4336
|
+
const F = new fe(I.current);
|
|
4337
|
+
return fe.preloadEngines(), F.container = S.current, T(F), () => {
|
|
4338
|
+
console.log("[Player] Cleanup called - destroying PlayerCore"), w.current && (console.log("[Player] Destroying AdManager"), w.current.destroy(), w.current = null), F.destroy(), T(null);
|
|
4328
4339
|
};
|
|
4329
4340
|
}, []), k(() => {
|
|
4330
|
-
if (!
|
|
4341
|
+
if (!C || !B) return;
|
|
4331
4342
|
console.log("[Player] Setting up ads");
|
|
4332
|
-
const
|
|
4343
|
+
const F = (J) => {
|
|
4333
4344
|
G(J), d?.(J);
|
|
4334
|
-
}, Z = new
|
|
4335
|
-
return
|
|
4345
|
+
}, Z = new $r(C, B, F);
|
|
4346
|
+
return w.current = Z, Z.setup().catch((J) => {
|
|
4336
4347
|
console.error("[Player] Failed to setup ads:", J);
|
|
4337
4348
|
}), () => {
|
|
4338
|
-
|
|
4349
|
+
w.current && (console.log("[Player] Cleaning up ads"), w.current.destroy(), w.current = null);
|
|
4339
4350
|
};
|
|
4340
|
-
}, [
|
|
4341
|
-
!
|
|
4342
|
-
}, [
|
|
4343
|
-
const
|
|
4351
|
+
}, [C, B]), k(() => {
|
|
4352
|
+
!C || !l || C.setConfig(l);
|
|
4353
|
+
}, [C, l]);
|
|
4354
|
+
const P = Ue(() => l?.drm ?? null, [l?.drm]);
|
|
4344
4355
|
return k(() => {
|
|
4345
|
-
!
|
|
4346
|
-
}, [
|
|
4347
|
-
|
|
4348
|
-
console.error("[Player] setSource failed:",
|
|
4356
|
+
!C || !P?.enabled || C.setupDrm(P);
|
|
4357
|
+
}, [C, P]), k(() => {
|
|
4358
|
+
C && a && (console.log("[Player] Setting source:", a), C.setSource(a).catch((F) => {
|
|
4359
|
+
console.error("[Player] setSource failed:", F);
|
|
4349
4360
|
}));
|
|
4350
|
-
}, [
|
|
4351
|
-
if (!
|
|
4352
|
-
const
|
|
4353
|
-
if (!
|
|
4354
|
-
const Z = () =>
|
|
4355
|
-
return
|
|
4356
|
-
}, [
|
|
4361
|
+
}, [C, a]), k(() => {
|
|
4362
|
+
if (!C || !c) return;
|
|
4363
|
+
const F = C.getVideoElement();
|
|
4364
|
+
if (!F) return;
|
|
4365
|
+
const Z = () => E(!0);
|
|
4366
|
+
return F.addEventListener("ended", Z), () => F.removeEventListener("ended", Z);
|
|
4367
|
+
}, [C, c]), /* @__PURE__ */ u(Fr, { children: [
|
|
4357
4368
|
/* @__PURE__ */ u(
|
|
4358
4369
|
"div",
|
|
4359
4370
|
{
|
|
@@ -4361,14 +4372,14 @@ function Ei({
|
|
|
4361
4372
|
role: "region",
|
|
4362
4373
|
"aria-label": "Video Player",
|
|
4363
4374
|
className: `playron-wrapper ${n || ""}`,
|
|
4364
|
-
onTouchStart:
|
|
4365
|
-
onTouchMove:
|
|
4366
|
-
onTouchEnd:
|
|
4375
|
+
onTouchStart: M,
|
|
4376
|
+
onTouchMove: N,
|
|
4377
|
+
onTouchEnd: H,
|
|
4367
4378
|
style: {
|
|
4368
4379
|
position: "relative",
|
|
4369
4380
|
backgroundColor: "#000",
|
|
4370
4381
|
overflow: "hidden",
|
|
4371
|
-
cursor:
|
|
4382
|
+
cursor: L ? "default" : "none"
|
|
4372
4383
|
},
|
|
4373
4384
|
children: [
|
|
4374
4385
|
/* @__PURE__ */ s(
|
|
@@ -4392,7 +4403,7 @@ function Ei({
|
|
|
4392
4403
|
/* @__PURE__ */ s(
|
|
4393
4404
|
"video",
|
|
4394
4405
|
{
|
|
4395
|
-
ref:
|
|
4406
|
+
ref: I,
|
|
4396
4407
|
className: `virtus-video-element ${n || ""}`,
|
|
4397
4408
|
style: {
|
|
4398
4409
|
width: "100%",
|
|
@@ -4411,20 +4422,20 @@ function Ei({
|
|
|
4411
4422
|
tabIndex: e ? 0 : -1
|
|
4412
4423
|
}
|
|
4413
4424
|
),
|
|
4414
|
-
|
|
4415
|
-
/* @__PURE__ */ s(Ur, { videoElement:
|
|
4425
|
+
C ? /* @__PURE__ */ s(Gt, { playerInstance: C, children: /* @__PURE__ */ u(He.Provider, { value: L, children: [
|
|
4426
|
+
/* @__PURE__ */ s(Ur, { videoElement: I.current }),
|
|
4416
4427
|
/* @__PURE__ */ s(nr, { config: l, isAdLoading: y }),
|
|
4417
4428
|
/* @__PURE__ */ s(Pr, { type: Q?.type ?? null, value: Q?.value ?? "" }),
|
|
4418
4429
|
/* @__PURE__ */ s(Ar, { drmConfig: l?.drm }),
|
|
4419
|
-
/* @__PURE__ */ s(Tr, { isOpen:
|
|
4430
|
+
/* @__PURE__ */ s(Tr, { isOpen: X, onClose: _ }),
|
|
4420
4431
|
c && /* @__PURE__ */ s(
|
|
4421
4432
|
Mr,
|
|
4422
4433
|
{
|
|
4423
|
-
isVisible:
|
|
4434
|
+
isVisible: W,
|
|
4424
4435
|
onNextEpisode: () => {
|
|
4425
|
-
|
|
4436
|
+
E(!1), c();
|
|
4426
4437
|
},
|
|
4427
|
-
onDismiss: () =>
|
|
4438
|
+
onDismiss: () => E(!1),
|
|
4428
4439
|
countdownSec: g,
|
|
4429
4440
|
nextTitle: h,
|
|
4430
4441
|
thumbnail: p
|
|
@@ -4483,7 +4494,7 @@ function zr({
|
|
|
4483
4494
|
style: o,
|
|
4484
4495
|
...l
|
|
4485
4496
|
}) {
|
|
4486
|
-
const d =
|
|
4497
|
+
const d = Y((g) => g.isPlaying), { togglePlay: c } = q(), h = async (g) => {
|
|
4487
4498
|
try {
|
|
4488
4499
|
await c();
|
|
4489
4500
|
} catch (m) {
|
|
@@ -4546,7 +4557,7 @@ const qr = "_controlButton_14cpd_3", be = {
|
|
|
4546
4557
|
controlButton: qr
|
|
4547
4558
|
};
|
|
4548
4559
|
function xi({ className: a, onClick: e, ...t }) {
|
|
4549
|
-
const r =
|
|
4560
|
+
const r = Y((o) => o.isMuted), { toggleMute: i } = q(), n = (o) => {
|
|
4550
4561
|
i(), e?.(o);
|
|
4551
4562
|
};
|
|
4552
4563
|
return /* @__PURE__ */ s(
|
|
@@ -4783,7 +4794,7 @@ function Yr(a, e, t = !0) {
|
|
|
4783
4794
|
};
|
|
4784
4795
|
}, [a, e, t]);
|
|
4785
4796
|
}
|
|
4786
|
-
const Te =
|
|
4797
|
+
const Te = de({
|
|
4787
4798
|
isOpen: !1,
|
|
4788
4799
|
toggle: () => {
|
|
4789
4800
|
},
|
|
@@ -4793,7 +4804,7 @@ const Te = ce({
|
|
|
4793
4804
|
}
|
|
4794
4805
|
});
|
|
4795
4806
|
function ht({ children: a }) {
|
|
4796
|
-
const [e, t] = b(!1), r =
|
|
4807
|
+
const [e, t] = b(!1), r = O(null), i = () => t((d) => !d), n = () => t(!1), o = () => t(!0);
|
|
4797
4808
|
Yr(r, n, e);
|
|
4798
4809
|
const l = {
|
|
4799
4810
|
isOpen: e,
|
|
@@ -4998,7 +5009,7 @@ function We({
|
|
|
4998
5009
|
);
|
|
4999
5010
|
}
|
|
5000
5011
|
function Si() {
|
|
5001
|
-
const a = q(), e =
|
|
5012
|
+
const a = q(), e = Y(), [t, r] = b(1), [i, n] = b(!1), o = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
|
|
5002
5013
|
k(() => {
|
|
5003
5014
|
e?.playbackRate !== void 0 && r(e.playbackRate);
|
|
5004
5015
|
}, [e?.playbackRate]);
|
|
@@ -5077,28 +5088,28 @@ const Xr = "_timeDisplay_1wupc_3", Gr = "_currentTime_1wupc_16", Qr = "_separato
|
|
|
5077
5088
|
currentTime: Gr,
|
|
5078
5089
|
separator: Qr,
|
|
5079
5090
|
duration: Zr
|
|
5080
|
-
},
|
|
5091
|
+
}, $e = (a) => {
|
|
5081
5092
|
if (!isFinite(a) || isNaN(a)) return "0:00";
|
|
5082
5093
|
const e = Math.floor(a / 3600), t = Math.floor(a % 3600 / 60), r = Math.floor(a % 60);
|
|
5083
5094
|
return e > 0 ? `${e}:${t.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}` : `${t}:${r.toString().padStart(2, "0")}`;
|
|
5084
5095
|
};
|
|
5085
5096
|
function Jr({ className: a, ...e }) {
|
|
5086
|
-
const { currentTime: t, duration: r, isLive: i } =
|
|
5097
|
+
const { currentTime: t, duration: r, isLive: i } = Y();
|
|
5087
5098
|
return i ? /* @__PURE__ */ s("div", { className: `virtus-time-display ${pe.timeDisplay} ${a || ""}`, ...e, children: /* @__PURE__ */ s(
|
|
5088
5099
|
"span",
|
|
5089
5100
|
{
|
|
5090
5101
|
className: pe.currentTime,
|
|
5091
5102
|
style: { color: "rgba(255, 255, 255, 0.7)", fontSize: "12px" },
|
|
5092
|
-
children:
|
|
5103
|
+
children: $e(t)
|
|
5093
5104
|
}
|
|
5094
5105
|
) }) : /* @__PURE__ */ u("div", { className: `virtus-time-display ${pe.timeDisplay} ${a || ""}`, ...e, children: [
|
|
5095
|
-
/* @__PURE__ */ s("span", { className: pe.currentTime, children:
|
|
5106
|
+
/* @__PURE__ */ s("span", { className: pe.currentTime, children: $e(t) }),
|
|
5096
5107
|
/* @__PURE__ */ s("span", { className: pe.separator, children: "/" }),
|
|
5097
|
-
/* @__PURE__ */ s("span", { className: pe.duration, children:
|
|
5108
|
+
/* @__PURE__ */ s("span", { className: pe.duration, children: $e(r) })
|
|
5098
5109
|
] });
|
|
5099
5110
|
}
|
|
5100
5111
|
function ei() {
|
|
5101
|
-
const { isLive: a, isAtLiveEdge: e } =
|
|
5112
|
+
const { isLive: a, isAtLiveEdge: e } = Y(), { seekToLiveEdge: t } = q();
|
|
5102
5113
|
return !a || e ? null : /* @__PURE__ */ u(
|
|
5103
5114
|
"button",
|
|
5104
5115
|
{
|
|
@@ -5147,7 +5158,7 @@ function ei() {
|
|
|
5147
5158
|
);
|
|
5148
5159
|
}
|
|
5149
5160
|
function ti() {
|
|
5150
|
-
const { isLive: a, isAtLiveEdge: e, liveLatency: t } =
|
|
5161
|
+
const { isLive: a, isAtLiveEdge: e, liveLatency: t } = Y();
|
|
5151
5162
|
if (!a || e || !t || t < 1) return null;
|
|
5152
5163
|
const r = Math.round(t);
|
|
5153
5164
|
return /* @__PURE__ */ u(
|
|
@@ -5174,7 +5185,7 @@ const ri = "_container_6dw0q_3", ii = "_skipButton_6dw0q_11", Fe = {
|
|
|
5174
5185
|
skipButton: ii
|
|
5175
5186
|
};
|
|
5176
5187
|
function Ai({ introOutro: a }) {
|
|
5177
|
-
const { currentTime: e } =
|
|
5188
|
+
const { currentTime: e } = Y(), { seekTo: t } = q(), [r, i] = b(!1), [n, o] = b(!1);
|
|
5178
5189
|
k(() => {
|
|
5179
5190
|
if (a) {
|
|
5180
5191
|
if (a.intro) {
|
|
@@ -5187,9 +5198,9 @@ function Ai({ introOutro: a }) {
|
|
|
5187
5198
|
}
|
|
5188
5199
|
}
|
|
5189
5200
|
}, [e, a]);
|
|
5190
|
-
const l =
|
|
5201
|
+
const l = $(() => {
|
|
5191
5202
|
a?.intro && (t(a.intro.end), i(!1));
|
|
5192
|
-
}, [a, t]), d =
|
|
5203
|
+
}, [a, t]), d = $(() => {
|
|
5193
5204
|
a?.outro && (t(a.outro.end), o(!1));
|
|
5194
5205
|
}, [a, t]);
|
|
5195
5206
|
return !r && !n ? null : /* @__PURE__ */ u("div", { className: Fe.container, children: [
|
|
@@ -5427,68 +5438,68 @@ function ai({
|
|
|
5427
5438
|
thumbnailsVttUrl: n,
|
|
5428
5439
|
seekBarStyle: o
|
|
5429
5440
|
}) {
|
|
5430
|
-
const l = re(He), d =
|
|
5441
|
+
const l = re(He), d = O(null), [c, h] = b(!1), [p, g] = b(null), [m, S] = b(null), [I, C] = b([]), T = O(null), { currentTime: w, duration: y, isLive: G, isPlaying: X, playbackRate: D } = Y(), { seekTo: A, getDVRRange: _, getBufferedRanges: W } = q(), [E, M] = b(w), N = O(null), H = O({ time: w, ts: performance.now() });
|
|
5431
5442
|
k(() => {
|
|
5432
|
-
|
|
5433
|
-
}, [
|
|
5434
|
-
const Q =
|
|
5435
|
-
if (
|
|
5436
|
-
const { time: v, ts: R } =
|
|
5437
|
-
|
|
5443
|
+
H.current = { time: w, ts: performance.now() }, M(w);
|
|
5444
|
+
}, [w]);
|
|
5445
|
+
const Q = $(() => {
|
|
5446
|
+
if (X) {
|
|
5447
|
+
const { time: v, ts: R } = H.current, V = D ?? 1, U = (performance.now() - R) / 1e3, ee = Math.min(y || 1 / 0, v + U * V);
|
|
5448
|
+
M(ee);
|
|
5438
5449
|
}
|
|
5439
|
-
|
|
5440
|
-
}, [
|
|
5441
|
-
k(() => (
|
|
5442
|
-
|
|
5450
|
+
N.current = requestAnimationFrame(Q);
|
|
5451
|
+
}, [X, D, y]);
|
|
5452
|
+
k(() => (N.current = requestAnimationFrame(Q), () => {
|
|
5453
|
+
N.current !== null && cancelAnimationFrame(N.current);
|
|
5443
5454
|
}), [Q]), k(() => {
|
|
5444
5455
|
if (!n) return;
|
|
5445
5456
|
const v = new si();
|
|
5446
|
-
return
|
|
5447
|
-
v.destroy(),
|
|
5457
|
+
return T.current = v, v.load(n), () => {
|
|
5458
|
+
v.destroy(), T.current = null;
|
|
5448
5459
|
};
|
|
5449
5460
|
}, [n]), k(() => {
|
|
5450
5461
|
const v = setInterval(() => {
|
|
5451
|
-
|
|
5462
|
+
C(W());
|
|
5452
5463
|
}, 500);
|
|
5453
5464
|
return () => clearInterval(v);
|
|
5454
|
-
}, [
|
|
5455
|
-
const
|
|
5465
|
+
}, [W]);
|
|
5466
|
+
const L = a === "live" || !!G, B = L ? _() : null, P = B !== null && B.end - B.start > 5, F = P ? B.end - B.start : 0, Z = P && F > 0 ? (E - B.start) / F * 100 : 0, J = L ? Math.min(100, Math.max(0, Z)) : y > 0 ? E / y * 100 : 0, Ee = o?.trackColor ?? "rgba(255, 255, 255, 0.3)", ae = o?.progressColor ?? (L ? "#ff2020" : "#6366f1"), ce = o?.bufferedColor ?? "rgba(255, 255, 255, 0.25)", j = o?.handleColor ?? "#ffffff", Me = o?.height ?? 4, ue = o?.borderRadius ?? 2, me = o?.showHandle !== !1, Pe = o?.showTooltip !== !1, ye = o?.paddingX ?? 20, Le = o?.paddingY ?? 0, Re = o?.bottom ?? 64, le = (v) => {
|
|
5456
5467
|
if (!isFinite(v) || isNaN(v)) return "0:00";
|
|
5457
|
-
const R = Math.floor(v / 3600),
|
|
5458
|
-
return R > 0 ? `${R}:${
|
|
5468
|
+
const R = Math.floor(v / 3600), V = Math.floor(v % 3600 / 60), U = Math.floor(v % 60);
|
|
5469
|
+
return R > 0 ? `${R}:${V.toString().padStart(2, "0")}:${U.toString().padStart(2, "0")}` : `${V}:${U.toString().padStart(2, "0")}`;
|
|
5459
5470
|
}, ve = (v) => {
|
|
5460
5471
|
if (!d.current) return 0;
|
|
5461
|
-
const R = d.current.getBoundingClientRect(),
|
|
5462
|
-
return Math.max(0, Math.min(1,
|
|
5463
|
-
},
|
|
5464
|
-
if (!(
|
|
5465
|
-
if (
|
|
5466
|
-
|
|
5472
|
+
const R = d.current.getBoundingClientRect(), V = (v.clientX - R.left) / R.width;
|
|
5473
|
+
return Math.max(0, Math.min(1, V));
|
|
5474
|
+
}, we = (v) => {
|
|
5475
|
+
if (!(L && !P)) {
|
|
5476
|
+
if (L && P) {
|
|
5477
|
+
A(B.start + v * F);
|
|
5467
5478
|
return;
|
|
5468
5479
|
}
|
|
5469
|
-
y !== 0 &&
|
|
5480
|
+
y !== 0 && A(v * y);
|
|
5470
5481
|
}
|
|
5471
5482
|
}, De = (v) => {
|
|
5472
|
-
if (
|
|
5483
|
+
if (L && !P) return;
|
|
5473
5484
|
v.preventDefault(), h(!0);
|
|
5474
5485
|
const R = ve(v);
|
|
5475
|
-
|
|
5486
|
+
we(R);
|
|
5476
5487
|
}, Ie = (v) => {
|
|
5477
5488
|
if (!d.current) return;
|
|
5478
5489
|
const R = ve(v);
|
|
5479
|
-
if (g(R),
|
|
5480
|
-
const
|
|
5481
|
-
S(
|
|
5490
|
+
if (g(R), T.current) {
|
|
5491
|
+
const V = P ? B.start + R * F : R * y;
|
|
5492
|
+
S(T.current.getThumbnailAt(V));
|
|
5482
5493
|
}
|
|
5483
5494
|
}, _e = () => {
|
|
5484
5495
|
g(null), S(null);
|
|
5485
5496
|
};
|
|
5486
5497
|
return k(() => {
|
|
5487
5498
|
if (!c) return;
|
|
5488
|
-
const v = (
|
|
5499
|
+
const v = (V) => {
|
|
5489
5500
|
if (!d.current) return;
|
|
5490
|
-
const
|
|
5491
|
-
g(
|
|
5501
|
+
const U = ve(V);
|
|
5502
|
+
g(U), we(U);
|
|
5492
5503
|
}, R = () => {
|
|
5493
5504
|
h(!1);
|
|
5494
5505
|
};
|
|
@@ -5511,7 +5522,7 @@ function ai({
|
|
|
5511
5522
|
pointerEvents: l ? "auto" : "none"
|
|
5512
5523
|
},
|
|
5513
5524
|
children: [
|
|
5514
|
-
|
|
5525
|
+
L && !P && /* @__PURE__ */ u(
|
|
5515
5526
|
"div",
|
|
5516
5527
|
{
|
|
5517
5528
|
style: {
|
|
@@ -5550,7 +5561,7 @@ function ai({
|
|
|
5550
5561
|
]
|
|
5551
5562
|
}
|
|
5552
5563
|
),
|
|
5553
|
-
|
|
5564
|
+
L && P && /* @__PURE__ */ u(
|
|
5554
5565
|
"div",
|
|
5555
5566
|
{
|
|
5556
5567
|
style: {
|
|
@@ -5597,41 +5608,41 @@ function ai({
|
|
|
5597
5608
|
"div",
|
|
5598
5609
|
{
|
|
5599
5610
|
ref: d,
|
|
5600
|
-
role:
|
|
5601
|
-
tabIndex:
|
|
5602
|
-
"aria-label":
|
|
5603
|
-
"aria-valuemin":
|
|
5604
|
-
"aria-valuemax":
|
|
5605
|
-
"aria-valuenow":
|
|
5606
|
-
"aria-valuetext":
|
|
5607
|
-
"aria-disabled":
|
|
5611
|
+
role: L && !P ? void 0 : "slider",
|
|
5612
|
+
tabIndex: L && !P ? void 0 : 0,
|
|
5613
|
+
"aria-label": L ? "DVR seek" : "Seek",
|
|
5614
|
+
"aria-valuemin": L && !P ? void 0 : P ? Math.floor(B.start) : 0,
|
|
5615
|
+
"aria-valuemax": L && !P ? void 0 : P ? Math.floor(B.end) : Math.floor(y) || 0,
|
|
5616
|
+
"aria-valuenow": L && !P ? void 0 : Math.floor(w),
|
|
5617
|
+
"aria-valuetext": L && !P ? "LIVE" : P ? `${le(w)} (DVR)` : `${le(w)} of ${le(y)}`,
|
|
5618
|
+
"aria-disabled": L && !P ? !0 : void 0,
|
|
5608
5619
|
onMouseDown: De,
|
|
5609
5620
|
onMouseMove: Ie,
|
|
5610
5621
|
onMouseLeave: _e,
|
|
5611
5622
|
onKeyDown: (v) => {
|
|
5612
|
-
if (
|
|
5613
|
-
const R = 5,
|
|
5623
|
+
if (L && !P) return;
|
|
5624
|
+
const R = 5, V = 30, U = P ? B.start : 0, ee = P ? B.end : y;
|
|
5614
5625
|
if (ee !== 0)
|
|
5615
5626
|
switch (v.key) {
|
|
5616
5627
|
case "ArrowLeft":
|
|
5617
5628
|
case "ArrowDown":
|
|
5618
|
-
v.preventDefault(),
|
|
5629
|
+
v.preventDefault(), A(Math.max(U, w - R));
|
|
5619
5630
|
break;
|
|
5620
5631
|
case "ArrowRight":
|
|
5621
5632
|
case "ArrowUp":
|
|
5622
|
-
v.preventDefault(),
|
|
5633
|
+
v.preventDefault(), A(Math.min(ee, w + R));
|
|
5623
5634
|
break;
|
|
5624
5635
|
case "PageDown":
|
|
5625
|
-
v.preventDefault(),
|
|
5636
|
+
v.preventDefault(), A(Math.max(U, w - V));
|
|
5626
5637
|
break;
|
|
5627
5638
|
case "PageUp":
|
|
5628
|
-
v.preventDefault(),
|
|
5639
|
+
v.preventDefault(), A(Math.min(ee, w + V));
|
|
5629
5640
|
break;
|
|
5630
5641
|
case "Home":
|
|
5631
|
-
v.preventDefault(),
|
|
5642
|
+
v.preventDefault(), A(U);
|
|
5632
5643
|
break;
|
|
5633
5644
|
case "End":
|
|
5634
|
-
v.preventDefault(),
|
|
5645
|
+
v.preventDefault(), A(ee);
|
|
5635
5646
|
break;
|
|
5636
5647
|
}
|
|
5637
5648
|
},
|
|
@@ -5640,7 +5651,7 @@ function ai({
|
|
|
5640
5651
|
height: "32px",
|
|
5641
5652
|
display: "flex",
|
|
5642
5653
|
alignItems: "center",
|
|
5643
|
-
cursor:
|
|
5654
|
+
cursor: L && !P ? "default" : "pointer",
|
|
5644
5655
|
position: "relative",
|
|
5645
5656
|
outline: "none"
|
|
5646
5657
|
},
|
|
@@ -5653,23 +5664,23 @@ function ai({
|
|
|
5653
5664
|
left: 0,
|
|
5654
5665
|
right: 0,
|
|
5655
5666
|
height: `${Me}px`,
|
|
5656
|
-
backgroundColor:
|
|
5667
|
+
backgroundColor: Ee,
|
|
5657
5668
|
borderRadius: `${ue}px`
|
|
5658
5669
|
},
|
|
5659
5670
|
children: [
|
|
5660
|
-
!
|
|
5671
|
+
!L && I.map((v, R) => {
|
|
5661
5672
|
if (y <= 0) return null;
|
|
5662
|
-
const
|
|
5673
|
+
const V = v.start / y * 100, U = (v.end - v.start) / y * 100;
|
|
5663
5674
|
return /* @__PURE__ */ s(
|
|
5664
5675
|
"div",
|
|
5665
5676
|
{
|
|
5666
5677
|
style: {
|
|
5667
5678
|
position: "absolute",
|
|
5668
|
-
left: `${
|
|
5679
|
+
left: `${V}%`,
|
|
5669
5680
|
top: 0,
|
|
5670
5681
|
height: "100%",
|
|
5671
|
-
width: `${
|
|
5672
|
-
backgroundColor:
|
|
5682
|
+
width: `${U}%`,
|
|
5683
|
+
backgroundColor: ce,
|
|
5673
5684
|
borderRadius: `${ue}px`,
|
|
5674
5685
|
pointerEvents: "none"
|
|
5675
5686
|
}
|
|
@@ -5692,7 +5703,7 @@ function ai({
|
|
|
5692
5703
|
}
|
|
5693
5704
|
}
|
|
5694
5705
|
),
|
|
5695
|
-
!
|
|
5706
|
+
!L && e.map((v) => {
|
|
5696
5707
|
const R = y > 0 ? v.startTime / y * 100 : 0;
|
|
5697
5708
|
return /* @__PURE__ */ s(
|
|
5698
5709
|
"div",
|
|
@@ -5712,21 +5723,21 @@ function ai({
|
|
|
5712
5723
|
v.id
|
|
5713
5724
|
);
|
|
5714
5725
|
}),
|
|
5715
|
-
r && !
|
|
5716
|
-
const
|
|
5717
|
-
return
|
|
5726
|
+
r && !L && y > 0 && t.map((v, R) => {
|
|
5727
|
+
const V = v.time / y * 100;
|
|
5728
|
+
return V < 0 || V > 100 ? null : /* @__PURE__ */ s(
|
|
5718
5729
|
ni,
|
|
5719
5730
|
{
|
|
5720
5731
|
event: v,
|
|
5721
|
-
position:
|
|
5732
|
+
position: V,
|
|
5722
5733
|
size: i,
|
|
5723
5734
|
showTooltip: !0,
|
|
5724
|
-
onClick: (
|
|
5735
|
+
onClick: (U) => A(U)
|
|
5725
5736
|
},
|
|
5726
5737
|
`timeline-${R}-${v.time}`
|
|
5727
5738
|
);
|
|
5728
5739
|
}),
|
|
5729
|
-
|
|
5740
|
+
P && /* @__PURE__ */ s(
|
|
5730
5741
|
"div",
|
|
5731
5742
|
{
|
|
5732
5743
|
style: {
|
|
@@ -5745,7 +5756,7 @@ function ai({
|
|
|
5745
5756
|
title: "Live edge"
|
|
5746
5757
|
}
|
|
5747
5758
|
),
|
|
5748
|
-
me && (!
|
|
5759
|
+
me && (!L || P) && p !== null && /* @__PURE__ */ s(
|
|
5749
5760
|
"div",
|
|
5750
5761
|
{
|
|
5751
5762
|
style: {
|
|
@@ -5755,7 +5766,7 @@ function ai({
|
|
|
5755
5766
|
transform: "translate(-50%, -50%)",
|
|
5756
5767
|
width: "14px",
|
|
5757
5768
|
height: "14px",
|
|
5758
|
-
backgroundColor:
|
|
5769
|
+
backgroundColor: j,
|
|
5759
5770
|
borderRadius: "50%",
|
|
5760
5771
|
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.3)",
|
|
5761
5772
|
pointerEvents: "none",
|
|
@@ -5763,7 +5774,7 @@ function ai({
|
|
|
5763
5774
|
}
|
|
5764
5775
|
}
|
|
5765
5776
|
),
|
|
5766
|
-
me && (!
|
|
5777
|
+
me && (!L || P) && /* @__PURE__ */ s(
|
|
5767
5778
|
"div",
|
|
5768
5779
|
{
|
|
5769
5780
|
style: {
|
|
@@ -5773,7 +5784,7 @@ function ai({
|
|
|
5773
5784
|
transform: "translate(-50%, -50%)",
|
|
5774
5785
|
width: c ? "16px" : "14px",
|
|
5775
5786
|
height: c ? "16px" : "14px",
|
|
5776
|
-
backgroundColor:
|
|
5787
|
+
backgroundColor: j,
|
|
5777
5788
|
borderRadius: "50%",
|
|
5778
5789
|
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.3)",
|
|
5779
5790
|
pointerEvents: "none",
|
|
@@ -5786,17 +5797,17 @@ function ai({
|
|
|
5786
5797
|
]
|
|
5787
5798
|
}
|
|
5788
5799
|
),
|
|
5789
|
-
Pe && (!
|
|
5790
|
-
const v =
|
|
5800
|
+
Pe && (!L || P) && p !== null && (() => {
|
|
5801
|
+
const v = P ? B.start + p * F : p * y, R = d.current?.offsetWidth ?? 0, V = p * 100, U = p * R, ee = Ze / 2;
|
|
5791
5802
|
let he = "-50%";
|
|
5792
|
-
return
|
|
5803
|
+
return U < ee ? he = "0%" : R - U < ee && (he = "-100%"), m ? (
|
|
5793
5804
|
/* Thumbnail card */
|
|
5794
5805
|
/* @__PURE__ */ u(
|
|
5795
5806
|
"div",
|
|
5796
5807
|
{
|
|
5797
5808
|
style: {
|
|
5798
5809
|
position: "absolute",
|
|
5799
|
-
left: `${
|
|
5810
|
+
left: `${V}%`,
|
|
5800
5811
|
bottom: "24px",
|
|
5801
5812
|
transform: `translateX(${he})`,
|
|
5802
5813
|
pointerEvents: "none",
|
|
@@ -5850,7 +5861,7 @@ function ai({
|
|
|
5850
5861
|
{
|
|
5851
5862
|
style: {
|
|
5852
5863
|
position: "absolute",
|
|
5853
|
-
left: `${
|
|
5864
|
+
left: `${V}%`,
|
|
5854
5865
|
bottom: "20px",
|
|
5855
5866
|
transform: `translateX(${he})`,
|
|
5856
5867
|
padding: "4px 8px",
|
|
@@ -5891,7 +5902,7 @@ function li({
|
|
|
5891
5902
|
hoverBackground: t,
|
|
5892
5903
|
icon: r
|
|
5893
5904
|
}) {
|
|
5894
|
-
const { skipBackward: i } = q(), { isLive: n } =
|
|
5905
|
+
const { skipBackward: i } = q(), { isLive: n } = Y();
|
|
5895
5906
|
if (n) return null;
|
|
5896
5907
|
const o = typeof t == "string" ? t : t === !1 ? "transparent" : void 0;
|
|
5897
5908
|
return /* @__PURE__ */ s(
|
|
@@ -5949,13 +5960,13 @@ function li({
|
|
|
5949
5960
|
}
|
|
5950
5961
|
);
|
|
5951
5962
|
}
|
|
5952
|
-
function
|
|
5963
|
+
function di({
|
|
5953
5964
|
seconds: a = 15,
|
|
5954
5965
|
iconSize: e = 24,
|
|
5955
5966
|
hoverBackground: t,
|
|
5956
5967
|
icon: r
|
|
5957
5968
|
}) {
|
|
5958
|
-
const { skipForward: i } = q(), { isLive: n } =
|
|
5969
|
+
const { skipForward: i } = q(), { isLive: n } = Y();
|
|
5959
5970
|
if (n) return null;
|
|
5960
5971
|
const o = typeof t == "string" ? t : t === !1 ? "transparent" : void 0;
|
|
5961
5972
|
return /* @__PURE__ */ s(
|
|
@@ -6013,7 +6024,7 @@ function ci({
|
|
|
6013
6024
|
}
|
|
6014
6025
|
);
|
|
6015
6026
|
}
|
|
6016
|
-
function
|
|
6027
|
+
function ci({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBackground: r }) {
|
|
6017
6028
|
const i = {
|
|
6018
6029
|
sliderBackground: e?.sliderBackground ?? "rgba(10, 10, 20, 0.88)",
|
|
6019
6030
|
borderColor: e?.borderColor ?? "rgba(255,255,255,0.1)",
|
|
@@ -6023,43 +6034,43 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6023
6034
|
trackColor: e?.trackColor ?? "rgba(255,255,255,0.3)",
|
|
6024
6035
|
fillColor: e?.fillColor ?? "#3b82f6",
|
|
6025
6036
|
handleColor: e?.handleColor ?? "#fff"
|
|
6026
|
-
}, { isMuted: n, volume: o } =
|
|
6037
|
+
}, { isMuted: n, volume: o } = Y(), { toggleMute: l, setVolume: d } = q(), [c, h] = b(!1), [p, g] = b(!1), m = O(null), S = a === "top" || a === "bottom", I = $((E, M) => {
|
|
6027
6038
|
if (!m.current) return;
|
|
6028
|
-
const
|
|
6029
|
-
d(
|
|
6030
|
-
}, [d, S]),
|
|
6031
|
-
g(!0), n && l(),
|
|
6032
|
-
}, [
|
|
6039
|
+
const N = m.current.getBoundingClientRect(), H = S ? Math.max(0, Math.min(1, 1 - (M - N.top) / N.height)) : Math.max(0, Math.min(1, (E - N.left) / N.width));
|
|
6040
|
+
d(H);
|
|
6041
|
+
}, [d, S]), C = $((E) => {
|
|
6042
|
+
g(!0), n && l(), I(E.clientX, E.clientY);
|
|
6043
|
+
}, [I, n, l]);
|
|
6033
6044
|
k(() => {
|
|
6034
6045
|
if (!p) return;
|
|
6035
|
-
const
|
|
6036
|
-
return window.addEventListener("mousemove",
|
|
6037
|
-
window.removeEventListener("mousemove",
|
|
6046
|
+
const E = (N) => I(N.clientX, N.clientY), M = () => g(!1);
|
|
6047
|
+
return window.addEventListener("mousemove", E), window.addEventListener("mouseup", M), () => {
|
|
6048
|
+
window.removeEventListener("mousemove", E), window.removeEventListener("mouseup", M);
|
|
6038
6049
|
};
|
|
6039
|
-
}, [p,
|
|
6040
|
-
const
|
|
6050
|
+
}, [p, I]);
|
|
6051
|
+
const T = p ? o : n ? 0 : o, w = c || p, y = {
|
|
6041
6052
|
position: "absolute",
|
|
6042
|
-
opacity:
|
|
6053
|
+
opacity: w ? 1 : 0,
|
|
6043
6054
|
transition: "all 0.25s ease",
|
|
6044
|
-
pointerEvents:
|
|
6055
|
+
pointerEvents: w ? "auto" : "none",
|
|
6045
6056
|
zIndex: 10,
|
|
6046
6057
|
background: i.sliderBackground,
|
|
6047
6058
|
backdropFilter: "blur(12px)",
|
|
6048
6059
|
boxShadow: "4px 0 16px rgba(0,0,0,0.5)",
|
|
6049
6060
|
overflow: "hidden"
|
|
6050
6061
|
}, G = (() => {
|
|
6051
|
-
const
|
|
6062
|
+
const E = `1px solid ${i.borderColor}`;
|
|
6052
6063
|
switch (a) {
|
|
6053
6064
|
case "left":
|
|
6054
6065
|
return {
|
|
6055
6066
|
...y,
|
|
6056
6067
|
right: "40px",
|
|
6057
6068
|
top: "0",
|
|
6058
|
-
width:
|
|
6069
|
+
width: w ? "118px" : "0px",
|
|
6059
6070
|
height: "40px",
|
|
6060
6071
|
paddingRight: "8px",
|
|
6061
6072
|
borderRadius: "8px 0 0 8px",
|
|
6062
|
-
border:
|
|
6073
|
+
border: E,
|
|
6063
6074
|
borderRight: "none"
|
|
6064
6075
|
};
|
|
6065
6076
|
case "top":
|
|
@@ -6068,10 +6079,10 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6068
6079
|
bottom: "40px",
|
|
6069
6080
|
left: "0",
|
|
6070
6081
|
width: "40px",
|
|
6071
|
-
height:
|
|
6082
|
+
height: w ? "118px" : "0px",
|
|
6072
6083
|
paddingBottom: "8px",
|
|
6073
6084
|
borderRadius: "8px 8px 0 0",
|
|
6074
|
-
border:
|
|
6085
|
+
border: E,
|
|
6075
6086
|
borderBottom: "none"
|
|
6076
6087
|
};
|
|
6077
6088
|
case "bottom":
|
|
@@ -6080,10 +6091,10 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6080
6091
|
top: "40px",
|
|
6081
6092
|
left: "0",
|
|
6082
6093
|
width: "40px",
|
|
6083
|
-
height:
|
|
6094
|
+
height: w ? "118px" : "0px",
|
|
6084
6095
|
paddingTop: "8px",
|
|
6085
6096
|
borderRadius: "0 0 8px 8px",
|
|
6086
|
-
border:
|
|
6097
|
+
border: E,
|
|
6087
6098
|
borderTop: "none"
|
|
6088
6099
|
};
|
|
6089
6100
|
default:
|
|
@@ -6091,20 +6102,20 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6091
6102
|
...y,
|
|
6092
6103
|
left: "40px",
|
|
6093
6104
|
top: "0",
|
|
6094
|
-
width:
|
|
6105
|
+
width: w ? "118px" : "0px",
|
|
6095
6106
|
height: "40px",
|
|
6096
6107
|
paddingLeft: "8px",
|
|
6097
6108
|
borderRadius: "0 8px 8px 0",
|
|
6098
|
-
border:
|
|
6109
|
+
border: E,
|
|
6099
6110
|
borderLeft: "none"
|
|
6100
6111
|
};
|
|
6101
6112
|
}
|
|
6102
|
-
})(),
|
|
6113
|
+
})(), X = S ? { width: "40px", height: "110px", display: "flex", justifyContent: "center", alignItems: "center", cursor: "pointer", position: "relative", outline: "none" } : { width: "110px", height: "40px", display: "flex", alignItems: "center", cursor: "pointer", position: "relative", paddingRight: "8px", outline: "none" }, D = S ? { width: "4px", height: "100%", backgroundColor: i.trackColor, borderRadius: "2px", position: "relative" } : { width: "100%", height: "4px", backgroundColor: i.trackColor, borderRadius: "2px", position: "relative" }, A = S ? {
|
|
6103
6114
|
position: "absolute",
|
|
6104
6115
|
bottom: 0,
|
|
6105
6116
|
left: 0,
|
|
6106
6117
|
right: 0,
|
|
6107
|
-
height: `${
|
|
6118
|
+
height: `${T * 100}%`,
|
|
6108
6119
|
backgroundColor: i.fillColor,
|
|
6109
6120
|
borderRadius: "2px",
|
|
6110
6121
|
transition: p ? "none" : "height 0.1s ease"
|
|
@@ -6113,28 +6124,28 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6113
6124
|
left: 0,
|
|
6114
6125
|
top: 0,
|
|
6115
6126
|
bottom: 0,
|
|
6116
|
-
width: `${
|
|
6127
|
+
width: `${T * 100}%`,
|
|
6117
6128
|
backgroundColor: i.fillColor,
|
|
6118
6129
|
borderRadius: "2px",
|
|
6119
6130
|
transition: p ? "none" : "width 0.1s ease"
|
|
6120
|
-
},
|
|
6131
|
+
}, _ = p ? 14 : 12, W = S ? {
|
|
6121
6132
|
position: "absolute",
|
|
6122
|
-
bottom: `calc(${
|
|
6133
|
+
bottom: `calc(${T * 100}% - ${T * _}px)`,
|
|
6123
6134
|
left: "50%",
|
|
6124
6135
|
transform: "translateX(-50%)",
|
|
6125
|
-
width: `${
|
|
6126
|
-
height: `${
|
|
6136
|
+
width: `${_}px`,
|
|
6137
|
+
height: `${_}px`,
|
|
6127
6138
|
backgroundColor: i.handleColor,
|
|
6128
6139
|
borderRadius: "50%",
|
|
6129
6140
|
boxShadow: "0 2px 4px rgba(0,0,0,0.3)",
|
|
6130
6141
|
transition: p ? "none" : "all 0.2s ease"
|
|
6131
6142
|
} : {
|
|
6132
6143
|
position: "absolute",
|
|
6133
|
-
left: `calc(${
|
|
6144
|
+
left: `calc(${T * 100}% - ${T * _}px)`,
|
|
6134
6145
|
top: "50%",
|
|
6135
6146
|
transform: "translateY(-50%)",
|
|
6136
|
-
width: `${
|
|
6137
|
-
height: `${
|
|
6147
|
+
width: `${_}px`,
|
|
6148
|
+
height: `${_}px`,
|
|
6138
6149
|
backgroundColor: i.handleColor,
|
|
6139
6150
|
borderRadius: "50%",
|
|
6140
6151
|
boxShadow: "0 2px 4px rgba(0,0,0,0.3)",
|
|
@@ -6170,11 +6181,11 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6170
6181
|
position: "relative",
|
|
6171
6182
|
zIndex: 1
|
|
6172
6183
|
},
|
|
6173
|
-
onMouseEnter: (
|
|
6174
|
-
h(!0),
|
|
6184
|
+
onMouseEnter: (E) => {
|
|
6185
|
+
h(!0), E.currentTarget.style.background = typeof r == "string" ? r : r === !1 ? "transparent" : i.buttonHoverBackground, E.currentTarget.style.transform = "scale(1.05)";
|
|
6175
6186
|
},
|
|
6176
|
-
onMouseLeave: (
|
|
6177
|
-
|
|
6187
|
+
onMouseLeave: (E) => {
|
|
6188
|
+
E.currentTarget.style.background = r === !1 ? "transparent" : i.buttonBackground, E.currentTarget.style.transform = "scale(1)";
|
|
6178
6189
|
},
|
|
6179
6190
|
children: n || o === 0 ? (
|
|
6180
6191
|
// Heroicons SpeakerXMarkIcon (solid)
|
|
@@ -6200,42 +6211,42 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6200
6211
|
"aria-label": "Volume",
|
|
6201
6212
|
"aria-valuemin": 0,
|
|
6202
6213
|
"aria-valuemax": 100,
|
|
6203
|
-
"aria-valuenow": Math.round(
|
|
6204
|
-
"aria-valuetext": n ? "Muted" : `${Math.round(
|
|
6205
|
-
onMouseDown:
|
|
6206
|
-
onKeyDown: (
|
|
6207
|
-
const
|
|
6208
|
-
switch (
|
|
6214
|
+
"aria-valuenow": Math.round(T * 100),
|
|
6215
|
+
"aria-valuetext": n ? "Muted" : `${Math.round(T * 100)}%`,
|
|
6216
|
+
onMouseDown: C,
|
|
6217
|
+
onKeyDown: (E) => {
|
|
6218
|
+
const H = n ? 0 : o;
|
|
6219
|
+
switch (E.key) {
|
|
6209
6220
|
case "ArrowRight":
|
|
6210
6221
|
case "ArrowUp":
|
|
6211
|
-
|
|
6222
|
+
E.preventDefault(), d(Math.min(1, H + 0.05));
|
|
6212
6223
|
break;
|
|
6213
6224
|
case "ArrowLeft":
|
|
6214
6225
|
case "ArrowDown":
|
|
6215
|
-
|
|
6226
|
+
E.preventDefault(), d(Math.max(0, H - 0.05));
|
|
6216
6227
|
break;
|
|
6217
6228
|
case "PageUp":
|
|
6218
|
-
|
|
6229
|
+
E.preventDefault(), d(Math.min(1, H + 0.2));
|
|
6219
6230
|
break;
|
|
6220
6231
|
case "PageDown":
|
|
6221
|
-
|
|
6232
|
+
E.preventDefault(), d(Math.max(0, H - 0.2));
|
|
6222
6233
|
break;
|
|
6223
6234
|
case "Home":
|
|
6224
|
-
|
|
6235
|
+
E.preventDefault(), d(0);
|
|
6225
6236
|
break;
|
|
6226
6237
|
case "End":
|
|
6227
|
-
|
|
6238
|
+
E.preventDefault(), d(1);
|
|
6228
6239
|
break;
|
|
6229
6240
|
case "m":
|
|
6230
6241
|
case "M":
|
|
6231
|
-
|
|
6242
|
+
E.preventDefault(), l();
|
|
6232
6243
|
break;
|
|
6233
6244
|
}
|
|
6234
6245
|
},
|
|
6235
|
-
style:
|
|
6236
|
-
children: /* @__PURE__ */ u("div", { style:
|
|
6237
|
-
/* @__PURE__ */ s("div", { style:
|
|
6238
|
-
/* @__PURE__ */ s("div", { style:
|
|
6246
|
+
style: X,
|
|
6247
|
+
children: /* @__PURE__ */ u("div", { style: D, children: [
|
|
6248
|
+
/* @__PURE__ */ s("div", { style: A }),
|
|
6249
|
+
/* @__PURE__ */ s("div", { style: W })
|
|
6239
6250
|
] })
|
|
6240
6251
|
}
|
|
6241
6252
|
)
|
|
@@ -6247,7 +6258,7 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6247
6258
|
}
|
|
6248
6259
|
const ui = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
|
|
6249
6260
|
function Ci() {
|
|
6250
|
-
const { setPlaybackRate: a } = q(), [e, t] = b(1), r =
|
|
6261
|
+
const { setPlaybackRate: a } = q(), [e, t] = b(1), r = $(
|
|
6251
6262
|
(n) => {
|
|
6252
6263
|
a(n), t(n);
|
|
6253
6264
|
},
|
|
@@ -6327,7 +6338,7 @@ function Ci() {
|
|
|
6327
6338
|
] }) })
|
|
6328
6339
|
] });
|
|
6329
6340
|
}
|
|
6330
|
-
const ze =
|
|
6341
|
+
const ze = de({
|
|
6331
6342
|
textColor: "#fff",
|
|
6332
6343
|
accentColor: "#6366f1",
|
|
6333
6344
|
accentAlpha15: "rgba(99,102,241,0.15)",
|
|
@@ -6462,57 +6473,57 @@ function yi({
|
|
|
6462
6473
|
borderBottom: `1px solid ${d.replace("0.1)", "0.08)")}`
|
|
6463
6474
|
}, g = e?.vertical ?? "top", m = e?.horizontal ?? "right", {
|
|
6464
6475
|
setQuality: S,
|
|
6465
|
-
setAudioTrack:
|
|
6466
|
-
setPlaybackRate:
|
|
6467
|
-
setSubtitleTrack:
|
|
6468
|
-
getPlayerStats:
|
|
6469
|
-
} = q(), y = Ce(), { playbackRate: G = 1, isLive:
|
|
6476
|
+
setAudioTrack: I,
|
|
6477
|
+
setPlaybackRate: C,
|
|
6478
|
+
setSubtitleTrack: T,
|
|
6479
|
+
getPlayerStats: w
|
|
6480
|
+
} = q(), y = Ce(), { playbackRate: G = 1, isLive: X } = Y(), { style: D, setStyle: A } = ut(), [_, W] = b(!1), [E, M] = b("root");
|
|
6470
6481
|
k(() => {
|
|
6471
|
-
|
|
6472
|
-
}, [
|
|
6473
|
-
const [
|
|
6482
|
+
X && E === "speed" && M("root");
|
|
6483
|
+
}, [X, E]);
|
|
6484
|
+
const [N, H] = b([]), [Q, L] = b(null), [B, P] = b([]), [F, Z] = b(""), [J, Ee] = b([]), [ae, ce] = b(null), [j, Me] = b(null), [ue, me] = b([]);
|
|
6474
6485
|
k(() => {
|
|
6475
6486
|
const f = () => {
|
|
6476
|
-
|
|
6487
|
+
H(y.getAvailableQualities()), L(y.getQuality()), P(y.getAvailableAudioTracks()), Z(y.getAudioTrack()), Ee(y.getSubtitleTracks()), ce(y.getActiveSubtitleLanguage());
|
|
6477
6488
|
};
|
|
6478
6489
|
y.events.on("tracksready", f), y.events.on("streamTypeDetected", f), y.events.on("qualitychange", f), y.events.on("loadedmetadata", f), f();
|
|
6479
|
-
const
|
|
6490
|
+
const K = setTimeout(f, 100);
|
|
6480
6491
|
return () => {
|
|
6481
|
-
y.events.off("tracksready", f), y.events.off("streamTypeDetected", f), y.events.off("qualitychange", f), y.events.off("loadedmetadata", f), clearTimeout(
|
|
6492
|
+
y.events.off("tracksready", f), y.events.off("streamTypeDetected", f), y.events.off("qualitychange", f), y.events.off("loadedmetadata", f), clearTimeout(K);
|
|
6482
6493
|
};
|
|
6483
6494
|
}, [y]), k(() => {
|
|
6484
|
-
|
|
6485
|
-
}, [
|
|
6495
|
+
_ && (H(y.getAvailableQualities()), L(y.getQuality()), P(y.getAvailableAudioTracks()), Z(y.getAudioTrack()), Ee(y.getSubtitleTracks()), ce(y.getActiveSubtitleLanguage()));
|
|
6496
|
+
}, [_, y]);
|
|
6486
6497
|
const Pe = B.length > 1;
|
|
6487
6498
|
k(() => {
|
|
6488
|
-
if (
|
|
6499
|
+
if (E !== "statistics") return;
|
|
6489
6500
|
const f = () => {
|
|
6490
|
-
const xe =
|
|
6501
|
+
const xe = w();
|
|
6491
6502
|
Me(xe), me((Ve) => [...Ve.slice(-59), xe]);
|
|
6492
6503
|
};
|
|
6493
6504
|
f();
|
|
6494
|
-
const
|
|
6505
|
+
const K = setInterval(f, 1e3);
|
|
6495
6506
|
return () => {
|
|
6496
|
-
clearInterval(
|
|
6507
|
+
clearInterval(K), me([]);
|
|
6497
6508
|
};
|
|
6498
|
-
}, [
|
|
6499
|
-
const ye =
|
|
6509
|
+
}, [E, w]);
|
|
6510
|
+
const ye = O(null);
|
|
6500
6511
|
k(() => {
|
|
6501
|
-
if (!
|
|
6502
|
-
const f = (
|
|
6503
|
-
ye.current && !ye.current.contains(
|
|
6512
|
+
if (!_) return;
|
|
6513
|
+
const f = (K) => {
|
|
6514
|
+
ye.current && !ye.current.contains(K.target) && (W(!1), M("root"));
|
|
6504
6515
|
};
|
|
6505
6516
|
return document.addEventListener("pointerdown", f), () => document.removeEventListener("pointerdown", f);
|
|
6506
|
-
}, [
|
|
6507
|
-
if (!
|
|
6508
|
-
const f = (
|
|
6509
|
-
|
|
6517
|
+
}, [_]), k(() => {
|
|
6518
|
+
if (!_) return;
|
|
6519
|
+
const f = (K) => {
|
|
6520
|
+
K.key === "Escape" && (W(!1), M("root")), K.key === "Backspace" && E !== "root" && M("root");
|
|
6510
6521
|
};
|
|
6511
6522
|
return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
|
|
6512
|
-
}, [
|
|
6513
|
-
const Le =
|
|
6514
|
-
|
|
6515
|
-
}, []), Re = Q ? Q.id === "auto" ? "Auto" : Q.label : "Auto", le = G === 1 ? "1×" : `${G}×`, ve = B.find((f) => f.id ===
|
|
6523
|
+
}, [_, E]);
|
|
6524
|
+
const Le = $(() => {
|
|
6525
|
+
W((f) => (f && M("root"), !f));
|
|
6526
|
+
}, []), Re = Q ? Q.id === "auto" ? "Auto" : Q.label : "Auto", le = G === 1 ? "1×" : `${G}×`, ve = B.find((f) => f.id === F)?.label ?? "Auto", we = ae === null ? "Off" : J.find((f) => f.language === ae)?.label ?? ae, De = /* @__PURE__ */ u("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
6516
6527
|
/* @__PURE__ */ s("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
6517
6528
|
/* @__PURE__ */ s("path", { d: "M8 21h8M12 17v4" }),
|
|
6518
6529
|
/* @__PURE__ */ s("path", { d: "m7 8 2 2 4-4 2 2" })
|
|
@@ -6531,11 +6542,11 @@ function yi({
|
|
|
6531
6542
|
/* @__PURE__ */ s("circle", { cx: "12", cy: "12", r: "3" }),
|
|
6532
6543
|
/* @__PURE__ */ s("path", { d: "M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3" }),
|
|
6533
6544
|
/* @__PURE__ */ s("polyline", { points: "16 16 12 20 8 16" })
|
|
6534
|
-
] }),
|
|
6545
|
+
] }), V = /* @__PURE__ */ u("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
6535
6546
|
/* @__PURE__ */ s("line", { x1: "18", y1: "20", x2: "18", y2: "10" }),
|
|
6536
6547
|
/* @__PURE__ */ s("line", { x1: "12", y1: "20", x2: "12", y2: "4" }),
|
|
6537
6548
|
/* @__PURE__ */ s("line", { x1: "6", y1: "20", x2: "6", y2: "14" })
|
|
6538
|
-
] }),
|
|
6549
|
+
] }), U = () => /* @__PURE__ */ u(oe, { children: [
|
|
6539
6550
|
/* @__PURE__ */ u("div", { style: p, children: [
|
|
6540
6551
|
/* @__PURE__ */ u("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "rgba(255,255,255,0.6)", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
6541
6552
|
/* @__PURE__ */ s("circle", { cx: "12", cy: "12", r: "3" }),
|
|
@@ -6544,59 +6555,59 @@ function yi({
|
|
|
6544
6555
|
"Settings"
|
|
6545
6556
|
] }),
|
|
6546
6557
|
/* @__PURE__ */ u("div", { style: { padding: "4px 0" }, children: [
|
|
6547
|
-
/* @__PURE__ */ s(z, { icon: De, label: "Quality", value: Re, onClick: () =>
|
|
6548
|
-
!
|
|
6549
|
-
Pe && /* @__PURE__ */ s(z, { icon: _e, label: "Audio Track", value: ve, onClick: () =>
|
|
6558
|
+
/* @__PURE__ */ s(z, { icon: De, label: "Quality", value: Re, onClick: () => M("quality") }),
|
|
6559
|
+
!X && /* @__PURE__ */ s(z, { icon: Ie, label: "Speed", value: le, onClick: () => M("speed") }),
|
|
6560
|
+
Pe && /* @__PURE__ */ s(z, { icon: _e, label: "Audio Track", value: ve, onClick: () => M("audio") }),
|
|
6550
6561
|
/* @__PURE__ */ s(tt, {}),
|
|
6551
|
-
/* @__PURE__ */ s(z, { icon: v, label: "Subtitles", value:
|
|
6552
|
-
/* @__PURE__ */ s(z, { icon: R, label: "Subtitle Style", value: `${
|
|
6562
|
+
/* @__PURE__ */ s(z, { icon: v, label: "Subtitles", value: we, onClick: () => M("subtitles") }),
|
|
6563
|
+
/* @__PURE__ */ s(z, { icon: R, label: "Subtitle Style", value: `${D.fontSize}px`, onClick: () => M("subtitleStyle") }),
|
|
6553
6564
|
/* @__PURE__ */ s(tt, {}),
|
|
6554
|
-
/* @__PURE__ */ s(z, { icon:
|
|
6565
|
+
/* @__PURE__ */ s(z, { icon: V, label: "Statistics", onClick: () => M("statistics") })
|
|
6555
6566
|
] })
|
|
6556
6567
|
] }), ee = () => /* @__PURE__ */ u(oe, { children: [
|
|
6557
|
-
/* @__PURE__ */ s("div", { style: p, children: /* @__PURE__ */ s(z, { label: "Quality", isBack: !0, onClick: () =>
|
|
6568
|
+
/* @__PURE__ */ s("div", { style: p, children: /* @__PURE__ */ s(z, { label: "Quality", isBack: !0, onClick: () => M("root") }) }),
|
|
6558
6569
|
/* @__PURE__ */ u("div", { style: { padding: "4px 0", maxHeight: "280px", overflowY: "auto" }, children: [
|
|
6559
|
-
|
|
6570
|
+
N.map((f) => /* @__PURE__ */ s(
|
|
6560
6571
|
z,
|
|
6561
6572
|
{
|
|
6562
6573
|
label: f.id === "auto" ? "Auto" : f.label,
|
|
6563
6574
|
selected: Q?.id === f.id,
|
|
6564
6575
|
onClick: () => {
|
|
6565
|
-
S(f.id),
|
|
6576
|
+
S(f.id), L(f), W(!1), M("root");
|
|
6566
6577
|
}
|
|
6567
6578
|
},
|
|
6568
6579
|
f.id
|
|
6569
6580
|
)),
|
|
6570
|
-
|
|
6581
|
+
N.length === 0 && /* @__PURE__ */ s("div", { style: { padding: "10px 14px", color: "rgba(255,255,255,0.4)", fontSize: "13px" }, children: "No quality levels available" })
|
|
6571
6582
|
] })
|
|
6572
6583
|
] }), he = () => /* @__PURE__ */ u(oe, { children: [
|
|
6573
|
-
/* @__PURE__ */ s("div", { style: p, children: /* @__PURE__ */ s(z, { label: "Speed", isBack: !0, onClick: () =>
|
|
6584
|
+
/* @__PURE__ */ s("div", { style: p, children: /* @__PURE__ */ s(z, { label: "Speed", isBack: !0, onClick: () => M("root") }) }),
|
|
6574
6585
|
/* @__PURE__ */ s("div", { style: { padding: "4px 0" }, children: pi.map((f) => /* @__PURE__ */ s(
|
|
6575
6586
|
z,
|
|
6576
6587
|
{
|
|
6577
6588
|
label: f === 1 ? "1× (Normal)" : `${f}×`,
|
|
6578
6589
|
selected: G === f,
|
|
6579
6590
|
onClick: () => {
|
|
6580
|
-
|
|
6591
|
+
C(f), W(!1), M("root");
|
|
6581
6592
|
}
|
|
6582
6593
|
},
|
|
6583
6594
|
f
|
|
6584
6595
|
)) })
|
|
6585
6596
|
] }), ft = () => /* @__PURE__ */ u(oe, { children: [
|
|
6586
|
-
/* @__PURE__ */ s("div", { style: p, children: /* @__PURE__ */ s(z, { label: "Audio Track", isBack: !0, onClick: () =>
|
|
6597
|
+
/* @__PURE__ */ s("div", { style: p, children: /* @__PURE__ */ s(z, { label: "Audio Track", isBack: !0, onClick: () => M("root") }) }),
|
|
6587
6598
|
/* @__PURE__ */ s("div", { style: { padding: "4px 0" }, children: B.map((f) => /* @__PURE__ */ s(
|
|
6588
6599
|
z,
|
|
6589
6600
|
{
|
|
6590
6601
|
label: f.label || f.language || f.id,
|
|
6591
|
-
selected:
|
|
6602
|
+
selected: F === f.id,
|
|
6592
6603
|
onClick: () => {
|
|
6593
|
-
|
|
6604
|
+
I(f.id), Z(f.id), W(!1), M("root");
|
|
6594
6605
|
}
|
|
6595
6606
|
},
|
|
6596
6607
|
f.id
|
|
6597
6608
|
)) })
|
|
6598
6609
|
] }), mt = () => /* @__PURE__ */ u(oe, { children: [
|
|
6599
|
-
/* @__PURE__ */ s("div", { style: p, children: /* @__PURE__ */ s(z, { label: "Subtitles", isBack: !0, onClick: () =>
|
|
6610
|
+
/* @__PURE__ */ s("div", { style: p, children: /* @__PURE__ */ s(z, { label: "Subtitles", isBack: !0, onClick: () => M("root") }) }),
|
|
6600
6611
|
/* @__PURE__ */ u("div", { style: { padding: "4px 0" }, children: [
|
|
6601
6612
|
/* @__PURE__ */ s(
|
|
6602
6613
|
z,
|
|
@@ -6604,32 +6615,32 @@ function yi({
|
|
|
6604
6615
|
label: "Off",
|
|
6605
6616
|
selected: ae === null,
|
|
6606
6617
|
onClick: () => {
|
|
6607
|
-
|
|
6618
|
+
T(null), ce(null), W(!1), M("root");
|
|
6608
6619
|
}
|
|
6609
6620
|
},
|
|
6610
6621
|
"off"
|
|
6611
6622
|
),
|
|
6612
|
-
J.map((f,
|
|
6623
|
+
J.map((f, K) => /* @__PURE__ */ s(
|
|
6613
6624
|
z,
|
|
6614
6625
|
{
|
|
6615
6626
|
label: f.label || f.language,
|
|
6616
6627
|
selected: ae === f.language,
|
|
6617
6628
|
onClick: () => {
|
|
6618
|
-
|
|
6629
|
+
T(f.language), ce(f.language), W(!1), M("root");
|
|
6619
6630
|
}
|
|
6620
6631
|
},
|
|
6621
|
-
f.url || `${f.language}-${
|
|
6632
|
+
f.url || `${f.language}-${K}`
|
|
6622
6633
|
)),
|
|
6623
6634
|
J.length === 0 && /* @__PURE__ */ s("div", { style: { padding: "10px 14px", color: "rgba(255,255,255,0.4)", fontSize: "13px" }, children: "No subtitle tracks available" })
|
|
6624
6635
|
] })
|
|
6625
6636
|
] }), yt = () => /* @__PURE__ */ u(oe, { children: [
|
|
6626
|
-
/* @__PURE__ */ s("div", { style: p, children: /* @__PURE__ */ s(z, { label: "Subtitle Style", isBack: !0, onClick: () =>
|
|
6637
|
+
/* @__PURE__ */ s("div", { style: p, children: /* @__PURE__ */ s(z, { label: "Subtitle Style", isBack: !0, onClick: () => M("root") }) }),
|
|
6627
6638
|
/* @__PURE__ */ u("div", { style: { padding: "8px 14px 12px", display: "flex", flexDirection: "column", gap: "14px" }, children: [
|
|
6628
6639
|
/* @__PURE__ */ u("div", { children: [
|
|
6629
6640
|
/* @__PURE__ */ u("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "6px" }, children: [
|
|
6630
6641
|
/* @__PURE__ */ s("span", { style: { fontSize: "13px", color: "rgba(255,255,255,0.8)" }, children: "Position" }),
|
|
6631
6642
|
/* @__PURE__ */ u("span", { style: { fontSize: "12px", color: "rgba(255,255,255,0.5)" }, children: [
|
|
6632
|
-
|
|
6643
|
+
D.bottomOffset,
|
|
6633
6644
|
"px from bottom"
|
|
6634
6645
|
] })
|
|
6635
6646
|
] }),
|
|
@@ -6640,8 +6651,8 @@ function yi({
|
|
|
6640
6651
|
min: 10,
|
|
6641
6652
|
max: 200,
|
|
6642
6653
|
step: 5,
|
|
6643
|
-
value:
|
|
6644
|
-
onChange: (f) =>
|
|
6654
|
+
value: D.bottomOffset,
|
|
6655
|
+
onChange: (f) => A({ bottomOffset: Number(f.target.value) }),
|
|
6645
6656
|
style: { width: "100%", accentColor: "#3b82f6", cursor: "pointer" }
|
|
6646
6657
|
}
|
|
6647
6658
|
)
|
|
@@ -6650,7 +6661,7 @@ function yi({
|
|
|
6650
6661
|
/* @__PURE__ */ u("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "6px" }, children: [
|
|
6651
6662
|
/* @__PURE__ */ s("span", { style: { fontSize: "13px", color: "rgba(255,255,255,0.8)" }, children: "Font Size" }),
|
|
6652
6663
|
/* @__PURE__ */ u("span", { style: { fontSize: "12px", color: "rgba(255,255,255,0.5)" }, children: [
|
|
6653
|
-
|
|
6664
|
+
D.fontSize,
|
|
6654
6665
|
"px"
|
|
6655
6666
|
] })
|
|
6656
6667
|
] }),
|
|
@@ -6661,8 +6672,8 @@ function yi({
|
|
|
6661
6672
|
min: 12,
|
|
6662
6673
|
max: 40,
|
|
6663
6674
|
step: 1,
|
|
6664
|
-
value:
|
|
6665
|
-
onChange: (f) =>
|
|
6675
|
+
value: D.fontSize,
|
|
6676
|
+
onChange: (f) => A({ fontSize: Number(f.target.value) }),
|
|
6666
6677
|
style: { width: "100%", accentColor: "#3b82f6", cursor: "pointer" }
|
|
6667
6678
|
}
|
|
6668
6679
|
)
|
|
@@ -6672,17 +6683,17 @@ function yi({
|
|
|
6672
6683
|
/* @__PURE__ */ s(
|
|
6673
6684
|
"button",
|
|
6674
6685
|
{
|
|
6675
|
-
onClick: () =>
|
|
6686
|
+
onClick: () => A({ background: D.background ? "" : "rgba(0,0,0,0.75)" }),
|
|
6676
6687
|
style: {
|
|
6677
6688
|
padding: "4px 12px",
|
|
6678
6689
|
borderRadius: "6px",
|
|
6679
6690
|
border: "1px solid rgba(255,255,255,0.2)",
|
|
6680
|
-
background:
|
|
6691
|
+
background: D.background ? "#3b82f6" : "transparent",
|
|
6681
6692
|
color: "#fff",
|
|
6682
6693
|
fontSize: "12px",
|
|
6683
6694
|
cursor: "pointer"
|
|
6684
6695
|
},
|
|
6685
|
-
children:
|
|
6696
|
+
children: D.background ? "On" : "Off"
|
|
6686
6697
|
}
|
|
6687
6698
|
)
|
|
6688
6699
|
] }),
|
|
@@ -6691,14 +6702,14 @@ function yi({
|
|
|
6691
6702
|
/* @__PURE__ */ s("div", { style: { display: "flex", gap: "6px" }, children: ["#ffffff", "#ffff00", "#00ff00", "#00cfff"].map((f) => /* @__PURE__ */ s(
|
|
6692
6703
|
"button",
|
|
6693
6704
|
{
|
|
6694
|
-
onClick: () =>
|
|
6705
|
+
onClick: () => A({ color: f }),
|
|
6695
6706
|
title: f,
|
|
6696
6707
|
style: {
|
|
6697
6708
|
width: "22px",
|
|
6698
6709
|
height: "22px",
|
|
6699
6710
|
borderRadius: "50%",
|
|
6700
6711
|
background: f,
|
|
6701
|
-
border:
|
|
6712
|
+
border: D.color === f ? "2px solid #3b82f6" : "2px solid transparent",
|
|
6702
6713
|
cursor: "pointer",
|
|
6703
6714
|
outline: "none",
|
|
6704
6715
|
padding: 0,
|
|
@@ -6710,7 +6721,7 @@ function yi({
|
|
|
6710
6721
|
] })
|
|
6711
6722
|
] })
|
|
6712
6723
|
] }), vt = () => {
|
|
6713
|
-
const f = ue.map((ie) => ie.bandwidth),
|
|
6724
|
+
const f = ue.map((ie) => ie.bandwidth), K = ue.map((ie) => ie.bufferHealth), xe = j?.bandwidth ?? 0, Ve = j?.bufferHealth ?? 0, Et = (ie) => ie >= 1e3 ? `${(ie / 1e3).toFixed(2)} Mbps` : `${ie.toFixed(0)} kbps`, ke = (ie, xt) => /* @__PURE__ */ u("div", { style: {
|
|
6714
6725
|
background: "rgba(255,255,255,0.04)",
|
|
6715
6726
|
borderRadius: "8px",
|
|
6716
6727
|
padding: "7px 10px",
|
|
@@ -6719,10 +6730,10 @@ function yi({
|
|
|
6719
6730
|
}, children: [
|
|
6720
6731
|
/* @__PURE__ */ s("div", { style: { fontSize: "10px", color: "rgba(255,255,255,0.4)", textTransform: "uppercase", letterSpacing: "0.06em", marginBottom: "3px" }, children: ie }),
|
|
6721
6732
|
/* @__PURE__ */ s("div", { style: { fontSize: "12px", color: "#fff", fontFamily: "monospace", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: xt })
|
|
6722
|
-
] }), Se =
|
|
6733
|
+
] }), Se = j?.segmentUrl ?? "", wt = Se.length > 36 ? "…" + Se.slice(-36) : Se || "—";
|
|
6723
6734
|
return /* @__PURE__ */ u(oe, { children: [
|
|
6724
6735
|
/* @__PURE__ */ u("div", { style: { ...p, justifyContent: "space-between" }, children: [
|
|
6725
|
-
/* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: /* @__PURE__ */ s(z, { label: "Statistics", isBack: !0, onClick: () =>
|
|
6736
|
+
/* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: /* @__PURE__ */ s(z, { label: "Statistics", isBack: !0, onClick: () => M("root") }) }),
|
|
6726
6737
|
/* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", gap: "6px", paddingRight: "14px", flexShrink: 0 }, children: [
|
|
6727
6738
|
/* @__PURE__ */ s("span", { style: {
|
|
6728
6739
|
width: "7px",
|
|
@@ -6740,25 +6751,25 @@ function yi({
|
|
|
6740
6751
|
/* @__PURE__ */ u("div", { style: { marginTop: "12px" }, children: [
|
|
6741
6752
|
/* @__PURE__ */ u("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "baseline", marginBottom: "6px" }, children: [
|
|
6742
6753
|
/* @__PURE__ */ s("span", { style: { fontSize: "11px", color: "rgba(255,255,255,0.45)", textTransform: "uppercase", letterSpacing: "0.07em" }, children: "Connection Speed" }),
|
|
6743
|
-
/* @__PURE__ */ s("span", { style: { fontSize: "16px", fontWeight: 600, color: "#4ade80", fontFamily: "monospace" }, children:
|
|
6754
|
+
/* @__PURE__ */ s("span", { style: { fontSize: "16px", fontWeight: 600, color: "#4ade80", fontFamily: "monospace" }, children: j ? Et(xe) : "—" })
|
|
6744
6755
|
] }),
|
|
6745
6756
|
/* @__PURE__ */ s("div", { style: { background: "rgba(0,0,0,0.3)", borderRadius: "8px", padding: "6px 8px" }, children: /* @__PURE__ */ s(et, { values: f, color: "#4ade80", gradId: "bw-grad" }) })
|
|
6746
6757
|
] }),
|
|
6747
6758
|
/* @__PURE__ */ u("div", { style: { marginTop: "14px" }, children: [
|
|
6748
6759
|
/* @__PURE__ */ u("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "baseline", marginBottom: "6px" }, children: [
|
|
6749
6760
|
/* @__PURE__ */ s("span", { style: { fontSize: "11px", color: "rgba(255,255,255,0.45)", textTransform: "uppercase", letterSpacing: "0.07em" }, children: "Buffer Health" }),
|
|
6750
|
-
/* @__PURE__ */ s("span", { style: { fontSize: "16px", fontWeight: 600, color: "#60a5fa", fontFamily: "monospace" }, children:
|
|
6761
|
+
/* @__PURE__ */ s("span", { style: { fontSize: "16px", fontWeight: 600, color: "#60a5fa", fontFamily: "monospace" }, children: j ? `${Ve.toFixed(1)} s` : "—" })
|
|
6751
6762
|
] }),
|
|
6752
|
-
/* @__PURE__ */ s("div", { style: { background: "rgba(0,0,0,0.3)", borderRadius: "8px", padding: "6px 8px" }, children: /* @__PURE__ */ s(et, { values:
|
|
6763
|
+
/* @__PURE__ */ s("div", { style: { background: "rgba(0,0,0,0.3)", borderRadius: "8px", padding: "6px 8px" }, children: /* @__PURE__ */ s(et, { values: K, color: "#60a5fa", gradId: "buf-grad" }) })
|
|
6753
6764
|
] }),
|
|
6754
6765
|
/* @__PURE__ */ s("div", { style: { height: "1px", background: "rgba(255,255,255,0.07)", margin: "14px 0 12px" } }),
|
|
6755
6766
|
/* @__PURE__ */ u("div", { style: { display: "flex", gap: "6px" }, children: [
|
|
6756
|
-
ke("Codec",
|
|
6757
|
-
ke("Resolution",
|
|
6758
|
-
ke("Dropped",
|
|
6767
|
+
ke("Codec", j?.codec || "—"),
|
|
6768
|
+
ke("Resolution", j?.resolution || "—"),
|
|
6769
|
+
ke("Dropped", j ? `${j.droppedFrames}/${j.totalFrames}` : "—")
|
|
6759
6770
|
] }),
|
|
6760
6771
|
/* @__PURE__ */ u("div", { style: { display: "flex", gap: "6px", marginTop: "6px" }, children: [
|
|
6761
|
-
ke("Stream",
|
|
6772
|
+
ke("Stream", j?.streamType || "—"),
|
|
6762
6773
|
/* @__PURE__ */ u("div", { style: {
|
|
6763
6774
|
background: "rgba(255,255,255,0.04)",
|
|
6764
6775
|
borderRadius: "8px",
|
|
@@ -6767,7 +6778,7 @@ function yi({
|
|
|
6767
6778
|
minWidth: 0
|
|
6768
6779
|
}, children: [
|
|
6769
6780
|
/* @__PURE__ */ s("div", { style: { fontSize: "10px", color: "rgba(255,255,255,0.4)", textTransform: "uppercase", letterSpacing: "0.06em", marginBottom: "3px" }, children: "Segment" }),
|
|
6770
|
-
/* @__PURE__ */ s("div", { style: { fontSize: "11px", color: "rgba(255,255,255,0.7)", fontFamily: "monospace", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, title: Se, children:
|
|
6781
|
+
/* @__PURE__ */ s("div", { style: { fontSize: "11px", color: "rgba(255,255,255,0.7)", fontFamily: "monospace", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, title: Se, children: wt })
|
|
6771
6782
|
] })
|
|
6772
6783
|
] })
|
|
6773
6784
|
] }),
|
|
@@ -6779,7 +6790,7 @@ function yi({
|
|
|
6779
6790
|
` })
|
|
6780
6791
|
] });
|
|
6781
6792
|
}, bt = () => {
|
|
6782
|
-
switch (
|
|
6793
|
+
switch (E) {
|
|
6783
6794
|
case "quality":
|
|
6784
6795
|
return ee();
|
|
6785
6796
|
case "speed":
|
|
@@ -6793,7 +6804,7 @@ function yi({
|
|
|
6793
6804
|
case "statistics":
|
|
6794
6805
|
return vt();
|
|
6795
6806
|
default:
|
|
6796
|
-
return
|
|
6807
|
+
return U();
|
|
6797
6808
|
}
|
|
6798
6809
|
};
|
|
6799
6810
|
return /* @__PURE__ */ u("div", { ref: ye, style: { position: "relative", display: "inline-block" }, children: [
|
|
@@ -6803,10 +6814,10 @@ function yi({
|
|
|
6803
6814
|
className: "virtus-settings-btn",
|
|
6804
6815
|
"aria-label": "Settings",
|
|
6805
6816
|
"aria-haspopup": "menu",
|
|
6806
|
-
"aria-expanded":
|
|
6817
|
+
"aria-expanded": _,
|
|
6807
6818
|
onClick: Le,
|
|
6808
6819
|
style: {
|
|
6809
|
-
background:
|
|
6820
|
+
background: _ ? "rgba(255,255,255,0.18)" : "transparent",
|
|
6810
6821
|
border: "none",
|
|
6811
6822
|
color: "white",
|
|
6812
6823
|
cursor: "pointer",
|
|
@@ -6820,11 +6831,11 @@ function yi({
|
|
|
6820
6831
|
transition: "all 0.2s ease"
|
|
6821
6832
|
},
|
|
6822
6833
|
onMouseEnter: (f) => {
|
|
6823
|
-
const
|
|
6824
|
-
f.currentTarget.style.background =
|
|
6834
|
+
const K = typeof r == "string" ? r : r === !1 ? "transparent" : "rgba(255,255,255,0.15)";
|
|
6835
|
+
f.currentTarget.style.background = K, f.currentTarget.style.transform = "scale(1.05)";
|
|
6825
6836
|
},
|
|
6826
6837
|
onMouseLeave: (f) => {
|
|
6827
|
-
f.currentTarget.style.background =
|
|
6838
|
+
f.currentTarget.style.background = _ ? "rgba(255,255,255,0.18)" : "transparent", f.currentTarget.style.transform = "scale(1)";
|
|
6828
6839
|
},
|
|
6829
6840
|
title: "Settings",
|
|
6830
6841
|
children: i ?? /* @__PURE__ */ u(
|
|
@@ -6840,7 +6851,7 @@ function yi({
|
|
|
6840
6851
|
strokeLinejoin: "round",
|
|
6841
6852
|
style: {
|
|
6842
6853
|
transition: "transform 0.3s ease",
|
|
6843
|
-
transform:
|
|
6854
|
+
transform: _ ? "rotate(45deg)" : "rotate(0deg)"
|
|
6844
6855
|
},
|
|
6845
6856
|
children: [
|
|
6846
6857
|
/* @__PURE__ */ s("circle", { cx: "12", cy: "12", r: "3" }),
|
|
@@ -6850,7 +6861,7 @@ function yi({
|
|
|
6850
6861
|
)
|
|
6851
6862
|
}
|
|
6852
6863
|
),
|
|
6853
|
-
|
|
6864
|
+
_ && /* @__PURE__ */ s(ze.Provider, { value: h, children: /* @__PURE__ */ s(
|
|
6854
6865
|
"div",
|
|
6855
6866
|
{
|
|
6856
6867
|
role: "menu",
|
|
@@ -6860,7 +6871,7 @@ function yi({
|
|
|
6860
6871
|
background: l,
|
|
6861
6872
|
border: `1px solid ${d}`,
|
|
6862
6873
|
boxShadow: `0 12px 48px rgba(0,0,0,0.7), 0 0 0 1px ${d.replace("0.1)", "0.08)")}`,
|
|
6863
|
-
width:
|
|
6874
|
+
width: E === "statistics" ? "360px" : "320px",
|
|
6864
6875
|
...g === "bottom" ? { top: "52px" } : { bottom: "52px" },
|
|
6865
6876
|
...m === "left" ? { left: 0 } : { right: 0 }
|
|
6866
6877
|
},
|
|
@@ -6887,7 +6898,7 @@ function Ti({ label: a = "AirPlay", className: e = "" }) {
|
|
|
6887
6898
|
t.events.off("airplaychange", d);
|
|
6888
6899
|
};
|
|
6889
6900
|
}, [t]);
|
|
6890
|
-
const l =
|
|
6901
|
+
const l = $(() => {
|
|
6891
6902
|
t?.showAirPlayPicker();
|
|
6892
6903
|
}, [t]);
|
|
6893
6904
|
return r ? /* @__PURE__ */ s(
|
|
@@ -6947,7 +6958,7 @@ function Mi({
|
|
|
6947
6958
|
t.events.off("castchange", d);
|
|
6948
6959
|
};
|
|
6949
6960
|
}, [t]);
|
|
6950
|
-
const l =
|
|
6961
|
+
const l = $(() => {
|
|
6951
6962
|
n ? t?.stopCasting() : t?.showCastPicker();
|
|
6952
6963
|
}, [t, n]);
|
|
6953
6964
|
return r ? /* @__PURE__ */ s(
|
|
@@ -7001,7 +7012,7 @@ function Pi({ x: a, y: e, isOpen: t, onClose: r, actions: i, theme: n }) {
|
|
|
7001
7012
|
hoverBackground: n?.hoverBackground ?? "rgba(255,255,255,0.07)",
|
|
7002
7013
|
iconBackground: n?.iconBackground ?? "rgba(255,255,255,0.08)",
|
|
7003
7014
|
dividerColor: n?.dividerColor ?? "rgba(255,255,255,0.07)"
|
|
7004
|
-
}, l =
|
|
7015
|
+
}, l = O(null);
|
|
7005
7016
|
return k(() => {
|
|
7006
7017
|
if (!t) return;
|
|
7007
7018
|
const d = (c) => {
|
|
@@ -7096,12 +7107,12 @@ function Pi({ x: a, y: e, isOpen: t, onClose: r, actions: i, theme: n }) {
|
|
|
7096
7107
|
] }) : null;
|
|
7097
7108
|
}
|
|
7098
7109
|
const Li = ({ mode: a }) => {
|
|
7099
|
-
const { isLive: e } =
|
|
7110
|
+
const { isLive: e } = Y(), t = a === "live" || a !== "vod" && !!e;
|
|
7100
7111
|
return /* @__PURE__ */ u(Or, { children: [
|
|
7101
7112
|
/* @__PURE__ */ s(zr, {}),
|
|
7102
7113
|
!t && /* @__PURE__ */ s(li, { seconds: 15 }),
|
|
7103
|
-
!t && /* @__PURE__ */ s(
|
|
7104
|
-
/* @__PURE__ */ s(
|
|
7114
|
+
!t && /* @__PURE__ */ s(di, { seconds: 15 }),
|
|
7115
|
+
/* @__PURE__ */ s(ci, { sliderDirection: "top" }),
|
|
7105
7116
|
!t && /* @__PURE__ */ s(Jr, {}),
|
|
7106
7117
|
/* @__PURE__ */ s("div", { style: { flex: 1 } }),
|
|
7107
7118
|
/* @__PURE__ */ s(yi, { theme: { background: "#fb0000" } }),
|
|
@@ -7229,7 +7240,7 @@ export {
|
|
|
7229
7240
|
Kr as PipButton,
|
|
7230
7241
|
zr as PlayButton,
|
|
7231
7242
|
Ci as PlaybackSpeedSelector,
|
|
7232
|
-
|
|
7243
|
+
wi as Player,
|
|
7233
7244
|
fe as PlayerCore,
|
|
7234
7245
|
Gt as PlayerProvider,
|
|
7235
7246
|
Di as Playron,
|
|
@@ -7239,21 +7250,21 @@ export {
|
|
|
7239
7250
|
Si as SettingsButton,
|
|
7240
7251
|
yi as SettingsPanel,
|
|
7241
7252
|
li as SkipBackwardButton,
|
|
7242
|
-
|
|
7253
|
+
di as SkipForwardButton,
|
|
7243
7254
|
Ai as SkipIntroButton,
|
|
7244
7255
|
Rt as StallDetector,
|
|
7245
7256
|
Pt as StreamDetector,
|
|
7246
7257
|
ki as TheaterModeButton,
|
|
7247
7258
|
si as ThumbnailManager,
|
|
7248
7259
|
Jr as TimeDisplay,
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7260
|
+
x as VideoEventType,
|
|
7261
|
+
ci as VolumeControl,
|
|
7262
|
+
wi as default,
|
|
7252
7263
|
ge as eventBus,
|
|
7253
|
-
|
|
7264
|
+
Ei as isVideoEventType,
|
|
7254
7265
|
Lt as streamDetector,
|
|
7255
7266
|
Lr as useMobileGestures,
|
|
7256
7267
|
Ce as usePlayer,
|
|
7257
7268
|
q as usePlayerMethods,
|
|
7258
|
-
|
|
7269
|
+
Y as usePlayerState
|
|
7259
7270
|
};
|