playron 1.0.36 → 1.0.38
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 +10 -10
- package/dist/playron.es.js +283 -268
- package/dist/types/config.d.ts +2 -0
- package/dist/types/config.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/playron.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s, jsxs as u, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as ce, useState as b, useEffect as
|
|
3
|
-
class
|
|
2
|
+
import { createContext as ce, useState as b, useEffect as k, useMemo as Ue, useContext as re, memo as kt, useRef as O, useCallback as $ } from "react";
|
|
3
|
+
class At {
|
|
4
4
|
listeners = /* @__PURE__ */ new Map();
|
|
5
5
|
/**
|
|
6
6
|
* Event dinleyicisi ekle
|
|
@@ -47,7 +47,7 @@ class St {
|
|
|
47
47
|
return this.listeners.get(e)?.size || 0;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
const ge = new
|
|
50
|
+
const ge = new At(), x = {
|
|
51
51
|
// Playback events
|
|
52
52
|
PLAY: "play",
|
|
53
53
|
PAUSE: "pause",
|
|
@@ -78,7 +78,7 @@ const ge = new St(), C = {
|
|
|
78
78
|
EMPTIED: "emptied",
|
|
79
79
|
// Other events
|
|
80
80
|
RESIZE: "resize"
|
|
81
|
-
},
|
|
81
|
+
}, Se = {
|
|
82
82
|
MEDIA_ERR_ABORTED: 1,
|
|
83
83
|
// Fetching process aborted by user
|
|
84
84
|
MEDIA_ERR_NETWORK: 2,
|
|
@@ -88,10 +88,10 @@ 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
|
-
class
|
|
94
|
+
class St {
|
|
95
95
|
videoElement = null;
|
|
96
96
|
isPlaying = !1;
|
|
97
97
|
isMuted = !1;
|
|
@@ -106,26 +106,26 @@ 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,
|
|
125
|
-
MEDIA_ERR_ABORTED: this.videoElement.error.code ===
|
|
126
|
-
MEDIA_ERR_NETWORK: this.videoElement.error.code ===
|
|
127
|
-
MEDIA_ERR_DECODE: this.videoElement.error.code ===
|
|
128
|
-
MEDIA_ERR_SRC_NOT_SUPPORTED: this.videoElement.error.code ===
|
|
125
|
+
MEDIA_ERR_ABORTED: this.videoElement.error.code === Se.MEDIA_ERR_ABORTED,
|
|
126
|
+
MEDIA_ERR_NETWORK: this.videoElement.error.code === Se.MEDIA_ERR_NETWORK,
|
|
127
|
+
MEDIA_ERR_DECODE: this.videoElement.error.code === Se.MEDIA_ERR_DECODE,
|
|
128
|
+
MEDIA_ERR_SRC_NOT_SUPPORTED: this.videoElement.error.code === Se.MEDIA_ERR_SRC_NOT_SUPPORTED
|
|
129
129
|
});
|
|
130
130
|
}));
|
|
131
131
|
}
|
|
@@ -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) {
|
|
@@ -1499,7 +1500,7 @@ class fe {
|
|
|
1499
1500
|
*/
|
|
1500
1501
|
initialize() {
|
|
1501
1502
|
if (!this.videoElement) return;
|
|
1502
|
-
this.videoEngine = new
|
|
1503
|
+
this.videoEngine = new St(this.videoElement);
|
|
1503
1504
|
const e = this.loadPersistedVolume();
|
|
1504
1505
|
e !== null && (this.videoElement.volume = e), this.stateManager = new Tt({
|
|
1505
1506
|
isPlaying: !1,
|
|
@@ -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"}`;
|
|
@@ -1780,7 +1791,9 @@ class fe {
|
|
|
1780
1791
|
const r = this.streamInfo?.isDynamic ?? !1, i = t.protocol === "hls" ? "application/x-mpegURL" : t.protocol === "dash" ? "application/dash+xml" : "video/mp4";
|
|
1781
1792
|
this.castManager.loadMedia(e, i, 0, r);
|
|
1782
1793
|
}
|
|
1783
|
-
this.startStallDetector()
|
|
1794
|
+
this.startStallDetector(), this.videoElement?.autoplay && this.videoElement.play().catch((r) => {
|
|
1795
|
+
r instanceof DOMException && (r.name === "AbortError" || r.name === "NotAllowedError") || console.warn("[PlayerCore] Autoplay failed:", r);
|
|
1796
|
+
});
|
|
1784
1797
|
}
|
|
1785
1798
|
/**
|
|
1786
1799
|
* Aktif streaming engine'i temizle
|
|
@@ -1794,7 +1807,9 @@ class fe {
|
|
|
1794
1807
|
async fallbackToNative(e, t) {
|
|
1795
1808
|
if (!(!this.videoElement || !this.videoEngine))
|
|
1796
1809
|
try {
|
|
1797
|
-
console.log(`[PlayerCore] Attempting native fallback for ${t} stream`), this.videoEngine.setSource(e), this.
|
|
1810
|
+
console.log(`[PlayerCore] Attempting native fallback for ${t} stream`), this.videoEngine.setSource(e), this.videoElement?.autoplay && this.videoElement.play().catch((r) => {
|
|
1811
|
+
r instanceof DOMException && (r.name === "AbortError" || r.name);
|
|
1812
|
+
}), this.streamType = "vod", this.streamInfo = {
|
|
1798
1813
|
type: "vod",
|
|
1799
1814
|
protocol: "progressive",
|
|
1800
1815
|
isDynamic: !1,
|
|
@@ -2069,7 +2084,7 @@ const st = ce(null), ot = {
|
|
|
2069
2084
|
}, at = ce(ot), lt = ce(null);
|
|
2070
2085
|
function Gt({ children: a, playerInstance: e }) {
|
|
2071
2086
|
const [t, r] = b(ot);
|
|
2072
|
-
|
|
2087
|
+
k(() => {
|
|
2073
2088
|
if (!e) return;
|
|
2074
2089
|
const n = e.getStateManager();
|
|
2075
2090
|
if (!n) return;
|
|
@@ -2101,8 +2116,8 @@ function Gt({ children: a, playerInstance: e }) {
|
|
|
2101
2116
|
isLive: !0
|
|
2102
2117
|
});
|
|
2103
2118
|
};
|
|
2104
|
-
return e.events.on("livelatencyupdate", p), l.addEventListener(
|
|
2105
|
-
e.events.off("livelatencyupdate", p), l.removeEventListener(
|
|
2119
|
+
return e.events.on("livelatencyupdate", p), l.addEventListener(x.TIME_UPDATE, c), l.addEventListener(x.PLAY, d), l.addEventListener(x.PAUSE, d), l.addEventListener(x.VOLUME_CHANGE, h), l.addEventListener(x.LOADED_METADATA, c), () => {
|
|
2120
|
+
e.events.off("livelatencyupdate", p), l.removeEventListener(x.TIME_UPDATE, c), l.removeEventListener(x.PLAY, d), l.removeEventListener(x.PAUSE, d), l.removeEventListener(x.VOLUME_CHANGE, h), l.removeEventListener(x.LOADED_METADATA, c), n.unsubscribe(o);
|
|
2106
2121
|
};
|
|
2107
2122
|
}
|
|
2108
2123
|
return () => {
|
|
@@ -2263,11 +2278,11 @@ const Zt = "_overlay_3mfq6_3", Jt = "_iconContainer_3mfq6_17", er = "_loading_3m
|
|
|
2263
2278
|
};
|
|
2264
2279
|
function ir({ config: a, isAdLoading: e }) {
|
|
2265
2280
|
const t = Y((D) => D.isPlaying), { togglePlay: r, toggleFullscreen: i, getPlayer: n } = q(), [o, l] = b(!1), [c, d] = b("play"), [h, p] = b(!1), g = O(null);
|
|
2266
|
-
|
|
2281
|
+
k(() => {
|
|
2267
2282
|
console.log("[VideoOverlay] isAdLoading changed:", e), e ? (console.log("[VideoOverlay] ✅ Showing ad loading icon"), p(!0), d("loading"), l(!0)) : (console.log("[VideoOverlay] ❌ Hiding ad loading icon"), p(!1), l(!1));
|
|
2268
2283
|
}, [e]);
|
|
2269
|
-
const m = a?.ui?.showOverlayIcons !== !1,
|
|
2270
|
-
|
|
2284
|
+
const m = a?.ui?.showOverlayIcons !== !1, A = 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;
|
|
2285
|
+
k(() => {
|
|
2271
2286
|
const D = n();
|
|
2272
2287
|
if (!D) return;
|
|
2273
2288
|
const S = D.video || D.videoElement;
|
|
@@ -2278,7 +2293,7 @@ function ir({ config: a, isAdLoading: e }) {
|
|
|
2278
2293
|
g.current = window.setTimeout(() => {
|
|
2279
2294
|
p(!1), l(!1);
|
|
2280
2295
|
}, 300);
|
|
2281
|
-
},
|
|
2296
|
+
}, E = () => {
|
|
2282
2297
|
p(!0), d("loading"), l(!0);
|
|
2283
2298
|
}, M = () => {
|
|
2284
2299
|
h && (g.current = window.setTimeout(() => {
|
|
@@ -2291,10 +2306,10 @@ function ir({ config: a, isAdLoading: e }) {
|
|
|
2291
2306
|
}, H = () => {
|
|
2292
2307
|
p(!0), d("loading"), l(!0);
|
|
2293
2308
|
};
|
|
2294
|
-
return S.addEventListener(
|
|
2295
|
-
S.removeEventListener(
|
|
2309
|
+
return S.addEventListener(x.SEEKING, _), S.addEventListener(x.SEEKED, W), S.addEventListener(x.WAITING, E), S.addEventListener(x.PLAYING, M), S.addEventListener(x.CAN_PLAY, N), S.addEventListener(x.LOAD_START, H), () => {
|
|
2310
|
+
S.removeEventListener(x.SEEKING, _), S.removeEventListener(x.SEEKED, W), S.removeEventListener(x.WAITING, E), S.removeEventListener(x.PLAYING, M), S.removeEventListener(x.CAN_PLAY, N), S.removeEventListener(x.LOAD_START, H), g.current && clearTimeout(g.current);
|
|
2296
2311
|
};
|
|
2297
|
-
}, [n, h]),
|
|
2312
|
+
}, [n, h]), k(() => {
|
|
2298
2313
|
if (!h) {
|
|
2299
2314
|
d(t ? "pause" : "play"), l(!0);
|
|
2300
2315
|
const D = setTimeout(() => {
|
|
@@ -2303,12 +2318,12 @@ function ir({ config: a, isAdLoading: e }) {
|
|
|
2303
2318
|
return () => clearTimeout(D);
|
|
2304
2319
|
}
|
|
2305
2320
|
}, [t, h]);
|
|
2306
|
-
const y =
|
|
2321
|
+
const y = $(async () => {
|
|
2307
2322
|
await r();
|
|
2308
|
-
}, [r]), G =
|
|
2323
|
+
}, [r]), G = $(() => {
|
|
2309
2324
|
i();
|
|
2310
2325
|
}, [i]), X = (D) => {
|
|
2311
|
-
const S = D === "play" ? I :
|
|
2326
|
+
const S = D === "play" ? I : C;
|
|
2312
2327
|
return S ? /^https?:\/\//.test(S) || /\.(jpg|jpeg|png|svg|gif|webp)$/i.test(S) ? /* @__PURE__ */ s(
|
|
2313
2328
|
"img",
|
|
2314
2329
|
{
|
|
@@ -2364,7 +2379,7 @@ function ir({ config: a, isAdLoading: e }) {
|
|
|
2364
2379
|
{
|
|
2365
2380
|
className: `${ne.iconContainer} ${ne.loading}`,
|
|
2366
2381
|
style: {
|
|
2367
|
-
"--icon-container-size": `${
|
|
2382
|
+
"--icon-container-size": `${w}px`,
|
|
2368
2383
|
"--icon-size": `${T}px`
|
|
2369
2384
|
},
|
|
2370
2385
|
children: /* @__PURE__ */ s(Xe, { size: T })
|
|
@@ -2376,12 +2391,12 @@ function ir({ config: a, isAdLoading: e }) {
|
|
|
2376
2391
|
className: `virtus-video-overlay ${ne.overlay}`,
|
|
2377
2392
|
onClick: y,
|
|
2378
2393
|
onDoubleClick: G,
|
|
2379
|
-
children: m && o && !e && (c === "loading" ||
|
|
2394
|
+
children: m && o && !e && (c === "loading" || A) && /* @__PURE__ */ s(
|
|
2380
2395
|
"div",
|
|
2381
2396
|
{
|
|
2382
2397
|
className: `${ne.iconContainer} ${h ? ne.loading : ""}`,
|
|
2383
2398
|
style: {
|
|
2384
|
-
"--icon-container-size": `${
|
|
2399
|
+
"--icon-container-size": `${w}px`,
|
|
2385
2400
|
"--icon-size": `${T}px`
|
|
2386
2401
|
},
|
|
2387
2402
|
children: c === "loading" ? /* @__PURE__ */ s(Xe, { size: T }) : X(c)
|
|
@@ -2398,7 +2413,7 @@ function Ce() {
|
|
|
2398
2413
|
throw new Error("usePlayer must be used within PlayerProvider");
|
|
2399
2414
|
return a;
|
|
2400
2415
|
}
|
|
2401
|
-
const sr = "_errorOverlay_4djr8_5", or = "_variant_drm_4djr8_19", ar = "_variant_network_4djr8_23", lr = "_variant_decode_4djr8_27", cr = "_variant_generic_4djr8_31", dr = "_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",
|
|
2416
|
+
const sr = "_errorOverlay_4djr8_5", or = "_variant_drm_4djr8_19", ar = "_variant_network_4djr8_23", lr = "_variant_decode_4djr8_27", cr = "_variant_generic_4djr8_31", dr = "_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
2417
|
errorOverlay: sr,
|
|
2403
2418
|
variant_drm: or,
|
|
2404
2419
|
variant_network: ar,
|
|
@@ -2414,8 +2429,8 @@ const sr = "_errorOverlay_4djr8_5", or = "_variant_drm_4djr8_19", ar = "_variant
|
|
|
2414
2429
|
errorHint: yr,
|
|
2415
2430
|
browserList: vr,
|
|
2416
2431
|
browserItem: br,
|
|
2417
|
-
errorCode:
|
|
2418
|
-
retryButton:
|
|
2432
|
+
errorCode: Er,
|
|
2433
|
+
retryButton: wr
|
|
2419
2434
|
};
|
|
2420
2435
|
function xr(a, e) {
|
|
2421
2436
|
const t = a.code.toUpperCase(), r = (a.message ?? "").toUpperCase();
|
|
@@ -2497,10 +2512,10 @@ function kr(a) {
|
|
|
2497
2512
|
};
|
|
2498
2513
|
}
|
|
2499
2514
|
}
|
|
2500
|
-
const
|
|
2501
|
-
function
|
|
2515
|
+
const Ar = 12e3;
|
|
2516
|
+
function Sr({ onRetry: a, drmConfig: e }) {
|
|
2502
2517
|
const t = Ce(), [r, i] = b(null), [n, o] = b(null), l = O(null), c = O(null);
|
|
2503
|
-
c.current = r,
|
|
2518
|
+
c.current = r, k(() => {
|
|
2504
2519
|
it().then((g) => {
|
|
2505
2520
|
o(g);
|
|
2506
2521
|
const m = Ge(e, g);
|
|
@@ -2512,50 +2527,50 @@ function Ar({ onRetry: a, drmConfig: e }) {
|
|
|
2512
2527
|
// must NOT be dismissed by play/loadedmetadata
|
|
2513
2528
|
});
|
|
2514
2529
|
}).catch(() => o(null));
|
|
2515
|
-
}, []),
|
|
2530
|
+
}, []), k(() => {
|
|
2516
2531
|
if (!n || !e?.enabled) return;
|
|
2517
2532
|
const g = Ge(e, n);
|
|
2518
2533
|
g && !c.current && i({ type: g, code: "DRM_NOT_SUPPORTED", rawMessage: "Browser does not support the required DRM key system.", persistent: !0 });
|
|
2519
|
-
}, [e, n]),
|
|
2534
|
+
}, [e, n]), k(() => {
|
|
2520
2535
|
if (!t || !e?.enabled) return;
|
|
2521
2536
|
const g = t.getVideoElement();
|
|
2522
2537
|
if (!g) return;
|
|
2523
2538
|
const m = () => {
|
|
2524
2539
|
g.currentTime > 0.5 || (l.current = setTimeout(() => {
|
|
2525
2540
|
if (c.current) return;
|
|
2526
|
-
const I = n,
|
|
2541
|
+
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
2542
|
i({
|
|
2528
|
-
type:
|
|
2543
|
+
type: C,
|
|
2529
2544
|
code: "DRM_TIMEOUT",
|
|
2530
2545
|
rawMessage: "Playback stalled — possible DRM or network issue.",
|
|
2531
2546
|
persistent: !0
|
|
2532
2547
|
// don't let a late loadedmetadata dismiss this
|
|
2533
2548
|
});
|
|
2534
|
-
},
|
|
2535
|
-
},
|
|
2549
|
+
}, Ar));
|
|
2550
|
+
}, A = () => {
|
|
2536
2551
|
l.current && (clearTimeout(l.current), l.current = null);
|
|
2537
2552
|
};
|
|
2538
|
-
return g.addEventListener("waiting", m), g.addEventListener("playing",
|
|
2539
|
-
g.removeEventListener("waiting", m), g.removeEventListener("playing",
|
|
2553
|
+
return g.addEventListener("waiting", m), g.addEventListener("playing", A), g.addEventListener("timeupdate", A), () => {
|
|
2554
|
+
g.removeEventListener("waiting", m), g.removeEventListener("playing", A), g.removeEventListener("timeupdate", A), A();
|
|
2540
2555
|
};
|
|
2541
|
-
}, [t, e, n]),
|
|
2556
|
+
}, [t, e, n]), k(() => {
|
|
2542
2557
|
if (!t) return;
|
|
2543
2558
|
const g = (m) => {
|
|
2544
2559
|
console.error("[ErrorOverlay] Player error:", m);
|
|
2545
|
-
const
|
|
2546
|
-
i({ type:
|
|
2560
|
+
const A = xr(m, n);
|
|
2561
|
+
i({ type: A, code: m.code, rawMessage: m.message ?? "Unknown error" });
|
|
2547
2562
|
};
|
|
2548
2563
|
return t.events.on("error", g), () => {
|
|
2549
2564
|
t.events.off("error", g);
|
|
2550
2565
|
};
|
|
2551
|
-
}, [t, n]),
|
|
2566
|
+
}, [t, n]), k(() => {
|
|
2552
2567
|
if (!t) return;
|
|
2553
2568
|
const g = () => i((m) => m?.persistent ? m : null);
|
|
2554
2569
|
return t.events.on("play", g), t.events.on("loadedmetadata", g), () => {
|
|
2555
2570
|
t.events.off("play", g), t.events.off("loadedmetadata", g);
|
|
2556
2571
|
};
|
|
2557
2572
|
}, [t]);
|
|
2558
|
-
const d =
|
|
2573
|
+
const d = $(() => {
|
|
2559
2574
|
if (i(null), a) {
|
|
2560
2575
|
a();
|
|
2561
2576
|
return;
|
|
@@ -2633,10 +2648,10 @@ const se = {
|
|
|
2633
2648
|
{ key: "Esc", description: "Close overlays", icon: se.close }
|
|
2634
2649
|
];
|
|
2635
2650
|
function Tr({ isOpen: a, onClose: e }) {
|
|
2636
|
-
const t =
|
|
2651
|
+
const t = $((r) => {
|
|
2637
2652
|
r.key === "Escape" && e();
|
|
2638
2653
|
}, [e]);
|
|
2639
|
-
return
|
|
2654
|
+
return k(() => {
|
|
2640
2655
|
if (a)
|
|
2641
2656
|
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
2642
2657
|
}, [a, t]), a ? /* @__PURE__ */ u(
|
|
@@ -2796,10 +2811,10 @@ function Mr({
|
|
|
2796
2811
|
nextTitle: i,
|
|
2797
2812
|
thumbnail: n
|
|
2798
2813
|
}) {
|
|
2799
|
-
const [o, l] = b(r), c = O(null), d =
|
|
2814
|
+
const [o, l] = b(r), c = O(null), d = $(() => {
|
|
2800
2815
|
c.current && (clearInterval(c.current), c.current = null);
|
|
2801
2816
|
}, []);
|
|
2802
|
-
if (
|
|
2817
|
+
if (k(() => {
|
|
2803
2818
|
if (!a) {
|
|
2804
2819
|
d(), l(r);
|
|
2805
2820
|
return;
|
|
@@ -3034,26 +3049,26 @@ function Pr({ type: a, value: e }) {
|
|
|
3034
3049
|
);
|
|
3035
3050
|
}
|
|
3036
3051
|
function Lr({ player: a, skipSec: e = 10 }) {
|
|
3037
|
-
const [t, r] = b(null), i = O(null), n =
|
|
3052
|
+
const [t, r] = b(null), i = O(null), n = $((p) => {
|
|
3038
3053
|
r(p), i.current && clearTimeout(i.current), i.current = setTimeout(() => r(null), 900);
|
|
3039
|
-
}, []), o = O(null), l = 300, c =
|
|
3054
|
+
}, []), o = O(null), l = 300, c = $((p) => {
|
|
3040
3055
|
if (!a) return;
|
|
3041
|
-
const g = p.touches[0], m = Date.now(),
|
|
3042
|
-
if (
|
|
3043
|
-
const
|
|
3044
|
-
if (g.clientX -
|
|
3045
|
-
const
|
|
3046
|
-
|
|
3056
|
+
const g = p.touches[0], m = Date.now(), A = o.current;
|
|
3057
|
+
if (A && m - A.time < l) {
|
|
3058
|
+
const C = p.currentTarget.getBoundingClientRect();
|
|
3059
|
+
if (g.clientX - C.left > C.width / 2) {
|
|
3060
|
+
const w = a.getVideoElement();
|
|
3061
|
+
w && a.seekTo(Math.min(w.duration || 0, w.currentTime + e)), n({ type: "seek-forward", value: `+${e}s` });
|
|
3047
3062
|
} else {
|
|
3048
|
-
const
|
|
3049
|
-
|
|
3063
|
+
const w = a.getVideoElement();
|
|
3064
|
+
w && a.seekTo(Math.max(0, w.currentTime - e)), n({ type: "seek-backward", value: `-${e}s` });
|
|
3050
3065
|
}
|
|
3051
3066
|
o.current = null;
|
|
3052
3067
|
return;
|
|
3053
3068
|
}
|
|
3054
3069
|
o.current = { time: m, x: g.clientX };
|
|
3055
|
-
}, [a, e, n]), d =
|
|
3056
|
-
}, []), h =
|
|
3070
|
+
}, [a, e, n]), d = $((p) => {
|
|
3071
|
+
}, []), h = $(() => {
|
|
3057
3072
|
}, []);
|
|
3058
3073
|
return { onTouchStart: c, onTouchMove: d, onTouchEnd: h, gestureHint: t };
|
|
3059
3074
|
}
|
|
@@ -3067,12 +3082,12 @@ function Dr({
|
|
|
3067
3082
|
timeout: a = 3e3,
|
|
3068
3083
|
initialVisible: e = !0
|
|
3069
3084
|
} = {}) {
|
|
3070
|
-
const [t, r] = b(e), i = O(null), n =
|
|
3085
|
+
const [t, r] = b(e), i = O(null), n = $(() => {
|
|
3071
3086
|
i.current && clearTimeout(i.current), r(!0), i.current = window.setTimeout(() => {
|
|
3072
3087
|
r(!1);
|
|
3073
3088
|
}, a);
|
|
3074
3089
|
}, [a]);
|
|
3075
|
-
return
|
|
3090
|
+
return k(() => {
|
|
3076
3091
|
const o = Rr(() => {
|
|
3077
3092
|
n();
|
|
3078
3093
|
}, 100), l = () => {
|
|
@@ -3089,7 +3104,7 @@ function Ir({
|
|
|
3089
3104
|
enabled: t = !0,
|
|
3090
3105
|
onShowShortcuts: r
|
|
3091
3106
|
}) {
|
|
3092
|
-
|
|
3107
|
+
k(() => {
|
|
3093
3108
|
if (!a || !t) return;
|
|
3094
3109
|
const i = (n) => {
|
|
3095
3110
|
const o = n.target;
|
|
@@ -3251,21 +3266,21 @@ class _r {
|
|
|
3251
3266
|
parseAdElement(e, t) {
|
|
3252
3267
|
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
3268
|
if (!n) {
|
|
3254
|
-
const T = Array.from(e.children).map((
|
|
3269
|
+
const T = Array.from(e.children).map((w) => w.tagName);
|
|
3255
3270
|
throw T.length === 0 ? new Error("VAST Ad element is empty (no ads available)") : new Error(`VAST InLine not found. Found: ${T.join(", ")}`);
|
|
3256
3271
|
}
|
|
3257
3272
|
const o = e.getAttribute("id") || `ad-${Date.now()}`, l = n.querySelector("AdTitle")?.textContent?.trim(), c = n.querySelector("Duration")?.textContent?.trim(), d = this.parseDuration(c || "00:00:00"), { mediaFile: h, isVpaid: p, vpaidUrl: g } = this.getMediaFileInfo(n);
|
|
3258
3273
|
if (!h) throw new Error("VAST MediaFile not found");
|
|
3259
|
-
const m = n.querySelector("ClickThrough")?.textContent?.trim(),
|
|
3274
|
+
const m = n.querySelector("ClickThrough")?.textContent?.trim(), A = this.parseTrackingEvents(n, t), I = this.getErrorUrls(t), C = this.parseCompanions(n);
|
|
3260
3275
|
return {
|
|
3261
3276
|
id: o,
|
|
3262
3277
|
title: l,
|
|
3263
3278
|
duration: d,
|
|
3264
3279
|
mediaFile: h,
|
|
3265
3280
|
clickThrough: m,
|
|
3266
|
-
trackingEvents:
|
|
3281
|
+
trackingEvents: A,
|
|
3267
3282
|
errorUrls: I,
|
|
3268
|
-
companions:
|
|
3283
|
+
companions: C.length > 0 ? C : void 0,
|
|
3269
3284
|
isVpaid: p,
|
|
3270
3285
|
vpaidUrl: g,
|
|
3271
3286
|
podSequence: i
|
|
@@ -3275,9 +3290,9 @@ class _r {
|
|
|
3275
3290
|
parseCompanions(e) {
|
|
3276
3291
|
const t = [];
|
|
3277
3292
|
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, c = i.querySelector("StaticResource"), d = i.querySelector("HTMLResource"), h = i.querySelector("IFrameResource"), p = c?.textContent?.trim() ?? void 0, g = d?.textContent?.trim() ?? void 0, m = h?.textContent?.trim() ?? void 0,
|
|
3279
|
-
i.querySelectorAll('TrackingEvents > Tracking[event="creativeView"]').forEach((
|
|
3280
|
-
const y =
|
|
3293
|
+
const n = parseInt(i.getAttribute("width") || "0", 10), o = parseInt(i.getAttribute("height") || "0", 10), l = i.getAttribute("id") ?? void 0, c = i.querySelector("StaticResource"), d = i.querySelector("HTMLResource"), h = i.querySelector("IFrameResource"), p = c?.textContent?.trim() ?? void 0, g = d?.textContent?.trim() ?? void 0, m = h?.textContent?.trim() ?? void 0, A = c?.getAttribute("creativeType") ?? void 0, I = i.querySelector("CompanionClickThrough")?.textContent?.trim() ?? void 0, C = i.querySelector("AltText")?.textContent?.trim() ?? void 0, T = [];
|
|
3294
|
+
i.querySelectorAll('TrackingEvents > Tracking[event="creativeView"]').forEach((w) => {
|
|
3295
|
+
const y = w.textContent?.trim();
|
|
3281
3296
|
y && T.push(y);
|
|
3282
3297
|
}), (p || g || m) && t.push({
|
|
3283
3298
|
id: l,
|
|
@@ -3286,9 +3301,9 @@ class _r {
|
|
|
3286
3301
|
staticResource: p,
|
|
3287
3302
|
htmlResource: g,
|
|
3288
3303
|
iFrameResource: m,
|
|
3289
|
-
type:
|
|
3304
|
+
type: A,
|
|
3290
3305
|
clickThrough: I,
|
|
3291
|
-
altText:
|
|
3306
|
+
altText: C,
|
|
3292
3307
|
viewTrackingUrls: T.length > 0 ? T : void 0
|
|
3293
3308
|
});
|
|
3294
3309
|
}), t;
|
|
@@ -3565,7 +3580,7 @@ class Nr {
|
|
|
3565
3580
|
reset() {
|
|
3566
3581
|
}
|
|
3567
3582
|
}
|
|
3568
|
-
class
|
|
3583
|
+
class Br {
|
|
3569
3584
|
player;
|
|
3570
3585
|
config;
|
|
3571
3586
|
tracker;
|
|
@@ -3796,8 +3811,8 @@ class $r {
|
|
|
3796
3811
|
const i = this.adVideo;
|
|
3797
3812
|
let n = !1;
|
|
3798
3813
|
const o = () => {
|
|
3799
|
-
i.play().catch((
|
|
3800
|
-
n || (m(), r(
|
|
3814
|
+
i.play().catch((A) => {
|
|
3815
|
+
n || (m(), r(A));
|
|
3801
3816
|
});
|
|
3802
3817
|
}, l = () => this.tracker.trackStart(e), c = () => {
|
|
3803
3818
|
console.log("[AdPlayer] Ad video playing, hiding loading..."), this.hideLoadingCallback && this.hideLoadingCallback();
|
|
@@ -3811,12 +3826,12 @@ class $r {
|
|
|
3811
3826
|
t();
|
|
3812
3827
|
return;
|
|
3813
3828
|
}
|
|
3814
|
-
const
|
|
3815
|
-
if (
|
|
3829
|
+
const A = i.error?.code;
|
|
3830
|
+
if (A === 4) {
|
|
3816
3831
|
m(), t();
|
|
3817
3832
|
return;
|
|
3818
3833
|
}
|
|
3819
|
-
m(), r(new Error(`Ad video playback error: ${i.error?.message ?? "Unknown"} (code: ${
|
|
3834
|
+
m(), r(new Error(`Ad video playback error: ${i.error?.message ?? "Unknown"} (code: ${A})`));
|
|
3820
3835
|
}, m = () => {
|
|
3821
3836
|
if (!n) {
|
|
3822
3837
|
n = !0;
|
|
@@ -3900,7 +3915,7 @@ class $r {
|
|
|
3900
3915
|
};
|
|
3901
3916
|
}
|
|
3902
3917
|
}
|
|
3903
|
-
class
|
|
3918
|
+
class $r {
|
|
3904
3919
|
player;
|
|
3905
3920
|
config;
|
|
3906
3921
|
vastParser;
|
|
@@ -3917,7 +3932,7 @@ class Br {
|
|
|
3917
3932
|
this.player = e, this.config = t, this.onLoadingChange = r, this.vastParser = new _r(
|
|
3918
3933
|
t.timeout || 5e3,
|
|
3919
3934
|
t.maxWrapperDepth || 5
|
|
3920
|
-
), this.vmapParser = new Vr(t.timeout || 5e3), this.adPlayer = new
|
|
3935
|
+
), this.vmapParser = new Vr(t.timeout || 5e3), this.adPlayer = new Br(e, t, () => this.hideAdLoading()), console.log("[AdManager] Initialized with config:", t);
|
|
3921
3936
|
}
|
|
3922
3937
|
/**
|
|
3923
3938
|
* Wait for video element to be ready (with retry logic)
|
|
@@ -4213,7 +4228,7 @@ function ut() {
|
|
|
4213
4228
|
}
|
|
4214
4229
|
function Ur({ videoElement: a }) {
|
|
4215
4230
|
const { style: e } = ut(), [t, r] = b([]), i = O(""), n = O(0);
|
|
4216
|
-
return
|
|
4231
|
+
return k(() => {
|
|
4217
4232
|
if (!a) return;
|
|
4218
4233
|
const o = () => {
|
|
4219
4234
|
const l = a.textTracks, c = [];
|
|
@@ -4224,8 +4239,8 @@ function Ur({ videoElement: a }) {
|
|
|
4224
4239
|
const g = p.activeCues;
|
|
4225
4240
|
if (g)
|
|
4226
4241
|
for (let m = 0; m < g.length; m++) {
|
|
4227
|
-
const
|
|
4228
|
-
|
|
4242
|
+
const A = g[m];
|
|
4243
|
+
A.text && c.push(A.text);
|
|
4229
4244
|
}
|
|
4230
4245
|
}
|
|
4231
4246
|
const d = c.join("\0");
|
|
@@ -4275,7 +4290,7 @@ function Ur({ videoElement: a }) {
|
|
|
4275
4290
|
);
|
|
4276
4291
|
}
|
|
4277
4292
|
const He = ce(!0);
|
|
4278
|
-
function
|
|
4293
|
+
function wi({
|
|
4279
4294
|
src: a = "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
|
|
4280
4295
|
defaultControls: e = !1,
|
|
4281
4296
|
autoplay: t = !1,
|
|
@@ -4291,20 +4306,20 @@ function Ei({
|
|
|
4291
4306
|
endCardCountdown: g = 5,
|
|
4292
4307
|
crossOrigin: m
|
|
4293
4308
|
}) {
|
|
4294
|
-
const
|
|
4295
|
-
player:
|
|
4309
|
+
const A = O(null), I = O(null), [C, T] = b(null), w = O(null), [y, G] = b(!1), [X, D] = b(!1), S = $(() => D(!0), []), _ = $(() => D(!1), []), [W, E] = b(!1), { onTouchStart: M, onTouchMove: N, onTouchEnd: H, gestureHint: Q } = Lr({
|
|
4310
|
+
player: C,
|
|
4296
4311
|
skipSec: 10
|
|
4297
4312
|
}), { isActive: L } = Dr({
|
|
4298
4313
|
timeout: 3e3,
|
|
4299
4314
|
initialVisible: !0
|
|
4300
4315
|
});
|
|
4301
4316
|
Ir({
|
|
4302
|
-
player:
|
|
4317
|
+
player: C,
|
|
4303
4318
|
seekStep: 10,
|
|
4304
4319
|
enabled: !0,
|
|
4305
4320
|
onShowShortcuts: S
|
|
4306
4321
|
});
|
|
4307
|
-
const
|
|
4322
|
+
const B = Ue(() => !l?.ads?.enabled || !l.ads.vastUrl && !l.ads.vmapUrl ? null : {
|
|
4308
4323
|
enabled: !0,
|
|
4309
4324
|
vastUrl: l.ads.vastUrl,
|
|
4310
4325
|
vmapUrl: l.ads.vmapUrl,
|
|
@@ -4319,45 +4334,45 @@ function Ei({
|
|
|
4319
4334
|
l?.ads?.timeout,
|
|
4320
4335
|
l?.ads?.maxWrapperDepth
|
|
4321
4336
|
]);
|
|
4322
|
-
|
|
4323
|
-
if (!I.current || !
|
|
4337
|
+
k(() => {
|
|
4338
|
+
if (!I.current || !A.current) return;
|
|
4324
4339
|
console.log("[Player] Initializing PlayerCore");
|
|
4325
4340
|
const F = new fe(I.current);
|
|
4326
|
-
return fe.preloadEngines(), F.container =
|
|
4327
|
-
console.log("[Player] Cleanup called - destroying PlayerCore"),
|
|
4341
|
+
return fe.preloadEngines(), F.container = A.current, T(F), () => {
|
|
4342
|
+
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
4343
|
};
|
|
4329
|
-
}, []),
|
|
4330
|
-
if (!
|
|
4344
|
+
}, []), k(() => {
|
|
4345
|
+
if (!C || !B) return;
|
|
4331
4346
|
console.log("[Player] Setting up ads");
|
|
4332
4347
|
const F = (J) => {
|
|
4333
4348
|
G(J), c?.(J);
|
|
4334
|
-
}, Z = new
|
|
4335
|
-
return
|
|
4349
|
+
}, Z = new $r(C, B, F);
|
|
4350
|
+
return w.current = Z, Z.setup().catch((J) => {
|
|
4336
4351
|
console.error("[Player] Failed to setup ads:", J);
|
|
4337
4352
|
}), () => {
|
|
4338
|
-
|
|
4353
|
+
w.current && (console.log("[Player] Cleaning up ads"), w.current.destroy(), w.current = null);
|
|
4339
4354
|
};
|
|
4340
|
-
}, [
|
|
4341
|
-
!
|
|
4342
|
-
}, [
|
|
4355
|
+
}, [C, B]), k(() => {
|
|
4356
|
+
!C || !l || C.setConfig(l);
|
|
4357
|
+
}, [C, l]);
|
|
4343
4358
|
const P = Ue(() => l?.drm ?? null, [l?.drm]);
|
|
4344
|
-
return
|
|
4345
|
-
!
|
|
4346
|
-
}, [
|
|
4347
|
-
|
|
4359
|
+
return k(() => {
|
|
4360
|
+
!C || !P?.enabled || C.setupDrm(P);
|
|
4361
|
+
}, [C, P]), k(() => {
|
|
4362
|
+
C && a && (console.log("[Player] Setting source:", a), C.setSource(a).catch((F) => {
|
|
4348
4363
|
console.error("[Player] setSource failed:", F);
|
|
4349
4364
|
}));
|
|
4350
|
-
}, [
|
|
4351
|
-
if (!
|
|
4352
|
-
const F =
|
|
4365
|
+
}, [C, a]), k(() => {
|
|
4366
|
+
if (!C || !d) return;
|
|
4367
|
+
const F = C.getVideoElement();
|
|
4353
4368
|
if (!F) return;
|
|
4354
|
-
const Z = () =>
|
|
4369
|
+
const Z = () => E(!0);
|
|
4355
4370
|
return F.addEventListener("ended", Z), () => F.removeEventListener("ended", Z);
|
|
4356
|
-
}, [
|
|
4371
|
+
}, [C, d]), /* @__PURE__ */ u(Fr, { children: [
|
|
4357
4372
|
/* @__PURE__ */ u(
|
|
4358
4373
|
"div",
|
|
4359
4374
|
{
|
|
4360
|
-
ref:
|
|
4375
|
+
ref: A,
|
|
4361
4376
|
role: "region",
|
|
4362
4377
|
"aria-label": "Video Player",
|
|
4363
4378
|
className: `playron-wrapper ${n || ""}`,
|
|
@@ -4411,20 +4426,20 @@ function Ei({
|
|
|
4411
4426
|
tabIndex: e ? 0 : -1
|
|
4412
4427
|
}
|
|
4413
4428
|
),
|
|
4414
|
-
|
|
4429
|
+
C ? /* @__PURE__ */ s(Gt, { playerInstance: C, children: /* @__PURE__ */ u(He.Provider, { value: L, children: [
|
|
4415
4430
|
/* @__PURE__ */ s(Ur, { videoElement: I.current }),
|
|
4416
4431
|
/* @__PURE__ */ s(nr, { config: l, isAdLoading: y }),
|
|
4417
4432
|
/* @__PURE__ */ s(Pr, { type: Q?.type ?? null, value: Q?.value ?? "" }),
|
|
4418
|
-
/* @__PURE__ */ s(
|
|
4433
|
+
/* @__PURE__ */ s(Sr, { drmConfig: l?.drm }),
|
|
4419
4434
|
/* @__PURE__ */ s(Tr, { isOpen: X, onClose: _ }),
|
|
4420
4435
|
d && /* @__PURE__ */ s(
|
|
4421
4436
|
Mr,
|
|
4422
4437
|
{
|
|
4423
4438
|
isVisible: W,
|
|
4424
4439
|
onNextEpisode: () => {
|
|
4425
|
-
|
|
4440
|
+
E(!1), d();
|
|
4426
4441
|
},
|
|
4427
|
-
onDismiss: () =>
|
|
4442
|
+
onDismiss: () => E(!1),
|
|
4428
4443
|
countdownSec: g,
|
|
4429
4444
|
nextTitle: h,
|
|
4430
4445
|
thumbnail: p
|
|
@@ -4602,7 +4617,7 @@ function jr({
|
|
|
4602
4617
|
...l
|
|
4603
4618
|
}) {
|
|
4604
4619
|
const { toggleFullscreen: c } = q(), [d, h] = b(!1);
|
|
4605
|
-
|
|
4620
|
+
k(() => {
|
|
4606
4621
|
const m = () => {
|
|
4607
4622
|
h(!!document.fullscreenElement);
|
|
4608
4623
|
};
|
|
@@ -4654,7 +4669,7 @@ function jr({
|
|
|
4654
4669
|
}
|
|
4655
4670
|
function Kr({ className: a, onClick: e, ...t }) {
|
|
4656
4671
|
const { togglePip: r } = q(), [i, n] = b(!1);
|
|
4657
|
-
|
|
4672
|
+
k(() => {
|
|
4658
4673
|
const l = () => {
|
|
4659
4674
|
n(!!document.pictureInPictureElement);
|
|
4660
4675
|
};
|
|
@@ -4700,7 +4715,7 @@ function ki() {
|
|
|
4700
4715
|
const { toggleTheaterMode: a, isTheaterMode: e } = q(), [t, r] = b(e()), i = () => {
|
|
4701
4716
|
a(), r(!t);
|
|
4702
4717
|
};
|
|
4703
|
-
return
|
|
4718
|
+
return k(() => {
|
|
4704
4719
|
const n = (o) => {
|
|
4705
4720
|
r(o.detail.isTheaterMode);
|
|
4706
4721
|
};
|
|
@@ -4771,7 +4786,7 @@ function ki() {
|
|
|
4771
4786
|
);
|
|
4772
4787
|
}
|
|
4773
4788
|
function Yr(a, e, t = !0) {
|
|
4774
|
-
|
|
4789
|
+
k(() => {
|
|
4775
4790
|
if (!t) return;
|
|
4776
4791
|
const r = (n) => {
|
|
4777
4792
|
a.current && !a.current.contains(n.target) && e();
|
|
@@ -4997,9 +5012,9 @@ function We({
|
|
|
4997
5012
|
}
|
|
4998
5013
|
);
|
|
4999
5014
|
}
|
|
5000
|
-
function
|
|
5015
|
+
function Ai() {
|
|
5001
5016
|
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
|
-
|
|
5017
|
+
k(() => {
|
|
5003
5018
|
e?.playbackRate !== void 0 && r(e.playbackRate);
|
|
5004
5019
|
}, [e?.playbackRate]);
|
|
5005
5020
|
const l = (d) => {
|
|
@@ -5077,7 +5092,7 @@ const Xr = "_timeDisplay_1wupc_3", Gr = "_currentTime_1wupc_16", Qr = "_separato
|
|
|
5077
5092
|
currentTime: Gr,
|
|
5078
5093
|
separator: Qr,
|
|
5079
5094
|
duration: Zr
|
|
5080
|
-
},
|
|
5095
|
+
}, $e = (a) => {
|
|
5081
5096
|
if (!isFinite(a) || isNaN(a)) return "0:00";
|
|
5082
5097
|
const e = Math.floor(a / 3600), t = Math.floor(a % 3600 / 60), r = Math.floor(a % 60);
|
|
5083
5098
|
return e > 0 ? `${e}:${t.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}` : `${t}:${r.toString().padStart(2, "0")}`;
|
|
@@ -5089,12 +5104,12 @@ function Jr({ className: a, ...e }) {
|
|
|
5089
5104
|
{
|
|
5090
5105
|
className: pe.currentTime,
|
|
5091
5106
|
style: { color: "rgba(255, 255, 255, 0.7)", fontSize: "12px" },
|
|
5092
|
-
children:
|
|
5107
|
+
children: $e(t)
|
|
5093
5108
|
}
|
|
5094
5109
|
) }) : /* @__PURE__ */ u("div", { className: `virtus-time-display ${pe.timeDisplay} ${a || ""}`, ...e, children: [
|
|
5095
|
-
/* @__PURE__ */ s("span", { className: pe.currentTime, children:
|
|
5110
|
+
/* @__PURE__ */ s("span", { className: pe.currentTime, children: $e(t) }),
|
|
5096
5111
|
/* @__PURE__ */ s("span", { className: pe.separator, children: "/" }),
|
|
5097
|
-
/* @__PURE__ */ s("span", { className: pe.duration, children:
|
|
5112
|
+
/* @__PURE__ */ s("span", { className: pe.duration, children: $e(r) })
|
|
5098
5113
|
] });
|
|
5099
5114
|
}
|
|
5100
5115
|
function ei() {
|
|
@@ -5173,9 +5188,9 @@ const ri = "_container_6dw0q_3", ii = "_skipButton_6dw0q_11", Fe = {
|
|
|
5173
5188
|
container: ri,
|
|
5174
5189
|
skipButton: ii
|
|
5175
5190
|
};
|
|
5176
|
-
function
|
|
5191
|
+
function Si({ introOutro: a }) {
|
|
5177
5192
|
const { currentTime: e } = Y(), { seekTo: t } = q(), [r, i] = b(!1), [n, o] = b(!1);
|
|
5178
|
-
|
|
5193
|
+
k(() => {
|
|
5179
5194
|
if (a) {
|
|
5180
5195
|
if (a.intro) {
|
|
5181
5196
|
const d = e >= a.intro.start && e < a.intro.end;
|
|
@@ -5187,9 +5202,9 @@ function Ai({ introOutro: a }) {
|
|
|
5187
5202
|
}
|
|
5188
5203
|
}
|
|
5189
5204
|
}, [e, a]);
|
|
5190
|
-
const l =
|
|
5205
|
+
const l = $(() => {
|
|
5191
5206
|
a?.intro && (t(a.intro.end), i(!1));
|
|
5192
|
-
}, [a, t]), c =
|
|
5207
|
+
}, [a, t]), c = $(() => {
|
|
5193
5208
|
a?.outro && (t(a.outro.end), o(!1));
|
|
5194
5209
|
}, [a, t]);
|
|
5195
5210
|
return !r && !n ? null : /* @__PURE__ */ u("div", { className: Fe.container, children: [
|
|
@@ -5427,32 +5442,32 @@ function ai({
|
|
|
5427
5442
|
thumbnailsVttUrl: n,
|
|
5428
5443
|
seekBarStyle: o
|
|
5429
5444
|
}) {
|
|
5430
|
-
const l = re(He), c = O(null), [d, h] = b(!1), [p, g] = b(null), [m,
|
|
5431
|
-
|
|
5432
|
-
H.current = { time:
|
|
5433
|
-
}, [
|
|
5434
|
-
const Q =
|
|
5445
|
+
const l = re(He), c = O(null), [d, h] = b(!1), [p, g] = b(null), [m, A] = b(null), [I, C] = b([]), T = O(null), { currentTime: w, duration: y, isLive: G, isPlaying: X, playbackRate: D } = Y(), { seekTo: S, getDVRRange: _, getBufferedRanges: W } = q(), [E, M] = b(w), N = O(null), H = O({ time: w, ts: performance.now() });
|
|
5446
|
+
k(() => {
|
|
5447
|
+
H.current = { time: w, ts: performance.now() }, M(w);
|
|
5448
|
+
}, [w]);
|
|
5449
|
+
const Q = $(() => {
|
|
5435
5450
|
if (X) {
|
|
5436
5451
|
const { time: v, ts: R } = H.current, V = D ?? 1, U = (performance.now() - R) / 1e3, ee = Math.min(y || 1 / 0, v + U * V);
|
|
5437
5452
|
M(ee);
|
|
5438
5453
|
}
|
|
5439
5454
|
N.current = requestAnimationFrame(Q);
|
|
5440
5455
|
}, [X, D, y]);
|
|
5441
|
-
|
|
5456
|
+
k(() => (N.current = requestAnimationFrame(Q), () => {
|
|
5442
5457
|
N.current !== null && cancelAnimationFrame(N.current);
|
|
5443
|
-
}), [Q]),
|
|
5458
|
+
}), [Q]), k(() => {
|
|
5444
5459
|
if (!n) return;
|
|
5445
5460
|
const v = new si();
|
|
5446
5461
|
return T.current = v, v.load(n), () => {
|
|
5447
5462
|
v.destroy(), T.current = null;
|
|
5448
5463
|
};
|
|
5449
|
-
}, [n]),
|
|
5464
|
+
}, [n]), k(() => {
|
|
5450
5465
|
const v = setInterval(() => {
|
|
5451
|
-
|
|
5466
|
+
C(W());
|
|
5452
5467
|
}, 500);
|
|
5453
5468
|
return () => clearInterval(v);
|
|
5454
5469
|
}, [W]);
|
|
5455
|
-
const L = a === "live" || !!G,
|
|
5470
|
+
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"), de = 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
5471
|
if (!isFinite(v) || isNaN(v)) return "0:00";
|
|
5457
5472
|
const R = Math.floor(v / 3600), V = Math.floor(v % 3600 / 60), U = Math.floor(v % 60);
|
|
5458
5473
|
return R > 0 ? `${R}:${V.toString().padStart(2, "0")}:${U.toString().padStart(2, "0")}` : `${V}:${U.toString().padStart(2, "0")}`;
|
|
@@ -5460,10 +5475,10 @@ function ai({
|
|
|
5460
5475
|
if (!c.current) return 0;
|
|
5461
5476
|
const R = c.current.getBoundingClientRect(), V = (v.clientX - R.left) / R.width;
|
|
5462
5477
|
return Math.max(0, Math.min(1, V));
|
|
5463
|
-
},
|
|
5478
|
+
}, we = (v) => {
|
|
5464
5479
|
if (!(L && !P)) {
|
|
5465
5480
|
if (L && P) {
|
|
5466
|
-
S(
|
|
5481
|
+
S(B.start + v * F);
|
|
5467
5482
|
return;
|
|
5468
5483
|
}
|
|
5469
5484
|
y !== 0 && S(v * y);
|
|
@@ -5472,23 +5487,23 @@ function ai({
|
|
|
5472
5487
|
if (L && !P) return;
|
|
5473
5488
|
v.preventDefault(), h(!0);
|
|
5474
5489
|
const R = ve(v);
|
|
5475
|
-
|
|
5490
|
+
we(R);
|
|
5476
5491
|
}, Ie = (v) => {
|
|
5477
5492
|
if (!c.current) return;
|
|
5478
5493
|
const R = ve(v);
|
|
5479
5494
|
if (g(R), T.current) {
|
|
5480
|
-
const V = P ?
|
|
5481
|
-
|
|
5495
|
+
const V = P ? B.start + R * F : R * y;
|
|
5496
|
+
A(T.current.getThumbnailAt(V));
|
|
5482
5497
|
}
|
|
5483
5498
|
}, _e = () => {
|
|
5484
|
-
g(null),
|
|
5499
|
+
g(null), A(null);
|
|
5485
5500
|
};
|
|
5486
|
-
return
|
|
5501
|
+
return k(() => {
|
|
5487
5502
|
if (!d) return;
|
|
5488
5503
|
const v = (V) => {
|
|
5489
5504
|
if (!c.current) return;
|
|
5490
5505
|
const U = ve(V);
|
|
5491
|
-
g(U),
|
|
5506
|
+
g(U), we(U);
|
|
5492
5507
|
}, R = () => {
|
|
5493
5508
|
h(!1);
|
|
5494
5509
|
};
|
|
@@ -5600,32 +5615,32 @@ function ai({
|
|
|
5600
5615
|
role: L && !P ? void 0 : "slider",
|
|
5601
5616
|
tabIndex: L && !P ? void 0 : 0,
|
|
5602
5617
|
"aria-label": L ? "DVR seek" : "Seek",
|
|
5603
|
-
"aria-valuemin": L && !P ? void 0 : P ? Math.floor(
|
|
5604
|
-
"aria-valuemax": L && !P ? void 0 : P ? Math.floor(
|
|
5605
|
-
"aria-valuenow": L && !P ? void 0 : Math.floor(
|
|
5606
|
-
"aria-valuetext": L && !P ? "LIVE" : P ? `${le(
|
|
5618
|
+
"aria-valuemin": L && !P ? void 0 : P ? Math.floor(B.start) : 0,
|
|
5619
|
+
"aria-valuemax": L && !P ? void 0 : P ? Math.floor(B.end) : Math.floor(y) || 0,
|
|
5620
|
+
"aria-valuenow": L && !P ? void 0 : Math.floor(w),
|
|
5621
|
+
"aria-valuetext": L && !P ? "LIVE" : P ? `${le(w)} (DVR)` : `${le(w)} of ${le(y)}`,
|
|
5607
5622
|
"aria-disabled": L && !P ? !0 : void 0,
|
|
5608
5623
|
onMouseDown: De,
|
|
5609
5624
|
onMouseMove: Ie,
|
|
5610
5625
|
onMouseLeave: _e,
|
|
5611
5626
|
onKeyDown: (v) => {
|
|
5612
5627
|
if (L && !P) return;
|
|
5613
|
-
const R = 5, V = 30, U = P ?
|
|
5628
|
+
const R = 5, V = 30, U = P ? B.start : 0, ee = P ? B.end : y;
|
|
5614
5629
|
if (ee !== 0)
|
|
5615
5630
|
switch (v.key) {
|
|
5616
5631
|
case "ArrowLeft":
|
|
5617
5632
|
case "ArrowDown":
|
|
5618
|
-
v.preventDefault(), S(Math.max(U,
|
|
5633
|
+
v.preventDefault(), S(Math.max(U, w - R));
|
|
5619
5634
|
break;
|
|
5620
5635
|
case "ArrowRight":
|
|
5621
5636
|
case "ArrowUp":
|
|
5622
|
-
v.preventDefault(), S(Math.min(ee,
|
|
5637
|
+
v.preventDefault(), S(Math.min(ee, w + R));
|
|
5623
5638
|
break;
|
|
5624
5639
|
case "PageDown":
|
|
5625
|
-
v.preventDefault(), S(Math.max(U,
|
|
5640
|
+
v.preventDefault(), S(Math.max(U, w - V));
|
|
5626
5641
|
break;
|
|
5627
5642
|
case "PageUp":
|
|
5628
|
-
v.preventDefault(), S(Math.min(ee,
|
|
5643
|
+
v.preventDefault(), S(Math.min(ee, w + V));
|
|
5629
5644
|
break;
|
|
5630
5645
|
case "Home":
|
|
5631
5646
|
v.preventDefault(), S(U);
|
|
@@ -5653,7 +5668,7 @@ function ai({
|
|
|
5653
5668
|
left: 0,
|
|
5654
5669
|
right: 0,
|
|
5655
5670
|
height: `${Me}px`,
|
|
5656
|
-
backgroundColor:
|
|
5671
|
+
backgroundColor: Ee,
|
|
5657
5672
|
borderRadius: `${ue}px`
|
|
5658
5673
|
},
|
|
5659
5674
|
children: [
|
|
@@ -5787,7 +5802,7 @@ function ai({
|
|
|
5787
5802
|
}
|
|
5788
5803
|
),
|
|
5789
5804
|
Pe && (!L || P) && p !== null && (() => {
|
|
5790
|
-
const v = P ?
|
|
5805
|
+
const v = P ? B.start + p * F : p * y, R = c.current?.offsetWidth ?? 0, V = p * 100, U = p * R, ee = Ze / 2;
|
|
5791
5806
|
let he = "-50%";
|
|
5792
5807
|
return U < ee ? he = "0%" : R - U < ee && (he = "-100%"), m ? (
|
|
5793
5808
|
/* Thumbnail card */
|
|
@@ -6023,43 +6038,43 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6023
6038
|
trackColor: e?.trackColor ?? "rgba(255,255,255,0.3)",
|
|
6024
6039
|
fillColor: e?.fillColor ?? "#3b82f6",
|
|
6025
6040
|
handleColor: e?.handleColor ?? "#fff"
|
|
6026
|
-
}, { isMuted: n, volume: o } = Y(), { toggleMute: l, setVolume: c } = q(), [d, h] = b(!1), [p, g] = b(!1), m = O(null),
|
|
6041
|
+
}, { isMuted: n, volume: o } = Y(), { toggleMute: l, setVolume: c } = q(), [d, h] = b(!1), [p, g] = b(!1), m = O(null), A = a === "top" || a === "bottom", I = $((E, M) => {
|
|
6027
6042
|
if (!m.current) return;
|
|
6028
|
-
const N = m.current.getBoundingClientRect(), H =
|
|
6043
|
+
const N = m.current.getBoundingClientRect(), H = A ? Math.max(0, Math.min(1, 1 - (M - N.top) / N.height)) : Math.max(0, Math.min(1, (E - N.left) / N.width));
|
|
6029
6044
|
c(H);
|
|
6030
|
-
}, [c,
|
|
6031
|
-
g(!0), n && l(), I(
|
|
6045
|
+
}, [c, A]), C = $((E) => {
|
|
6046
|
+
g(!0), n && l(), I(E.clientX, E.clientY);
|
|
6032
6047
|
}, [I, n, l]);
|
|
6033
|
-
|
|
6048
|
+
k(() => {
|
|
6034
6049
|
if (!p) return;
|
|
6035
|
-
const
|
|
6036
|
-
return window.addEventListener("mousemove",
|
|
6037
|
-
window.removeEventListener("mousemove",
|
|
6050
|
+
const E = (N) => I(N.clientX, N.clientY), M = () => g(!1);
|
|
6051
|
+
return window.addEventListener("mousemove", E), window.addEventListener("mouseup", M), () => {
|
|
6052
|
+
window.removeEventListener("mousemove", E), window.removeEventListener("mouseup", M);
|
|
6038
6053
|
};
|
|
6039
6054
|
}, [p, I]);
|
|
6040
|
-
const T = p ? o : n ? 0 : o,
|
|
6055
|
+
const T = p ? o : n ? 0 : o, w = d || p, y = {
|
|
6041
6056
|
position: "absolute",
|
|
6042
|
-
opacity:
|
|
6057
|
+
opacity: w ? 1 : 0,
|
|
6043
6058
|
transition: "all 0.25s ease",
|
|
6044
|
-
pointerEvents:
|
|
6059
|
+
pointerEvents: w ? "auto" : "none",
|
|
6045
6060
|
zIndex: 10,
|
|
6046
6061
|
background: i.sliderBackground,
|
|
6047
6062
|
backdropFilter: "blur(12px)",
|
|
6048
6063
|
boxShadow: "4px 0 16px rgba(0,0,0,0.5)",
|
|
6049
6064
|
overflow: "hidden"
|
|
6050
6065
|
}, G = (() => {
|
|
6051
|
-
const
|
|
6066
|
+
const E = `1px solid ${i.borderColor}`;
|
|
6052
6067
|
switch (a) {
|
|
6053
6068
|
case "left":
|
|
6054
6069
|
return {
|
|
6055
6070
|
...y,
|
|
6056
6071
|
right: "40px",
|
|
6057
6072
|
top: "0",
|
|
6058
|
-
width:
|
|
6073
|
+
width: w ? "118px" : "0px",
|
|
6059
6074
|
height: "40px",
|
|
6060
6075
|
paddingRight: "8px",
|
|
6061
6076
|
borderRadius: "8px 0 0 8px",
|
|
6062
|
-
border:
|
|
6077
|
+
border: E,
|
|
6063
6078
|
borderRight: "none"
|
|
6064
6079
|
};
|
|
6065
6080
|
case "top":
|
|
@@ -6068,10 +6083,10 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6068
6083
|
bottom: "40px",
|
|
6069
6084
|
left: "0",
|
|
6070
6085
|
width: "40px",
|
|
6071
|
-
height:
|
|
6086
|
+
height: w ? "118px" : "0px",
|
|
6072
6087
|
paddingBottom: "8px",
|
|
6073
6088
|
borderRadius: "8px 8px 0 0",
|
|
6074
|
-
border:
|
|
6089
|
+
border: E,
|
|
6075
6090
|
borderBottom: "none"
|
|
6076
6091
|
};
|
|
6077
6092
|
case "bottom":
|
|
@@ -6080,10 +6095,10 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6080
6095
|
top: "40px",
|
|
6081
6096
|
left: "0",
|
|
6082
6097
|
width: "40px",
|
|
6083
|
-
height:
|
|
6098
|
+
height: w ? "118px" : "0px",
|
|
6084
6099
|
paddingTop: "8px",
|
|
6085
6100
|
borderRadius: "0 0 8px 8px",
|
|
6086
|
-
border:
|
|
6101
|
+
border: E,
|
|
6087
6102
|
borderTop: "none"
|
|
6088
6103
|
};
|
|
6089
6104
|
default:
|
|
@@ -6091,15 +6106,15 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6091
6106
|
...y,
|
|
6092
6107
|
left: "40px",
|
|
6093
6108
|
top: "0",
|
|
6094
|
-
width:
|
|
6109
|
+
width: w ? "118px" : "0px",
|
|
6095
6110
|
height: "40px",
|
|
6096
6111
|
paddingLeft: "8px",
|
|
6097
6112
|
borderRadius: "0 8px 8px 0",
|
|
6098
|
-
border:
|
|
6113
|
+
border: E,
|
|
6099
6114
|
borderLeft: "none"
|
|
6100
6115
|
};
|
|
6101
6116
|
}
|
|
6102
|
-
})(), X =
|
|
6117
|
+
})(), X = A ? { 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 = A ? { width: "4px", height: "100%", backgroundColor: i.trackColor, borderRadius: "2px", position: "relative" } : { width: "100%", height: "4px", backgroundColor: i.trackColor, borderRadius: "2px", position: "relative" }, S = A ? {
|
|
6103
6118
|
position: "absolute",
|
|
6104
6119
|
bottom: 0,
|
|
6105
6120
|
left: 0,
|
|
@@ -6117,7 +6132,7 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6117
6132
|
backgroundColor: i.fillColor,
|
|
6118
6133
|
borderRadius: "2px",
|
|
6119
6134
|
transition: p ? "none" : "width 0.1s ease"
|
|
6120
|
-
}, _ = p ? 14 : 12, W =
|
|
6135
|
+
}, _ = p ? 14 : 12, W = A ? {
|
|
6121
6136
|
position: "absolute",
|
|
6122
6137
|
bottom: `calc(${T * 100}% - ${T * _}px)`,
|
|
6123
6138
|
left: "50%",
|
|
@@ -6170,11 +6185,11 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6170
6185
|
position: "relative",
|
|
6171
6186
|
zIndex: 1
|
|
6172
6187
|
},
|
|
6173
|
-
onMouseEnter: (
|
|
6174
|
-
h(!0),
|
|
6188
|
+
onMouseEnter: (E) => {
|
|
6189
|
+
h(!0), E.currentTarget.style.background = typeof r == "string" ? r : r === !1 ? "transparent" : i.buttonHoverBackground, E.currentTarget.style.transform = "scale(1.05)";
|
|
6175
6190
|
},
|
|
6176
|
-
onMouseLeave: (
|
|
6177
|
-
|
|
6191
|
+
onMouseLeave: (E) => {
|
|
6192
|
+
E.currentTarget.style.background = r === !1 ? "transparent" : i.buttonBackground, E.currentTarget.style.transform = "scale(1)";
|
|
6178
6193
|
},
|
|
6179
6194
|
children: n || o === 0 ? (
|
|
6180
6195
|
// Heroicons SpeakerXMarkIcon (solid)
|
|
@@ -6202,33 +6217,33 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6202
6217
|
"aria-valuemax": 100,
|
|
6203
6218
|
"aria-valuenow": Math.round(T * 100),
|
|
6204
6219
|
"aria-valuetext": n ? "Muted" : `${Math.round(T * 100)}%`,
|
|
6205
|
-
onMouseDown:
|
|
6206
|
-
onKeyDown: (
|
|
6220
|
+
onMouseDown: C,
|
|
6221
|
+
onKeyDown: (E) => {
|
|
6207
6222
|
const H = n ? 0 : o;
|
|
6208
|
-
switch (
|
|
6223
|
+
switch (E.key) {
|
|
6209
6224
|
case "ArrowRight":
|
|
6210
6225
|
case "ArrowUp":
|
|
6211
|
-
|
|
6226
|
+
E.preventDefault(), c(Math.min(1, H + 0.05));
|
|
6212
6227
|
break;
|
|
6213
6228
|
case "ArrowLeft":
|
|
6214
6229
|
case "ArrowDown":
|
|
6215
|
-
|
|
6230
|
+
E.preventDefault(), c(Math.max(0, H - 0.05));
|
|
6216
6231
|
break;
|
|
6217
6232
|
case "PageUp":
|
|
6218
|
-
|
|
6233
|
+
E.preventDefault(), c(Math.min(1, H + 0.2));
|
|
6219
6234
|
break;
|
|
6220
6235
|
case "PageDown":
|
|
6221
|
-
|
|
6236
|
+
E.preventDefault(), c(Math.max(0, H - 0.2));
|
|
6222
6237
|
break;
|
|
6223
6238
|
case "Home":
|
|
6224
|
-
|
|
6239
|
+
E.preventDefault(), c(0);
|
|
6225
6240
|
break;
|
|
6226
6241
|
case "End":
|
|
6227
|
-
|
|
6242
|
+
E.preventDefault(), c(1);
|
|
6228
6243
|
break;
|
|
6229
6244
|
case "m":
|
|
6230
6245
|
case "M":
|
|
6231
|
-
|
|
6246
|
+
E.preventDefault(), l();
|
|
6232
6247
|
break;
|
|
6233
6248
|
}
|
|
6234
6249
|
},
|
|
@@ -6247,7 +6262,7 @@ function di({ sliderDirection: a = "right", theme: e, iconSize: t = 20, hoverBac
|
|
|
6247
6262
|
}
|
|
6248
6263
|
const ui = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
|
|
6249
6264
|
function Ci() {
|
|
6250
|
-
const { setPlaybackRate: a } = q(), [e, t] = b(1), r =
|
|
6265
|
+
const { setPlaybackRate: a } = q(), [e, t] = b(1), r = $(
|
|
6251
6266
|
(n) => {
|
|
6252
6267
|
a(n), t(n);
|
|
6253
6268
|
},
|
|
@@ -6461,33 +6476,33 @@ function yi({
|
|
|
6461
6476
|
fontSize: d,
|
|
6462
6477
|
borderBottom: `1px solid ${c.replace("0.1)", "0.08)")}`
|
|
6463
6478
|
}, g = e?.vertical ?? "top", m = e?.horizontal ?? "right", {
|
|
6464
|
-
setQuality:
|
|
6479
|
+
setQuality: A,
|
|
6465
6480
|
setAudioTrack: I,
|
|
6466
|
-
setPlaybackRate:
|
|
6481
|
+
setPlaybackRate: C,
|
|
6467
6482
|
setSubtitleTrack: T,
|
|
6468
|
-
getPlayerStats:
|
|
6469
|
-
} = q(), y = Ce(), { playbackRate: G = 1, isLive: X } = Y(), { style: D, setStyle: S } = ut(), [_, W] = b(!1), [
|
|
6470
|
-
|
|
6471
|
-
X &&
|
|
6472
|
-
}, [X,
|
|
6473
|
-
const [N, H] = b([]), [Q, L] = b(null), [
|
|
6474
|
-
|
|
6483
|
+
getPlayerStats: w
|
|
6484
|
+
} = q(), y = Ce(), { playbackRate: G = 1, isLive: X } = Y(), { style: D, setStyle: S } = ut(), [_, W] = b(!1), [E, M] = b("root");
|
|
6485
|
+
k(() => {
|
|
6486
|
+
X && E === "speed" && M("root");
|
|
6487
|
+
}, [X, E]);
|
|
6488
|
+
const [N, H] = b([]), [Q, L] = b(null), [B, P] = b([]), [F, Z] = b(""), [J, Ee] = b([]), [ae, de] = b(null), [j, Me] = b(null), [ue, me] = b([]);
|
|
6489
|
+
k(() => {
|
|
6475
6490
|
const f = () => {
|
|
6476
|
-
H(y.getAvailableQualities()), L(y.getQuality()), P(y.getAvailableAudioTracks()), Z(y.getAudioTrack()),
|
|
6491
|
+
H(y.getAvailableQualities()), L(y.getQuality()), P(y.getAvailableAudioTracks()), Z(y.getAudioTrack()), Ee(y.getSubtitleTracks()), de(y.getActiveSubtitleLanguage());
|
|
6477
6492
|
};
|
|
6478
6493
|
y.events.on("tracksready", f), y.events.on("streamTypeDetected", f), y.events.on("qualitychange", f), y.events.on("loadedmetadata", f), f();
|
|
6479
6494
|
const K = setTimeout(f, 100);
|
|
6480
6495
|
return () => {
|
|
6481
6496
|
y.events.off("tracksready", f), y.events.off("streamTypeDetected", f), y.events.off("qualitychange", f), y.events.off("loadedmetadata", f), clearTimeout(K);
|
|
6482
6497
|
};
|
|
6483
|
-
}, [y]),
|
|
6484
|
-
_ && (H(y.getAvailableQualities()), L(y.getQuality()), P(y.getAvailableAudioTracks()), Z(y.getAudioTrack()),
|
|
6498
|
+
}, [y]), k(() => {
|
|
6499
|
+
_ && (H(y.getAvailableQualities()), L(y.getQuality()), P(y.getAvailableAudioTracks()), Z(y.getAudioTrack()), Ee(y.getSubtitleTracks()), de(y.getActiveSubtitleLanguage()));
|
|
6485
6500
|
}, [_, y]);
|
|
6486
|
-
const Pe =
|
|
6487
|
-
|
|
6488
|
-
if (
|
|
6501
|
+
const Pe = B.length > 1;
|
|
6502
|
+
k(() => {
|
|
6503
|
+
if (E !== "statistics") return;
|
|
6489
6504
|
const f = () => {
|
|
6490
|
-
const xe =
|
|
6505
|
+
const xe = w();
|
|
6491
6506
|
Me(xe), me((Ve) => [...Ve.slice(-59), xe]);
|
|
6492
6507
|
};
|
|
6493
6508
|
f();
|
|
@@ -6495,24 +6510,24 @@ function yi({
|
|
|
6495
6510
|
return () => {
|
|
6496
6511
|
clearInterval(K), me([]);
|
|
6497
6512
|
};
|
|
6498
|
-
}, [
|
|
6513
|
+
}, [E, w]);
|
|
6499
6514
|
const ye = O(null);
|
|
6500
|
-
|
|
6515
|
+
k(() => {
|
|
6501
6516
|
if (!_) return;
|
|
6502
6517
|
const f = (K) => {
|
|
6503
6518
|
ye.current && !ye.current.contains(K.target) && (W(!1), M("root"));
|
|
6504
6519
|
};
|
|
6505
6520
|
return document.addEventListener("pointerdown", f), () => document.removeEventListener("pointerdown", f);
|
|
6506
|
-
}, [_]),
|
|
6521
|
+
}, [_]), k(() => {
|
|
6507
6522
|
if (!_) return;
|
|
6508
6523
|
const f = (K) => {
|
|
6509
|
-
K.key === "Escape" && (W(!1), M("root")), K.key === "Backspace" &&
|
|
6524
|
+
K.key === "Escape" && (W(!1), M("root")), K.key === "Backspace" && E !== "root" && M("root");
|
|
6510
6525
|
};
|
|
6511
6526
|
return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
|
|
6512
|
-
}, [_,
|
|
6513
|
-
const Le =
|
|
6527
|
+
}, [_, E]);
|
|
6528
|
+
const Le = $(() => {
|
|
6514
6529
|
W((f) => (f && M("root"), !f));
|
|
6515
|
-
}, []), Re = Q ? Q.id === "auto" ? "Auto" : Q.label : "Auto", le = G === 1 ? "1×" : `${G}×`, ve =
|
|
6530
|
+
}, []), 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
6531
|
/* @__PURE__ */ s("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
6517
6532
|
/* @__PURE__ */ s("path", { d: "M8 21h8M12 17v4" }),
|
|
6518
6533
|
/* @__PURE__ */ s("path", { d: "m7 8 2 2 4-4 2 2" })
|
|
@@ -6548,7 +6563,7 @@ function yi({
|
|
|
6548
6563
|
!X && /* @__PURE__ */ s(z, { icon: Ie, label: "Speed", value: le, onClick: () => M("speed") }),
|
|
6549
6564
|
Pe && /* @__PURE__ */ s(z, { icon: _e, label: "Audio Track", value: ve, onClick: () => M("audio") }),
|
|
6550
6565
|
/* @__PURE__ */ s(tt, {}),
|
|
6551
|
-
/* @__PURE__ */ s(z, { icon: v, label: "Subtitles", value:
|
|
6566
|
+
/* @__PURE__ */ s(z, { icon: v, label: "Subtitles", value: we, onClick: () => M("subtitles") }),
|
|
6552
6567
|
/* @__PURE__ */ s(z, { icon: R, label: "Subtitle Style", value: `${D.fontSize}px`, onClick: () => M("subtitleStyle") }),
|
|
6553
6568
|
/* @__PURE__ */ s(tt, {}),
|
|
6554
6569
|
/* @__PURE__ */ s(z, { icon: V, label: "Statistics", onClick: () => M("statistics") })
|
|
@@ -6562,7 +6577,7 @@ function yi({
|
|
|
6562
6577
|
label: f.id === "auto" ? "Auto" : f.label,
|
|
6563
6578
|
selected: Q?.id === f.id,
|
|
6564
6579
|
onClick: () => {
|
|
6565
|
-
|
|
6580
|
+
A(f.id), L(f), W(!1), M("root");
|
|
6566
6581
|
}
|
|
6567
6582
|
},
|
|
6568
6583
|
f.id
|
|
@@ -6577,14 +6592,14 @@ function yi({
|
|
|
6577
6592
|
label: f === 1 ? "1× (Normal)" : `${f}×`,
|
|
6578
6593
|
selected: G === f,
|
|
6579
6594
|
onClick: () => {
|
|
6580
|
-
|
|
6595
|
+
C(f), W(!1), M("root");
|
|
6581
6596
|
}
|
|
6582
6597
|
},
|
|
6583
6598
|
f
|
|
6584
6599
|
)) })
|
|
6585
6600
|
] }), ft = () => /* @__PURE__ */ u(oe, { children: [
|
|
6586
6601
|
/* @__PURE__ */ s("div", { style: p, children: /* @__PURE__ */ s(z, { label: "Audio Track", isBack: !0, onClick: () => M("root") }) }),
|
|
6587
|
-
/* @__PURE__ */ s("div", { style: { padding: "4px 0" }, children:
|
|
6602
|
+
/* @__PURE__ */ s("div", { style: { padding: "4px 0" }, children: B.map((f) => /* @__PURE__ */ s(
|
|
6588
6603
|
z,
|
|
6589
6604
|
{
|
|
6590
6605
|
label: f.label || f.language || f.id,
|
|
@@ -6710,7 +6725,7 @@ function yi({
|
|
|
6710
6725
|
] })
|
|
6711
6726
|
] })
|
|
6712
6727
|
] }), vt = () => {
|
|
6713
|
-
const f = ue.map((ie) => ie.bandwidth), K = ue.map((ie) => ie.bufferHealth), xe = j?.bandwidth ?? 0, Ve = j?.bufferHealth ?? 0,
|
|
6728
|
+
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
6729
|
background: "rgba(255,255,255,0.04)",
|
|
6715
6730
|
borderRadius: "8px",
|
|
6716
6731
|
padding: "7px 10px",
|
|
@@ -6719,7 +6734,7 @@ function yi({
|
|
|
6719
6734
|
}, children: [
|
|
6720
6735
|
/* @__PURE__ */ s("div", { style: { fontSize: "10px", color: "rgba(255,255,255,0.4)", textTransform: "uppercase", letterSpacing: "0.06em", marginBottom: "3px" }, children: ie }),
|
|
6721
6736
|
/* @__PURE__ */ s("div", { style: { fontSize: "12px", color: "#fff", fontFamily: "monospace", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: xt })
|
|
6722
|
-
] }),
|
|
6737
|
+
] }), Ae = j?.segmentUrl ?? "", wt = Ae.length > 36 ? "…" + Ae.slice(-36) : Ae || "—";
|
|
6723
6738
|
return /* @__PURE__ */ u(oe, { children: [
|
|
6724
6739
|
/* @__PURE__ */ u("div", { style: { ...p, justifyContent: "space-between" }, children: [
|
|
6725
6740
|
/* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: /* @__PURE__ */ s(z, { label: "Statistics", isBack: !0, onClick: () => M("root") }) }),
|
|
@@ -6740,7 +6755,7 @@ function yi({
|
|
|
6740
6755
|
/* @__PURE__ */ u("div", { style: { marginTop: "12px" }, children: [
|
|
6741
6756
|
/* @__PURE__ */ u("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "baseline", marginBottom: "6px" }, children: [
|
|
6742
6757
|
/* @__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: j ?
|
|
6758
|
+
/* @__PURE__ */ s("span", { style: { fontSize: "16px", fontWeight: 600, color: "#4ade80", fontFamily: "monospace" }, children: j ? Et(xe) : "—" })
|
|
6744
6759
|
] }),
|
|
6745
6760
|
/* @__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
6761
|
] }),
|
|
@@ -6767,7 +6782,7 @@ function yi({
|
|
|
6767
6782
|
minWidth: 0
|
|
6768
6783
|
}, children: [
|
|
6769
6784
|
/* @__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:
|
|
6785
|
+
/* @__PURE__ */ s("div", { style: { fontSize: "11px", color: "rgba(255,255,255,0.7)", fontFamily: "monospace", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, title: Ae, children: wt })
|
|
6771
6786
|
] })
|
|
6772
6787
|
] })
|
|
6773
6788
|
] }),
|
|
@@ -6779,7 +6794,7 @@ function yi({
|
|
|
6779
6794
|
` })
|
|
6780
6795
|
] });
|
|
6781
6796
|
}, bt = () => {
|
|
6782
|
-
switch (
|
|
6797
|
+
switch (E) {
|
|
6783
6798
|
case "quality":
|
|
6784
6799
|
return ee();
|
|
6785
6800
|
case "speed":
|
|
@@ -6860,7 +6875,7 @@ function yi({
|
|
|
6860
6875
|
background: l,
|
|
6861
6876
|
border: `1px solid ${c}`,
|
|
6862
6877
|
boxShadow: `0 12px 48px rgba(0,0,0,0.7), 0 0 0 1px ${c.replace("0.1)", "0.08)")}`,
|
|
6863
|
-
width:
|
|
6878
|
+
width: E === "statistics" ? "360px" : "320px",
|
|
6864
6879
|
...g === "bottom" ? { top: "52px" } : { bottom: "52px" },
|
|
6865
6880
|
...m === "left" ? { left: 0 } : { right: 0 }
|
|
6866
6881
|
},
|
|
@@ -6877,7 +6892,7 @@ function yi({
|
|
|
6877
6892
|
}
|
|
6878
6893
|
function Ti({ label: a = "AirPlay", className: e = "" }) {
|
|
6879
6894
|
const t = Ce(), [r, i] = b(!1), [n, o] = b(!1);
|
|
6880
|
-
|
|
6895
|
+
k(() => {
|
|
6881
6896
|
if (!t) return;
|
|
6882
6897
|
i(t.isAirPlayAvailable()), o(t.isAirPlayActive());
|
|
6883
6898
|
const c = ({ isAvailable: d, isActive: h }) => {
|
|
@@ -6887,7 +6902,7 @@ function Ti({ label: a = "AirPlay", className: e = "" }) {
|
|
|
6887
6902
|
t.events.off("airplaychange", c);
|
|
6888
6903
|
};
|
|
6889
6904
|
}, [t]);
|
|
6890
|
-
const l =
|
|
6905
|
+
const l = $(() => {
|
|
6891
6906
|
t?.showAirPlayPicker();
|
|
6892
6907
|
}, [t]);
|
|
6893
6908
|
return r ? /* @__PURE__ */ s(
|
|
@@ -6934,7 +6949,7 @@ function Mi({
|
|
|
6934
6949
|
className: e = ""
|
|
6935
6950
|
}) {
|
|
6936
6951
|
const t = Ce(), [r, i] = b(!1), [n, o] = b(!1);
|
|
6937
|
-
|
|
6952
|
+
k(() => {
|
|
6938
6953
|
if (!t) return;
|
|
6939
6954
|
i(t.isCastAvailable()), o(t.isCastActive());
|
|
6940
6955
|
const c = ({
|
|
@@ -6947,7 +6962,7 @@ function Mi({
|
|
|
6947
6962
|
t.events.off("castchange", c);
|
|
6948
6963
|
};
|
|
6949
6964
|
}, [t]);
|
|
6950
|
-
const l =
|
|
6965
|
+
const l = $(() => {
|
|
6951
6966
|
n ? t?.stopCasting() : t?.showCastPicker();
|
|
6952
6967
|
}, [t, n]);
|
|
6953
6968
|
return r ? /* @__PURE__ */ s(
|
|
@@ -7002,7 +7017,7 @@ function Pi({ x: a, y: e, isOpen: t, onClose: r, actions: i, theme: n }) {
|
|
|
7002
7017
|
iconBackground: n?.iconBackground ?? "rgba(255,255,255,0.08)",
|
|
7003
7018
|
dividerColor: n?.dividerColor ?? "rgba(255,255,255,0.07)"
|
|
7004
7019
|
}, l = O(null);
|
|
7005
|
-
return
|
|
7020
|
+
return k(() => {
|
|
7006
7021
|
if (!t) return;
|
|
7007
7022
|
const c = (d) => {
|
|
7008
7023
|
if ("key" in d) {
|
|
@@ -7218,39 +7233,39 @@ export {
|
|
|
7218
7233
|
Li as ControlsContainer,
|
|
7219
7234
|
He as ControlsVisibilityContext,
|
|
7220
7235
|
Mr as EndCard,
|
|
7221
|
-
|
|
7236
|
+
At as EventBus,
|
|
7222
7237
|
jr as FullscreenButton,
|
|
7223
7238
|
Pr as GestureHintOverlay,
|
|
7224
7239
|
ei as JumpToLiveButton,
|
|
7225
7240
|
Tr as KeyboardShortcutsOverlay,
|
|
7226
7241
|
ti as LiveLatencyDisplay,
|
|
7227
|
-
|
|
7242
|
+
Se as MediaErrorCode,
|
|
7228
7243
|
xi as MuteButton,
|
|
7229
7244
|
Kr as PipButton,
|
|
7230
7245
|
zr as PlayButton,
|
|
7231
7246
|
Ci as PlaybackSpeedSelector,
|
|
7232
|
-
|
|
7247
|
+
wi as Player,
|
|
7233
7248
|
fe as PlayerCore,
|
|
7234
7249
|
Gt as PlayerProvider,
|
|
7235
7250
|
Di as Playron,
|
|
7236
7251
|
Mt as PlayronEventEmitter,
|
|
7237
7252
|
ai as SeekBar,
|
|
7238
7253
|
Ri as SeekBarContainer,
|
|
7239
|
-
|
|
7254
|
+
Ai as SettingsButton,
|
|
7240
7255
|
yi as SettingsPanel,
|
|
7241
7256
|
li as SkipBackwardButton,
|
|
7242
7257
|
ci as SkipForwardButton,
|
|
7243
|
-
|
|
7258
|
+
Si as SkipIntroButton,
|
|
7244
7259
|
Rt as StallDetector,
|
|
7245
7260
|
Pt as StreamDetector,
|
|
7246
7261
|
ki as TheaterModeButton,
|
|
7247
7262
|
si as ThumbnailManager,
|
|
7248
7263
|
Jr as TimeDisplay,
|
|
7249
|
-
|
|
7264
|
+
x as VideoEventType,
|
|
7250
7265
|
di as VolumeControl,
|
|
7251
|
-
|
|
7266
|
+
wi as default,
|
|
7252
7267
|
ge as eventBus,
|
|
7253
|
-
|
|
7268
|
+
Ei as isVideoEventType,
|
|
7254
7269
|
Lt as streamDetector,
|
|
7255
7270
|
Lr as useMobileGestures,
|
|
7256
7271
|
Ce as usePlayer,
|