boss-web-player-sdk 1.1.2 → 1.1.3
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/README.md +6 -7
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/dash.all.min-CkVT4O2X.cjs +19 -0
- package/dist/dash.all.min-CkVT4O2X.cjs.map +1 -0
- package/dist/dash.all.min-srqAFNy2.js +38600 -0
- package/dist/dash.all.min-srqAFNy2.js.map +1 -0
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +501 -492
- package/dist/index.js.map +1 -1
- package/dist/{src-9ogb0T2_.js → src-BNOvGEgV.js} +33 -22
- package/dist/{src-9ogb0T2_.js.map → src-BNOvGEgV.js.map} +1 -1
- package/dist/{src-DZrghpiH.cjs → src-BRPWpIe_.cjs} +3 -3
- package/dist/{src-DZrghpiH.cjs.map → src-BRPWpIe_.cjs.map} +1 -1
- package/package.json +2 -6
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e, t, u as n } from "./src-
|
|
1
|
+
import { c as e, t, u as n } from "./src-BNOvGEgV.js";
|
|
2
2
|
import { createContext as r, createElement as i, forwardRef as a, useCallback as o, useContext as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
3
3
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
4
4
|
import { createRoot as ee } from "react-dom/client";
|
|
@@ -377,12 +377,12 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
377
377
|
]), Oe = g("volume", [["path", {
|
|
378
378
|
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
379
379
|
key: "uqj9uw"
|
|
380
|
-
}]]), ke = 1e4, Ae = (e) => {
|
|
380
|
+
}]]), ke = 1e4, Ae = !1, je = (e) => {
|
|
381
381
|
let t = e.match(/#EXT-X-TITLE:(.+)/);
|
|
382
382
|
if (t?.[1]?.trim()) return t[1].trim();
|
|
383
383
|
let n = e.match(/#EXT-X-SESSION-DATA:[^\n]*DATA-ID="[^"]*title[^"]*"[^\n]*VALUE="([^"]+)"/i);
|
|
384
384
|
return n?.[1]?.trim() ? n[1].trim() : null;
|
|
385
|
-
},
|
|
385
|
+
}, Me = (e) => {
|
|
386
386
|
if (!e || e.length < 10 || e[0] !== 73 || e[1] !== 68 || e[2] !== 51) return null;
|
|
387
387
|
let t = e[3], n = (e[6] & 127) << 21 | (e[7] & 127) << 14 | (e[8] & 127) << 7 | e[9] & 127, r = Math.min(10 + n, e.length), i = 10;
|
|
388
388
|
for (; i + 10 <= r;) {
|
|
@@ -395,7 +395,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
395
395
|
i += 10 + a;
|
|
396
396
|
}
|
|
397
397
|
return null;
|
|
398
|
-
},
|
|
398
|
+
}, Ne = ({ size: e = 20 }) => /* @__PURE__ */ m("svg", {
|
|
399
399
|
width: e,
|
|
400
400
|
height: e,
|
|
401
401
|
viewBox: "0 0 24 24",
|
|
@@ -415,10 +415,10 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
415
415
|
/* @__PURE__ */ p("path", { d: "M7 9v6M7 12h3M10 9v6" }),
|
|
416
416
|
/* @__PURE__ */ p("path", { d: "M14 9h1.5a3 3 0 0 1 0 6H14z" })
|
|
417
417
|
]
|
|
418
|
-
}),
|
|
418
|
+
}), v = (e) => {
|
|
419
419
|
let t = e.replace("#", "");
|
|
420
420
|
return t.length === 6 ? `${parseInt(t.substring(0, 2), 16)}, ${parseInt(t.substring(2, 4), 16)}, ${parseInt(t.substring(4, 6), 16)}` : t.length === 3 ? `${parseInt(t[0] + t[0], 16)}, ${parseInt(t[1] + t[1], 16)}, ${parseInt(t[2] + t[2], 16)}` : "99, 102, 241";
|
|
421
|
-
},
|
|
421
|
+
}, Pe = {
|
|
422
422
|
en: "English",
|
|
423
423
|
eng: "English",
|
|
424
424
|
fr: "French",
|
|
@@ -441,50 +441,59 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
441
441
|
hi: "Hindi",
|
|
442
442
|
ta: "Tamil",
|
|
443
443
|
tam: "Tamil"
|
|
444
|
-
},
|
|
444
|
+
}, y = (e) => {
|
|
445
445
|
if (!e) return null;
|
|
446
446
|
let t = e.trim().toLowerCase(), n = t.match(/^(en|eng|fr|fre|fra|es|spa|de|ger|deu|it|ita|pt|por|ja|zh|ko|ru|ar|hi|ta|tam)/);
|
|
447
|
-
if (n &&
|
|
448
|
-
for (let [e, n] of Object.entries(
|
|
447
|
+
if (n && Pe[n[0]]) return Pe[n[0]];
|
|
448
|
+
for (let [e, n] of Object.entries(Pe)) if (t.includes(e)) return n;
|
|
449
449
|
return /english|anglais|ingles/i.test(t) ? "English" : /french|français/i.test(t) ? "French" : /spanish|español/i.test(t) ? "Spanish" : /german|deutsch/i.test(t) ? "German" : /italian|italiano/i.test(t) ? "Italian" : /portuguese|português/i.test(t) ? "Portuguese" : /japanese|nihongo/i.test(t) ? "Japanese" : /chinese|中文/i.test(t) ? "Chinese" : /korean|한국어/i.test(t) ? "Korean" : /tamil|தமிழ்/i.test(t) ? "Tamil" : /russian|русский/i.test(t) ? "Russian" : /arabic|العربية/i.test(t) ? "Arabic" : /hindi|हिन्दी/i.test(t) ? "Hindi" : null;
|
|
450
|
-
},
|
|
450
|
+
}, b = (e) => {
|
|
451
451
|
if (e.lang) {
|
|
452
|
-
let t =
|
|
452
|
+
let t = y(e.lang);
|
|
453
453
|
if (t) return t;
|
|
454
454
|
}
|
|
455
455
|
if (e.label) {
|
|
456
456
|
let t = e.label.trim(), n = t.split(/[#\d\.\s\-_/|:]+/).filter(Boolean);
|
|
457
457
|
for (let e = n.length - 1; e >= 0; --e) {
|
|
458
|
-
let t =
|
|
458
|
+
let t = y(n[e]);
|
|
459
459
|
if (t) return t;
|
|
460
460
|
}
|
|
461
461
|
let r = t.replace(/^[#\d\.\s]+/, "").trim();
|
|
462
|
-
return
|
|
462
|
+
return y(r) || r;
|
|
463
463
|
}
|
|
464
464
|
return "Unknown";
|
|
465
465
|
}, Fe = (e) => {
|
|
466
466
|
let t = /* @__PURE__ */ new Set();
|
|
467
467
|
return e.filter((e) => {
|
|
468
|
-
let n = `${
|
|
468
|
+
let n = `${b(e).toLowerCase()}|${(e.lang || "").trim().toLowerCase()}`;
|
|
469
469
|
return t.has(n) ? !1 : (t.add(n), !0);
|
|
470
470
|
});
|
|
471
471
|
}, Ie = (e) => {
|
|
472
472
|
let t = (e ?? "").split(":").map(Number);
|
|
473
473
|
return (t[0] || 0) * 3600 + (t[1] || 0) * 60 + (t[2] || 0);
|
|
474
|
-
}, Le = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoments: ee, subtitles: ne = [], watermark: re, themeColor: h = "#6366f1", drmConfig: ie, firebaseConfig: ae, onAnalyticsEvent: oe, onAdBreakChange: se, onKeyMomentsLoaded: ce, enableControls: le = !0, enableChromecast: g, enableKeyMoments:
|
|
475
|
-
let
|
|
474
|
+
}, Le = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoments: ee, subtitles: ne = [], watermark: re, themeColor: h = "#6366f1", drmConfig: ie, firebaseConfig: ae, onAnalyticsEvent: oe, onAdBreakChange: se, onKeyMomentsLoaded: ce, enableControls: le = !0, enableChromecast: g, enableKeyMoments: Pe, enableSubtitles: y, enableQuality: Le, enablePlaybackSpeed: Re, enablePiP: ze, enableFullscreen: Be = !0, autoFullscreen: Ve = !1, watchProgressInterval: He = 30, subtitleStyle: Ue = {}, resolvedEntitlement: We, licenseKey: Ge, title: Ke, chaptersDisplayMode: qe = "strip", volumeControlType: Je = "slider", urlTransformer: Ye, pauseAdOnTabSwitch: x = !0, enableSkipAd: Xe = !1, skipAdAfterSeconds: Ze = 5, overlayAdUrl: Qe, adTrackingUrl: $e, sources: et, activeSourceIndex: tt = 0, onSourceChange: nt, initialTime: rt, onTimeUpdate: it }) => {
|
|
475
|
+
let at = Ye ?? ((e) => e), S = u(null), ot = u(null), st = u(!1), C = u(null), ct = u(0), lt = u(null), w = u(null), ut = u(null), dt = u(null), ft = u(!1), T = u(!1), E = u(null), D = u(null), pt = u(null), mt = u(() => {}), O = u(null), ht = u(null), gt = u(null), _t = u(null), vt = u(null), k = u(null), yt = u(null), bt = u(et), xt = u(nt), St = u(!1), [Ct, wt] = d(!1), Tt = u(!1), Et = u(null), [Dt, Ot] = d(null);
|
|
476
476
|
c(() => {
|
|
477
|
+
if (typeof window > "u" || Ae) return;
|
|
478
|
+
let e = window.requestAnimationFrame(() => {
|
|
479
|
+
let e = S.current;
|
|
480
|
+
if (!e) return;
|
|
481
|
+
let t = window.getComputedStyle(e);
|
|
482
|
+
t.overflow !== "hidden" && t.borderTopLeftRadius === "0px" && (Ae = !0, console.warn("[boss-web-player-sdk] Player styles appear to be missing — the player will look broken/unstyled.\nImport the stylesheet once at your app entry point:\n import 'boss-web-player-sdk/css';"));
|
|
483
|
+
});
|
|
484
|
+
return () => window.cancelAnimationFrame(e);
|
|
485
|
+
}, []), c(() => {
|
|
477
486
|
let e = S.current;
|
|
478
487
|
if (!e) return;
|
|
479
488
|
let t = new ResizeObserver((e) => {
|
|
480
|
-
for (let t of e)
|
|
489
|
+
for (let t of e) wt(t.contentRect.width <= 768);
|
|
481
490
|
});
|
|
482
|
-
return t.observe(e),
|
|
491
|
+
return t.observe(e), wt(e.getBoundingClientRect().width <= 768), () => t.disconnect();
|
|
483
492
|
}, []);
|
|
484
|
-
let [A,
|
|
485
|
-
enableSubtitles: j ? !!M.subtitle_support : typeof
|
|
493
|
+
let [A, kt] = d(null), At = We ?? null, j = At != null, M = At?.features ?? {}, jt = j ? !!(M.drm_protection && !Ge) : !1, N = {
|
|
494
|
+
enableSubtitles: j ? !!M.subtitle_support : typeof y == "boolean" ? y : !0,
|
|
486
495
|
enableChromecast: j ? !!M.chromecast : typeof g == "boolean" ? g : !0,
|
|
487
|
-
enableKeyMoments: j ? !!M.key_moments : typeof
|
|
496
|
+
enableKeyMoments: j ? !!M.key_moments : typeof Pe == "boolean" ? Pe : !0,
|
|
488
497
|
enableQuality: j ? !!M.multiple_resolution : typeof Le == "boolean" ? Le : !0,
|
|
489
498
|
enablePlaybackSpeed: j ? !!M.playback_speed : typeof Re == "boolean" ? Re : !0,
|
|
490
499
|
enablePiP: j ? !!M.picture_in_picture : typeof ze == "boolean" ? ze : !0,
|
|
@@ -492,9 +501,9 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
492
501
|
allowMultipleAudio: j ? !!M.multiple_audio : !0,
|
|
493
502
|
m3u8_playback: j ? !!M.m3u8_playback : !0,
|
|
494
503
|
drm_protection: j ? !!M.drm_protection : !1
|
|
495
|
-
}, [
|
|
496
|
-
|
|
497
|
-
let
|
|
504
|
+
}, [Mt, Nt] = d(!1), [Pt, Ft] = d(0), [It, Lt] = d(!1), [P, Rt] = d(0), [zt, Bt] = d(0), [Vt, Ht] = d(1), [Ut, Wt] = d(!1), [Gt, Kt] = d(!1), [qt, Jt] = d(!1), [F, Yt] = d(!1), [Xt, Zt] = d(!1), Qt = Ct || (qt || F) && Xt, [$t, en] = d(!1), [tn, nn] = d(!1), [I, rn] = d([]), L = u([]), an = u(/* @__PURE__ */ new Set()), [on, sn] = d(/* @__PURE__ */ new Set()), [cn, ln] = d(r);
|
|
505
|
+
cn !== r && (ln(r), sn(/* @__PURE__ */ new Set()));
|
|
506
|
+
let un = u(null), dn = u(!1), [fn, pn] = d([]), [mn, hn] = d(null), gn = u([]), _n = u(null), vn = u(/* @__PURE__ */ new Set()), [yn, bn] = d([]), xn = u([]), Sn = l(() => I.reduce((e, t) => e + (t.endTime - t.startTime), 0), [I]), Cn = zt > 0 ? Math.max(0, zt - Sn) : 0, R = I.length > 0 && Cn > 0 ? Cn : zt, z = o((e) => {
|
|
498
507
|
let t = e;
|
|
499
508
|
for (let n of I) e >= n.endTime ? t -= n.endTime - n.startTime : e >= n.startTime && (t -= e - n.startTime);
|
|
500
509
|
return Math.max(0, t);
|
|
@@ -502,31 +511,31 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
502
511
|
let t = e;
|
|
503
512
|
for (let e of I) t >= e.startTime && (t += e.endTime - e.startTime);
|
|
504
513
|
return t;
|
|
505
|
-
}, [I]), [
|
|
514
|
+
}, [I]), [wn, Tn] = d([]), [En, Dn] = d({
|
|
506
515
|
id: -1,
|
|
507
516
|
height: 0,
|
|
508
517
|
width: 0,
|
|
509
518
|
bitrate: 0,
|
|
510
519
|
label: "Auto"
|
|
511
|
-
}), [
|
|
520
|
+
}), [On, kn] = d(""), [V, An] = d("off"), [jn, Mn] = d(Fe(ne)), [Nn, Pn] = d([]), [Fn, In] = d(0);
|
|
512
521
|
c(() => {
|
|
513
522
|
if (A) {
|
|
514
523
|
let e = A.subtitles.getTracks();
|
|
515
|
-
|
|
516
|
-
} else
|
|
524
|
+
Mn(Fe([...ne, ...e.filter((e) => !ne.some((t) => t.id === e.id))]));
|
|
525
|
+
} else Mn(Fe(ne));
|
|
517
526
|
}, [ne.map((e) => e.id).join(","), A]);
|
|
518
|
-
let [
|
|
527
|
+
let [Ln, Rn] = d({
|
|
519
528
|
chapter: null,
|
|
520
529
|
index: -1
|
|
521
|
-
}), [H,
|
|
530
|
+
}), [H, zn] = d(ee || s || []), [U, W] = d("none"), [Bn, Vn] = d(1), [G, Hn] = d(!1), [Un, Wn] = d({}), [Gn, K] = d(""), [Kn, qn] = d(null), Jn = u(!1), Yn = JSON.stringify(H.map((e) => ({
|
|
522
531
|
title: e.title,
|
|
523
532
|
startTime: e.startTime
|
|
524
533
|
})));
|
|
525
534
|
c(() => {
|
|
526
|
-
|
|
535
|
+
zn(ee || s || []);
|
|
527
536
|
}, [(ee || s || []).map((e) => `${e.startTime}:${e.title}`).join(",")]), c(() => {
|
|
528
537
|
if (!r || !H || H.length === 0) return;
|
|
529
|
-
|
|
538
|
+
Wn({});
|
|
530
539
|
let e = document.createElement("video");
|
|
531
540
|
e.muted = !0, e.preload = "metadata", e.crossOrigin = "anonymous", e.style.cssText = "position:fixed;top:0;left:0;width:10px;height:10px;opacity:0.01;pointer-events:none;z-index:-9999;", document.body.appendChild(e);
|
|
532
541
|
let t = null, i = r.includes(".m3u8"), a = document.createElement("canvas");
|
|
@@ -542,7 +551,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
542
551
|
if (o && e.readyState >= 2) {
|
|
543
552
|
o.drawImage(e, 0, 0, a.width, a.height);
|
|
544
553
|
let t = a.toDataURL("image/jpeg", .8);
|
|
545
|
-
|
|
554
|
+
Wn((e) => ({
|
|
546
555
|
...e,
|
|
547
556
|
[s]: t
|
|
548
557
|
})), s++, l();
|
|
@@ -556,32 +565,32 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
556
565
|
xhrSetup: (e, t) => {
|
|
557
566
|
let n = ie?.authToken;
|
|
558
567
|
try {
|
|
559
|
-
let r =
|
|
568
|
+
let r = at(t), i = new URL(r, window.location.origin);
|
|
560
569
|
n && i.searchParams.set("token", n), e.open("GET", i.toString(), !0);
|
|
561
570
|
} catch (e) {
|
|
562
571
|
console.error("[WebVideoPlayer tempHls] xhrSetup error:", e);
|
|
563
572
|
}
|
|
564
573
|
}
|
|
565
|
-
}), t.loadSource(
|
|
574
|
+
}), t.loadSource(at(r)), t.attachMedia(e)) : e.src = r, e.readyState >= 2 && d();
|
|
566
575
|
let f = () => {
|
|
567
576
|
e.removeEventListener("seeked", u), e.removeEventListener("canplay", d), t && t.destroy(), document.body.contains(e) && document.body.removeChild(e);
|
|
568
577
|
};
|
|
569
578
|
return f;
|
|
570
|
-
}, [r,
|
|
571
|
-
let [q,
|
|
579
|
+
}, [r, Yn]);
|
|
580
|
+
let [q, Xn] = d(null), [Zn, Qn] = d(null), $n = u(!1), [er, tr] = d(!1), [nr, rr] = d(!1), [ir, ar] = d(null), [or, sr] = d(null), [cr, lr] = d(0), [ur, dr] = d(0), [fr, pr] = d(null), [mr, hr] = d(null), [J, gr] = d(null);
|
|
572
581
|
c(() => {
|
|
573
|
-
if (
|
|
582
|
+
if (pt.current && !pt.current.querySelector("google-cast-launcher")) {
|
|
574
583
|
let e = document.createElement("google-cast-launcher");
|
|
575
|
-
e.style.cursor = "pointer", e.style.width = "100%", e.style.height = "100%", e.style.display = "block",
|
|
584
|
+
e.style.cursor = "pointer", e.style.width = "100%", e.style.height = "100%", e.style.display = "block", pt.current.appendChild(e);
|
|
576
585
|
}
|
|
577
586
|
}, []), c(() => {
|
|
578
587
|
if (!A) {
|
|
579
|
-
|
|
588
|
+
tr(!1), rr(!1), ar(null);
|
|
580
589
|
return;
|
|
581
590
|
}
|
|
582
|
-
let e = (e) =>
|
|
591
|
+
let e = (e) => tr(e), t = () => {
|
|
583
592
|
let e = A.getVideoElement(), t = !!e?.webkitCurrentPlaybackTargetIsWireless;
|
|
584
|
-
|
|
593
|
+
rr(t), ar(t ? e.webkitCurrentPlaybackTargetName || "AirPlay device" : null);
|
|
585
594
|
};
|
|
586
595
|
e(A.casting.isAirPlayAvailable()), t();
|
|
587
596
|
let n = A.getVideoElement(), r = (t) => {
|
|
@@ -593,16 +602,16 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
593
602
|
"webkitShowPlaybackTargetPicker" in n && (n.removeEventListener("webkitplaybacktargetavailabilitychanged", r), n.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged", i));
|
|
594
603
|
};
|
|
595
604
|
}, [A]);
|
|
596
|
-
let [
|
|
597
|
-
|
|
598
|
-
let e =
|
|
599
|
-
|
|
600
|
-
|
|
605
|
+
let [_r, vr] = d(""), [yr, br] = d(!0), [Y, xr] = d(!1), Sr = u(null), Cr = u(!1), wr = u(!1), Tr = u("none"), Er = u(ne), Dr = () => {
|
|
606
|
+
br(!0), Sr.current && window.clearTimeout(Sr.current);
|
|
607
|
+
let e = Tt.current ? 3500 : 1e4;
|
|
608
|
+
Sr.current = window.setTimeout(() => {
|
|
609
|
+
Cr.current && Tr.current === "none" && br(!1);
|
|
601
610
|
}, e);
|
|
602
|
-
},
|
|
611
|
+
}, Or = o((e) => {
|
|
603
612
|
k.current &&= (clearTimeout(k.current), null);
|
|
604
|
-
let t =
|
|
605
|
-
|
|
613
|
+
let t = bt.current, n = t?.[e]?.label ?? "This format", r = t?.[0]?.label ?? "default";
|
|
614
|
+
yt.current = null, qn(`${n} isn't supported on this device. Switched to ${r}.`), window.setTimeout(() => qn(null), 4e3), xt.current?.(0);
|
|
606
615
|
}, []);
|
|
607
616
|
c(() => {
|
|
608
617
|
if (!S.current) return;
|
|
@@ -616,39 +625,39 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
616
625
|
xhrSetup: (e, t) => {
|
|
617
626
|
let n = ie?.authToken;
|
|
618
627
|
try {
|
|
619
|
-
let r =
|
|
628
|
+
let r = at(t), i = new URL(r, window.location.origin);
|
|
620
629
|
n && i.searchParams.set("token", n), e.open("GET", i.toString(), !0);
|
|
621
630
|
} catch (e) {
|
|
622
631
|
console.error("[WebVideoPlayer hiddenHls] xhrSetup error:", e);
|
|
623
632
|
}
|
|
624
633
|
}
|
|
625
634
|
});
|
|
626
|
-
e.loadSource(
|
|
635
|
+
e.loadSource(at(r)), e.attachMedia(o), ut.current = e, e.on(n.Events.MANIFEST_LOADED, (e, t) => {
|
|
627
636
|
if (Ke) return;
|
|
628
|
-
let n =
|
|
629
|
-
n &&
|
|
637
|
+
let n = je(t?.networkDetails?.responseText ?? "");
|
|
638
|
+
n && vr(n);
|
|
630
639
|
}), e.on(n.Events.FRAG_PARSING_METADATA, (e, t) => {
|
|
631
|
-
if (!(Ke ||
|
|
632
|
-
let t =
|
|
640
|
+
if (!(Ke || _r)) for (let e of t?.samples ?? []) {
|
|
641
|
+
let t = Me(e.data);
|
|
633
642
|
if (t) {
|
|
634
|
-
|
|
643
|
+
vr(t);
|
|
635
644
|
break;
|
|
636
645
|
}
|
|
637
646
|
}
|
|
638
647
|
});
|
|
639
648
|
} else s && o.canPlayType("application/vnd.apple.mpegurl"), o.src = r;
|
|
640
649
|
o.addEventListener("seeked", () => {
|
|
641
|
-
let e =
|
|
650
|
+
let e = lt.current;
|
|
642
651
|
if (!e) return;
|
|
643
652
|
let t = e.getContext("2d");
|
|
644
|
-
t && o.readyState >= 2 && (t.drawImage(o, 0, 0, e.width, e.height),
|
|
653
|
+
t && o.readyState >= 2 && (t.drawImage(o, 0, 0, e.width, e.height), pr(e.toDataURL("image/jpeg", .82)));
|
|
645
654
|
});
|
|
646
655
|
let c;
|
|
647
656
|
if (ae) {
|
|
648
657
|
let t = new e(ae);
|
|
649
|
-
|
|
658
|
+
ot.current = t, c = t.createCallback();
|
|
650
659
|
}
|
|
651
|
-
if (
|
|
660
|
+
if (jt) return;
|
|
652
661
|
let l = new t({
|
|
653
662
|
container: S.current,
|
|
654
663
|
src: r,
|
|
@@ -670,16 +679,16 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
670
679
|
},
|
|
671
680
|
watchProgressInterval: He * 1e3,
|
|
672
681
|
themeColor: h,
|
|
673
|
-
urlTransformer:
|
|
682
|
+
urlTransformer: Ye
|
|
674
683
|
});
|
|
675
684
|
l.on("keymomentsloaded", (e) => {
|
|
676
|
-
|
|
685
|
+
zn(e), ce && ce(e);
|
|
677
686
|
}), l.on("chaptersloaded", (e) => {
|
|
678
|
-
|
|
687
|
+
zn(e), ce && ce(e);
|
|
679
688
|
}), l.on("play", () => {
|
|
680
|
-
|
|
681
|
-
}), l.on("pause", () =>
|
|
682
|
-
|
|
689
|
+
Lt(!0), nn(!1);
|
|
690
|
+
}), l.on("pause", () => Lt(!1)), l.on("ended", () => {
|
|
691
|
+
Lt(!1), nn(!0);
|
|
683
692
|
});
|
|
684
693
|
let u = () => {
|
|
685
694
|
O.current && (O.current.style.opacity = "1");
|
|
@@ -691,14 +700,14 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
691
700
|
});
|
|
692
701
|
}, f = (e) => {
|
|
693
702
|
T.current = !0;
|
|
694
|
-
let t =
|
|
695
|
-
|
|
703
|
+
let t = gt.current ?? e + .5;
|
|
704
|
+
gt.current = null, E.current = t, u(), l.seek(t), D.current && window.clearTimeout(D.current), D.current = window.setTimeout(() => {
|
|
696
705
|
T.current = !1, E.current = null, D.current = null, d();
|
|
697
706
|
}, 3e3);
|
|
698
707
|
};
|
|
699
|
-
if (
|
|
708
|
+
if (ht.current = f, l.on("timeupdate", (e) => {
|
|
700
709
|
if (!T.current) {
|
|
701
|
-
let t = L.current.find((t) =>
|
|
710
|
+
let t = L.current.find((t) => an.current.has(t.startTime) && e >= t.startTime - .5 && e < t.endTime);
|
|
702
711
|
if (t) {
|
|
703
712
|
f(t.endTime);
|
|
704
713
|
return;
|
|
@@ -706,19 +715,19 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
706
715
|
}
|
|
707
716
|
if (T.current && E.current !== null) if (e >= E.current - 2) T.current = !1, E.current = null, D.current &&= (window.clearTimeout(D.current), null), L.current.some((t) => e >= t.startTime && e < t.endTime) || d();
|
|
708
717
|
else return;
|
|
709
|
-
|
|
718
|
+
Rt(e);
|
|
710
719
|
let t = l.getDuration();
|
|
711
|
-
if (
|
|
712
|
-
let t =
|
|
713
|
-
(e >= t.startTimeSeconds + t.durationSeconds || e < t.startTimeSeconds) && (
|
|
720
|
+
if (Bt(t), !St.current && rt && rt > 0 && t > 0 && rt < t && (St.current = !0, l.seek(rt)), it?.(e), gn.current.length > 0) if (_n.current) {
|
|
721
|
+
let t = _n.current;
|
|
722
|
+
(e >= t.startTimeSeconds + t.durationSeconds || e < t.startTimeSeconds) && (hn(null), _n.current = null);
|
|
714
723
|
} else {
|
|
715
|
-
let t =
|
|
716
|
-
t && (
|
|
724
|
+
let t = gn.current.find((t) => e >= t.startTimeSeconds && e < t.startTimeSeconds + t.durationSeconds && !vn.current.has(t.availId));
|
|
725
|
+
t && (hn(t), _n.current = t, t.impressionBeacons.forEach((e) => {
|
|
717
726
|
fetch(e, { mode: "no-cors" }).catch(() => {});
|
|
718
727
|
}));
|
|
719
728
|
}
|
|
720
729
|
let n = l.keyMoments.getCurrentMoment(e);
|
|
721
|
-
if (
|
|
730
|
+
if (Rn({
|
|
722
731
|
chapter: n.keyMoment,
|
|
723
732
|
index: n.index
|
|
724
733
|
}), "mediaSession" in navigator && navigator.mediaSession.setPositionState) {
|
|
@@ -747,81 +756,81 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
747
756
|
}
|
|
748
757
|
}
|
|
749
758
|
}), l.on("qualitylevels", (e) => {
|
|
750
|
-
|
|
759
|
+
Tn(e);
|
|
751
760
|
}), l.on("qualitychange", (e) => {
|
|
752
|
-
|
|
761
|
+
Dn(e);
|
|
753
762
|
}), l.on("buffering", (e) => {
|
|
754
|
-
if (
|
|
755
|
-
let e =
|
|
756
|
-
|
|
763
|
+
if (Kt(e), !e && (k.current &&= (clearTimeout(k.current), null), yt.current = null, vt.current !== null)) {
|
|
764
|
+
let e = vt.current;
|
|
765
|
+
vt.current = null, l.seek(e);
|
|
757
766
|
}
|
|
758
767
|
}), l.on("adbreakchange", (e) => {
|
|
759
768
|
if (l.analytics.setAdBreak(e, l.getVideoElement()), se && se(e), e) {
|
|
760
769
|
let e = l.getCurrentTime(), t = L.current.find((t) => e >= t.startTime && e < t.endTime);
|
|
761
|
-
if (t &&
|
|
770
|
+
if (t && an.current.has(t.startTime)) {
|
|
762
771
|
u(), T.current || f(t.endTime);
|
|
763
772
|
return;
|
|
764
773
|
}
|
|
765
|
-
t && (
|
|
766
|
-
} else if (
|
|
767
|
-
let e =
|
|
768
|
-
|
|
774
|
+
t && (un.current = t.startTime), xr(!0), W("none");
|
|
775
|
+
} else if (un.current !== null && (an.current.add(un.current), sn(new Set(an.current)), un.current = null), xr(!1), gt.current !== null) {
|
|
776
|
+
let e = gt.current;
|
|
777
|
+
gt.current = null, T.current = !0, E.current = e, l.seek(e), D.current && window.clearTimeout(D.current), D.current = window.setTimeout(() => {
|
|
769
778
|
T.current = !1, E.current = null, D.current = null;
|
|
770
779
|
}, 3e3);
|
|
771
780
|
}
|
|
772
781
|
}), l.on("adbreaksloaded", (e) => {
|
|
773
|
-
L.current = e,
|
|
782
|
+
L.current = e, rn(e);
|
|
774
783
|
}), l.on("volumechange", (e) => {
|
|
775
|
-
|
|
784
|
+
Ht(e.volume), Wt(e.muted);
|
|
776
785
|
}), l.on("pipchange", (e) => {
|
|
777
|
-
|
|
786
|
+
en(e);
|
|
778
787
|
}), l.on("error", () => {
|
|
779
|
-
|
|
788
|
+
Nt(!0), Kt(!1);
|
|
780
789
|
}), l.on("unsupportedcodec", () => {
|
|
781
|
-
let e =
|
|
782
|
-
e && e.targetIdx !== 0 && (
|
|
790
|
+
let e = yt.current;
|
|
791
|
+
e && e.targetIdx !== 0 && (bt.current?.length ?? 0) > 1 && Or(e.targetIdx);
|
|
783
792
|
}), l.subtitles.onSubtitleChange((e) => {
|
|
784
|
-
|
|
793
|
+
kn(e);
|
|
785
794
|
}), l.on("subtitlesloaded", (e) => {
|
|
786
795
|
if (!N.enableSubtitles) return;
|
|
787
|
-
|
|
796
|
+
Mn(Fe([...e]));
|
|
788
797
|
let t = e.find((e) => e.isDefault);
|
|
789
|
-
t && (l.subtitles.setActiveTrack(t.id),
|
|
798
|
+
t && (l.subtitles.setActiveTrack(t.id), An(t.id));
|
|
790
799
|
}), l.on("audiotracksloaded", (e) => {
|
|
791
|
-
|
|
800
|
+
Pn(e), In(e[0]?.id ?? 0);
|
|
792
801
|
}), l.on("audiotrackchange", (e) => {
|
|
793
|
-
|
|
802
|
+
In(e);
|
|
794
803
|
}), l.casting.onCastStateChange((e, t) => {
|
|
795
804
|
if (e) {
|
|
796
|
-
|
|
805
|
+
$n.current = l.isMuted(), l.pause();
|
|
797
806
|
let e = l.getVideoElement();
|
|
798
|
-
e.muted = !0,
|
|
807
|
+
e.muted = !0, Xn(t);
|
|
799
808
|
} else {
|
|
800
809
|
let e = l.casting.getRemoteState();
|
|
801
810
|
e && e.currentTime > 0 && l.seek(e.currentTime);
|
|
802
811
|
let t = l.getVideoElement();
|
|
803
|
-
t.muted =
|
|
812
|
+
t.muted = $n.current, Xn(null), Qn(null);
|
|
804
813
|
}
|
|
805
814
|
}), l.casting.onRemoteStateChange((e) => {
|
|
806
|
-
|
|
807
|
-
}),
|
|
815
|
+
Qn(e);
|
|
816
|
+
}), Ht(l.getVolume()), Wt(l.isMuted()), "mediaSession" in navigator) try {
|
|
808
817
|
navigator.mediaSession.setActionHandler("seekto", (e) => {
|
|
809
|
-
if (e.seekTime == null ||
|
|
818
|
+
if (e.seekTime == null || wr.current) return;
|
|
810
819
|
let t = e.seekTime;
|
|
811
820
|
for (let e of L.current) t >= e.startTime && (t += e.endTime - e.startTime);
|
|
812
|
-
|
|
821
|
+
_t.current?.(t);
|
|
813
822
|
});
|
|
814
823
|
} catch {}
|
|
815
|
-
|
|
816
|
-
let p =
|
|
824
|
+
kt(l);
|
|
825
|
+
let p = yt.current;
|
|
817
826
|
p && p.targetIdx !== 0 && (k.current && clearTimeout(k.current), k.current = setTimeout(() => {
|
|
818
|
-
k.current = null, !l.getBufferedRanges().some((e) => e.end > e.start) &&
|
|
819
|
-
}, ke)), Ve && S.current && (
|
|
820
|
-
|
|
827
|
+
k.current = null, !l.getBufferedRanges().some((e) => e.end > e.start) && Or(p.targetIdx);
|
|
828
|
+
}, ke)), Ve && S.current && (st.current = !0, S.current.requestFullscreen().catch(() => {
|
|
829
|
+
st.current = !1;
|
|
821
830
|
}));
|
|
822
831
|
let m = () => {
|
|
823
832
|
let e = document, t = !!(document.fullscreenElement || e.webkitFullscreenElement);
|
|
824
|
-
|
|
833
|
+
Jt(t), t || Yt(!1);
|
|
825
834
|
let n = l.getVideoElement();
|
|
826
835
|
l.analytics.track(t ? "fullscreen_enter" : "fullscreen_exit", n);
|
|
827
836
|
};
|
|
@@ -846,7 +855,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
846
855
|
break;
|
|
847
856
|
case "arrowleft":
|
|
848
857
|
case "j":
|
|
849
|
-
if (e.preventDefault(), !
|
|
858
|
+
if (e.preventDefault(), !wr.current) {
|
|
850
859
|
let e = l.getCurrentTime(), t = e;
|
|
851
860
|
for (let n of L.current) e >= n.endTime ? t -= n.endTime - n.startTime : e >= n.startTime && (t -= e - n.startTime);
|
|
852
861
|
let n = Math.max(0, t - 10);
|
|
@@ -856,12 +865,12 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
856
865
|
break;
|
|
857
866
|
case "arrowright":
|
|
858
867
|
case "l":
|
|
859
|
-
if (e.preventDefault(), !
|
|
868
|
+
if (e.preventDefault(), !wr.current) {
|
|
860
869
|
let e = l.getCurrentTime(), t = L.current.reduce((e, t) => e + (t.endTime - t.startTime), 0), n = Math.max(0, l.getDuration() - t), r = e;
|
|
861
870
|
for (let t of L.current) e >= t.endTime ? r -= t.endTime - t.startTime : e >= t.startTime && (r -= e - t.startTime);
|
|
862
871
|
let i = Math.min(n, r + 10);
|
|
863
872
|
for (let e of L.current) i >= e.startTime && (i += e.endTime - e.startTime);
|
|
864
|
-
|
|
873
|
+
_t.current?.(i);
|
|
865
874
|
}
|
|
866
875
|
break;
|
|
867
876
|
case "arrowup":
|
|
@@ -874,46 +883,46 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
874
883
|
e.preventDefault(), l.setMute(!l.isMuted());
|
|
875
884
|
break;
|
|
876
885
|
case "f":
|
|
877
|
-
e.preventDefault(),
|
|
886
|
+
e.preventDefault(), mt.current();
|
|
878
887
|
break;
|
|
879
888
|
case "p":
|
|
880
|
-
e.preventDefault(),
|
|
889
|
+
e.preventDefault(), wr.current || l.togglePictureInPicture();
|
|
881
890
|
break;
|
|
882
891
|
case "c":
|
|
883
|
-
if (e.preventDefault(), N.enableSubtitles && !
|
|
892
|
+
if (e.preventDefault(), N.enableSubtitles && !wr.current) if (l.subtitles.getActiveTrackId() !== "off") l.subtitles.setActiveTrack("off"), An("off");
|
|
884
893
|
else {
|
|
885
|
-
let e =
|
|
886
|
-
e && e.length > 0 && (l.subtitles.setActiveTrack(e[0].id),
|
|
894
|
+
let e = Er.current;
|
|
895
|
+
e && e.length > 0 && (l.subtitles.setActiveTrack(e[0].id), An(e[0].id));
|
|
887
896
|
}
|
|
888
897
|
break;
|
|
889
898
|
default: return;
|
|
890
899
|
}
|
|
891
|
-
|
|
900
|
+
Dr();
|
|
892
901
|
}
|
|
893
902
|
};
|
|
894
|
-
return document.addEventListener("keydown", ee),
|
|
895
|
-
if (l.destroy(),
|
|
903
|
+
return document.addEventListener("keydown", ee), Dr(), () => {
|
|
904
|
+
if (l.destroy(), ot.current?.destroy(), ot.current = null, document.body.style.overflow = "", document.body.style.touchAction = "", document.removeEventListener("fullscreenchange", m), document.removeEventListener("webkitfullscreenchange", m), document.removeEventListener("keydown", ee), Sr.current && window.clearTimeout(Sr.current), D.current &&= (window.clearTimeout(D.current), null), k.current &&= (clearTimeout(k.current), null), O.current && (O.current.style.opacity = "0"), "mediaSession" in navigator) try {
|
|
896
905
|
navigator.mediaSession.setActionHandler("seekto", null);
|
|
897
906
|
} catch {}
|
|
898
|
-
|
|
907
|
+
ut.current &&= (ut.current.destroy(), null), w.current &&= (document.body.removeChild(w.current), null), St.current = !1;
|
|
899
908
|
};
|
|
900
909
|
}, [
|
|
901
910
|
r,
|
|
902
911
|
re,
|
|
903
|
-
|
|
912
|
+
Pt
|
|
904
913
|
]), c(() => {
|
|
905
914
|
if (A) {
|
|
906
915
|
A.keyMoments.setKeyMoments(H);
|
|
907
916
|
let e = S.current?.querySelector("video");
|
|
908
917
|
if (e) {
|
|
909
918
|
let t = A.keyMoments.getCurrentMoment(e.currentTime);
|
|
910
|
-
|
|
919
|
+
Rn({
|
|
911
920
|
chapter: t.keyMoment,
|
|
912
921
|
index: t.index
|
|
913
922
|
});
|
|
914
923
|
}
|
|
915
924
|
}
|
|
916
|
-
}, [
|
|
925
|
+
}, [Yn, A]), c(() => {
|
|
917
926
|
let e = (e) => {
|
|
918
927
|
U !== "none" && (e.target.closest(".sdk-menu-container") || W("none"));
|
|
919
928
|
};
|
|
@@ -921,31 +930,31 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
921
930
|
document.removeEventListener("click", e);
|
|
922
931
|
};
|
|
923
932
|
}, [U]), c(() => {
|
|
924
|
-
|
|
925
|
-
}, [
|
|
926
|
-
|
|
933
|
+
Cr.current = It;
|
|
934
|
+
}, [It]), c(() => {
|
|
935
|
+
wr.current = Y;
|
|
927
936
|
}, [Y]), c(() => {
|
|
928
|
-
|
|
937
|
+
Tr.current = U;
|
|
929
938
|
}, [U]), c(() => {
|
|
930
|
-
|
|
931
|
-
}, [
|
|
932
|
-
|
|
933
|
-
}, [
|
|
939
|
+
Er.current = jn;
|
|
940
|
+
}, [jn]), c(() => {
|
|
941
|
+
Tt.current = Ct;
|
|
942
|
+
}, [Ct]), c(() => {
|
|
934
943
|
L.current = I;
|
|
935
944
|
}, [I]), c(() => {
|
|
936
|
-
|
|
937
|
-
}, [
|
|
938
|
-
|
|
939
|
-
}, [
|
|
940
|
-
|
|
941
|
-
}, [
|
|
942
|
-
|
|
943
|
-
}, [
|
|
944
|
-
|
|
945
|
-
}, [
|
|
946
|
-
|
|
945
|
+
gn.current = fn;
|
|
946
|
+
}, [fn]), c(() => {
|
|
947
|
+
_n.current = mn;
|
|
948
|
+
}, [mn]), c(() => {
|
|
949
|
+
xn.current = yn;
|
|
950
|
+
}, [yn]), c(() => {
|
|
951
|
+
bt.current = et;
|
|
952
|
+
}, [et]), c(() => {
|
|
953
|
+
xt.current = nt;
|
|
954
|
+
}, [nt]), c(() => {
|
|
955
|
+
an.current = /* @__PURE__ */ new Set(), un.current = null, dn.current = !1, gt.current = null, hn(null), _n.current = null, vn.current = /* @__PURE__ */ new Set(), Nt(!1);
|
|
947
956
|
}, [r]), c(() => {
|
|
948
|
-
|
|
957
|
+
pn([]), Qe && fetch(Qe).then((e) => e.json()).then((e) => {
|
|
949
958
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
950
959
|
for (let r of e.nonLinearAvails ?? []) {
|
|
951
960
|
if (t.has(r.availId)) continue;
|
|
@@ -972,11 +981,11 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
972
981
|
dismissible: o.dismissible === !0
|
|
973
982
|
});
|
|
974
983
|
}
|
|
975
|
-
|
|
984
|
+
pn(n);
|
|
976
985
|
}).catch(() => {});
|
|
977
986
|
}, [Qe, r]), c(() => {
|
|
978
|
-
|
|
979
|
-
|
|
987
|
+
bn([]), $e && fetch($e).then((e) => e.json()).then((e) => {
|
|
988
|
+
bn((e.avails ?? []).map((e) => {
|
|
980
989
|
let t = e.ads?.[0]?.skipOffset ?? null, n = !!t;
|
|
981
990
|
return {
|
|
982
991
|
startTimeSeconds: e.startTimeInSeconds ?? 0,
|
|
@@ -987,33 +996,33 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
987
996
|
}));
|
|
988
997
|
}).catch(() => {});
|
|
989
998
|
}, [$e, r]), c(() => {
|
|
990
|
-
if (!A ||
|
|
991
|
-
let e =
|
|
999
|
+
if (!A || yn.length === 0) return;
|
|
1000
|
+
let e = yn.map((e) => ({
|
|
992
1001
|
startTime: e.startTimeSeconds,
|
|
993
1002
|
endTime: e.startTimeSeconds + e.durationSeconds
|
|
994
1003
|
}));
|
|
995
1004
|
A.setAdBreaks(e);
|
|
996
|
-
}, [A,
|
|
1005
|
+
}, [A, yn]), c(() => {
|
|
997
1006
|
if (!A) return;
|
|
998
1007
|
let e = () => {
|
|
999
|
-
document.hidden ?
|
|
1008
|
+
document.hidden ? x && wr.current && (A.pause(), dn.current = !0) : dn.current &&= (A.play(), !1);
|
|
1000
1009
|
};
|
|
1001
1010
|
return document.addEventListener("visibilitychange", e), () => {
|
|
1002
1011
|
document.removeEventListener("visibilitychange", e);
|
|
1003
1012
|
};
|
|
1004
|
-
}, [A,
|
|
1005
|
-
let
|
|
1006
|
-
|
|
1007
|
-
}, kr = () => {
|
|
1008
|
-
Ve && !ot.current && S.current && (ot.current = !0, S.current.requestFullscreen().catch(() => {}));
|
|
1013
|
+
}, [A, x]);
|
|
1014
|
+
let kr = () => {
|
|
1015
|
+
Dr();
|
|
1009
1016
|
}, Ar = () => {
|
|
1017
|
+
Ve && !st.current && S.current && (st.current = !0, S.current.requestFullscreen().catch(() => {}));
|
|
1018
|
+
}, jr = () => {
|
|
1010
1019
|
if (A) {
|
|
1011
1020
|
if (q) {
|
|
1012
|
-
A.casting.remotePlayPause(),
|
|
1021
|
+
A.casting.remotePlayPause(), Dr();
|
|
1013
1022
|
return;
|
|
1014
1023
|
}
|
|
1015
|
-
if (
|
|
1016
|
-
else if (
|
|
1024
|
+
if (tn) X(0), Ar(), A.play(), nn(!1);
|
|
1025
|
+
else if (It) {
|
|
1017
1026
|
A.pause();
|
|
1018
1027
|
try {
|
|
1019
1028
|
let e = A.getVideoElement?.();
|
|
@@ -1026,26 +1035,26 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1026
1035
|
}), w.current && !w.current.paused) try {
|
|
1027
1036
|
w.current.pause();
|
|
1028
1037
|
} catch {}
|
|
1029
|
-
} else
|
|
1030
|
-
|
|
1038
|
+
} else Ar(), A.play();
|
|
1039
|
+
Dr();
|
|
1031
1040
|
}
|
|
1032
|
-
},
|
|
1041
|
+
}, Mr = (e) => {
|
|
1033
1042
|
if (!C.current || !A || R === 0) return 0;
|
|
1034
1043
|
let t = C.current.getBoundingClientRect();
|
|
1035
1044
|
return B(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * R);
|
|
1036
|
-
},
|
|
1045
|
+
}, Nr = (e) => {
|
|
1037
1046
|
if (!A || Y) return;
|
|
1038
|
-
|
|
1047
|
+
ft.current = !0, gr(Mr(e));
|
|
1039
1048
|
let t = (e) => {
|
|
1040
|
-
if (!
|
|
1049
|
+
if (!ft.current || !C.current) return;
|
|
1041
1050
|
let t = C.current.getBoundingClientRect(), n = B(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * R);
|
|
1042
|
-
|
|
1051
|
+
gr(n), sr(e.clientX - t.left), dr(n), w.current && (w.current.currentTime = n), Dr();
|
|
1043
1052
|
}, n = (e) => {
|
|
1044
|
-
if (
|
|
1053
|
+
if (ft.current = !1, C.current) {
|
|
1045
1054
|
let t = C.current.getBoundingClientRect();
|
|
1046
1055
|
X(B(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * R));
|
|
1047
1056
|
}
|
|
1048
|
-
|
|
1057
|
+
gr(null), sr(null), pr(null), hr(null), document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
|
|
1049
1058
|
};
|
|
1050
1059
|
document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
|
|
1051
1060
|
}, X = (e) => {
|
|
@@ -1054,142 +1063,142 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1054
1063
|
A.casting.remoteSeek(e);
|
|
1055
1064
|
return;
|
|
1056
1065
|
}
|
|
1057
|
-
let t = Math.max(0,
|
|
1066
|
+
let t = Math.max(0, zt > 0 ? Math.min(e, zt) : e), n = A.getCurrentTime();
|
|
1058
1067
|
if (t > n && L.current.length > 0) {
|
|
1059
|
-
let e = L.current.filter((e) => e.startTime > n && e.startTime < t && !
|
|
1068
|
+
let e = L.current.filter((e) => e.startTime > n && e.startTime < t && !an.current.has(e.startTime)).sort((e, t) => e.startTime - t.startTime);
|
|
1060
1069
|
if (e.length > 0) {
|
|
1061
|
-
|
|
1070
|
+
gt.current = t;
|
|
1062
1071
|
let n = e[e.length - 1].startTime;
|
|
1063
|
-
T.current = !0, E.current = n,
|
|
1072
|
+
T.current = !0, E.current = n, Rt(n), O.current && (O.current.style.opacity = "0"), A.seek(n), D.current && window.clearTimeout(D.current), D.current = window.setTimeout(() => {
|
|
1064
1073
|
T.current = !1, E.current = null, D.current = null, O.current && (O.current.style.opacity = "0");
|
|
1065
1074
|
}, 3e3);
|
|
1066
1075
|
return;
|
|
1067
1076
|
}
|
|
1068
1077
|
}
|
|
1069
|
-
|
|
1078
|
+
gt.current = null, T.current = !0, E.current = t, Rt(t), O.current && (O.current.style.opacity = "0"), A.seek(t), D.current && window.clearTimeout(D.current), D.current = window.setTimeout(() => {
|
|
1070
1079
|
T.current = !1, E.current = null, D.current = null, O.current && (O.current.style.opacity = "0");
|
|
1071
1080
|
}, 3e3);
|
|
1072
1081
|
};
|
|
1073
|
-
|
|
1074
|
-
let
|
|
1082
|
+
_t.current = X;
|
|
1083
|
+
let Pr = () => {
|
|
1075
1084
|
if (!A) return;
|
|
1076
1085
|
if (q) {
|
|
1077
|
-
A.casting.remoteSetMute(!(
|
|
1086
|
+
A.casting.remoteSetMute(!(Zn?.isMuted ?? !1));
|
|
1078
1087
|
return;
|
|
1079
1088
|
}
|
|
1080
|
-
let e = !
|
|
1081
|
-
A.setMute(e),
|
|
1082
|
-
}, Pr = (e) => {
|
|
1083
|
-
A && (A.setPlaybackRate(e), Bn(e), W("none"), K(`Playback speed: ${e === 1 ? "Normal" : `${e}x`}`));
|
|
1089
|
+
let e = !Ut;
|
|
1090
|
+
A.setMute(e), Wt(e);
|
|
1084
1091
|
}, Fr = (e) => {
|
|
1092
|
+
A && (A.setPlaybackRate(e), Vn(e), W("none"), K(`Playback speed: ${e === 1 ? "Normal" : `${e}x`}`));
|
|
1093
|
+
}, Ir = (e) => {
|
|
1085
1094
|
if (!A) return;
|
|
1086
1095
|
A.setQuality(e);
|
|
1087
|
-
let t =
|
|
1088
|
-
t && (
|
|
1089
|
-
},
|
|
1090
|
-
if (A) if (A.subtitles.setActiveTrack(e),
|
|
1096
|
+
let t = wn.find((t) => t.id === e);
|
|
1097
|
+
t && (Dn(t), K(`Quality: ${t.label}`)), W("none");
|
|
1098
|
+
}, Lr = (e) => {
|
|
1099
|
+
if (A) if (A.subtitles.setActiveTrack(e), An(e), W("none"), e === "off") K("Captions off");
|
|
1091
1100
|
else {
|
|
1092
|
-
let t =
|
|
1093
|
-
K(`Captions: ${t ?
|
|
1101
|
+
let t = jn.find((t) => t.id === e);
|
|
1102
|
+
K(`Captions: ${t ? b(t) : "on"}`);
|
|
1094
1103
|
}
|
|
1095
|
-
}, Lr = (e) => {
|
|
1096
|
-
A && (k.current &&= (clearTimeout(k.current), null), Kn(null), vt.current === null && (_t.current = A.getCurrentTime()), vt.current = { targetIdx: e }, W("none"), K(`Source: ${x?.[e]?.label ?? ""}`), tt?.(e));
|
|
1097
1104
|
}, Rr = (e) => {
|
|
1105
|
+
A && (k.current &&= (clearTimeout(k.current), null), qn(null), yt.current === null && (vt.current = A.getCurrentTime()), yt.current = { targetIdx: e }, W("none"), K(`Source: ${et?.[e]?.label ?? ""}`), nt?.(e));
|
|
1106
|
+
}, zr = (e) => {
|
|
1098
1107
|
X(e), W("none");
|
|
1099
|
-
}, zr = () => {
|
|
1100
|
-
A && A.togglePictureInPicture();
|
|
1101
1108
|
}, Br = () => {
|
|
1109
|
+
A && A.togglePictureInPicture();
|
|
1110
|
+
}, Vr = () => {
|
|
1102
1111
|
if (!S.current) return;
|
|
1103
1112
|
let e = S.current, t = document, n = e, r = !!(document.fullscreenElement || t.webkitFullscreenElement), i = () => {
|
|
1104
|
-
|
|
1113
|
+
Yt(!0), Jt(!0), document.body.style.overflow = "hidden", document.body.style.touchAction = "none", A?.analytics.track("fullscreen_enter", A.getVideoElement());
|
|
1105
1114
|
}, a = () => {
|
|
1106
|
-
|
|
1115
|
+
Yt(!1), Jt(!1), document.body.style.overflow = "", document.body.style.touchAction = "", A?.analytics.track("fullscreen_exit", A.getVideoElement());
|
|
1107
1116
|
};
|
|
1108
|
-
if (r || F)
|
|
1117
|
+
if (r || F) Zt(!1), document.fullscreenElement ? document.exitFullscreen() : t.webkitFullscreenElement ? t.webkitExitFullscreen?.() : a();
|
|
1109
1118
|
else {
|
|
1110
|
-
|
|
1119
|
+
Zt(Tt.current);
|
|
1111
1120
|
let t = e.requestFullscreen?.bind(e) ?? n.webkitRequestFullscreen?.bind(n);
|
|
1112
1121
|
t ? t().catch(i) : i();
|
|
1113
1122
|
}
|
|
1114
1123
|
};
|
|
1115
1124
|
c(() => {
|
|
1116
|
-
|
|
1125
|
+
mt.current = Vr;
|
|
1117
1126
|
});
|
|
1118
|
-
let
|
|
1127
|
+
let Hr = () => {
|
|
1119
1128
|
if (!Y) return;
|
|
1120
1129
|
let e = I.find((e) => P >= e.startTime && P < e.endTime);
|
|
1121
|
-
e &&
|
|
1122
|
-
},
|
|
1123
|
-
|
|
1124
|
-
},
|
|
1130
|
+
e && ht.current?.(e.endTime);
|
|
1131
|
+
}, Ur = () => {
|
|
1132
|
+
_n.current && vn.current.add(_n.current.availId), hn(null), _n.current = null;
|
|
1133
|
+
}, Wr = (e) => {
|
|
1125
1134
|
e.clickTrackingUrl && fetch(e.clickTrackingUrl, { mode: "no-cors" }).catch(() => {}), e.clickThrough && window.open(e.clickThrough, "_blank", "noopener,noreferrer");
|
|
1126
|
-
}, Wr = () => {
|
|
1127
|
-
A && (q ? A.casting.stopCasting() : A.casting.requestSession(r, P));
|
|
1128
1135
|
}, Gr = () => {
|
|
1136
|
+
A && (q ? A.casting.stopCasting() : A.casting.requestSession(r, P));
|
|
1137
|
+
}, Kr = () => {
|
|
1129
1138
|
if (!A) return;
|
|
1130
1139
|
let e = A.getVideoElement();
|
|
1131
|
-
if (
|
|
1140
|
+
if (nr) {
|
|
1132
1141
|
A.casting.stopAirPlay(e);
|
|
1133
1142
|
return;
|
|
1134
1143
|
}
|
|
1135
1144
|
typeof e.webkitShowPlaybackTargetPicker == "function" || A.casting.isAirPlayAvailable() ? A.casting.requestAirPlaySession(e) : console.warn("[PlayerSDK AirPlay] AirPlay is not available on this device.");
|
|
1136
|
-
},
|
|
1145
|
+
}, qr = (e) => {
|
|
1137
1146
|
if (!C.current || R === 0 || !A || Y) return;
|
|
1138
1147
|
let t = C.current.getBoundingClientRect();
|
|
1139
|
-
|
|
1148
|
+
ct.current = t.width, lr(Math.max(192 / 2, Math.min(e.clientX - t.left, t.width - 192 / 2)));
|
|
1140
1149
|
let n = B(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * R);
|
|
1141
|
-
|
|
1150
|
+
sr(e.clientX - t.left), dr(n), dt.current && window.clearTimeout(dt.current), dt.current = window.setTimeout(() => {
|
|
1142
1151
|
w.current && (w.current.currentTime = n);
|
|
1143
|
-
}, 100),
|
|
1144
|
-
},
|
|
1152
|
+
}, 100), hr(A.keyMoments.getCurrentMoment(n).keyMoment);
|
|
1153
|
+
}, Jr = (e) => {
|
|
1145
1154
|
if (!C.current || R === 0) return 0;
|
|
1146
1155
|
let t = C.current.getBoundingClientRect();
|
|
1147
1156
|
return B(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * R);
|
|
1148
|
-
},
|
|
1157
|
+
}, Yr = (e) => {
|
|
1149
1158
|
if (!A || Y || R === 0) return;
|
|
1150
|
-
e.preventDefault(),
|
|
1159
|
+
e.preventDefault(), ft.current = !0, gr(Jr(e.touches[0]));
|
|
1151
1160
|
let t = (e) => {
|
|
1152
|
-
if (!
|
|
1161
|
+
if (!ft.current || !C.current) return;
|
|
1153
1162
|
let t = e.touches[0], n = C.current.getBoundingClientRect(), r = B(Math.max(0, Math.min(1, (t.clientX - n.left) / n.width)) * R);
|
|
1154
|
-
|
|
1163
|
+
gr(r), dr(r), Dr();
|
|
1155
1164
|
}, n = (e) => {
|
|
1156
|
-
if (
|
|
1165
|
+
if (ft.current = !1, C.current && e.changedTouches[0]) {
|
|
1157
1166
|
let t = e.changedTouches[0], n = C.current.getBoundingClientRect();
|
|
1158
1167
|
X(B(Math.max(0, Math.min(1, (t.clientX - n.left) / n.width)) * R));
|
|
1159
1168
|
}
|
|
1160
|
-
|
|
1169
|
+
gr(null), document.removeEventListener("touchmove", t), document.removeEventListener("touchend", n);
|
|
1161
1170
|
};
|
|
1162
1171
|
document.addEventListener("touchmove", t, { passive: !1 }), document.addEventListener("touchend", n);
|
|
1163
|
-
},
|
|
1164
|
-
|
|
1172
|
+
}, Xr = () => {
|
|
1173
|
+
sr(null), pr(null), hr(null), dt.current && window.clearTimeout(dt.current);
|
|
1165
1174
|
}, Z = (e) => {
|
|
1166
1175
|
if (isNaN(e) || e < 0) return "00:00";
|
|
1167
1176
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = (e) => String(e).padStart(2, "0");
|
|
1168
1177
|
return n > 0 ? `${a(n)}:${a(r)}:${a(i)}` : `${a(r)}:${a(i)}`;
|
|
1169
1178
|
};
|
|
1170
1179
|
c(() => {
|
|
1171
|
-
|
|
1172
|
-
}, [
|
|
1173
|
-
|
|
1174
|
-
}, [
|
|
1175
|
-
|
|
1180
|
+
Jn.current && K(It ? "Playing" : "Paused");
|
|
1181
|
+
}, [It]), c(() => {
|
|
1182
|
+
Jn.current && K(Ut ? "Muted" : "Unmuted");
|
|
1183
|
+
}, [Ut]), c(() => {
|
|
1184
|
+
Jn.current = !0;
|
|
1176
1185
|
}, []), c(() => {
|
|
1177
1186
|
let e = (e) => {
|
|
1178
|
-
e.key === "Escape" &&
|
|
1187
|
+
e.key === "Escape" && Tr.current !== "none" && (e.preventDefault(), W("none"));
|
|
1179
1188
|
};
|
|
1180
1189
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1181
1190
|
}, []);
|
|
1182
|
-
let
|
|
1191
|
+
let Zr = q ? !(Zn?.isPaused ?? !0) : It, Q = q ? Zn?.currentTime ?? 0 : P, Qr = q ? Zn?.duration ?? 0 : R, $r = q ? Zn?.volumeLevel ?? 1 : Vt, ei = q ? Zn?.isMuted ?? !1 : Ut, ti = o((e) => {
|
|
1183
1192
|
if (Y || e.target.closest(".sdk-mobile-ctrl")) return;
|
|
1184
|
-
let t = Date.now(), n = S.current?.getBoundingClientRect(), r = e.clientX - (n?.left ?? 0), i =
|
|
1193
|
+
let t = Date.now(), n = S.current?.getBoundingClientRect(), r = e.clientX - (n?.left ?? 0), i = Et.current;
|
|
1185
1194
|
if (i && t - i.time < 300) {
|
|
1186
|
-
|
|
1195
|
+
Et.current = null;
|
|
1187
1196
|
let e = r < (n?.width ?? 0) / 2, t = e ? -10 : 10;
|
|
1188
|
-
X(B(Math.max(0, Math.min(R, z(Q) + t)))),
|
|
1189
|
-
} else
|
|
1197
|
+
X(B(Math.max(0, Math.min(R, z(Q) + t)))), Ot(e ? "left" : "right"), window.setTimeout(() => Ot(null), 700), Dr();
|
|
1198
|
+
} else Et.current = {
|
|
1190
1199
|
time: t,
|
|
1191
1200
|
x: r
|
|
1192
|
-
},
|
|
1201
|
+
}, yr ? (br(!1), Sr.current && window.clearTimeout(Sr.current)) : Dr();
|
|
1193
1202
|
}, [
|
|
1194
1203
|
Y,
|
|
1195
1204
|
R,
|
|
@@ -1197,20 +1206,20 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1197
1206
|
Q,
|
|
1198
1207
|
B,
|
|
1199
1208
|
X,
|
|
1200
|
-
|
|
1201
|
-
]),
|
|
1209
|
+
yr
|
|
1210
|
+
]), ni = () => p(ei || $r === 0 ? De : $r < .3 ? Oe : $r < .7 ? Te : Ee, { size: 18 }), $ = (e) => (t) => {
|
|
1202
1211
|
t.key === "Enter" || t.key === " " ? (t.preventDefault(), e()) : t.key === "Escape" && (t.preventDefault(), W("none"));
|
|
1203
|
-
},
|
|
1212
|
+
}, ri = (e) => (t) => {
|
|
1204
1213
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), e());
|
|
1205
|
-
},
|
|
1214
|
+
}, ii = (e) => {
|
|
1206
1215
|
if (!Y) if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
1207
1216
|
e.preventDefault();
|
|
1208
1217
|
let t = e.key === "ArrowLeft" ? -5 : 5;
|
|
1209
1218
|
X(B(Math.max(0, Math.min(R, z(Q) + t))));
|
|
1210
1219
|
} else e.key === "Home" ? (e.preventDefault(), X(B(0))) : e.key === "End" && (e.preventDefault(), X(B(R)));
|
|
1211
|
-
},
|
|
1220
|
+
}, ai = (e) => {
|
|
1212
1221
|
W(U === e ? "none" : e);
|
|
1213
|
-
},
|
|
1222
|
+
}, oi = o((e) => {
|
|
1214
1223
|
if (!e) return;
|
|
1215
1224
|
e.style.left = "";
|
|
1216
1225
|
let t = S.current;
|
|
@@ -1221,19 +1230,19 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1221
1230
|
return /* @__PURE__ */ m("div", {
|
|
1222
1231
|
ref: S,
|
|
1223
1232
|
role: "region",
|
|
1224
|
-
"aria-label": Ke ||
|
|
1225
|
-
className: `sdk-player-container ${
|
|
1226
|
-
onMouseMove:
|
|
1227
|
-
onTouchStart:
|
|
1233
|
+
"aria-label": Ke || _r ? `${Ke || _r} video player` : "Video player",
|
|
1234
|
+
className: `sdk-player-container ${yr ? "controls-active" : ""} ${F ? "sdk-fs-simulated" : ""}`,
|
|
1235
|
+
onMouseMove: kr,
|
|
1236
|
+
onTouchStart: Qt ? void 0 : Dr,
|
|
1228
1237
|
onMouseLeave: () => {},
|
|
1229
1238
|
style: {
|
|
1230
1239
|
border: F ? "none" : "1px solid rgba(255, 255, 255, 0.08)",
|
|
1231
1240
|
"--sdk-theme-color": h,
|
|
1232
|
-
"--sdk-theme-color-rgb":
|
|
1241
|
+
"--sdk-theme-color-rgb": v(h)
|
|
1233
1242
|
},
|
|
1234
1243
|
children: [
|
|
1235
1244
|
/* @__PURE__ */ p("canvas", {
|
|
1236
|
-
ref:
|
|
1245
|
+
ref: lt,
|
|
1237
1246
|
width: 160,
|
|
1238
1247
|
height: 90,
|
|
1239
1248
|
style: {
|
|
@@ -1248,7 +1257,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1248
1257
|
"aria-live": "polite",
|
|
1249
1258
|
"aria-atomic": "true",
|
|
1250
1259
|
className: "sdk-sr-only",
|
|
1251
|
-
children:
|
|
1260
|
+
children: Gn
|
|
1252
1261
|
}),
|
|
1253
1262
|
/* @__PURE__ */ p("div", {
|
|
1254
1263
|
ref: O,
|
|
@@ -1264,11 +1273,11 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1264
1273
|
"aria-hidden": "true"
|
|
1265
1274
|
}),
|
|
1266
1275
|
/* @__PURE__ */ p("div", {
|
|
1267
|
-
className: `sdk-spinner-overlay ${
|
|
1276
|
+
className: `sdk-spinner-overlay ${Gt ? "active" : ""}`,
|
|
1268
1277
|
"aria-hidden": "true",
|
|
1269
1278
|
children: /* @__PURE__ */ p("div", { className: "sdk-spinner" })
|
|
1270
1279
|
}),
|
|
1271
|
-
|
|
1280
|
+
Mt && /* @__PURE__ */ p("div", {
|
|
1272
1281
|
style: {
|
|
1273
1282
|
position: "absolute",
|
|
1274
1283
|
inset: 0,
|
|
@@ -1282,10 +1291,10 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1282
1291
|
padding: "0 24px"
|
|
1283
1292
|
},
|
|
1284
1293
|
children: /* @__PURE__ */ p(te, { onRetry: () => {
|
|
1285
|
-
|
|
1294
|
+
Nt(!1), Ft((e) => e + 1);
|
|
1286
1295
|
} })
|
|
1287
1296
|
}),
|
|
1288
|
-
|
|
1297
|
+
Kn && /* @__PURE__ */ p("div", {
|
|
1289
1298
|
style: {
|
|
1290
1299
|
position: "absolute",
|
|
1291
1300
|
top: 16,
|
|
@@ -1303,9 +1312,9 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1303
1312
|
backdropFilter: "blur(8px)",
|
|
1304
1313
|
border: "1px solid rgba(255,255,255,0.12)"
|
|
1305
1314
|
},
|
|
1306
|
-
children:
|
|
1315
|
+
children: Kn
|
|
1307
1316
|
}),
|
|
1308
|
-
N.enableSubtitles &&
|
|
1317
|
+
N.enableSubtitles && On && V !== "off" && /* @__PURE__ */ p("div", {
|
|
1309
1318
|
className: "sdk-subtitles-overlay",
|
|
1310
1319
|
children: /* @__PURE__ */ p("span", {
|
|
1311
1320
|
className: "sdk-subtitles-text",
|
|
@@ -1316,11 +1325,11 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1316
1325
|
border: Ue.background === "none" ? "none" : "1px solid rgba(255,255,255,0.08)",
|
|
1317
1326
|
backdropFilter: Ue.background === "none" ? "none" : "blur(8px)"
|
|
1318
1327
|
},
|
|
1319
|
-
dangerouslySetInnerHTML: { __html:
|
|
1328
|
+
dangerouslySetInnerHTML: { __html: On }
|
|
1320
1329
|
})
|
|
1321
1330
|
}),
|
|
1322
|
-
|
|
1323
|
-
className: `sdk-overlay-ad sdk-overlay-ad--${
|
|
1331
|
+
mn && /* @__PURE__ */ m("div", {
|
|
1332
|
+
className: `sdk-overlay-ad sdk-overlay-ad--${mn.position}`,
|
|
1324
1333
|
role: "complementary",
|
|
1325
1334
|
"aria-label": "Advertisement",
|
|
1326
1335
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -1328,23 +1337,23 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1328
1337
|
children: [/* @__PURE__ */ p("span", {
|
|
1329
1338
|
className: "sdk-overlay-ad-label",
|
|
1330
1339
|
children: "Ad"
|
|
1331
|
-
}),
|
|
1340
|
+
}), mn.dismissible && /* @__PURE__ */ p("button", {
|
|
1332
1341
|
className: "sdk-overlay-ad-close",
|
|
1333
|
-
onClick:
|
|
1342
|
+
onClick: Ur,
|
|
1334
1343
|
"aria-label": "Close advertisement",
|
|
1335
1344
|
children: "✕"
|
|
1336
1345
|
})]
|
|
1337
1346
|
}), /* @__PURE__ */ p("img", {
|
|
1338
|
-
src:
|
|
1339
|
-
width:
|
|
1340
|
-
height:
|
|
1341
|
-
alt:
|
|
1347
|
+
src: mn.imageUrl,
|
|
1348
|
+
width: mn.imageWidth,
|
|
1349
|
+
height: mn.imageHeight,
|
|
1350
|
+
alt: mn.title || "Advertisement",
|
|
1342
1351
|
className: "sdk-overlay-ad-img",
|
|
1343
|
-
onClick: () =>
|
|
1352
|
+
onClick: () => Wr(mn)
|
|
1344
1353
|
})]
|
|
1345
1354
|
}),
|
|
1346
1355
|
Y && (() => {
|
|
1347
|
-
let e = I.find((e) => P >= e.startTime && P < e.endTime), t = e ? Math.max(0, e.endTime - P) : 0, n = e ? P - e.startTime : 0, r =
|
|
1356
|
+
let e = I.find((e) => P >= e.startTime && P < e.endTime), t = e ? Math.max(0, e.endTime - P) : 0, n = e ? P - e.startTime : 0, r = yn.find((e) => P >= e.startTimeSeconds && P < e.startTimeSeconds + e.durationSeconds), i = r ? r.skippable : Xe, a = r ? r.skipOffsetSeconds : Ze, o = i && n >= a, s = Math.ceil(a - n);
|
|
1348
1357
|
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
|
|
1349
1358
|
className: "sdk-ad-countdown",
|
|
1350
1359
|
role: "timer",
|
|
@@ -1369,14 +1378,14 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1369
1378
|
]
|
|
1370
1379
|
}), i && /* @__PURE__ */ p("button", {
|
|
1371
1380
|
className: `sdk-skip-ad-btn ${o ? "sdk-skip-ad-btn--ready" : ""}`,
|
|
1372
|
-
onClick: o ?
|
|
1381
|
+
onClick: o ? Hr : void 0,
|
|
1373
1382
|
disabled: !o,
|
|
1374
1383
|
"aria-label": o ? "Skip advertisement" : `Skip advertisement available in ${s} seconds`,
|
|
1375
1384
|
"aria-disabled": !o,
|
|
1376
1385
|
children: o ? "Skip Ad ›" : `Skip in ${s}s`
|
|
1377
1386
|
})] });
|
|
1378
1387
|
})(),
|
|
1379
|
-
|
|
1388
|
+
jt && /* @__PURE__ */ p("div", {
|
|
1380
1389
|
style: {
|
|
1381
1390
|
position: "absolute",
|
|
1382
1391
|
inset: 0,
|
|
@@ -1402,15 +1411,15 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1402
1411
|
})]
|
|
1403
1412
|
})
|
|
1404
1413
|
}),
|
|
1405
|
-
(q ||
|
|
1406
|
-
|
|
1407
|
-
className: `sdk-mobile-overlay ${
|
|
1408
|
-
onClick:
|
|
1409
|
-
children: [
|
|
1410
|
-
className: `sdk-mobile-doubletap ${
|
|
1414
|
+
(q || nr) && /* @__PURE__ */ p("div", { className: "sdk-cast-bg" }),
|
|
1415
|
+
Qt && /* @__PURE__ */ m("div", {
|
|
1416
|
+
className: `sdk-mobile-overlay ${yr ? "active" : ""}`,
|
|
1417
|
+
onClick: ti,
|
|
1418
|
+
children: [Dt && /* @__PURE__ */ p("div", {
|
|
1419
|
+
className: `sdk-mobile-doubletap ${Dt}`,
|
|
1411
1420
|
children: /* @__PURE__ */ m("div", {
|
|
1412
1421
|
className: "sdk-mobile-doubletap-icon",
|
|
1413
|
-
children: [p(
|
|
1422
|
+
children: [p(Dt === "left" ? Se : Ce, { size: 26 }), /* @__PURE__ */ p("span", {
|
|
1414
1423
|
className: "sdk-mobile-doubletap-label",
|
|
1415
1424
|
children: "10s"
|
|
1416
1425
|
})]
|
|
@@ -1420,17 +1429,17 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1420
1429
|
className: "sdk-mobile-header sdk-mobile-ctrl",
|
|
1421
1430
|
children: [/* @__PURE__ */ m("div", {
|
|
1422
1431
|
className: "sdk-mobile-header-left",
|
|
1423
|
-
children: [(
|
|
1432
|
+
children: [(qt || F) && /* @__PURE__ */ p("button", {
|
|
1424
1433
|
className: "sdk-mobile-back-btn",
|
|
1425
|
-
onClick:
|
|
1434
|
+
onClick: Vr,
|
|
1426
1435
|
"aria-label": "Exit fullscreen",
|
|
1427
1436
|
children: /* @__PURE__ */ p(pe, {
|
|
1428
1437
|
size: 22,
|
|
1429
1438
|
"aria-hidden": "true"
|
|
1430
1439
|
})
|
|
1431
|
-
}), (Ke ||
|
|
1440
|
+
}), (Ke || _r) && /* @__PURE__ */ p("div", {
|
|
1432
1441
|
className: "sdk-mobile-title",
|
|
1433
|
-
children: Ke ||
|
|
1442
|
+
children: Ke || _r
|
|
1434
1443
|
})]
|
|
1435
1444
|
}), /* @__PURE__ */ m("div", {
|
|
1436
1445
|
className: "sdk-mobile-header-actions",
|
|
@@ -1438,11 +1447,11 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1438
1447
|
N.enablePiP && /* @__PURE__ */ p("button", {
|
|
1439
1448
|
className: "sdk-mobile-hdr-btn",
|
|
1440
1449
|
onClick: () => {
|
|
1441
|
-
Y ||
|
|
1450
|
+
Y || Br();
|
|
1442
1451
|
},
|
|
1443
|
-
style: { color:
|
|
1444
|
-
"aria-label":
|
|
1445
|
-
"aria-pressed":
|
|
1452
|
+
style: { color: $t ? h : "" },
|
|
1453
|
+
"aria-label": $t ? "Exit picture-in-picture" : "Enter picture-in-picture",
|
|
1454
|
+
"aria-pressed": $t,
|
|
1446
1455
|
children: /* @__PURE__ */ p(be, {
|
|
1447
1456
|
size: 20,
|
|
1448
1457
|
"aria-hidden": "true"
|
|
@@ -1450,7 +1459,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1450
1459
|
}),
|
|
1451
1460
|
N.enableChromecast && !Y && /* @__PURE__ */ p("button", {
|
|
1452
1461
|
className: "sdk-mobile-hdr-btn",
|
|
1453
|
-
onClick:
|
|
1462
|
+
onClick: Gr,
|
|
1454
1463
|
title: q ? `Casting to ${q} — tap to disconnect` : "Cast to device",
|
|
1455
1464
|
"aria-label": q ? `Stop casting to ${q}` : "Cast to device",
|
|
1456
1465
|
"aria-pressed": !!q,
|
|
@@ -1461,12 +1470,12 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1461
1470
|
"aria-hidden": "true"
|
|
1462
1471
|
})
|
|
1463
1472
|
}),
|
|
1464
|
-
N.allowAirplay &&
|
|
1473
|
+
N.allowAirplay && er && /* @__PURE__ */ p("button", {
|
|
1465
1474
|
className: "sdk-mobile-hdr-btn",
|
|
1466
|
-
onClick:
|
|
1467
|
-
"aria-label":
|
|
1468
|
-
"aria-pressed":
|
|
1469
|
-
style: { color:
|
|
1475
|
+
onClick: Kr,
|
|
1476
|
+
"aria-label": nr ? `Stop AirPlay to ${ir || "device"}` : "AirPlay to device",
|
|
1477
|
+
"aria-pressed": nr,
|
|
1478
|
+
style: { color: nr ? h : "" },
|
|
1470
1479
|
children: /* @__PURE__ */ p(ue, {
|
|
1471
1480
|
size: 20,
|
|
1472
1481
|
"aria-hidden": "true"
|
|
@@ -1493,12 +1502,12 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1493
1502
|
}),
|
|
1494
1503
|
/* @__PURE__ */ p("button", {
|
|
1495
1504
|
className: "sdk-mobile-play-btn",
|
|
1496
|
-
onClick:
|
|
1497
|
-
"aria-label":
|
|
1498
|
-
children:
|
|
1505
|
+
onClick: jr,
|
|
1506
|
+
"aria-label": tn ? "Replay" : Zr ? "Pause" : "Play",
|
|
1507
|
+
children: tn ? /* @__PURE__ */ p(Se, {
|
|
1499
1508
|
size: 38,
|
|
1500
1509
|
"aria-hidden": "true"
|
|
1501
|
-
}) :
|
|
1510
|
+
}) : Zr ? /* @__PURE__ */ p(ye, {
|
|
1502
1511
|
size: 38,
|
|
1503
1512
|
fill: "currentColor",
|
|
1504
1513
|
"aria-hidden": "true"
|
|
@@ -1530,7 +1539,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1530
1539
|
N.enableKeyMoments && G && H.length > 0 && /* @__PURE__ */ p("div", {
|
|
1531
1540
|
className: "sdk-mobile-chapters-scroll",
|
|
1532
1541
|
children: H.map((e, t) => {
|
|
1533
|
-
let n =
|
|
1542
|
+
let n = Ln.index === t;
|
|
1534
1543
|
return /* @__PURE__ */ m("div", {
|
|
1535
1544
|
role: "button",
|
|
1536
1545
|
tabIndex: 0,
|
|
@@ -1541,11 +1550,11 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1541
1550
|
onClick: () => {
|
|
1542
1551
|
X(e.startTime);
|
|
1543
1552
|
},
|
|
1544
|
-
onKeyDown:
|
|
1553
|
+
onKeyDown: ri(() => X(e.startTime)),
|
|
1545
1554
|
children: [/* @__PURE__ */ m("div", {
|
|
1546
1555
|
className: "sdk-mobile-chapter-thumb",
|
|
1547
|
-
children: [
|
|
1548
|
-
src:
|
|
1556
|
+
children: [Un[t] || e.thumbnail ? /* @__PURE__ */ p("img", {
|
|
1557
|
+
src: Un[t] || e.thumbnail,
|
|
1549
1558
|
alt: "",
|
|
1550
1559
|
"aria-hidden": "true",
|
|
1551
1560
|
style: {
|
|
@@ -1581,11 +1590,11 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1581
1590
|
"aria-valuetext": Y ? void 0 : `${Z(z(J === null ? P : J))} of ${Z(R)}`,
|
|
1582
1591
|
tabIndex: Y ? void 0 : 0,
|
|
1583
1592
|
className: `sdk-seekbar-container sdk-mobile-seekbar${Y ? " sdk-ad-mode" : ""}`,
|
|
1584
|
-
onMouseDown: Y ? void 0 :
|
|
1585
|
-
onMouseMove: Y ? void 0 :
|
|
1586
|
-
onMouseLeave: Y ? void 0 :
|
|
1587
|
-
onTouchStart: Y ? void 0 :
|
|
1588
|
-
onKeyDown: Y ? void 0 :
|
|
1593
|
+
onMouseDown: Y ? void 0 : Nr,
|
|
1594
|
+
onMouseMove: Y ? void 0 : qr,
|
|
1595
|
+
onMouseLeave: Y ? void 0 : Xr,
|
|
1596
|
+
onTouchStart: Y ? void 0 : Yr,
|
|
1597
|
+
onKeyDown: Y ? void 0 : ii,
|
|
1589
1598
|
style: {
|
|
1590
1599
|
pointerEvents: Y ? "none" : void 0,
|
|
1591
1600
|
touchAction: "none"
|
|
@@ -1599,9 +1608,9 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1599
1608
|
}) : /* @__PURE__ */ m(f, { children: [
|
|
1600
1609
|
/* @__PURE__ */ p("div", {
|
|
1601
1610
|
className: "sdk-seekbar-buffered",
|
|
1602
|
-
style: { width: `${
|
|
1611
|
+
style: { width: `${zt ? (A && A.getBufferedRanges()[0]?.end || 0) / zt * 100 : 0}%` }
|
|
1603
1612
|
}),
|
|
1604
|
-
R > 0 && I.filter((e) => !
|
|
1613
|
+
R > 0 && I.filter((e) => !on.has(e.startTime)).map((e, t) => /* @__PURE__ */ p("div", {
|
|
1605
1614
|
className: "sdk-seekbar-adbreak",
|
|
1606
1615
|
style: {
|
|
1607
1616
|
left: `${z(e.startTime) / R * 100}%`,
|
|
@@ -1611,7 +1620,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1611
1620
|
/* @__PURE__ */ p("div", {
|
|
1612
1621
|
className: "sdk-seekbar-progress",
|
|
1613
1622
|
style: {
|
|
1614
|
-
width: q ? `${
|
|
1623
|
+
width: q ? `${Qr > 0 ? Q / Qr * 100 : 0}%` : `${R ? z(J === null ? P : J) / R * 100 : 0}%`,
|
|
1615
1624
|
background: "#ffffff",
|
|
1616
1625
|
boxShadow: "none"
|
|
1617
1626
|
},
|
|
@@ -1633,14 +1642,14 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1633
1642
|
className: "sdk-mobile-controls-row",
|
|
1634
1643
|
children: [!Y && /* @__PURE__ */ p("span", {
|
|
1635
1644
|
className: "sdk-time-display",
|
|
1636
|
-
children: q ? `${Z(Q)} / ${Z(
|
|
1645
|
+
children: q ? `${Z(Q)} / ${Z(Qr)}` : `${Z(z(J === null ? P : J))} / ${Z(R)}`
|
|
1637
1646
|
}), /* @__PURE__ */ m("div", {
|
|
1638
1647
|
className: "sdk-mobile-bottom-icons",
|
|
1639
1648
|
children: [
|
|
1640
1649
|
N.enableKeyMoments && H.length > 0 && !Y && /* @__PURE__ */ p("button", {
|
|
1641
1650
|
className: `sdk-mobile-icon-btn${G ? " active" : ""}`,
|
|
1642
1651
|
onClick: () => {
|
|
1643
|
-
|
|
1652
|
+
Hn(!G);
|
|
1644
1653
|
},
|
|
1645
1654
|
"aria-label": G ? "Hide chapters" : "Show chapters",
|
|
1646
1655
|
"aria-pressed": G,
|
|
@@ -1649,12 +1658,12 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1649
1658
|
"aria-hidden": "true"
|
|
1650
1659
|
})
|
|
1651
1660
|
}),
|
|
1652
|
-
N.enableSubtitles && !Y &&
|
|
1661
|
+
N.enableSubtitles && !Y && jn.some((e) => !e.isNative) && /* @__PURE__ */ m("div", {
|
|
1653
1662
|
className: "sdk-menu-container",
|
|
1654
1663
|
children: [/* @__PURE__ */ p("button", {
|
|
1655
1664
|
className: `sdk-mobile-icon-btn${V === "off" ? "" : " active"}`,
|
|
1656
1665
|
onClick: () => {
|
|
1657
|
-
|
|
1666
|
+
ai("subtitles");
|
|
1658
1667
|
},
|
|
1659
1668
|
"aria-label": "Captions",
|
|
1660
1669
|
"aria-haspopup": "listbox",
|
|
@@ -1664,7 +1673,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1664
1673
|
"aria-hidden": "true"
|
|
1665
1674
|
})
|
|
1666
1675
|
}), U === "subtitles" && /* @__PURE__ */ m("div", {
|
|
1667
|
-
ref:
|
|
1676
|
+
ref: oi,
|
|
1668
1677
|
className: "sdk-dropup-menu",
|
|
1669
1678
|
role: "listbox",
|
|
1670
1679
|
"aria-label": "Captions",
|
|
@@ -1679,21 +1688,21 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1679
1688
|
"aria-selected": V === "off",
|
|
1680
1689
|
tabIndex: 0,
|
|
1681
1690
|
className: `sdk-dropup-item ${V === "off" ? "active" : ""}`,
|
|
1682
|
-
onClick: () =>
|
|
1683
|
-
onKeyDown: $(() =>
|
|
1691
|
+
onClick: () => Lr("off"),
|
|
1692
|
+
onKeyDown: $(() => Lr("off")),
|
|
1684
1693
|
children: [/* @__PURE__ */ p("span", { children: "Off" }), V === "off" && /* @__PURE__ */ p(_, {
|
|
1685
1694
|
size: 12,
|
|
1686
1695
|
"aria-hidden": "true"
|
|
1687
1696
|
})]
|
|
1688
1697
|
}),
|
|
1689
|
-
|
|
1698
|
+
jn.map((e) => /* @__PURE__ */ m("div", {
|
|
1690
1699
|
role: "option",
|
|
1691
1700
|
"aria-selected": V === e.id,
|
|
1692
1701
|
tabIndex: 0,
|
|
1693
1702
|
className: `sdk-dropup-item ${V === e.id ? "active" : ""}`,
|
|
1694
|
-
onClick: () =>
|
|
1695
|
-
onKeyDown: $(() =>
|
|
1696
|
-
children: [/* @__PURE__ */ p("span", { children:
|
|
1703
|
+
onClick: () => Lr(e.id),
|
|
1704
|
+
onKeyDown: $(() => Lr(e.id)),
|
|
1705
|
+
children: [/* @__PURE__ */ p("span", { children: b(e) }), V === e.id && /* @__PURE__ */ p(_, {
|
|
1697
1706
|
size: 12,
|
|
1698
1707
|
"aria-hidden": "true"
|
|
1699
1708
|
})]
|
|
@@ -1701,12 +1710,12 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1701
1710
|
]
|
|
1702
1711
|
})]
|
|
1703
1712
|
}),
|
|
1704
|
-
N.allowMultipleAudio &&
|
|
1713
|
+
N.allowMultipleAudio && Nn.length > 1 && !Y && /* @__PURE__ */ m("div", {
|
|
1705
1714
|
className: "sdk-menu-container",
|
|
1706
1715
|
children: [/* @__PURE__ */ p("button", {
|
|
1707
1716
|
className: `sdk-mobile-icon-btn${U === "audio" ? " active" : ""}`,
|
|
1708
1717
|
onClick: () => {
|
|
1709
|
-
|
|
1718
|
+
ai("audio");
|
|
1710
1719
|
},
|
|
1711
1720
|
"aria-label": "Audio track",
|
|
1712
1721
|
"aria-haspopup": "listbox",
|
|
@@ -1716,7 +1725,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1716
1725
|
"aria-hidden": "true"
|
|
1717
1726
|
})
|
|
1718
1727
|
}), U === "audio" && /* @__PURE__ */ m("div", {
|
|
1719
|
-
ref:
|
|
1728
|
+
ref: oi,
|
|
1720
1729
|
className: "sdk-dropup-menu",
|
|
1721
1730
|
role: "listbox",
|
|
1722
1731
|
"aria-label": "Audio track",
|
|
@@ -1724,18 +1733,18 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1724
1733
|
className: "sdk-dropup-header",
|
|
1725
1734
|
"aria-hidden": "true",
|
|
1726
1735
|
children: "Audio Track"
|
|
1727
|
-
}),
|
|
1736
|
+
}), Nn.map((e) => /* @__PURE__ */ m("div", {
|
|
1728
1737
|
role: "option",
|
|
1729
|
-
"aria-selected":
|
|
1738
|
+
"aria-selected": Fn === e.id,
|
|
1730
1739
|
tabIndex: 0,
|
|
1731
|
-
className: `sdk-dropup-item ${
|
|
1740
|
+
className: `sdk-dropup-item ${Fn === e.id ? "active" : ""}`,
|
|
1732
1741
|
onClick: () => {
|
|
1733
|
-
A?.setAudioTrack(e.id),
|
|
1742
|
+
A?.setAudioTrack(e.id), In(e.id), W("none"), K(`Audio: ${b(e)}`);
|
|
1734
1743
|
},
|
|
1735
1744
|
onKeyDown: $(() => {
|
|
1736
|
-
A?.setAudioTrack(e.id),
|
|
1745
|
+
A?.setAudioTrack(e.id), In(e.id), W("none"), K(`Audio: ${b(e)}`);
|
|
1737
1746
|
}),
|
|
1738
|
-
children: [/* @__PURE__ */ p("span", { children:
|
|
1747
|
+
children: [/* @__PURE__ */ p("span", { children: b(e) }), Fn === e.id && /* @__PURE__ */ p(_, {
|
|
1739
1748
|
size: 12,
|
|
1740
1749
|
"aria-hidden": "true"
|
|
1741
1750
|
})]
|
|
@@ -1747,7 +1756,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1747
1756
|
children: [/* @__PURE__ */ p("button", {
|
|
1748
1757
|
className: `sdk-mobile-icon-btn${U === "speed" ? " active" : ""}`,
|
|
1749
1758
|
onClick: () => {
|
|
1750
|
-
|
|
1759
|
+
ai("speed");
|
|
1751
1760
|
},
|
|
1752
1761
|
"aria-label": "Playback speed",
|
|
1753
1762
|
"aria-haspopup": "listbox",
|
|
@@ -1757,7 +1766,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1757
1766
|
"aria-hidden": "true"
|
|
1758
1767
|
})
|
|
1759
1768
|
}), U === "speed" && /* @__PURE__ */ m("div", {
|
|
1760
|
-
ref:
|
|
1769
|
+
ref: oi,
|
|
1761
1770
|
className: "sdk-dropup-menu",
|
|
1762
1771
|
role: "listbox",
|
|
1763
1772
|
"aria-label": "Playback speed",
|
|
@@ -1774,12 +1783,12 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1774
1783
|
2
|
|
1775
1784
|
].map((e) => /* @__PURE__ */ m("div", {
|
|
1776
1785
|
role: "option",
|
|
1777
|
-
"aria-selected":
|
|
1786
|
+
"aria-selected": Bn === e,
|
|
1778
1787
|
tabIndex: 0,
|
|
1779
|
-
className: `sdk-dropup-item ${
|
|
1780
|
-
onClick: () =>
|
|
1781
|
-
onKeyDown: $(() =>
|
|
1782
|
-
children: [/* @__PURE__ */ p("span", { children: e === 1 ? "Normal" : `${e}x` }),
|
|
1788
|
+
className: `sdk-dropup-item ${Bn === e ? "active" : ""}`,
|
|
1789
|
+
onClick: () => Fr(e),
|
|
1790
|
+
onKeyDown: $(() => Fr(e)),
|
|
1791
|
+
children: [/* @__PURE__ */ p("span", { children: e === 1 ? "Normal" : `${e}x` }), Bn === e && /* @__PURE__ */ p(_, {
|
|
1783
1792
|
size: 12,
|
|
1784
1793
|
"aria-hidden": "true"
|
|
1785
1794
|
})]
|
|
@@ -1789,19 +1798,19 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1789
1798
|
N.enableQuality && !Y && /* @__PURE__ */ m("div", {
|
|
1790
1799
|
className: "sdk-menu-container",
|
|
1791
1800
|
children: [/* @__PURE__ */ p("button", {
|
|
1792
|
-
className: `sdk-mobile-icon-btn${
|
|
1801
|
+
className: `sdk-mobile-icon-btn${En.id === -1 ? "" : " active"}`,
|
|
1793
1802
|
onClick: () => {
|
|
1794
|
-
|
|
1803
|
+
ai("quality");
|
|
1795
1804
|
},
|
|
1796
1805
|
"aria-label": "Video quality",
|
|
1797
1806
|
"aria-haspopup": "listbox",
|
|
1798
1807
|
"aria-expanded": U === "quality",
|
|
1799
|
-
children: /* @__PURE__ */ p(
|
|
1808
|
+
children: /* @__PURE__ */ p(Ne, {
|
|
1800
1809
|
size: 18,
|
|
1801
1810
|
"aria-hidden": "true"
|
|
1802
1811
|
})
|
|
1803
1812
|
}), U === "quality" && /* @__PURE__ */ m("div", {
|
|
1804
|
-
ref:
|
|
1813
|
+
ref: oi,
|
|
1805
1814
|
className: "sdk-dropup-menu large",
|
|
1806
1815
|
role: "listbox",
|
|
1807
1816
|
"aria-label": "Video quality",
|
|
@@ -1809,26 +1818,26 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1809
1818
|
className: "sdk-dropup-header",
|
|
1810
1819
|
"aria-hidden": "true",
|
|
1811
1820
|
children: "Quality"
|
|
1812
|
-
}),
|
|
1821
|
+
}), wn.map((e) => /* @__PURE__ */ m("div", {
|
|
1813
1822
|
role: "option",
|
|
1814
|
-
"aria-selected":
|
|
1823
|
+
"aria-selected": En.id === e.id,
|
|
1815
1824
|
tabIndex: 0,
|
|
1816
|
-
className: `sdk-dropup-item ${
|
|
1817
|
-
onClick: () =>
|
|
1818
|
-
onKeyDown: $(() =>
|
|
1819
|
-
children: [/* @__PURE__ */ p("span", { children: e.label }),
|
|
1825
|
+
className: `sdk-dropup-item ${En.id === e.id ? "active" : ""}`,
|
|
1826
|
+
onClick: () => Ir(e.id),
|
|
1827
|
+
onKeyDown: $(() => Ir(e.id)),
|
|
1828
|
+
children: [/* @__PURE__ */ p("span", { children: e.label }), En.id === e.id && /* @__PURE__ */ p(_, {
|
|
1820
1829
|
size: 12,
|
|
1821
1830
|
"aria-hidden": "true"
|
|
1822
1831
|
})]
|
|
1823
1832
|
}, e.id))]
|
|
1824
1833
|
})]
|
|
1825
1834
|
}),
|
|
1826
|
-
|
|
1835
|
+
et && et.length > 1 && !Y && /* @__PURE__ */ m("div", {
|
|
1827
1836
|
className: "sdk-menu-container",
|
|
1828
1837
|
children: [/* @__PURE__ */ p("button", {
|
|
1829
1838
|
className: `sdk-mobile-icon-btn${U === "sources" ? " active" : ""}`,
|
|
1830
1839
|
onClick: () => {
|
|
1831
|
-
|
|
1840
|
+
ai("sources");
|
|
1832
1841
|
},
|
|
1833
1842
|
"aria-label": "Select source",
|
|
1834
1843
|
"aria-haspopup": "listbox",
|
|
@@ -1838,7 +1847,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1838
1847
|
"aria-hidden": "true"
|
|
1839
1848
|
})
|
|
1840
1849
|
}), U === "sources" && /* @__PURE__ */ m("div", {
|
|
1841
|
-
ref:
|
|
1850
|
+
ref: oi,
|
|
1842
1851
|
className: "sdk-dropup-menu",
|
|
1843
1852
|
role: "listbox",
|
|
1844
1853
|
"aria-label": "Select source",
|
|
@@ -1846,14 +1855,14 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1846
1855
|
className: "sdk-dropup-header",
|
|
1847
1856
|
"aria-hidden": "true",
|
|
1848
1857
|
children: "Source"
|
|
1849
|
-
}),
|
|
1858
|
+
}), et.map((e, t) => /* @__PURE__ */ m("div", {
|
|
1850
1859
|
role: "option",
|
|
1851
|
-
"aria-selected":
|
|
1860
|
+
"aria-selected": tt === t,
|
|
1852
1861
|
tabIndex: 0,
|
|
1853
|
-
className: `sdk-dropup-item ${
|
|
1854
|
-
onClick: () =>
|
|
1855
|
-
onKeyDown: $(() =>
|
|
1856
|
-
children: [/* @__PURE__ */ p("span", { children: e.label }),
|
|
1862
|
+
className: `sdk-dropup-item ${tt === t ? "active" : ""}`,
|
|
1863
|
+
onClick: () => Rr(t),
|
|
1864
|
+
onKeyDown: $(() => Rr(t)),
|
|
1865
|
+
children: [/* @__PURE__ */ p("span", { children: e.label }), tt === t && /* @__PURE__ */ p(_, {
|
|
1857
1866
|
size: 12,
|
|
1858
1867
|
"aria-hidden": "true"
|
|
1859
1868
|
})]
|
|
@@ -1862,10 +1871,10 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1862
1871
|
}),
|
|
1863
1872
|
/* @__PURE__ */ p("button", {
|
|
1864
1873
|
className: "sdk-mobile-icon-btn",
|
|
1865
|
-
onClick:
|
|
1866
|
-
"aria-label":
|
|
1867
|
-
"aria-pressed":
|
|
1868
|
-
children: p(
|
|
1874
|
+
onClick: Vr,
|
|
1875
|
+
"aria-label": qt || F ? "Exit fullscreen" : "Enter fullscreen",
|
|
1876
|
+
"aria-pressed": qt || F,
|
|
1877
|
+
children: p(qt ? ve : _e, {
|
|
1869
1878
|
size: 18,
|
|
1870
1879
|
"aria-hidden": "true"
|
|
1871
1880
|
})
|
|
@@ -1877,28 +1886,28 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1877
1886
|
})
|
|
1878
1887
|
] })]
|
|
1879
1888
|
}),
|
|
1880
|
-
!
|
|
1889
|
+
!Qt && /* @__PURE__ */ m("div", {
|
|
1881
1890
|
className: "sdk-controls-overlay",
|
|
1882
1891
|
onClick: (e) => {
|
|
1883
|
-
Y || e.target.closest(".sdk-desktop-header") || e.target.closest(".sdk-desktop-center-controls") || e.target.closest(".sdk-desktop-bottom") ||
|
|
1892
|
+
Y || e.target.closest(".sdk-desktop-header") || e.target.closest(".sdk-desktop-center-controls") || e.target.closest(".sdk-desktop-bottom") || jr();
|
|
1884
1893
|
},
|
|
1885
1894
|
children: [/* @__PURE__ */ m("div", {
|
|
1886
1895
|
className: "sdk-desktop-header",
|
|
1887
1896
|
children: [/* @__PURE__ */ m("div", {
|
|
1888
1897
|
className: "sdk-desktop-header-left",
|
|
1889
|
-
children: [(
|
|
1898
|
+
children: [(qt || F) && /* @__PURE__ */ p("button", {
|
|
1890
1899
|
className: "sdk-desktop-back-btn",
|
|
1891
1900
|
onClick: (e) => {
|
|
1892
|
-
e.stopPropagation(),
|
|
1901
|
+
e.stopPropagation(), Vr();
|
|
1893
1902
|
},
|
|
1894
1903
|
"aria-label": "Exit fullscreen",
|
|
1895
1904
|
children: /* @__PURE__ */ p(pe, {
|
|
1896
1905
|
size: 22,
|
|
1897
1906
|
"aria-hidden": "true"
|
|
1898
1907
|
})
|
|
1899
|
-
}), (Ke ||
|
|
1908
|
+
}), (Ke || _r) && /* @__PURE__ */ p("span", {
|
|
1900
1909
|
className: "sdk-desktop-title",
|
|
1901
|
-
children: Ke ||
|
|
1910
|
+
children: Ke || _r
|
|
1902
1911
|
})]
|
|
1903
1912
|
}), /* @__PURE__ */ m("div", {
|
|
1904
1913
|
className: "sdk-desktop-header-right",
|
|
@@ -1906,7 +1915,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1906
1915
|
N.enableChromecast && !Y && /* @__PURE__ */ p("button", {
|
|
1907
1916
|
className: "sdk-desktop-hdr-btn",
|
|
1908
1917
|
onClick: (e) => {
|
|
1909
|
-
e.stopPropagation(),
|
|
1918
|
+
e.stopPropagation(), Gr();
|
|
1910
1919
|
},
|
|
1911
1920
|
title: q ? `Casting to ${q} — click to disconnect` : "Cast to device",
|
|
1912
1921
|
"aria-label": q ? `Stop casting to ${q}` : "Cast to device",
|
|
@@ -1927,15 +1936,15 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1927
1936
|
"aria-hidden": "true"
|
|
1928
1937
|
}), q]
|
|
1929
1938
|
}),
|
|
1930
|
-
N.allowAirplay &&
|
|
1939
|
+
N.allowAirplay && er && /* @__PURE__ */ p("button", {
|
|
1931
1940
|
className: "sdk-desktop-hdr-btn",
|
|
1932
1941
|
onClick: (e) => {
|
|
1933
|
-
e.stopPropagation(),
|
|
1942
|
+
e.stopPropagation(), Kr();
|
|
1934
1943
|
},
|
|
1935
|
-
title:
|
|
1936
|
-
"aria-label":
|
|
1937
|
-
"aria-pressed":
|
|
1938
|
-
style: { color:
|
|
1944
|
+
title: nr ? `AirPlay to ${ir || "device"} — click to disconnect` : "AirPlay to device",
|
|
1945
|
+
"aria-label": nr ? `Stop AirPlay to ${ir || "device"}` : "AirPlay to device",
|
|
1946
|
+
"aria-pressed": nr,
|
|
1947
|
+
style: { color: nr ? h : "" },
|
|
1939
1948
|
children: /* @__PURE__ */ p(ue, {
|
|
1940
1949
|
size: 20,
|
|
1941
1950
|
"aria-hidden": "true"
|
|
@@ -1977,14 +1986,14 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1977
1986
|
className: "sdk-desktop-play-btn",
|
|
1978
1987
|
style: { pointerEvents: "auto" },
|
|
1979
1988
|
onClick: (e) => {
|
|
1980
|
-
e.stopPropagation(),
|
|
1989
|
+
e.stopPropagation(), jr();
|
|
1981
1990
|
},
|
|
1982
|
-
title:
|
|
1983
|
-
"aria-label":
|
|
1984
|
-
children:
|
|
1991
|
+
title: tn ? "Replay" : Zr ? "Pause" : "Play",
|
|
1992
|
+
"aria-label": tn ? "Replay" : Zr ? "Pause" : "Play",
|
|
1993
|
+
children: tn ? /* @__PURE__ */ p(Se, {
|
|
1985
1994
|
size: 38,
|
|
1986
1995
|
"aria-hidden": "true"
|
|
1987
|
-
}) :
|
|
1996
|
+
}) : Zr ? /* @__PURE__ */ p(ye, {
|
|
1988
1997
|
size: 38,
|
|
1989
1998
|
fill: "currentColor",
|
|
1990
1999
|
"aria-hidden": "true"
|
|
@@ -2034,19 +2043,19 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2034
2043
|
}), /* @__PURE__ */ p("div", {
|
|
2035
2044
|
className: "sdk-chapters-panel-list",
|
|
2036
2045
|
children: H.map((e, t) => {
|
|
2037
|
-
let n =
|
|
2046
|
+
let n = Ln.index === t;
|
|
2038
2047
|
return /* @__PURE__ */ m("div", {
|
|
2039
2048
|
role: "button",
|
|
2040
2049
|
tabIndex: 0,
|
|
2041
2050
|
className: `sdk-chapters-panel-item${n ? " active" : ""}`,
|
|
2042
2051
|
"aria-label": `${e.title}, ${Z(e.startTime)}${n ? ", current chapter" : ""}`,
|
|
2043
2052
|
"aria-current": n ? "true" : void 0,
|
|
2044
|
-
onClick: () =>
|
|
2045
|
-
onKeyDown:
|
|
2053
|
+
onClick: () => zr(e.startTime),
|
|
2054
|
+
onKeyDown: ri(() => zr(e.startTime)),
|
|
2046
2055
|
children: [/* @__PURE__ */ p("div", {
|
|
2047
2056
|
className: "sdk-chapters-panel-thumb",
|
|
2048
|
-
children:
|
|
2049
|
-
src:
|
|
2057
|
+
children: Un[t] || e.thumbnail ? /* @__PURE__ */ p("img", {
|
|
2058
|
+
src: Un[t] || e.thumbnail,
|
|
2050
2059
|
alt: "",
|
|
2051
2060
|
"aria-hidden": "true",
|
|
2052
2061
|
style: {
|
|
@@ -2088,7 +2097,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2088
2097
|
N.enableKeyMoments && G && H.length > 0 && qe === "strip" && /* @__PURE__ */ p("div", {
|
|
2089
2098
|
className: "sdk-desktop-chapters-strip",
|
|
2090
2099
|
children: H.map((e, t) => {
|
|
2091
|
-
let n =
|
|
2100
|
+
let n = Ln.index === t;
|
|
2092
2101
|
return /* @__PURE__ */ m("div", {
|
|
2093
2102
|
role: "button",
|
|
2094
2103
|
tabIndex: 0,
|
|
@@ -2096,14 +2105,14 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2096
2105
|
"aria-label": `${e.title}, ${Z(e.startTime)}${n ? ", current chapter" : ""}`,
|
|
2097
2106
|
"aria-current": n ? "true" : void 0,
|
|
2098
2107
|
onClick: (t) => {
|
|
2099
|
-
t.stopPropagation(),
|
|
2108
|
+
t.stopPropagation(), zr(e.startTime);
|
|
2100
2109
|
},
|
|
2101
|
-
onKeyDown:
|
|
2110
|
+
onKeyDown: ri(() => zr(e.startTime)),
|
|
2102
2111
|
children: [
|
|
2103
2112
|
/* @__PURE__ */ p("div", {
|
|
2104
2113
|
className: "sdk-desktop-chapter-thumb",
|
|
2105
|
-
children:
|
|
2106
|
-
src:
|
|
2114
|
+
children: Un[t] || e.thumbnail ? /* @__PURE__ */ p("img", {
|
|
2115
|
+
src: Un[t] || e.thumbnail,
|
|
2107
2116
|
alt: "",
|
|
2108
2117
|
"aria-hidden": "true",
|
|
2109
2118
|
style: {
|
|
@@ -2141,11 +2150,11 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2141
2150
|
"aria-valuetext": Y ? void 0 : `${Z(z(J === null ? P : J))} of ${Z(R)}`,
|
|
2142
2151
|
tabIndex: Y ? void 0 : 0,
|
|
2143
2152
|
className: `sdk-seekbar-container sdk-desktop-seekbar${Y ? " sdk-ad-mode" : ""}`,
|
|
2144
|
-
onMouseDown: Y ? void 0 :
|
|
2145
|
-
onMouseMove: Y ? void 0 :
|
|
2146
|
-
onMouseLeave: Y ? void 0 :
|
|
2147
|
-
onTouchStart: Y ? void 0 :
|
|
2148
|
-
onKeyDown: Y ? void 0 :
|
|
2153
|
+
onMouseDown: Y ? void 0 : Nr,
|
|
2154
|
+
onMouseMove: Y ? void 0 : qr,
|
|
2155
|
+
onMouseLeave: Y ? void 0 : Xr,
|
|
2156
|
+
onTouchStart: Y ? void 0 : Yr,
|
|
2157
|
+
onKeyDown: Y ? void 0 : ii,
|
|
2149
2158
|
style: { pointerEvents: Y ? "none" : void 0 },
|
|
2150
2159
|
children: Y ? /* @__PURE__ */ p("div", {
|
|
2151
2160
|
className: "sdk-ad-progress-fill",
|
|
@@ -2156,9 +2165,9 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2156
2165
|
}) : /* @__PURE__ */ m(f, { children: [
|
|
2157
2166
|
/* @__PURE__ */ p("div", {
|
|
2158
2167
|
className: "sdk-seekbar-buffered",
|
|
2159
|
-
style: { width: `${
|
|
2168
|
+
style: { width: `${zt ? (A && A.getBufferedRanges()[0]?.end || 0) / zt * 100 : 0}%` }
|
|
2160
2169
|
}),
|
|
2161
|
-
R > 0 && I.filter((e) => !
|
|
2170
|
+
R > 0 && I.filter((e) => !on.has(e.startTime)).map((e, t) => /* @__PURE__ */ p("div", {
|
|
2162
2171
|
className: "sdk-seekbar-adbreak",
|
|
2163
2172
|
style: {
|
|
2164
2173
|
left: `${z(e.startTime) / R * 100}%`,
|
|
@@ -2168,7 +2177,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2168
2177
|
/* @__PURE__ */ p("div", {
|
|
2169
2178
|
className: "sdk-seekbar-progress",
|
|
2170
2179
|
style: {
|
|
2171
|
-
width: q ? `${
|
|
2180
|
+
width: q ? `${Qr > 0 ? Q / Qr * 100 : 0}%` : `${R ? z(J === null ? P : J) / R * 100 : 0}%`,
|
|
2172
2181
|
background: "#ffffff",
|
|
2173
2182
|
boxShadow: "none"
|
|
2174
2183
|
},
|
|
@@ -2178,14 +2187,14 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2178
2187
|
className: "sdk-seekbar-chapter-marker sdk-desktop-chapter-dot",
|
|
2179
2188
|
style: { left: `${z(e.startTime) / R * 100}%` }
|
|
2180
2189
|
}, t)),
|
|
2181
|
-
|
|
2190
|
+
or !== null && fr && /* @__PURE__ */ m("div", {
|
|
2182
2191
|
className: "sdk-thumbnail-tooltip",
|
|
2183
|
-
style: { left: `${
|
|
2192
|
+
style: { left: `${cr}px` },
|
|
2184
2193
|
children: [
|
|
2185
2194
|
/* @__PURE__ */ p("div", {
|
|
2186
2195
|
className: "sdk-thumbnail-preview",
|
|
2187
2196
|
children: /* @__PURE__ */ p("img", {
|
|
2188
|
-
src:
|
|
2197
|
+
src: fr,
|
|
2189
2198
|
alt: "preview",
|
|
2190
2199
|
style: {
|
|
2191
2200
|
width: "100%",
|
|
@@ -2196,13 +2205,13 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2196
2205
|
}
|
|
2197
2206
|
})
|
|
2198
2207
|
}),
|
|
2199
|
-
|
|
2208
|
+
mr && /* @__PURE__ */ p("div", {
|
|
2200
2209
|
className: "sdk-thumbnail-chapter-name",
|
|
2201
|
-
children:
|
|
2210
|
+
children: mr.title
|
|
2202
2211
|
}),
|
|
2203
2212
|
/* @__PURE__ */ p("div", {
|
|
2204
2213
|
className: "sdk-thumbnail-time-label",
|
|
2205
|
-
children: Z(z(
|
|
2214
|
+
children: Z(z(ur))
|
|
2206
2215
|
})
|
|
2207
2216
|
]
|
|
2208
2217
|
})
|
|
@@ -2214,31 +2223,31 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2214
2223
|
className: "sdk-desktop-left-controls",
|
|
2215
2224
|
children: [!Y && /* @__PURE__ */ p("div", {
|
|
2216
2225
|
className: "sdk-time-display",
|
|
2217
|
-
children: q ? `${Z(Q)} / ${Z(
|
|
2226
|
+
children: q ? `${Z(Q)} / ${Z(Qr)}` : `${Z(z(J === null ? P : J))} / ${Z(R)}`
|
|
2218
2227
|
}), Je === "slider" && /* @__PURE__ */ m("div", {
|
|
2219
2228
|
className: "sdk-volume-control",
|
|
2220
2229
|
children: [/* @__PURE__ */ p("button", {
|
|
2221
2230
|
className: "sdk-desktop-icon-btn",
|
|
2222
2231
|
onClick: (e) => {
|
|
2223
|
-
e.stopPropagation(),
|
|
2232
|
+
e.stopPropagation(), Pr();
|
|
2224
2233
|
},
|
|
2225
|
-
title:
|
|
2226
|
-
"aria-label":
|
|
2227
|
-
"aria-pressed":
|
|
2228
|
-
children:
|
|
2234
|
+
title: ei ? "Unmute" : "Mute",
|
|
2235
|
+
"aria-label": ei ? "Unmute" : "Mute",
|
|
2236
|
+
"aria-pressed": ei,
|
|
2237
|
+
children: ni()
|
|
2229
2238
|
}), /* @__PURE__ */ p("input", {
|
|
2230
2239
|
type: "range",
|
|
2231
2240
|
className: "sdk-volume-slider",
|
|
2232
2241
|
min: 0,
|
|
2233
2242
|
max: 1,
|
|
2234
2243
|
step: .02,
|
|
2235
|
-
value:
|
|
2244
|
+
value: ei ? 0 : $r,
|
|
2236
2245
|
"aria-label": "Volume",
|
|
2237
|
-
"aria-valuetext":
|
|
2238
|
-
style: { "--vol-pct": Math.round((
|
|
2246
|
+
"aria-valuetext": ei ? "Muted" : `${Math.round($r * 100)}%`,
|
|
2247
|
+
style: { "--vol-pct": Math.round((ei ? 0 : $r) * 100) },
|
|
2239
2248
|
onChange: (e) => {
|
|
2240
2249
|
let t = parseFloat(e.target.value);
|
|
2241
|
-
q ? (A?.casting.remoteSetVolume(t), t > 0 && A?.casting.remoteSetMute(!1)) : (A?.setVolume(t), t > 0 &&
|
|
2250
|
+
q ? (A?.casting.remoteSetVolume(t), t > 0 && A?.casting.remoteSetMute(!1)) : (A?.setVolume(t), t > 0 && Ut && A?.setMute(!1));
|
|
2242
2251
|
},
|
|
2243
2252
|
onClick: (e) => e.stopPropagation()
|
|
2244
2253
|
})]
|
|
@@ -2249,7 +2258,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2249
2258
|
N.enableKeyMoments && H.length > 0 && !Y && /* @__PURE__ */ p("button", {
|
|
2250
2259
|
className: `sdk-desktop-icon-btn${G ? " active" : ""}`,
|
|
2251
2260
|
onClick: (e) => {
|
|
2252
|
-
e.stopPropagation(),
|
|
2261
|
+
e.stopPropagation(), Hn(!G);
|
|
2253
2262
|
},
|
|
2254
2263
|
title: "Key Moments",
|
|
2255
2264
|
"aria-label": G ? "Hide chapters" : "Show chapters",
|
|
@@ -2259,12 +2268,12 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2259
2268
|
"aria-hidden": "true"
|
|
2260
2269
|
})
|
|
2261
2270
|
}),
|
|
2262
|
-
N.enableSubtitles && !Y &&
|
|
2271
|
+
N.enableSubtitles && !Y && jn.some((e) => !e.isNative) && /* @__PURE__ */ m("div", {
|
|
2263
2272
|
className: "sdk-menu-container",
|
|
2264
2273
|
children: [/* @__PURE__ */ p("button", {
|
|
2265
2274
|
className: `sdk-desktop-icon-btn${V === "off" ? "" : " active"}`,
|
|
2266
2275
|
onClick: (e) => {
|
|
2267
|
-
e.stopPropagation(),
|
|
2276
|
+
e.stopPropagation(), ai("subtitles");
|
|
2268
2277
|
},
|
|
2269
2278
|
title: "Captions",
|
|
2270
2279
|
"aria-label": "Captions",
|
|
@@ -2275,7 +2284,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2275
2284
|
"aria-hidden": "true"
|
|
2276
2285
|
})
|
|
2277
2286
|
}), U === "subtitles" && /* @__PURE__ */ m("div", {
|
|
2278
|
-
ref:
|
|
2287
|
+
ref: oi,
|
|
2279
2288
|
className: "sdk-dropup-menu",
|
|
2280
2289
|
role: "listbox",
|
|
2281
2290
|
"aria-label": "Captions",
|
|
@@ -2290,21 +2299,21 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2290
2299
|
"aria-selected": V === "off",
|
|
2291
2300
|
tabIndex: 0,
|
|
2292
2301
|
className: `sdk-dropup-item ${V === "off" ? "active" : ""}`,
|
|
2293
|
-
onClick: () =>
|
|
2294
|
-
onKeyDown: $(() =>
|
|
2302
|
+
onClick: () => Lr("off"),
|
|
2303
|
+
onKeyDown: $(() => Lr("off")),
|
|
2295
2304
|
children: [/* @__PURE__ */ p("span", { children: "Off" }), V === "off" && /* @__PURE__ */ p(_, {
|
|
2296
2305
|
size: 12,
|
|
2297
2306
|
"aria-hidden": "true"
|
|
2298
2307
|
})]
|
|
2299
2308
|
}),
|
|
2300
|
-
|
|
2309
|
+
jn.map((e) => /* @__PURE__ */ m("div", {
|
|
2301
2310
|
role: "option",
|
|
2302
2311
|
"aria-selected": V === e.id,
|
|
2303
2312
|
tabIndex: 0,
|
|
2304
2313
|
className: `sdk-dropup-item ${V === e.id ? "active" : ""}`,
|
|
2305
|
-
onClick: () =>
|
|
2306
|
-
onKeyDown: $(() =>
|
|
2307
|
-
children: [/* @__PURE__ */ p("span", { children:
|
|
2314
|
+
onClick: () => Lr(e.id),
|
|
2315
|
+
onKeyDown: $(() => Lr(e.id)),
|
|
2316
|
+
children: [/* @__PURE__ */ p("span", { children: b(e) }), V === e.id && /* @__PURE__ */ p(_, {
|
|
2308
2317
|
size: 12,
|
|
2309
2318
|
"aria-hidden": "true"
|
|
2310
2319
|
})]
|
|
@@ -2312,12 +2321,12 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2312
2321
|
]
|
|
2313
2322
|
})]
|
|
2314
2323
|
}),
|
|
2315
|
-
N.allowMultipleAudio &&
|
|
2324
|
+
N.allowMultipleAudio && Nn.length > 1 && !Y && /* @__PURE__ */ m("div", {
|
|
2316
2325
|
className: "sdk-menu-container",
|
|
2317
2326
|
children: [/* @__PURE__ */ p("button", {
|
|
2318
2327
|
className: `sdk-desktop-icon-btn${U === "audio" ? " active" : ""}`,
|
|
2319
2328
|
onClick: (e) => {
|
|
2320
|
-
e.stopPropagation(),
|
|
2329
|
+
e.stopPropagation(), ai("audio");
|
|
2321
2330
|
},
|
|
2322
2331
|
title: "Audio Track",
|
|
2323
2332
|
"aria-label": "Audio track",
|
|
@@ -2328,7 +2337,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2328
2337
|
"aria-hidden": "true"
|
|
2329
2338
|
})
|
|
2330
2339
|
}), U === "audio" && /* @__PURE__ */ m("div", {
|
|
2331
|
-
ref:
|
|
2340
|
+
ref: oi,
|
|
2332
2341
|
className: "sdk-dropup-menu",
|
|
2333
2342
|
role: "listbox",
|
|
2334
2343
|
"aria-label": "Audio track",
|
|
@@ -2336,18 +2345,18 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2336
2345
|
className: "sdk-dropup-header",
|
|
2337
2346
|
"aria-hidden": "true",
|
|
2338
2347
|
children: "Audio Track"
|
|
2339
|
-
}),
|
|
2348
|
+
}), Nn.map((e) => /* @__PURE__ */ m("div", {
|
|
2340
2349
|
role: "option",
|
|
2341
|
-
"aria-selected":
|
|
2350
|
+
"aria-selected": Fn === e.id,
|
|
2342
2351
|
tabIndex: 0,
|
|
2343
|
-
className: `sdk-dropup-item ${
|
|
2352
|
+
className: `sdk-dropup-item ${Fn === e.id ? "active" : ""}`,
|
|
2344
2353
|
onClick: () => {
|
|
2345
|
-
A?.setAudioTrack(e.id),
|
|
2354
|
+
A?.setAudioTrack(e.id), In(e.id), W("none"), K(`Audio: ${b(e)}`);
|
|
2346
2355
|
},
|
|
2347
2356
|
onKeyDown: $(() => {
|
|
2348
|
-
A?.setAudioTrack(e.id),
|
|
2357
|
+
A?.setAudioTrack(e.id), In(e.id), W("none"), K(`Audio: ${b(e)}`);
|
|
2349
2358
|
}),
|
|
2350
|
-
children: [/* @__PURE__ */ p("span", { children:
|
|
2359
|
+
children: [/* @__PURE__ */ p("span", { children: b(e) }), Fn === e.id && /* @__PURE__ */ p(_, {
|
|
2351
2360
|
size: 12,
|
|
2352
2361
|
"aria-hidden": "true"
|
|
2353
2362
|
})]
|
|
@@ -2359,7 +2368,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2359
2368
|
children: [/* @__PURE__ */ p("button", {
|
|
2360
2369
|
className: `sdk-desktop-icon-btn${U === "speed" ? " active" : ""}`,
|
|
2361
2370
|
onClick: (e) => {
|
|
2362
|
-
e.stopPropagation(),
|
|
2371
|
+
e.stopPropagation(), ai("speed");
|
|
2363
2372
|
},
|
|
2364
2373
|
title: "Playback Speed",
|
|
2365
2374
|
"aria-label": "Playback speed",
|
|
@@ -2370,7 +2379,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2370
2379
|
"aria-hidden": "true"
|
|
2371
2380
|
})
|
|
2372
2381
|
}), U === "speed" && /* @__PURE__ */ m("div", {
|
|
2373
|
-
ref:
|
|
2382
|
+
ref: oi,
|
|
2374
2383
|
className: "sdk-dropup-menu",
|
|
2375
2384
|
role: "listbox",
|
|
2376
2385
|
"aria-label": "Playback speed",
|
|
@@ -2387,12 +2396,12 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2387
2396
|
2
|
|
2388
2397
|
].map((e) => /* @__PURE__ */ m("div", {
|
|
2389
2398
|
role: "option",
|
|
2390
|
-
"aria-selected":
|
|
2399
|
+
"aria-selected": Bn === e,
|
|
2391
2400
|
tabIndex: 0,
|
|
2392
|
-
className: `sdk-dropup-item ${
|
|
2393
|
-
onClick: () =>
|
|
2394
|
-
onKeyDown: $(() =>
|
|
2395
|
-
children: [/* @__PURE__ */ p("span", { children: e === 1 ? "Normal" : `${e}x` }),
|
|
2401
|
+
className: `sdk-dropup-item ${Bn === e ? "active" : ""}`,
|
|
2402
|
+
onClick: () => Fr(e),
|
|
2403
|
+
onKeyDown: $(() => Fr(e)),
|
|
2404
|
+
children: [/* @__PURE__ */ p("span", { children: e === 1 ? "Normal" : `${e}x` }), Bn === e && /* @__PURE__ */ p(_, {
|
|
2396
2405
|
size: 12,
|
|
2397
2406
|
"aria-hidden": "true"
|
|
2398
2407
|
})]
|
|
@@ -2402,20 +2411,20 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2402
2411
|
N.enableQuality && !Y && /* @__PURE__ */ m("div", {
|
|
2403
2412
|
className: "sdk-menu-container",
|
|
2404
2413
|
children: [/* @__PURE__ */ p("button", {
|
|
2405
|
-
className: `sdk-desktop-icon-btn${
|
|
2414
|
+
className: `sdk-desktop-icon-btn${En.id === -1 ? "" : " active"}`,
|
|
2406
2415
|
onClick: (e) => {
|
|
2407
|
-
e.stopPropagation(),
|
|
2416
|
+
e.stopPropagation(), ai("quality");
|
|
2408
2417
|
},
|
|
2409
2418
|
title: "Quality",
|
|
2410
2419
|
"aria-label": "Video quality",
|
|
2411
2420
|
"aria-haspopup": "listbox",
|
|
2412
2421
|
"aria-expanded": U === "quality",
|
|
2413
|
-
children: /* @__PURE__ */ p(
|
|
2422
|
+
children: /* @__PURE__ */ p(Ne, {
|
|
2414
2423
|
size: 20,
|
|
2415
2424
|
"aria-hidden": "true"
|
|
2416
2425
|
})
|
|
2417
2426
|
}), U === "quality" && /* @__PURE__ */ m("div", {
|
|
2418
|
-
ref:
|
|
2427
|
+
ref: oi,
|
|
2419
2428
|
className: "sdk-dropup-menu large",
|
|
2420
2429
|
role: "listbox",
|
|
2421
2430
|
"aria-label": "Video quality",
|
|
@@ -2423,26 +2432,26 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2423
2432
|
className: "sdk-dropup-header",
|
|
2424
2433
|
"aria-hidden": "true",
|
|
2425
2434
|
children: "Quality"
|
|
2426
|
-
}),
|
|
2435
|
+
}), wn.map((e) => /* @__PURE__ */ m("div", {
|
|
2427
2436
|
role: "option",
|
|
2428
|
-
"aria-selected":
|
|
2437
|
+
"aria-selected": En.id === e.id,
|
|
2429
2438
|
tabIndex: 0,
|
|
2430
|
-
className: `sdk-dropup-item ${
|
|
2431
|
-
onClick: () =>
|
|
2432
|
-
onKeyDown: $(() =>
|
|
2433
|
-
children: [/* @__PURE__ */ p("span", { children: e.label }),
|
|
2439
|
+
className: `sdk-dropup-item ${En.id === e.id ? "active" : ""}`,
|
|
2440
|
+
onClick: () => Ir(e.id),
|
|
2441
|
+
onKeyDown: $(() => Ir(e.id)),
|
|
2442
|
+
children: [/* @__PURE__ */ p("span", { children: e.label }), En.id === e.id && /* @__PURE__ */ p(_, {
|
|
2434
2443
|
size: 12,
|
|
2435
2444
|
"aria-hidden": "true"
|
|
2436
2445
|
})]
|
|
2437
2446
|
}, e.id))]
|
|
2438
2447
|
})]
|
|
2439
2448
|
}),
|
|
2440
|
-
|
|
2449
|
+
et && et.length > 1 && !Y && /* @__PURE__ */ m("div", {
|
|
2441
2450
|
className: "sdk-menu-container",
|
|
2442
2451
|
children: [/* @__PURE__ */ p("button", {
|
|
2443
2452
|
className: `sdk-desktop-icon-btn${U === "sources" ? " active" : ""}`,
|
|
2444
2453
|
onClick: (e) => {
|
|
2445
|
-
e.stopPropagation(),
|
|
2454
|
+
e.stopPropagation(), ai("sources");
|
|
2446
2455
|
},
|
|
2447
2456
|
title: "Select Source",
|
|
2448
2457
|
"aria-label": "Select source",
|
|
@@ -2453,7 +2462,7 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2453
2462
|
"aria-hidden": "true"
|
|
2454
2463
|
})
|
|
2455
2464
|
}), U === "sources" && /* @__PURE__ */ m("div", {
|
|
2456
|
-
ref:
|
|
2465
|
+
ref: oi,
|
|
2457
2466
|
className: "sdk-dropup-menu",
|
|
2458
2467
|
role: "listbox",
|
|
2459
2468
|
"aria-label": "Select source",
|
|
@@ -2461,14 +2470,14 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2461
2470
|
className: "sdk-dropup-header",
|
|
2462
2471
|
"aria-hidden": "true",
|
|
2463
2472
|
children: "Source"
|
|
2464
|
-
}),
|
|
2473
|
+
}), et.map((e, t) => /* @__PURE__ */ m("div", {
|
|
2465
2474
|
role: "option",
|
|
2466
|
-
"aria-selected":
|
|
2475
|
+
"aria-selected": tt === t,
|
|
2467
2476
|
tabIndex: 0,
|
|
2468
|
-
className: `sdk-dropup-item ${
|
|
2469
|
-
onClick: () =>
|
|
2470
|
-
onKeyDown: $(() =>
|
|
2471
|
-
children: [/* @__PURE__ */ p("span", { children: e.label }),
|
|
2477
|
+
className: `sdk-dropup-item ${tt === t ? "active" : ""}`,
|
|
2478
|
+
onClick: () => Rr(t),
|
|
2479
|
+
onKeyDown: $(() => Rr(t)),
|
|
2480
|
+
children: [/* @__PURE__ */ p("span", { children: e.label }), tt === t && /* @__PURE__ */ p(_, {
|
|
2472
2481
|
size: 12,
|
|
2473
2482
|
"aria-hidden": "true"
|
|
2474
2483
|
})]
|
|
@@ -2476,13 +2485,13 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2476
2485
|
})]
|
|
2477
2486
|
}),
|
|
2478
2487
|
N.enablePiP && !Y && /* @__PURE__ */ p("button", {
|
|
2479
|
-
className: `sdk-desktop-icon-btn${
|
|
2488
|
+
className: `sdk-desktop-icon-btn${$t ? " active" : ""}`,
|
|
2480
2489
|
onClick: (e) => {
|
|
2481
|
-
e.stopPropagation(),
|
|
2490
|
+
e.stopPropagation(), Br();
|
|
2482
2491
|
},
|
|
2483
2492
|
title: "Picture-in-Picture",
|
|
2484
|
-
"aria-label":
|
|
2485
|
-
"aria-pressed":
|
|
2493
|
+
"aria-label": $t ? "Exit picture-in-picture" : "Enter picture-in-picture",
|
|
2494
|
+
"aria-pressed": $t,
|
|
2486
2495
|
children: /* @__PURE__ */ p(be, {
|
|
2487
2496
|
size: 20,
|
|
2488
2497
|
"aria-hidden": "true"
|
|
@@ -2491,22 +2500,22 @@ var ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2491
2500
|
Je === "button" && /* @__PURE__ */ p("button", {
|
|
2492
2501
|
className: "sdk-desktop-icon-btn",
|
|
2493
2502
|
onClick: (e) => {
|
|
2494
|
-
e.stopPropagation(),
|
|
2503
|
+
e.stopPropagation(), Pr();
|
|
2495
2504
|
},
|
|
2496
|
-
title:
|
|
2497
|
-
"aria-label":
|
|
2498
|
-
"aria-pressed":
|
|
2499
|
-
children:
|
|
2505
|
+
title: ei ? "Unmute" : "Mute",
|
|
2506
|
+
"aria-label": ei ? "Unmute" : "Mute",
|
|
2507
|
+
"aria-pressed": ei,
|
|
2508
|
+
children: ni()
|
|
2500
2509
|
}),
|
|
2501
2510
|
Be && /* @__PURE__ */ p("button", {
|
|
2502
2511
|
className: "sdk-desktop-icon-btn",
|
|
2503
2512
|
onClick: (e) => {
|
|
2504
|
-
e.stopPropagation(),
|
|
2513
|
+
e.stopPropagation(), Vr();
|
|
2505
2514
|
},
|
|
2506
|
-
title:
|
|
2507
|
-
"aria-label":
|
|
2508
|
-
"aria-pressed":
|
|
2509
|
-
children: p(
|
|
2515
|
+
title: qt || F ? "Exit fullscreen" : "Fullscreen",
|
|
2516
|
+
"aria-label": qt || F ? "Exit fullscreen" : "Enter fullscreen",
|
|
2517
|
+
"aria-pressed": qt || F,
|
|
2518
|
+
children: p(qt ? ve : _e, {
|
|
2510
2519
|
size: 20,
|
|
2511
2520
|
"aria-hidden": "true"
|
|
2512
2521
|
})
|
|
@@ -2640,14 +2649,14 @@ function qe(e) {
|
|
|
2640
2649
|
};
|
|
2641
2650
|
}
|
|
2642
2651
|
var Je = 3e4;
|
|
2643
|
-
function
|
|
2652
|
+
function Ye({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i = "#6366f1", firebaseConfig: a, proxyDomains: s, apiBaseUrl: l, adTrackingUrl: f, overlayAdUrl: ee, title: ne, watermark: re, autoplay: h = !1, muted: ie = !1, autoFullscreen: ae = !1, enableControls: oe = !0, enableSkipAd: se, skipAdAfterSeconds: ce, chaptersDisplayMode: le = "strip", volumeControlType: g = "slider", subtitleStyle: ue, drmConfig: de, onAnalyticsEvent: fe, onKeyMomentsLoaded: _, initialTime: pe, onTimeUpdate: me }) {
|
|
2644
2653
|
let [he, ge] = d([]), [_e, ve] = d(0), ye = Array.isArray(t) ? t : [{
|
|
2645
2654
|
label: "Default",
|
|
2646
2655
|
url: t
|
|
2647
|
-
}], be = ye[_e]?.url ?? ye[0]?.url ?? "", [xe, Se] = d("loading"), [Ce, we] = d(null), [Te, Ee] = d(0), [De, Oe] = d("network"), ke = u(null), Ae = u(!1), je = u(""), Me = u(!1), Ne = u(!1), v = u(null), Pe = u(0), y = u(null),
|
|
2656
|
+
}], be = ye[_e]?.url ?? ye[0]?.url ?? "", [xe, Se] = d("loading"), [Ce, we] = d(null), [Te, Ee] = d(0), [De, Oe] = d("network"), ke = u(null), Ae = u(!1), je = u(""), Me = u(!1), Ne = u(!1), v = u(null), Pe = u(0), y = u(null), b = u({
|
|
2648
2657
|
currentTime: 0,
|
|
2649
2658
|
duration: 0
|
|
2650
|
-
}),
|
|
2659
|
+
}), Fe = u(() => {}), Ie = be.split("/").filter(Boolean), Re = (Ie[Ie.length - 1] ?? "").replace(/\.m3u8.*$/, "") || "video", ze = o(() => qe(s), [s])();
|
|
2651
2660
|
c(() => {
|
|
2652
2661
|
document.documentElement.style.setProperty("--accent-indigo", i);
|
|
2653
2662
|
let e = i.replace("#", ""), t = "99, 102, 241";
|
|
@@ -2677,31 +2686,31 @@ function b({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i =
|
|
|
2677
2686
|
l,
|
|
2678
2687
|
Te
|
|
2679
2688
|
]);
|
|
2680
|
-
let
|
|
2689
|
+
let Ge = o(() => {
|
|
2681
2690
|
v.current && (clearTimeout(v.current), v.current = null, y.current !== null && (Pe.current += Date.now() - y.current, y.current = null));
|
|
2682
2691
|
}, []), Ye = o(() => {
|
|
2683
2692
|
v.current &&= (clearTimeout(v.current), null), Pe.current = 0, y.current = null;
|
|
2684
|
-
}, []),
|
|
2693
|
+
}, []), x = o(() => {
|
|
2685
2694
|
if (v.current || !je.current) return;
|
|
2686
2695
|
y.current = Date.now();
|
|
2687
2696
|
let t = Je - Pe.current;
|
|
2688
2697
|
v.current = setTimeout(() => {
|
|
2689
2698
|
v.current = null, Pe.current = 0, y.current = null;
|
|
2690
|
-
let { currentTime: t, duration: n } =
|
|
2691
|
-
console.log("[SDK] Heartbeat timer fired — 30s of real content elapsed"), He(e, je.current, t, n, l).catch((e) => console.warn("[SDK] Heartbeat failed:", e.message)),
|
|
2699
|
+
let { currentTime: t, duration: n } = b.current;
|
|
2700
|
+
console.log("[SDK] Heartbeat timer fired — 30s of real content elapsed"), He(e, je.current, t, n, l).catch((e) => console.warn("[SDK] Heartbeat failed:", e.message)), Fe.current();
|
|
2692
2701
|
}, t);
|
|
2693
2702
|
}, [e, l]);
|
|
2694
2703
|
c(() => {
|
|
2695
|
-
|
|
2696
|
-
}, [
|
|
2697
|
-
let
|
|
2704
|
+
Fe.current = x;
|
|
2705
|
+
}, [x]);
|
|
2706
|
+
let Xe = u(!0);
|
|
2698
2707
|
c(() => {
|
|
2699
|
-
if (
|
|
2700
|
-
|
|
2708
|
+
if (Xe.current) {
|
|
2709
|
+
Xe.current = !1;
|
|
2701
2710
|
return;
|
|
2702
2711
|
}
|
|
2703
|
-
Ne.current = !0,
|
|
2704
|
-
}, [_e,
|
|
2712
|
+
Ne.current = !0, Ge();
|
|
2713
|
+
}, [_e, Ge]), c(() => {
|
|
2705
2714
|
let t = () => {
|
|
2706
2715
|
je.current && (Ye(), We(e, je.current, l));
|
|
2707
2716
|
};
|
|
@@ -2713,23 +2722,23 @@ function b({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i =
|
|
|
2713
2722
|
l,
|
|
2714
2723
|
Ye
|
|
2715
2724
|
]);
|
|
2716
|
-
let
|
|
2725
|
+
let Ze = o((t) => {
|
|
2717
2726
|
let n = t;
|
|
2718
|
-
t.currentTime !== void 0 && (
|
|
2727
|
+
t.currentTime !== void 0 && (b.current = {
|
|
2719
2728
|
currentTime: t.currentTime,
|
|
2720
2729
|
duration: t.duration
|
|
2721
|
-
}), t.eventType === "session_start" && !Me.current && (Me.current = !0, je.current = typeof n.sessionId == "string" ? n.sessionId : "", Ve(e, je.current,
|
|
2730
|
+
}), t.eventType === "session_start" && !Me.current && (Me.current = !0, je.current = typeof n.sessionId == "string" ? n.sessionId : "", Ve(e, je.current, Re, l).catch((e) => console.warn("[SDK] Session start failed:", e.message)), Ae.current || x()), t.eventType === "play" && Me.current && !Ae.current && !Ne.current && x(), t.eventType === "pause" && Ge(), t.eventType === "buffering_start" && Ge(), t.eventType === "buffering_end" && Me.current && !Ae.current && (Ne.current = !1, x()), t.eventType === "ended" && (Ye(), je.current && Ue(e, je.current).catch((e) => console.warn("[SDK] Session end failed:", e.message))), console.log("[SDK Analytics]", t), fe?.(t);
|
|
2722
2731
|
}, [
|
|
2723
2732
|
e,
|
|
2724
2733
|
l,
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2734
|
+
Re,
|
|
2735
|
+
x,
|
|
2736
|
+
Ge,
|
|
2728
2737
|
Ye,
|
|
2729
2738
|
fe
|
|
2730
|
-
]),
|
|
2731
|
-
Ae.current = e, e ? (
|
|
2732
|
-
}, [
|
|
2739
|
+
]), Qe = o((e) => {
|
|
2740
|
+
Ae.current = e, e ? (Ge(), console.log("[SDK] Ad break started — heartbeat timer paused")) : (Me.current && x(), console.log("[SDK] Ad break ended — heartbeat timer resumed"));
|
|
2741
|
+
}, [Ge, x]), $e = o((e) => {
|
|
2733
2742
|
ge(e), _?.(e);
|
|
2734
2743
|
}, [_]);
|
|
2735
2744
|
if (xe === "loading") return /* @__PURE__ */ m("div", {
|
|
@@ -2797,24 +2806,24 @@ function b({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i =
|
|
|
2797
2806
|
drmConfig: de,
|
|
2798
2807
|
overlayAdUrl: ee,
|
|
2799
2808
|
adTrackingUrl: f,
|
|
2800
|
-
urlTransformer:
|
|
2801
|
-
onAnalyticsEvent:
|
|
2802
|
-
onAdBreakChange:
|
|
2803
|
-
onKeyMomentsLoaded:
|
|
2809
|
+
urlTransformer: ze,
|
|
2810
|
+
onAnalyticsEvent: Ze,
|
|
2811
|
+
onAdBreakChange: Qe,
|
|
2812
|
+
onKeyMomentsLoaded: $e,
|
|
2804
2813
|
initialTime: pe,
|
|
2805
2814
|
onTimeUpdate: me
|
|
2806
2815
|
});
|
|
2807
2816
|
}
|
|
2808
2817
|
//#endregion
|
|
2809
2818
|
//#region src/create-player.ts
|
|
2810
|
-
function
|
|
2819
|
+
function x(e, t) {
|
|
2811
2820
|
let n = ee(e), r = t;
|
|
2812
|
-
return n.render(i(
|
|
2821
|
+
return n.render(i(Ye, r)), {
|
|
2813
2822
|
update(e) {
|
|
2814
2823
|
r = {
|
|
2815
2824
|
...r,
|
|
2816
2825
|
...e
|
|
2817
|
-
}, n.render(i(
|
|
2826
|
+
}, n.render(i(Ye, r));
|
|
2818
2827
|
},
|
|
2819
2828
|
destroy() {
|
|
2820
2829
|
n.unmount();
|
|
@@ -2822,6 +2831,6 @@ function Ye(e, t) {
|
|
|
2822
2831
|
};
|
|
2823
2832
|
}
|
|
2824
2833
|
//#endregion
|
|
2825
|
-
export {
|
|
2834
|
+
export { Ye as BossVideoPlayer, e as FirebaseAnalyticsProvider, t as VideoPlayerSDK, Le as WebVideoPlayer, x as createPlayer, Ue as endSession, Be as initSdk, He as sendHeartbeat, Ve as startSession };
|
|
2826
2835
|
|
|
2827
2836
|
//# sourceMappingURL=index.js.map
|