boss-web-player-sdk 1.1.19 → 1.1.21
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 +1 -1
- package/dist/boss-web-player-sdk.css +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +5 -17
- package/dist/core.js +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +46 -24
- package/dist/index.js +914 -817
- package/dist/index.js.map +1 -1
- package/dist/{src-IKWezLNW.js → src-B8eoxemB.js} +13 -12
- package/dist/{src-IKWezLNW.js.map → src-B8eoxemB.js.map} +1 -1
- package/dist/{src-Blzb5K-0.cjs → src-BXp0h90r.cjs} +5 -5
- package/dist/{src-Blzb5K-0.cjs.map → src-BXp0h90r.cjs.map} +1 -1
- package/package.json +1 -1
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-B8eoxemB.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 { createPortal as ee } from "react-dom";
|
|
4
4
|
import { Fragment as te, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
@@ -100,10 +100,10 @@ function re({ title: e = "Something Went Wrong", subtitle: t = "We encountered a
|
|
|
100
100
|
}
|
|
101
101
|
//#endregion
|
|
102
102
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
|
|
103
|
-
var
|
|
104
|
-
let t =
|
|
103
|
+
var m = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), ie = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), h = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), ae = (e) => {
|
|
104
|
+
let t = h(e);
|
|
105
105
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
106
|
-
},
|
|
106
|
+
}, oe = {
|
|
107
107
|
xmlns: "http://www.w3.org/2000/svg",
|
|
108
108
|
width: 24,
|
|
109
109
|
height: 24,
|
|
@@ -113,37 +113,37 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
113
113
|
strokeWidth: 2,
|
|
114
114
|
strokeLinecap: "round",
|
|
115
115
|
strokeLinejoin: "round"
|
|
116
|
-
},
|
|
116
|
+
}, se = (e) => {
|
|
117
117
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
118
118
|
return !1;
|
|
119
|
-
},
|
|
120
|
-
let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: ee = !1, color: te = "currentColor", className: f = "" } =
|
|
119
|
+
}, ce = r({}), le = () => s(ce), ue = a(({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: a = "", children: o, iconNode: s, ...c }, l) => {
|
|
120
|
+
let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: ee = !1, color: te = "currentColor", className: f = "" } = le() ?? {}, p = r ?? ee ? Number(n ?? d) * 24 / Number(t ?? u) : n ?? d;
|
|
121
121
|
return i("svg", {
|
|
122
122
|
ref: l,
|
|
123
|
-
...
|
|
124
|
-
width: t ?? u ??
|
|
125
|
-
height: t ?? u ??
|
|
123
|
+
...oe,
|
|
124
|
+
width: t ?? u ?? oe.width,
|
|
125
|
+
height: t ?? u ?? oe.height,
|
|
126
126
|
stroke: e ?? te,
|
|
127
127
|
strokeWidth: p,
|
|
128
|
-
className:
|
|
129
|
-
...!o && !
|
|
128
|
+
className: m("lucide", f, a),
|
|
129
|
+
...!o && !se(c) && { "aria-hidden": "true" },
|
|
130
130
|
...c
|
|
131
131
|
}, [...s.map(([e, t]) => i(e, t)), ...Array.isArray(o) ? o : [o]]);
|
|
132
|
-
}),
|
|
133
|
-
let n = a(({ className: n, ...r }, a) => i(
|
|
132
|
+
}), g = (e, t) => {
|
|
133
|
+
let n = a(({ className: n, ...r }, a) => i(ue, {
|
|
134
134
|
ref: a,
|
|
135
135
|
iconNode: t,
|
|
136
|
-
className:
|
|
136
|
+
className: m(`lucide-${ie(ae(e))}`, `lucide-${e}`, n),
|
|
137
137
|
...r
|
|
138
138
|
}));
|
|
139
|
-
return n.displayName =
|
|
140
|
-
},
|
|
139
|
+
return n.displayName = ae(e), n;
|
|
140
|
+
}, de = g("airplay", [["path", {
|
|
141
141
|
d: "M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1",
|
|
142
142
|
key: "ns4c3b"
|
|
143
143
|
}], ["path", {
|
|
144
144
|
d: "m12 15 5 6H7Z",
|
|
145
145
|
key: "14qnn2"
|
|
146
|
-
}]]),
|
|
146
|
+
}]]), fe = g("captions", [["rect", {
|
|
147
147
|
width: "18",
|
|
148
148
|
height: "14",
|
|
149
149
|
x: "3",
|
|
@@ -154,7 +154,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
154
154
|
}], ["path", {
|
|
155
155
|
d: "M7 15h4M15 15h2M7 11h2M13 11h4",
|
|
156
156
|
key: "1ueiar"
|
|
157
|
-
}]]),
|
|
157
|
+
}]]), pe = g("cast", [
|
|
158
158
|
["path", {
|
|
159
159
|
d: "M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6",
|
|
160
160
|
key: "3zrzxg"
|
|
@@ -174,13 +174,13 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
174
174
|
y2: "20",
|
|
175
175
|
key: "xu2jvo"
|
|
176
176
|
}]
|
|
177
|
-
]),
|
|
177
|
+
]), _ = g("check", [["path", {
|
|
178
178
|
d: "M20 6 9 17l-5-5",
|
|
179
179
|
key: "1gmf2c"
|
|
180
|
-
}]]),
|
|
180
|
+
}]]), me = g("chevron-left", [["path", {
|
|
181
181
|
d: "m15 18-6-6 6-6",
|
|
182
182
|
key: "1wnfg3"
|
|
183
|
-
}]]),
|
|
183
|
+
}]]), he = g("external-link", [
|
|
184
184
|
["path", {
|
|
185
185
|
d: "M15 3h6v6",
|
|
186
186
|
key: "1q9fwt"
|
|
@@ -193,13 +193,13 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
193
193
|
d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",
|
|
194
194
|
key: "a6xqqp"
|
|
195
195
|
}]
|
|
196
|
-
]),
|
|
196
|
+
]), ge = g("gauge", [["path", {
|
|
197
197
|
d: "m12 14 4-4",
|
|
198
198
|
key: "9kzdfg"
|
|
199
199
|
}], ["path", {
|
|
200
200
|
d: "M3.34 19a10 10 0 1 1 17.32 0",
|
|
201
201
|
key: "19p75a"
|
|
202
|
-
}]]),
|
|
202
|
+
}]]), _e = g("languages", [
|
|
203
203
|
["path", {
|
|
204
204
|
d: "m5 8 6 6",
|
|
205
205
|
key: "1wu5hv"
|
|
@@ -224,7 +224,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
224
224
|
d: "M14 18h6",
|
|
225
225
|
key: "1m8k6r"
|
|
226
226
|
}]
|
|
227
|
-
]),
|
|
227
|
+
]), ve = g("list-video", [
|
|
228
228
|
["path", {
|
|
229
229
|
d: "M21 5H3",
|
|
230
230
|
key: "1fi0y6"
|
|
@@ -241,7 +241,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
241
241
|
d: "M15 12.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997a1 1 0 0 1-1.517-.86z",
|
|
242
242
|
key: "ms4nik"
|
|
243
243
|
}]
|
|
244
|
-
]),
|
|
244
|
+
]), ye = g("maximize", [
|
|
245
245
|
["path", {
|
|
246
246
|
d: "M8 3H5a2 2 0 0 0-2 2v3",
|
|
247
247
|
key: "1dcmit"
|
|
@@ -258,7 +258,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
258
258
|
d: "M16 21h3a2 2 0 0 0 2-2v-3",
|
|
259
259
|
key: "18trek"
|
|
260
260
|
}]
|
|
261
|
-
]),
|
|
261
|
+
]), be = g("minimize", [
|
|
262
262
|
["path", {
|
|
263
263
|
d: "M8 3v3a2 2 0 0 1-2 2H3",
|
|
264
264
|
key: "hohbtr"
|
|
@@ -275,7 +275,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
275
275
|
d: "M16 21v-3a2 2 0 0 1 2-2h3",
|
|
276
276
|
key: "ph8mxp"
|
|
277
277
|
}]
|
|
278
|
-
]),
|
|
278
|
+
]), v = g("pause", [["rect", {
|
|
279
279
|
x: "14",
|
|
280
280
|
y: "3",
|
|
281
281
|
width: "5",
|
|
@@ -289,7 +289,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
289
289
|
height: "18",
|
|
290
290
|
rx: "1",
|
|
291
291
|
key: "1wsw3u"
|
|
292
|
-
}]]),
|
|
292
|
+
}]]), xe = g("picture-in-picture", [
|
|
293
293
|
["path", {
|
|
294
294
|
d: "M2 10h6V4",
|
|
295
295
|
key: "zwrco"
|
|
@@ -314,28 +314,28 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
314
314
|
rx: "1",
|
|
315
315
|
key: "1wjs3o"
|
|
316
316
|
}]
|
|
317
|
-
]),
|
|
317
|
+
]), Se = g("play", [["path", {
|
|
318
318
|
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
|
319
319
|
key: "10ikf1"
|
|
320
|
-
}]]),
|
|
320
|
+
}]]), Ce = g("rotate-ccw", [["path", {
|
|
321
321
|
d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
|
|
322
322
|
key: "1357e3"
|
|
323
323
|
}], ["path", {
|
|
324
324
|
d: "M3 3v5h5",
|
|
325
325
|
key: "1xhq8a"
|
|
326
|
-
}]]),
|
|
326
|
+
}]]), we = g("rotate-cw", [["path", {
|
|
327
327
|
d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",
|
|
328
328
|
key: "1p45f6"
|
|
329
329
|
}], ["path", {
|
|
330
330
|
d: "M21 3v5h-5",
|
|
331
331
|
key: "1q7to0"
|
|
332
|
-
}]]),
|
|
332
|
+
}]]), Te = g("volume-1", [["path", {
|
|
333
333
|
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",
|
|
334
334
|
key: "uqj9uw"
|
|
335
335
|
}], ["path", {
|
|
336
336
|
d: "M16 9a5 5 0 0 1 0 6",
|
|
337
337
|
key: "1q6k2b"
|
|
338
|
-
}]]),
|
|
338
|
+
}]]), Ee = g("volume-2", [
|
|
339
339
|
["path", {
|
|
340
340
|
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",
|
|
341
341
|
key: "uqj9uw"
|
|
@@ -348,7 +348,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
348
348
|
d: "M19.364 18.364a9 9 0 0 0 0-12.728",
|
|
349
349
|
key: "ijwkga"
|
|
350
350
|
}]
|
|
351
|
-
]),
|
|
351
|
+
]), De = g("volume-x", [
|
|
352
352
|
["path", {
|
|
353
353
|
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",
|
|
354
354
|
key: "uqj9uw"
|
|
@@ -367,15 +367,15 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
367
367
|
y2: "15",
|
|
368
368
|
key: "5ykzw1"
|
|
369
369
|
}]
|
|
370
|
-
]),
|
|
370
|
+
]), Oe = g("volume", [["path", {
|
|
371
371
|
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",
|
|
372
372
|
key: "uqj9uw"
|
|
373
|
-
}]]),
|
|
373
|
+
}]]), ke = 1e4, Ae = !1, je = "\n html, body { margin: 0; padding: 0; height: 100%; background: #000; overflow: hidden; }\n * { box-sizing: border-box; }\n .gb-pip-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }\n .gb-pip-overlay {\n position: absolute; inset: 0; z-index: 2;\n display: flex; flex-direction: column; justify-content: space-between;\n font-family: system-ui, -apple-system, sans-serif; color: #fff;\n opacity: 0; transition: opacity 0.15s ease;\n background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.55) 100%);\n }\n .gb-pip-overlay:hover, .gb-pip-overlay.gb-pip-paused { opacity: 1; }\n .gb-pip-center {\n flex: 1; display: flex; align-items: center; justify-content: center; gap: 28px;\n }\n .gb-pip-btn {\n background: rgba(0,0,0,0.35); border: none; color: #fff; border-radius: 50%;\n width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;\n cursor: pointer; padding: 0;\n }\n .gb-pip-btn:hover { background: rgba(0,0,0,0.55); }\n .gb-pip-btn.gb-pip-play { width: 56px; height: 56px; }\n .gb-pip-bottom { padding: 6px 10px 8px; display: flex; flex-direction: column; gap: 4px; }\n .gb-pip-progress { position: relative; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.3); cursor: pointer; }\n .gb-pip-progress-fill { position: absolute; inset: 0; width: 0%; border-radius: 2px; background: #fff; }\n .gb-pip-time { font-size: 11px; font-variant-numeric: tabular-nums; opacity: 0.9; }\n", Me = (e) => {
|
|
374
374
|
let t = e.match(/#EXT-X-TITLE:(.+)/);
|
|
375
375
|
if (t?.[1]?.trim()) return t[1].trim();
|
|
376
376
|
let n = e.match(/#EXT-X-SESSION-DATA:[^\n]*DATA-ID="[^"]*title[^"]*"[^\n]*VALUE="([^"]+)"/i);
|
|
377
377
|
return n?.[1]?.trim() ? n[1].trim() : null;
|
|
378
|
-
},
|
|
378
|
+
}, y = (e) => {
|
|
379
379
|
if (!e || e.length < 10 || e[0] !== 73 || e[1] !== 68 || e[2] !== 51) return null;
|
|
380
380
|
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;
|
|
381
381
|
for (; i + 10 <= r;) {
|
|
@@ -388,7 +388,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
388
388
|
i += 10 + a;
|
|
389
389
|
}
|
|
390
390
|
return null;
|
|
391
|
-
},
|
|
391
|
+
}, Ne = ({ size: e = 20 }) => /* @__PURE__ */ p("svg", {
|
|
392
392
|
width: e,
|
|
393
393
|
height: e,
|
|
394
394
|
viewBox: "0 0 24 24",
|
|
@@ -408,7 +408,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
408
408
|
/* @__PURE__ */ f("path", { d: "M7 9v6M7 12h3M10 9v6" }),
|
|
409
409
|
/* @__PURE__ */ f("path", { d: "M14 9h1.5a3 3 0 0 1 0 6H14z" })
|
|
410
410
|
]
|
|
411
|
-
}),
|
|
411
|
+
}), Pe = ({ size: e = 20 }) => /* @__PURE__ */ p("svg", {
|
|
412
412
|
width: e,
|
|
413
413
|
height: e,
|
|
414
414
|
viewBox: "0 0 24 24",
|
|
@@ -428,10 +428,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
428
428
|
/* @__PURE__ */ f("path", { d: "M7 9v6M7 12h3M10 9v6" }),
|
|
429
429
|
/* @__PURE__ */ f("path", { d: "M14 9h1.5a3 3 0 0 1 0 6H14z" })
|
|
430
430
|
]
|
|
431
|
-
}),
|
|
431
|
+
}), Fe = (e) => {
|
|
432
432
|
let t = e.replace("#", "");
|
|
433
433
|
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";
|
|
434
|
-
},
|
|
434
|
+
}, Ie = {
|
|
435
435
|
en: "English",
|
|
436
436
|
eng: "English",
|
|
437
437
|
fr: "French",
|
|
@@ -454,74 +454,118 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
454
454
|
hi: "Hindi",
|
|
455
455
|
ta: "Tamil",
|
|
456
456
|
tam: "Tamil"
|
|
457
|
-
},
|
|
457
|
+
}, Le = (e) => {
|
|
458
458
|
if (!e) return null;
|
|
459
459
|
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)/);
|
|
460
|
-
if (n &&
|
|
461
|
-
for (let [e, n] of Object.entries(
|
|
460
|
+
if (n && Ie[n[0]]) return Ie[n[0]];
|
|
461
|
+
for (let [e, n] of Object.entries(Ie)) if (t.includes(e)) return n;
|
|
462
462
|
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;
|
|
463
|
-
},
|
|
463
|
+
}, b = (e) => {
|
|
464
464
|
if (e.lang) {
|
|
465
|
-
let t =
|
|
465
|
+
let t = Le(e.lang);
|
|
466
466
|
if (t) return t;
|
|
467
467
|
}
|
|
468
468
|
if (e.label) {
|
|
469
469
|
let t = e.label.trim(), n = t.split(/[#\d\.\s\-_/|:]+/).filter(Boolean);
|
|
470
470
|
for (let e = n.length - 1; e >= 0; --e) {
|
|
471
|
-
let t =
|
|
471
|
+
let t = Le(n[e]);
|
|
472
472
|
if (t) return t;
|
|
473
473
|
}
|
|
474
474
|
let r = t.replace(/^[#\d\.\s]+/, "").trim();
|
|
475
|
-
return
|
|
475
|
+
return Le(r) || r;
|
|
476
476
|
}
|
|
477
477
|
return "Unknown";
|
|
478
|
-
},
|
|
478
|
+
}, Re = (e) => {
|
|
479
479
|
let t = /* @__PURE__ */ new Set();
|
|
480
480
|
return e.filter((e) => {
|
|
481
|
-
let n = `${
|
|
481
|
+
let n = `${b(e).toLowerCase()}|${(e.lang || "").trim().toLowerCase()}`;
|
|
482
482
|
return t.has(n) ? !1 : (t.add(n), !0);
|
|
483
483
|
});
|
|
484
|
-
},
|
|
484
|
+
}, ze = (e) => {
|
|
485
485
|
let t = (e ?? "").split(":").map(Number);
|
|
486
486
|
return (t[0] || 0) * 3600 + (t[1] || 0) * 60 + (t[2] || 0);
|
|
487
|
-
},
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
}
|
|
487
|
+
}, Be = (e) => {
|
|
488
|
+
if (!e) return !1;
|
|
489
|
+
try {
|
|
490
|
+
let { protocol: t } = new URL(e, window.location.href);
|
|
491
|
+
return t === "http:" || t === "https:";
|
|
492
|
+
} catch {
|
|
493
|
+
return !1;
|
|
494
|
+
}
|
|
495
|
+
}, Ve = (e) => {
|
|
496
|
+
if (typeof e == "number") return Number.isFinite(e) && e >= 0 ? e : null;
|
|
497
|
+
if (typeof e != "string") return null;
|
|
498
|
+
let t = e.trim();
|
|
499
|
+
if (!t) return null;
|
|
500
|
+
if (/^\d+:\d{1,2}:\d{1,2}(\.\d+)?$/.test(t)) return ze(t);
|
|
501
|
+
let n = Number(t);
|
|
502
|
+
return Number.isFinite(n) && n >= 0 ? n : null;
|
|
503
|
+
}, He = [
|
|
504
|
+
0,
|
|
505
|
+
1e3,
|
|
506
|
+
2e3,
|
|
507
|
+
3e3,
|
|
508
|
+
5e3,
|
|
509
|
+
8e3
|
|
510
|
+
];
|
|
511
|
+
function Ue(e, t, n) {
|
|
512
|
+
let r = !1, i, a = (o) => {
|
|
513
|
+
i = setTimeout(() => {
|
|
514
|
+
r || fetch(e).then((e) => e.json()).then((e) => {
|
|
515
|
+
if (r) return;
|
|
516
|
+
let i = t(e);
|
|
517
|
+
if (i !== null) {
|
|
518
|
+
n(i);
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
o + 1 < He.length && a(o + 1);
|
|
522
|
+
}).catch(() => {
|
|
523
|
+
r || o + 1 < He.length && a(o + 1);
|
|
524
|
+
});
|
|
525
|
+
}, He[o]);
|
|
526
|
+
};
|
|
527
|
+
return a(0), () => {
|
|
528
|
+
r = !0, i && clearTimeout(i);
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoments: ne, subtitles: m = [], watermark: ie, themeColor: h = "#6366f1", drmConfig: ae, firebaseConfig: oe, videoId: se, onAnalyticsEvent: ce, onAdBreakChange: le, onKeyMomentsLoaded: ue, enableControls: g = !0, enableChromecast: Ie, enableKeyMoments: Le, enableSubtitles: He, enableQuality: We, enablePlaybackSpeed: Ge, enablePiP: Ke, enableFullscreen: qe = !0, autoFullscreen: Je = !1, watchProgressInterval: Ye = 30, subtitleStyle: Xe = {}, resolvedEntitlement: Ze, licenseKey: Qe, title: x, chaptersDisplayMode: $e = "strip", volumeControlType: et = "slider", urlTransformer: tt, pauseAdOnTabSwitch: nt = !0, enableSkipAd: rt = !1, skipAdAfterSeconds: it = 5, overlayAdUrl: at, adTrackingUrl: ot, sources: S, activeSourceIndex: st = 0, onSourceChange: ct, initialTime: lt, onTimeUpdate: ut }) => {
|
|
532
|
+
let dt = tt ?? ((e) => e), C = u(null), ft = u(null), pt = u(!1), w = u(null), mt = u(0), ht = u(null), T = u(null), gt = u(null), _t = u(null), vt = u(!1), E = u(!1), D = u(null), O = u(null), k = u(null), yt = u(null), bt = u(() => {}), A = u(null), xt = u(!1), St = u(null), Ct = (e) => {
|
|
533
|
+
!e || St.current !== null || (St.current = e.muted, e.muted = !0);
|
|
534
|
+
}, wt = (e) => {
|
|
535
|
+
St.current !== null && (e && (e.muted = St.current), St.current = null);
|
|
536
|
+
}, Tt = u(null), Et = u(!1), Dt = u(null), Ot = u(null), kt = u(null), j = u(null), At = u(null), jt = u(S), Mt = u(ct), Nt = u(!1), M = u(null), N = u(null), P = u(null), Pt = u(null), Ft = u(0), It = u(null), [Lt, Rt] = d(!1), zt = u(!1), Bt = u(null), [Vt, Ht] = d(null);
|
|
493
537
|
c(() => {
|
|
494
|
-
if (typeof window > "u" ||
|
|
538
|
+
if (typeof window > "u" || Ae) return;
|
|
495
539
|
let e = window.requestAnimationFrame(() => {
|
|
496
540
|
let e = C.current;
|
|
497
541
|
if (!e) return;
|
|
498
542
|
let t = window.getComputedStyle(e);
|
|
499
|
-
t.overflow !== "hidden" && t.borderTopLeftRadius === "0px" && (
|
|
543
|
+
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';"));
|
|
500
544
|
});
|
|
501
545
|
return () => window.cancelAnimationFrame(e);
|
|
502
546
|
}, []), c(() => {
|
|
503
547
|
let e = C.current;
|
|
504
548
|
if (!e) return;
|
|
505
549
|
let t = new ResizeObserver((e) => {
|
|
506
|
-
for (let t of e)
|
|
550
|
+
for (let t of e) Rt(t.contentRect.width <= 768);
|
|
507
551
|
});
|
|
508
|
-
return t.observe(e),
|
|
552
|
+
return t.observe(e), Rt(e.getBoundingClientRect().width <= 768), () => t.disconnect();
|
|
509
553
|
}, []);
|
|
510
|
-
let [F,
|
|
511
|
-
enableSubtitles:
|
|
512
|
-
enableChromecast:
|
|
513
|
-
enableKeyMoments:
|
|
514
|
-
enableQuality:
|
|
515
|
-
enablePlaybackSpeed:
|
|
516
|
-
enablePiP:
|
|
517
|
-
allowAirplay:
|
|
518
|
-
allowMultipleAudio:
|
|
519
|
-
m3u8_playback:
|
|
520
|
-
drm_protection:
|
|
521
|
-
}, [
|
|
522
|
-
|
|
523
|
-
let
|
|
524
|
-
let t =
|
|
554
|
+
let [F, Ut] = d(null), [Wt, Gt] = d(!1), Kt = Ze ?? null, qt = Kt != null, Jt = Kt?.features ?? {}, Yt = qt ? !!(Jt.drm_protection && !Qe) : !1, I = {
|
|
555
|
+
enableSubtitles: qt ? !!Jt.subtitle_support : typeof He == "boolean" ? He : !0,
|
|
556
|
+
enableChromecast: qt ? !!Jt.chromecast : typeof Ie == "boolean" ? Ie : !0,
|
|
557
|
+
enableKeyMoments: qt ? !!Jt.key_moments : typeof Le == "boolean" ? Le : !0,
|
|
558
|
+
enableQuality: qt ? !!Jt.multiple_resolution : typeof We == "boolean" ? We : !0,
|
|
559
|
+
enablePlaybackSpeed: qt ? !!Jt.playback_speed : typeof Ge == "boolean" ? Ge : !0,
|
|
560
|
+
enablePiP: qt ? !!Jt.picture_in_picture : typeof Ke == "boolean" ? Ke : !0,
|
|
561
|
+
allowAirplay: qt ? !!Jt.airplay : !1,
|
|
562
|
+
allowMultipleAudio: qt ? !!Jt.multiple_audio : !0,
|
|
563
|
+
m3u8_playback: qt ? !!Jt.m3u8_playback : !0,
|
|
564
|
+
drm_protection: qt ? !!Jt.drm_protection : !1
|
|
565
|
+
}, [Xt, Zt] = d(!1), [Qt, $t] = d(0), [en, tn] = d(!1), [L, nn] = d(0), [rn, an] = d(0), [on, sn] = d(1), [cn, ln] = d(!1), [un, dn] = d(!1), [fn, pn] = d(!1), [mn, hn] = d(!1), [gn, _n] = d(!1), vn = Lt || (fn || mn) && gn, [yn, bn] = d(!1), [xn, Sn] = d(null), [Cn, wn] = d(!1), [R, Tn] = d([]), z = u([]), En = u(/* @__PURE__ */ new Set()), Dn = S && S.length > 0 ? S.map((e) => e.url).join("|") : r, [On, kn] = d(/* @__PURE__ */ new Set()), [An, jn] = d(Dn), Mn = u(null), Nn = u(!1), Pn = u(null);
|
|
566
|
+
An !== Dn && (jn(Dn), kn(/* @__PURE__ */ new Set()), En.current = /* @__PURE__ */ new Set(), Mn.current = null, Nn.current = !1);
|
|
567
|
+
let Fn = u(null), In = u(!1), [Ln, Rn] = d([]), [zn, Bn] = d(null), Vn = u([]), Hn = u(null), Un = u(/* @__PURE__ */ new Set()), [Wn, Gn] = d([]), Kn = u([]), [qn, Jn] = d([]), Yn = (e) => {
|
|
568
|
+
let t = Kn.current.find((t) => e >= t.startTimeSeconds && e < t.endTimeSeconds);
|
|
525
569
|
if (t) return {
|
|
526
570
|
start: t.startTimeSeconds,
|
|
527
571
|
end: t.endTimeSeconds
|
|
@@ -531,7 +575,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
531
575
|
start: n.startTime,
|
|
532
576
|
end: n.endTime
|
|
533
577
|
} : null;
|
|
534
|
-
},
|
|
578
|
+
}, Xn = l(() => R.reduce((e, t) => e + (t.endTime - t.startTime), 0), [R]), Zn = rn > 0 ? Math.max(0, rn - Xn) : 0, B = R.length > 0 && Zn > 0 ? Zn : rn, V = o((e) => {
|
|
535
579
|
let t = e;
|
|
536
580
|
for (let n of R) e >= n.endTime ? t -= n.endTime - n.startTime : e >= n.startTime && (t -= e - n.startTime);
|
|
537
581
|
return Math.max(0, t);
|
|
@@ -539,31 +583,31 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
539
583
|
let t = e;
|
|
540
584
|
for (let e of R) t >= e.startTime && (t += e.endTime - e.startTime);
|
|
541
585
|
return t;
|
|
542
|
-
}, [R]), [
|
|
586
|
+
}, [R]), [Qn, $n] = d([]), [er, tr] = d({
|
|
543
587
|
id: -1,
|
|
544
588
|
height: 0,
|
|
545
589
|
width: 0,
|
|
546
590
|
bitrate: 0,
|
|
547
591
|
label: "Auto"
|
|
548
|
-
}), [
|
|
592
|
+
}), [nr, rr] = d(""), [U, ir] = d("off"), [ar, or] = d(Re(m)), [sr, cr] = d([]), [lr, ur] = d(0);
|
|
549
593
|
c(() => {
|
|
550
594
|
if (F) {
|
|
551
595
|
let e = F.subtitles.getTracks();
|
|
552
|
-
|
|
553
|
-
} else
|
|
554
|
-
}, [
|
|
555
|
-
let [
|
|
596
|
+
or(Re([...m, ...e.filter((e) => !m.some((t) => t.id === e.id))]));
|
|
597
|
+
} else or(Re(m));
|
|
598
|
+
}, [m.map((e) => e.id).join(","), F]);
|
|
599
|
+
let [dr, fr] = d({
|
|
556
600
|
chapter: null,
|
|
557
601
|
index: -1
|
|
558
|
-
}), [W,
|
|
602
|
+
}), [W, pr] = d(ne || s || []), [G, K] = d("none"), [mr, hr] = d(1), [gr, _r] = d(!1), [vr, yr] = d({}), [br, xr] = d(""), [Sr, Cr] = d(null), wr = u(!1), Tr = JSON.stringify(W.map((e) => ({
|
|
559
603
|
title: e.title,
|
|
560
604
|
startTime: e.startTime
|
|
561
605
|
})));
|
|
562
606
|
c(() => {
|
|
563
|
-
|
|
607
|
+
pr(ne || s || []);
|
|
564
608
|
}, [(ne || s || []).map((e) => `${e.startTime}:${e.title}`).join(",")]), c(() => {
|
|
565
609
|
if (!r || !W || W.length === 0) return;
|
|
566
|
-
|
|
610
|
+
yr({});
|
|
567
611
|
let e = document.createElement("video");
|
|
568
612
|
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);
|
|
569
613
|
let t = null, i = r.includes(".m3u8"), a = document.createElement("canvas");
|
|
@@ -579,7 +623,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
579
623
|
if (o && e.readyState >= 2) {
|
|
580
624
|
o.drawImage(e, 0, 0, a.width, a.height);
|
|
581
625
|
let t = a.toDataURL("image/jpeg", .8);
|
|
582
|
-
|
|
626
|
+
yr((e) => ({
|
|
583
627
|
...e,
|
|
584
628
|
[s]: t
|
|
585
629
|
})), s++, l();
|
|
@@ -591,34 +635,34 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
591
635
|
enableWorker: !1,
|
|
592
636
|
maxBufferLength: 5,
|
|
593
637
|
xhrSetup: (e, t) => {
|
|
594
|
-
let n =
|
|
638
|
+
let n = ae?.authToken;
|
|
595
639
|
try {
|
|
596
|
-
let r =
|
|
640
|
+
let r = dt(t), i = new URL(r, window.location.origin);
|
|
597
641
|
n && i.searchParams.set("token", n), e.open("GET", i.toString(), !0);
|
|
598
642
|
} catch (e) {
|
|
599
643
|
console.error("[WebVideoPlayer tempHls] xhrSetup error:", e);
|
|
600
644
|
}
|
|
601
645
|
}
|
|
602
|
-
}), t.loadSource(
|
|
646
|
+
}), t.loadSource(dt(r)), t.attachMedia(e)) : e.src = r, e.readyState >= 2 && d();
|
|
603
647
|
let ee = () => {
|
|
604
648
|
e.removeEventListener("seeked", u), e.removeEventListener("canplay", d), t && t.destroy(), document.body.contains(e) && document.body.removeChild(e);
|
|
605
649
|
};
|
|
606
650
|
return ee;
|
|
607
|
-
}, [r,
|
|
608
|
-
let [q,
|
|
651
|
+
}, [r, Tr]);
|
|
652
|
+
let [q, Er] = d(null), [Dr, Or] = d(null), kr = u(!1), [Ar, jr] = d(!1), [Mr, Nr] = d(!1), [Pr, Fr] = d(null), [Ir, Lr] = d(null), [Rr, zr] = d(0), [Br, Vr] = d(0), [Hr, Ur] = d(null), [Wr, Gr] = d(null), [J, Kr] = d(null);
|
|
609
653
|
c(() => {
|
|
610
|
-
if (
|
|
654
|
+
if (yt.current && !yt.current.querySelector("google-cast-launcher")) {
|
|
611
655
|
let e = document.createElement("google-cast-launcher");
|
|
612
|
-
e.style.cursor = "pointer", e.style.width = "100%", e.style.height = "100%", e.style.display = "block",
|
|
656
|
+
e.style.cursor = "pointer", e.style.width = "100%", e.style.height = "100%", e.style.display = "block", yt.current.appendChild(e);
|
|
613
657
|
}
|
|
614
658
|
}, []), c(() => {
|
|
615
659
|
if (!F) {
|
|
616
|
-
|
|
660
|
+
jr(!1), Nr(!1), Fr(null);
|
|
617
661
|
return;
|
|
618
662
|
}
|
|
619
|
-
let e = (e) =>
|
|
663
|
+
let e = (e) => jr(e), t = () => {
|
|
620
664
|
let e = F.getVideoElement(), t = !!e?.webkitCurrentPlaybackTargetIsWireless;
|
|
621
|
-
|
|
665
|
+
Nr(t), Fr(t ? e.webkitCurrentPlaybackTargetName || "AirPlay device" : null);
|
|
622
666
|
};
|
|
623
667
|
e(F.casting.isAirPlayAvailable()), t();
|
|
624
668
|
let n = F.getVideoElement(), r = (t) => {
|
|
@@ -630,16 +674,16 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
630
674
|
"webkitShowPlaybackTargetPicker" in n && (n.removeEventListener("webkitplaybacktargetavailabilitychanged", r), n.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged", i));
|
|
631
675
|
};
|
|
632
676
|
}, [F]);
|
|
633
|
-
let [
|
|
634
|
-
|
|
635
|
-
let e =
|
|
636
|
-
|
|
637
|
-
|
|
677
|
+
let [qr, Jr] = d(""), [Yr, Xr] = d(!0), [Y, Zr] = d(!1), [Qr, $r] = d(!1), ei = u(!1), ti = u(null), ni = u(!1), ri = u(!1), ii = u("none"), ai = u(m), oi = () => {
|
|
678
|
+
Xr(!0), ti.current && window.clearTimeout(ti.current);
|
|
679
|
+
let e = zt.current ? 3500 : 1e4;
|
|
680
|
+
ti.current = window.setTimeout(() => {
|
|
681
|
+
ni.current && ii.current === "none" && Xr(!1);
|
|
638
682
|
}, e);
|
|
639
|
-
},
|
|
683
|
+
}, si = o((e) => {
|
|
640
684
|
j.current &&= (clearTimeout(j.current), null);
|
|
641
|
-
let t =
|
|
642
|
-
|
|
685
|
+
let t = jt.current, n = t?.[e]?.label ?? "This format", r = t?.[0]?.label ?? "default";
|
|
686
|
+
At.current = null, Cr(`${n} isn't supported on this device. Switched to ${r}.`), window.setTimeout(() => Cr(null), 4e3), Mt.current?.(0);
|
|
643
687
|
}, []);
|
|
644
688
|
c(() => {
|
|
645
689
|
if (!C.current) return;
|
|
@@ -651,99 +695,102 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
651
695
|
enableWorker: !1,
|
|
652
696
|
maxBufferLength: 5,
|
|
653
697
|
xhrSetup: (e, t) => {
|
|
654
|
-
let n =
|
|
698
|
+
let n = ae?.authToken;
|
|
655
699
|
try {
|
|
656
|
-
let r =
|
|
700
|
+
let r = dt(t), i = new URL(r, window.location.origin);
|
|
657
701
|
n && i.searchParams.set("token", n), e.open("GET", i.toString(), !0);
|
|
658
702
|
} catch (e) {
|
|
659
703
|
console.error("[WebVideoPlayer hiddenHls] xhrSetup error:", e);
|
|
660
704
|
}
|
|
661
705
|
}
|
|
662
706
|
});
|
|
663
|
-
e.loadSource(
|
|
664
|
-
if (
|
|
665
|
-
let n =
|
|
666
|
-
n &&
|
|
707
|
+
e.loadSource(dt(r)), e.attachMedia(o), gt.current = e, e.on(n.Events.MANIFEST_LOADED, (e, t) => {
|
|
708
|
+
if (x) return;
|
|
709
|
+
let n = Me(t?.networkDetails?.responseText ?? "");
|
|
710
|
+
n && Jr(n);
|
|
667
711
|
}), e.on(n.Events.FRAG_PARSING_METADATA, (e, t) => {
|
|
668
|
-
if (!(
|
|
669
|
-
let t =
|
|
712
|
+
if (!(x || qr)) for (let e of t?.samples ?? []) {
|
|
713
|
+
let t = y(e.data);
|
|
670
714
|
if (t) {
|
|
671
|
-
|
|
715
|
+
Jr(t);
|
|
672
716
|
break;
|
|
673
717
|
}
|
|
674
718
|
}
|
|
675
719
|
});
|
|
676
720
|
} else s && o.canPlayType("application/vnd.apple.mpegurl"), o.src = r;
|
|
677
721
|
o.addEventListener("seeked", () => {
|
|
678
|
-
let e =
|
|
722
|
+
let e = ht.current;
|
|
679
723
|
if (!e) return;
|
|
680
724
|
let t = e.getContext("2d");
|
|
681
|
-
t && o.readyState >= 2 && (t.drawImage(o, 0, 0, e.width, e.height),
|
|
725
|
+
t && o.readyState >= 2 && (t.drawImage(o, 0, 0, e.width, e.height), Ur(e.toDataURL("image/jpeg", .82)));
|
|
682
726
|
});
|
|
683
727
|
let c;
|
|
684
|
-
if (
|
|
685
|
-
let t = new e(
|
|
686
|
-
|
|
728
|
+
if (oe) {
|
|
729
|
+
let t = new e(oe);
|
|
730
|
+
ft.current = t, c = t.createCallback();
|
|
687
731
|
}
|
|
688
|
-
if (
|
|
732
|
+
if (Yt) return;
|
|
689
733
|
let l = new t({
|
|
690
734
|
container: C.current,
|
|
691
735
|
src: r,
|
|
736
|
+
videoId: se,
|
|
692
737
|
autoplay: i,
|
|
693
738
|
muted: a,
|
|
694
739
|
keyMoments: W,
|
|
695
|
-
subtitles:
|
|
740
|
+
subtitles: m,
|
|
696
741
|
drm: {
|
|
697
|
-
watermarkText:
|
|
742
|
+
watermarkText: ie,
|
|
698
743
|
allowedDomains: [
|
|
699
744
|
"localhost",
|
|
700
745
|
"127.0.0.1",
|
|
701
746
|
window.location.hostname
|
|
702
747
|
],
|
|
703
|
-
...
|
|
748
|
+
...ae
|
|
704
749
|
},
|
|
705
750
|
analyticsCallback: (e) => {
|
|
706
|
-
if (e.sessionId && (
|
|
751
|
+
if (e.sessionId && (Mn.current === null ? Mn.current = e.sessionId : e.sessionId !== Mn.current && (e = {
|
|
707
752
|
...e,
|
|
708
|
-
sessionId:
|
|
753
|
+
sessionId: Mn.current
|
|
709
754
|
})), e.eventType === "session_start") {
|
|
710
|
-
if (
|
|
711
|
-
|
|
755
|
+
if (Nn.current) return;
|
|
756
|
+
Nn.current = !0;
|
|
712
757
|
}
|
|
713
|
-
c?.(e),
|
|
758
|
+
c?.(e), ce && ce(e);
|
|
714
759
|
},
|
|
715
|
-
analyticsSessionSeed:
|
|
716
|
-
watchProgressInterval:
|
|
717
|
-
themeColor:
|
|
718
|
-
urlTransformer:
|
|
760
|
+
analyticsSessionSeed: Pn.current?.key === Dn ? Pn.current.snapshot : void 0,
|
|
761
|
+
watchProgressInterval: Ye * 1e3,
|
|
762
|
+
themeColor: h,
|
|
763
|
+
urlTransformer: tt
|
|
719
764
|
});
|
|
720
765
|
l.on("keymomentsloaded", (e) => {
|
|
721
|
-
|
|
766
|
+
pr(e), ue && ue(e);
|
|
722
767
|
}), l.on("chaptersloaded", (e) => {
|
|
723
|
-
|
|
768
|
+
pr(e), ue && ue(e);
|
|
724
769
|
}), l.on("play", () => {
|
|
725
|
-
|
|
770
|
+
tn(!0), wn(!1), te(l.getCurrentTime(), !1);
|
|
726
771
|
}), l.on("pause", () => {
|
|
727
|
-
|
|
772
|
+
tn(!1), te(l.getCurrentTime(), !0);
|
|
728
773
|
}), l.on("ended", () => {
|
|
729
|
-
|
|
774
|
+
tn(!1), wn(!0);
|
|
730
775
|
});
|
|
731
776
|
let u = () => {
|
|
732
|
-
A.current && (A.current.style.opacity = "1"),
|
|
777
|
+
xt.current = !0, dn(!1), A.current && (A.current.style.opacity = "1"), Ct(l.getVideoElement());
|
|
733
778
|
}, d = () => {
|
|
734
779
|
requestAnimationFrame(() => {
|
|
735
780
|
requestAnimationFrame(() => {
|
|
736
|
-
A.current && (A.current.style.opacity = "0"),
|
|
781
|
+
xt.current = !1, A.current && (A.current.style.opacity = "0"), wt(l.getVideoElement());
|
|
782
|
+
let e = l.getVideoElement();
|
|
783
|
+
e && !e.paused && e.readyState < 3 && dn(!0);
|
|
737
784
|
});
|
|
738
785
|
});
|
|
739
786
|
}, ee = (e, t = !1) => {
|
|
740
787
|
E.current = !0;
|
|
741
|
-
let n = t ? e + .5 :
|
|
742
|
-
t || (
|
|
743
|
-
E.current = !1, D.current = null, O.current = null, k.current = null,
|
|
788
|
+
let n = t ? e + .5 : Dt.current ?? e + .5;
|
|
789
|
+
t || (Dt.current = null), Et.current = t, D.current = n, O.current = l.getCurrentTime(), u(), l.seek(n), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
|
|
790
|
+
E.current = !1, D.current = null, O.current = null, k.current = null, Et.current = !1, d();
|
|
744
791
|
}, 3e3);
|
|
745
792
|
};
|
|
746
|
-
|
|
793
|
+
Tt.current = ee;
|
|
747
794
|
let te = (e, t) => {
|
|
748
795
|
if (!("mediaSession" in navigator) || !navigator.mediaSession.setPositionState) return;
|
|
749
796
|
navigator.mediaSession.playbackState = t ? "paused" : "playing";
|
|
@@ -773,137 +820,146 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
773
820
|
};
|
|
774
821
|
if (l.on("timeupdate", (e) => {
|
|
775
822
|
if (!E.current && N.current === null) {
|
|
776
|
-
let t = z.current.find((t) =>
|
|
823
|
+
let t = z.current.find((t) => En.current.has(t.startTime) && e >= t.startTime - .5 && e < t.endTime);
|
|
777
824
|
if (t) {
|
|
778
825
|
ee(t.endTime);
|
|
779
826
|
return;
|
|
780
827
|
}
|
|
781
|
-
|
|
828
|
+
Dt.current !== null && z.current.find((t) => e >= t.endTime - .5 && e < t.endTime) && u();
|
|
782
829
|
}
|
|
783
830
|
if (E.current && D.current !== null) {
|
|
784
831
|
let t = D.current;
|
|
785
832
|
if (O.current !== null && t < O.current ? e <= t + 2 && e >= t - 2 : e >= t - 2) {
|
|
786
833
|
E.current = !1, D.current = null, O.current = null, k.current &&= (window.clearTimeout(k.current), null);
|
|
787
|
-
let t = z.current.some((t) => e >= t.startTime && e < t.endTime), n =
|
|
788
|
-
|
|
834
|
+
let t = z.current.some((t) => e >= t.startTime && e < t.endTime), n = Et.current;
|
|
835
|
+
Et.current = !1, (n || !t && Dt.current === null) && d();
|
|
789
836
|
} else return;
|
|
790
837
|
}
|
|
791
|
-
|
|
838
|
+
nn(e), Ft.current = e;
|
|
792
839
|
let t = l.getDuration();
|
|
793
|
-
if (
|
|
840
|
+
if (an(t), N.current !== null && e >= N.current - 2) {
|
|
794
841
|
N.current = null, P.current &&= (window.clearTimeout(P.current), null);
|
|
795
|
-
let t = z.current.find((t) =>
|
|
842
|
+
let t = z.current.find((t) => En.current.has(t.startTime) && e >= t.startTime && e < t.endTime);
|
|
796
843
|
t && ee(t.endTime), requestAnimationFrame(() => {
|
|
797
844
|
requestAnimationFrame(() => {
|
|
798
845
|
M.current && (M.current.style.opacity = "0");
|
|
799
846
|
});
|
|
800
847
|
});
|
|
801
848
|
}
|
|
802
|
-
if (!
|
|
803
|
-
|
|
804
|
-
let e = z.current.find((e) =>
|
|
805
|
-
N.current = t, l.seek(t), P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
|
|
849
|
+
if (!Nt.current && kt.current === null && lt && lt > 0 && t > 0 && lt < t) {
|
|
850
|
+
Nt.current = !0;
|
|
851
|
+
let e = z.current.find((e) => lt >= e.startTime && lt < e.endTime), t = e ? e.startTime : lt;
|
|
852
|
+
Pt.current = e ? null : lt, N.current = t, l.seek(t), P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
|
|
806
853
|
N.current = null, P.current = null, M.current && (M.current.style.opacity = "0");
|
|
807
854
|
}, 4e3);
|
|
808
855
|
}
|
|
809
|
-
if (
|
|
810
|
-
let t =
|
|
811
|
-
(e >= t.startTimeSeconds + t.durationSeconds || e < t.startTimeSeconds) && (
|
|
856
|
+
if (ut?.(e), Vn.current.length > 0) if (Hn.current) {
|
|
857
|
+
let t = Hn.current;
|
|
858
|
+
(e >= t.startTimeSeconds + t.durationSeconds || e < t.startTimeSeconds) && (Bn(null), Hn.current = null);
|
|
812
859
|
} else {
|
|
813
|
-
let t =
|
|
814
|
-
t && (
|
|
860
|
+
let t = Vn.current.find((t) => e >= t.startTimeSeconds && e < t.startTimeSeconds + t.durationSeconds && !Un.current.has(t.availId));
|
|
861
|
+
t && (Bn(t), Hn.current = t, t.impressionBeacons.forEach((e) => {
|
|
815
862
|
fetch(e, { mode: "no-cors" }).catch(() => {});
|
|
816
863
|
}));
|
|
817
864
|
}
|
|
818
865
|
let n = l.keyMoments.getCurrentMoment(e);
|
|
819
|
-
|
|
866
|
+
fr({
|
|
820
867
|
chapter: n.keyMoment,
|
|
821
868
|
index: n.index
|
|
822
869
|
}), te(e, l.getVideoElement().paused);
|
|
823
870
|
}), l.on("qualitylevels", (e) => {
|
|
824
|
-
|
|
871
|
+
$n(e);
|
|
825
872
|
}), l.on("qualitychange", (e) => {
|
|
826
|
-
|
|
873
|
+
tr(e);
|
|
827
874
|
}), l.on("buffering", (e) => {
|
|
828
|
-
if (
|
|
829
|
-
let e =
|
|
830
|
-
|
|
875
|
+
if (dn(e && !xt.current), !e && (j.current &&= (clearTimeout(j.current), null), At.current = null, kt.current !== null)) {
|
|
876
|
+
let e = kt.current;
|
|
877
|
+
kt.current = null, Nt.current = !0, N.current = e, P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
|
|
831
878
|
N.current = null, P.current = null, M.current && (M.current.style.opacity = "0");
|
|
832
879
|
}, 4e3), l.seek(e);
|
|
833
880
|
}
|
|
834
881
|
}), l.on("adbreakchange", (e) => {
|
|
835
|
-
if (l.analytics.setAdBreak(e, l.getVideoElement()),
|
|
882
|
+
if (l.analytics.setAdBreak(e, l.getVideoElement()), le && le(e), e) {
|
|
836
883
|
let e = l.getCurrentTime(), t = z.current.find((t) => e >= t.startTime && e < t.endTime);
|
|
837
|
-
if (
|
|
884
|
+
if (ei.current = !1, $r(!1), t && En.current.has(t.startTime)) {
|
|
838
885
|
u(), E.current || ee(t.endTime);
|
|
839
886
|
return;
|
|
840
887
|
}
|
|
841
|
-
t && (
|
|
842
|
-
} else if (
|
|
843
|
-
let e =
|
|
844
|
-
|
|
888
|
+
t && (Fn.current = t.startTime), Zr(!0), K("none"), d();
|
|
889
|
+
} else if (Fn.current !== null && (En.current.add(Fn.current), kn(new Set(En.current)), Fn.current = null), Zr(!1), Dt.current !== null) {
|
|
890
|
+
let e = Dt.current;
|
|
891
|
+
Dt.current = null, E.current = !0, D.current = e, O.current = l.getCurrentTime(), u(), l.seek(e), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
|
|
845
892
|
E.current = !1, D.current = null, O.current = null, k.current = null, d();
|
|
846
893
|
}, 3e3);
|
|
847
894
|
}
|
|
848
895
|
}), l.on("adbreaksloaded", (e) => {
|
|
849
|
-
z.current = e,
|
|
896
|
+
z.current = e, Tn(e);
|
|
897
|
+
let t = Pt.current;
|
|
898
|
+
if (t === null) return;
|
|
899
|
+
Pt.current = null;
|
|
900
|
+
let n = e.find((e) => t >= e.startTime && t < e.endTime);
|
|
901
|
+
if (!n || En.current.has(n.startTime)) return;
|
|
902
|
+
let r = l.getCurrentTime();
|
|
903
|
+
r < n.startTime || r >= n.endTime || (M.current && (M.current.style.opacity = "1"), N.current = n.startTime, P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
|
|
904
|
+
N.current = null, P.current = null, M.current && (M.current.style.opacity = "0");
|
|
905
|
+
}, 4e3), l.seek(n.startTime));
|
|
850
906
|
}), l.on("volumechange", (e) => {
|
|
851
|
-
|
|
907
|
+
sn(e.volume), St.current === null && ln(e.muted);
|
|
852
908
|
}), l.on("pipchange", (e) => {
|
|
853
|
-
|
|
909
|
+
bn(e);
|
|
854
910
|
}), l.on("error", () => {
|
|
855
|
-
|
|
911
|
+
Zt(!0), dn(!1), N.current = null, P.current &&= (window.clearTimeout(P.current), null), M.current && (M.current.style.opacity = "0");
|
|
856
912
|
}), l.on("unsupportedcodec", () => {
|
|
857
|
-
let e =
|
|
858
|
-
e && e.targetIdx !== 0 && (
|
|
913
|
+
let e = At.current;
|
|
914
|
+
e && e.targetIdx !== 0 && (jt.current?.length ?? 0) > 1 && si(e.targetIdx);
|
|
859
915
|
}), l.subtitles.onSubtitleChange((e) => {
|
|
860
|
-
|
|
916
|
+
rr(e);
|
|
861
917
|
}), l.on("subtitlesloaded", (e) => {
|
|
862
918
|
if (!I.enableSubtitles) return;
|
|
863
|
-
|
|
919
|
+
or(Re([...e]));
|
|
864
920
|
let t = e.find((e) => e.isDefault);
|
|
865
|
-
t && (l.subtitles.setActiveTrack(t.id),
|
|
921
|
+
t && (l.subtitles.setActiveTrack(t.id), ir(t.id));
|
|
866
922
|
}), l.on("audiotracksloaded", (e) => {
|
|
867
|
-
|
|
923
|
+
cr(e), ur(e[0]?.id ?? 0);
|
|
868
924
|
}), l.on("audiotrackchange", (e) => {
|
|
869
|
-
|
|
925
|
+
ur(e);
|
|
870
926
|
}), l.casting.onCastStateChange((e, t) => {
|
|
871
927
|
if (e) {
|
|
872
|
-
|
|
928
|
+
kr.current = l.isMuted(), l.pause();
|
|
873
929
|
let e = l.getVideoElement();
|
|
874
|
-
e.muted = !0,
|
|
930
|
+
e.muted = !0, Er(t);
|
|
875
931
|
} else {
|
|
876
932
|
let e = l.casting.getRemoteState();
|
|
877
933
|
e && e.currentTime > 0 && (E.current = !0, D.current = e.currentTime, O.current = l.getCurrentTime(), l.seek(e.currentTime), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
|
|
878
934
|
E.current = !1, D.current = null, O.current = null, k.current = null;
|
|
879
935
|
}, 3e3));
|
|
880
936
|
let t = l.getVideoElement();
|
|
881
|
-
t.muted =
|
|
937
|
+
t.muted = kr.current, Er(null), Or(null);
|
|
882
938
|
}
|
|
883
939
|
}), l.casting.onRemoteStateChange((e) => {
|
|
884
|
-
|
|
885
|
-
}),
|
|
940
|
+
Or(e);
|
|
941
|
+
}), sn(l.getVolume()), ln(l.isMuted()), "mediaSession" in navigator) try {
|
|
886
942
|
navigator.mediaSession.setActionHandler("seekto", (e) => {
|
|
887
|
-
if (e.seekTime == null ||
|
|
943
|
+
if (e.seekTime == null || ri.current || ei.current) return;
|
|
888
944
|
let t = e.seekTime;
|
|
889
945
|
for (let e of z.current) t >= e.startTime && (t += e.endTime - e.startTime);
|
|
890
|
-
|
|
946
|
+
Ot.current?.(t);
|
|
891
947
|
});
|
|
892
948
|
let e = (e, t) => {
|
|
893
|
-
if (
|
|
949
|
+
if (ri.current || ei.current) return;
|
|
894
950
|
let n = t && t > 0 ? t : 10, r = l.getCurrentTime(), i = r;
|
|
895
951
|
for (let e of z.current) r >= e.endTime ? i -= e.endTime - e.startTime : r >= e.startTime && (i -= r - e.startTime);
|
|
896
952
|
if (e) {
|
|
897
953
|
let e = z.current.reduce((e, t) => e + (t.endTime - t.startTime), 0), t = Math.max(0, l.getDuration() - e), r = Math.min(t, i + n);
|
|
898
954
|
for (let e of z.current) r >= e.startTime && (r += e.endTime - e.startTime);
|
|
899
|
-
|
|
955
|
+
Ot.current?.(r, {
|
|
900
956
|
eventType: "fast_forward",
|
|
901
957
|
skipSeconds: n
|
|
902
958
|
});
|
|
903
959
|
} else {
|
|
904
960
|
let e = Math.max(0, i - n);
|
|
905
961
|
for (let t of z.current) e >= t.startTime && (e += t.endTime - t.startTime);
|
|
906
|
-
|
|
962
|
+
Ot.current?.(e, {
|
|
907
963
|
eventType: "fast_backward",
|
|
908
964
|
skipSeconds: n
|
|
909
965
|
});
|
|
@@ -912,33 +968,33 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
912
968
|
navigator.mediaSession.setActionHandler("seekforward", (t) => e(!0, t.seekOffset ?? void 0)), navigator.mediaSession.setActionHandler("seekbackward", (t) => e(!1, t.seekOffset ?? void 0));
|
|
913
969
|
} catch {}
|
|
914
970
|
let f = l.getVideoElement(), p = () => {
|
|
915
|
-
if (!(document.pictureInPictureElement === f || f.webkitPresentationMode === "picture-in-picture") || E.current || N.current !== null ||
|
|
916
|
-
let e = f.currentTime, t =
|
|
971
|
+
if (!(document.pictureInPictureElement === f || f.webkitPresentationMode === "picture-in-picture") || E.current || N.current !== null || kt.current !== null) return;
|
|
972
|
+
let e = f.currentTime, t = Ft.current;
|
|
917
973
|
if (!(Math.abs(e - t) < .5)) {
|
|
918
|
-
if (
|
|
974
|
+
if (ri.current) {
|
|
919
975
|
f.currentTime = t;
|
|
920
976
|
return;
|
|
921
977
|
}
|
|
922
|
-
f.currentTime = t,
|
|
978
|
+
f.currentTime = t, Ot.current?.(e);
|
|
923
979
|
}
|
|
924
980
|
};
|
|
925
|
-
f.addEventListener("seeking", p),
|
|
926
|
-
let ne =
|
|
981
|
+
f.addEventListener("seeking", p), Ut(l);
|
|
982
|
+
let ne = At.current;
|
|
927
983
|
ne && ne.targetIdx !== 0 && (j.current && clearTimeout(j.current), j.current = setTimeout(() => {
|
|
928
|
-
j.current = null, !l.getBufferedRanges().some((e) => e.end > e.start) &&
|
|
929
|
-
},
|
|
930
|
-
P.current = null, N.current = null, M.current && (M.current.style.opacity = "0"),
|
|
931
|
-
}, 12e3)),
|
|
932
|
-
|
|
984
|
+
j.current = null, !l.getBufferedRanges().some((e) => e.end > e.start) && si(ne.targetIdx);
|
|
985
|
+
}, ke)), kt.current !== null && (P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
|
|
986
|
+
P.current = null, N.current = null, M.current && (M.current.style.opacity = "0"), dn(!1);
|
|
987
|
+
}, 12e3)), Je && C.current && (pt.current = !0, C.current.requestFullscreen().catch(() => {
|
|
988
|
+
pt.current = !1;
|
|
933
989
|
}));
|
|
934
990
|
let re = () => {
|
|
935
991
|
let e = document, t = !!(document.fullscreenElement || e.webkitFullscreenElement);
|
|
936
|
-
|
|
992
|
+
pn(t), t || hn(!1);
|
|
937
993
|
let n = l.getVideoElement();
|
|
938
994
|
l.analytics.track(t ? "fullscreen_enter" : "fullscreen_exit", n);
|
|
939
995
|
};
|
|
940
996
|
document.addEventListener("fullscreenchange", re), document.addEventListener("webkitfullscreenchange", re);
|
|
941
|
-
let
|
|
997
|
+
let g = (e) => {
|
|
942
998
|
let t = document.activeElement;
|
|
943
999
|
if (!(t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.getAttribute("contenteditable") === "true" || t.getAttribute("role") === "slider"))) {
|
|
944
1000
|
switch (e.key.toLowerCase()) {
|
|
@@ -958,12 +1014,12 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
958
1014
|
break;
|
|
959
1015
|
case "arrowleft":
|
|
960
1016
|
case "j":
|
|
961
|
-
if (e.preventDefault(), !
|
|
1017
|
+
if (e.preventDefault(), !ri.current) {
|
|
962
1018
|
let e = l.getCurrentTime(), t = e;
|
|
963
1019
|
for (let n of z.current) e >= n.endTime ? t -= n.endTime - n.startTime : e >= n.startTime && (t -= e - n.startTime);
|
|
964
1020
|
let n = Math.max(0, t - 10);
|
|
965
1021
|
for (let e of z.current) n >= e.startTime && (n += e.endTime - e.startTime);
|
|
966
|
-
|
|
1022
|
+
Ot.current?.(n, {
|
|
967
1023
|
eventType: "fast_backward",
|
|
968
1024
|
skipSeconds: 10
|
|
969
1025
|
});
|
|
@@ -971,12 +1027,12 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
971
1027
|
break;
|
|
972
1028
|
case "arrowright":
|
|
973
1029
|
case "l":
|
|
974
|
-
if (e.preventDefault(), !
|
|
1030
|
+
if (e.preventDefault(), !ri.current) {
|
|
975
1031
|
let e = l.getCurrentTime(), t = z.current.reduce((e, t) => e + (t.endTime - t.startTime), 0), n = Math.max(0, l.getDuration() - t), r = e;
|
|
976
1032
|
for (let t of z.current) e >= t.endTime ? r -= t.endTime - t.startTime : e >= t.startTime && (r -= e - t.startTime);
|
|
977
1033
|
let i = Math.min(n, r + 10);
|
|
978
1034
|
for (let e of z.current) i >= e.startTime && (i += e.endTime - e.startTime);
|
|
979
|
-
|
|
1035
|
+
Ot.current?.(i, {
|
|
980
1036
|
eventType: "fast_forward",
|
|
981
1037
|
skipSeconds: 10
|
|
982
1038
|
});
|
|
@@ -992,32 +1048,32 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
992
1048
|
e.preventDefault(), l.setMute(!l.isMuted());
|
|
993
1049
|
break;
|
|
994
1050
|
case "f":
|
|
995
|
-
e.preventDefault(),
|
|
1051
|
+
e.preventDefault(), bt.current();
|
|
996
1052
|
break;
|
|
997
1053
|
case "p":
|
|
998
|
-
e.preventDefault(),
|
|
1054
|
+
e.preventDefault(), ri.current || l.togglePictureInPicture();
|
|
999
1055
|
break;
|
|
1000
1056
|
case "c":
|
|
1001
|
-
if (e.preventDefault(), I.enableSubtitles && !
|
|
1057
|
+
if (e.preventDefault(), I.enableSubtitles && !ri.current) if (l.subtitles.getActiveTrackId() !== "off") l.subtitles.setActiveTrack("off"), ir("off");
|
|
1002
1058
|
else {
|
|
1003
|
-
let e =
|
|
1004
|
-
e && e.length > 0 && (l.subtitles.setActiveTrack(e[0].id),
|
|
1059
|
+
let e = ai.current;
|
|
1060
|
+
e && e.length > 0 && (l.subtitles.setActiveTrack(e[0].id), ir(e[0].id));
|
|
1005
1061
|
}
|
|
1006
1062
|
break;
|
|
1007
1063
|
default: return;
|
|
1008
1064
|
}
|
|
1009
|
-
|
|
1065
|
+
oi();
|
|
1010
1066
|
}
|
|
1011
1067
|
};
|
|
1012
|
-
return document.addEventListener("keydown",
|
|
1013
|
-
if (
|
|
1014
|
-
key:
|
|
1068
|
+
return document.addEventListener("keydown", g), oi(), () => {
|
|
1069
|
+
if (Pn.current = {
|
|
1070
|
+
key: Dn,
|
|
1015
1071
|
snapshot: l.analytics.getSessionSnapshot()
|
|
1016
|
-
},
|
|
1017
|
-
let e =
|
|
1018
|
-
C.current && t.ownerDocument !== document && (t.classList.remove("gb-pip-video"), C.current.insertBefore(t, C.current.firstChild)),
|
|
1072
|
+
}, It.current) {
|
|
1073
|
+
let e = It.current, t = l.getVideoElement();
|
|
1074
|
+
C.current && t.ownerDocument !== document && (t.classList.remove("gb-pip-video"), C.current.insertBefore(t, C.current.firstChild)), It.current = null, Sn(null), bn(!1), e.close();
|
|
1019
1075
|
}
|
|
1020
|
-
if (l.destroy(),
|
|
1076
|
+
if (l.destroy(), ft.current?.destroy(), ft.current = null, document.body.style.overflow = "", document.body.style.touchAction = "", document.removeEventListener("fullscreenchange", re), document.removeEventListener("webkitfullscreenchange", re), document.removeEventListener("keydown", g), ti.current && window.clearTimeout(ti.current), k.current &&= (window.clearTimeout(k.current), null), j.current &&= (clearTimeout(j.current), null), xt.current = !1, A.current && (A.current.style.opacity = "0"), f.removeEventListener("seeking", p), "mediaSession" in navigator) {
|
|
1021
1077
|
try {
|
|
1022
1078
|
navigator.mediaSession.setActionHandler("seekto", null);
|
|
1023
1079
|
} catch {}
|
|
@@ -1028,25 +1084,25 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1028
1084
|
navigator.mediaSession.setActionHandler("seekbackward", null);
|
|
1029
1085
|
} catch {}
|
|
1030
1086
|
}
|
|
1031
|
-
|
|
1087
|
+
gt.current &&= (gt.current.destroy(), null), T.current &&= (document.body.removeChild(T.current), null), Nt.current = !1, N.current = null, P.current &&= (window.clearTimeout(P.current), null);
|
|
1032
1088
|
};
|
|
1033
1089
|
}, [
|
|
1034
1090
|
r,
|
|
1035
|
-
|
|
1036
|
-
|
|
1091
|
+
ie,
|
|
1092
|
+
Qt
|
|
1037
1093
|
]), c(() => {
|
|
1038
1094
|
if (F) {
|
|
1039
1095
|
F.keyMoments.setKeyMoments(W);
|
|
1040
1096
|
let e = C.current?.querySelector("video");
|
|
1041
1097
|
if (e) {
|
|
1042
1098
|
let t = F.keyMoments.getCurrentMoment(e.currentTime);
|
|
1043
|
-
|
|
1099
|
+
fr({
|
|
1044
1100
|
chapter: t.keyMoment,
|
|
1045
1101
|
index: t.index
|
|
1046
1102
|
});
|
|
1047
1103
|
}
|
|
1048
1104
|
}
|
|
1049
|
-
}, [
|
|
1105
|
+
}, [Tr, F]), c(() => {
|
|
1050
1106
|
let e = (e) => {
|
|
1051
1107
|
G !== "none" && (e.target.closest(".sdk-menu-container") || K("none"));
|
|
1052
1108
|
};
|
|
@@ -1054,17 +1110,17 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1054
1110
|
document.removeEventListener("click", e);
|
|
1055
1111
|
};
|
|
1056
1112
|
}, [G]), c(() => {
|
|
1057
|
-
|
|
1058
|
-
}, [
|
|
1059
|
-
|
|
1113
|
+
ni.current = en;
|
|
1114
|
+
}, [en]), c(() => {
|
|
1115
|
+
ri.current = Y;
|
|
1060
1116
|
}, [Y]), c(() => {
|
|
1061
|
-
|
|
1062
|
-
}, [
|
|
1063
|
-
let X = Y ||
|
|
1117
|
+
ei.current = Qr;
|
|
1118
|
+
}, [Qr]);
|
|
1119
|
+
let X = Y || Qr;
|
|
1064
1120
|
c(() => {
|
|
1065
|
-
|
|
1066
|
-
}, [
|
|
1067
|
-
|
|
1121
|
+
It.current = xn;
|
|
1122
|
+
}, [xn]), c(() => {
|
|
1123
|
+
ii.current = G;
|
|
1068
1124
|
}, [G]), c(() => {
|
|
1069
1125
|
if (!Y || !F) return;
|
|
1070
1126
|
let e = 0, t = F.getCurrentTime(), n = performance.now(), r = () => {
|
|
@@ -1074,7 +1130,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1074
1130
|
let e = i.playbackRate || 1;
|
|
1075
1131
|
s = t + (o - n) / 1e3 * e;
|
|
1076
1132
|
} else s = t;
|
|
1077
|
-
let c =
|
|
1133
|
+
let c = Yn(a);
|
|
1078
1134
|
if (c) {
|
|
1079
1135
|
let e = Math.min(s, a + .4, c.end), t = Math.min(100, Math.max(0, (e - c.start) / (c.end - c.start) * 100));
|
|
1080
1136
|
(C.current?.querySelectorAll(".sdk-ad-progress-fill"))?.forEach((e) => {
|
|
@@ -1085,38 +1141,38 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1085
1141
|
};
|
|
1086
1142
|
return e = requestAnimationFrame(r), () => cancelAnimationFrame(e);
|
|
1087
1143
|
}, [Y, F]), c(() => {
|
|
1088
|
-
|
|
1089
|
-
}, [
|
|
1090
|
-
|
|
1091
|
-
}, [
|
|
1144
|
+
ai.current = ar;
|
|
1145
|
+
}, [ar]), c(() => {
|
|
1146
|
+
zt.current = Lt;
|
|
1147
|
+
}, [Lt]), c(() => {
|
|
1092
1148
|
z.current = R;
|
|
1093
1149
|
}, [R]), c(() => {
|
|
1094
|
-
|
|
1095
|
-
}, [
|
|
1096
|
-
|
|
1097
|
-
}, [
|
|
1098
|
-
|
|
1099
|
-
}, [
|
|
1100
|
-
|
|
1101
|
-
}, [
|
|
1102
|
-
|
|
1103
|
-
}, [
|
|
1104
|
-
|
|
1150
|
+
Vn.current = Ln;
|
|
1151
|
+
}, [Ln]), c(() => {
|
|
1152
|
+
Hn.current = zn;
|
|
1153
|
+
}, [zn]), c(() => {
|
|
1154
|
+
Kn.current = Wn;
|
|
1155
|
+
}, [Wn]), c(() => {
|
|
1156
|
+
jt.current = S;
|
|
1157
|
+
}, [S]), c(() => {
|
|
1158
|
+
Mt.current = ct;
|
|
1159
|
+
}, [ct]), c(() => {
|
|
1160
|
+
Fn.current = null, In.current = !1, Dt.current = null, Pt.current = null, Bn(null), Hn.current = null, Un.current = /* @__PURE__ */ new Set(), Zt(!1);
|
|
1105
1161
|
}, [r]), c(() => {
|
|
1106
|
-
|
|
1162
|
+
Gt(!1);
|
|
1107
1163
|
}, [r]), c(() => {
|
|
1108
1164
|
if (!F) return;
|
|
1109
1165
|
let e = F.getVideoElement();
|
|
1110
1166
|
if (e && e.readyState >= 1) {
|
|
1111
|
-
|
|
1167
|
+
Gt(!0);
|
|
1112
1168
|
return;
|
|
1113
1169
|
}
|
|
1114
|
-
let t = () =>
|
|
1170
|
+
let t = () => Gt(!0);
|
|
1115
1171
|
return F.on("qualitylevels", t), e?.addEventListener("loadedmetadata", t), () => {
|
|
1116
1172
|
F.off("qualitylevels", t), e?.removeEventListener("loadedmetadata", t);
|
|
1117
1173
|
};
|
|
1118
1174
|
}, [F]), c(() => {
|
|
1119
|
-
|
|
1175
|
+
if (Rn([]), !(!at || !Wt)) return Ue(at, (e) => {
|
|
1120
1176
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
1121
1177
|
for (let r of e.nonLinearAvails ?? []) {
|
|
1122
1178
|
if (t.has(r.availId)) continue;
|
|
@@ -1130,39 +1186,41 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1130
1186
|
let s = o.position ?? "bottom_center";
|
|
1131
1187
|
n.push({
|
|
1132
1188
|
availId: r.availId,
|
|
1133
|
-
startTimeSeconds:
|
|
1134
|
-
durationSeconds:
|
|
1189
|
+
startTimeSeconds: ze(r.startTime ?? ""),
|
|
1190
|
+
durationSeconds: ze(i.minSuggestedDuration ?? "00:00:15"),
|
|
1135
1191
|
imageUrl: i.staticResource,
|
|
1136
1192
|
imageWidth: parseInt(i.width ?? "320", 10),
|
|
1137
1193
|
imageHeight: parseInt(i.height ?? "50", 10),
|
|
1138
1194
|
title: i.adTitle ?? "",
|
|
1139
|
-
clickThrough: i.clickThrough
|
|
1195
|
+
clickThrough: Be(i.clickThrough) ? i.clickThrough : "",
|
|
1140
1196
|
clickTrackingUrl: i.clickTracking ?? "",
|
|
1141
1197
|
impressionBeacons: a,
|
|
1142
1198
|
position: s,
|
|
1143
1199
|
dismissible: o.dismissible === !0
|
|
1144
1200
|
});
|
|
1145
1201
|
}
|
|
1146
|
-
|
|
1147
|
-
}
|
|
1202
|
+
return n.length > 0 ? n : null;
|
|
1203
|
+
}, Rn);
|
|
1148
1204
|
}, [
|
|
1149
|
-
|
|
1205
|
+
at,
|
|
1150
1206
|
r,
|
|
1151
|
-
|
|
1207
|
+
Wt
|
|
1152
1208
|
]), c(() => {
|
|
1153
|
-
|
|
1209
|
+
if (Gn([]), Jn([]), !(!ot || !Wt)) return Ue(ot, (e) => {
|
|
1154
1210
|
let t = [], n = [];
|
|
1155
1211
|
for (let r of e.avails ?? []) {
|
|
1156
1212
|
let e = r.ads ?? [];
|
|
1157
|
-
e.length
|
|
1158
|
-
|
|
1159
|
-
|
|
1213
|
+
if (e.length === 0) continue;
|
|
1214
|
+
let i = r.startTimeInSeconds ?? e[0].startTimeInSeconds ?? 0, a = e[e.length - 1], o = (a?.startTimeInSeconds ?? i) + (a?.durationInSeconds ?? 0);
|
|
1215
|
+
n.push({
|
|
1216
|
+
startTime: i,
|
|
1217
|
+
endTime: r.durationInSeconds == null ? Math.max(o, i) : i + r.durationInSeconds
|
|
1160
1218
|
}), e.forEach((n, r) => {
|
|
1161
|
-
let i = n?.skipOffset
|
|
1219
|
+
let i = Ve(n?.skipOffset), a = i !== null, o = {};
|
|
1162
1220
|
try {
|
|
1163
1221
|
o = JSON.parse(n?.adParameters ?? "{}");
|
|
1164
1222
|
} catch {}
|
|
1165
|
-
let s = o.ctaText && o.redirectUrl ? {
|
|
1223
|
+
let s = o.ctaText && Be(o.redirectUrl) ? {
|
|
1166
1224
|
text: o.ctaText,
|
|
1167
1225
|
url: o.redirectUrl,
|
|
1168
1226
|
title: o.title || void 0,
|
|
@@ -1173,42 +1231,47 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1173
1231
|
endTimeSeconds: c + l,
|
|
1174
1232
|
durationSeconds: l,
|
|
1175
1233
|
skippable: a,
|
|
1176
|
-
skipOffsetSeconds:
|
|
1234
|
+
skipOffsetSeconds: i ?? 0,
|
|
1177
1235
|
cta: s,
|
|
1178
1236
|
podIndex: r,
|
|
1179
1237
|
podTotal: e.length
|
|
1180
1238
|
});
|
|
1181
|
-
})
|
|
1239
|
+
});
|
|
1182
1240
|
}
|
|
1183
|
-
|
|
1184
|
-
|
|
1241
|
+
return t.length > 0 ? {
|
|
1242
|
+
pods: t,
|
|
1243
|
+
breaks: n
|
|
1244
|
+
} : null;
|
|
1245
|
+
}, ({ pods: e, breaks: t }) => {
|
|
1246
|
+
Gn(e), Jn(t);
|
|
1247
|
+
});
|
|
1185
1248
|
}, [
|
|
1186
|
-
|
|
1249
|
+
ot,
|
|
1187
1250
|
r,
|
|
1188
|
-
|
|
1251
|
+
Wt
|
|
1189
1252
|
]), c(() => {
|
|
1190
|
-
!F ||
|
|
1191
|
-
}, [F,
|
|
1253
|
+
!F || qn.length === 0 || F.setAdBreaks(qn);
|
|
1254
|
+
}, [F, qn]), c(() => {
|
|
1192
1255
|
if (!F) return;
|
|
1193
1256
|
let e = () => {
|
|
1194
|
-
document.hidden ?
|
|
1257
|
+
document.hidden ? nt && ri.current && ni.current && (F.pause(), In.current = !0) : In.current &&= (F.play(), !1);
|
|
1195
1258
|
};
|
|
1196
1259
|
return document.addEventListener("visibilitychange", e), () => {
|
|
1197
1260
|
document.removeEventListener("visibilitychange", e);
|
|
1198
1261
|
};
|
|
1199
|
-
}, [F,
|
|
1200
|
-
let
|
|
1201
|
-
|
|
1202
|
-
},
|
|
1203
|
-
|
|
1204
|
-
},
|
|
1262
|
+
}, [F, nt]);
|
|
1263
|
+
let ci = () => {
|
|
1264
|
+
oi();
|
|
1265
|
+
}, li = () => {
|
|
1266
|
+
Je && !pt.current && C.current && (pt.current = !0, C.current.requestFullscreen().catch(() => {}));
|
|
1267
|
+
}, ui = () => {
|
|
1205
1268
|
if (F) {
|
|
1206
1269
|
if (q) {
|
|
1207
|
-
F.casting.remotePlayPause(),
|
|
1270
|
+
F.casting.remotePlayPause(), oi();
|
|
1208
1271
|
return;
|
|
1209
1272
|
}
|
|
1210
|
-
if (
|
|
1211
|
-
else if (
|
|
1273
|
+
if (Cn) Z(0), li(), F.play(), wn(!1);
|
|
1274
|
+
else if (en) {
|
|
1212
1275
|
F.pause();
|
|
1213
1276
|
try {
|
|
1214
1277
|
let e = F.getVideoElement?.();
|
|
@@ -1221,100 +1284,100 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1221
1284
|
}), T.current && !T.current.paused) try {
|
|
1222
1285
|
T.current.pause();
|
|
1223
1286
|
} catch {}
|
|
1224
|
-
} else
|
|
1225
|
-
|
|
1287
|
+
} else li(), F.play();
|
|
1288
|
+
oi();
|
|
1226
1289
|
}
|
|
1227
|
-
},
|
|
1290
|
+
}, di = (e) => {
|
|
1228
1291
|
if (!w.current || !F || B === 0) return 0;
|
|
1229
1292
|
let t = w.current.getBoundingClientRect();
|
|
1230
1293
|
return H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
|
|
1231
|
-
},
|
|
1232
|
-
if (!F || Y ||
|
|
1233
|
-
|
|
1294
|
+
}, fi = (e) => {
|
|
1295
|
+
if (!F || Y || Qr) return;
|
|
1296
|
+
vt.current = !0, Kr(di(e));
|
|
1234
1297
|
let t = (e) => {
|
|
1235
|
-
if (!
|
|
1298
|
+
if (!vt.current || !w.current) return;
|
|
1236
1299
|
let t = w.current.getBoundingClientRect(), n = H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
|
|
1237
|
-
|
|
1300
|
+
Kr(n), Lr(e.clientX - t.left), Vr(n), T.current && (T.current.currentTime = n), oi();
|
|
1238
1301
|
}, n = (e) => {
|
|
1239
|
-
if (
|
|
1302
|
+
if (vt.current = !1, w.current) {
|
|
1240
1303
|
let t = w.current.getBoundingClientRect();
|
|
1241
1304
|
Z(H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B));
|
|
1242
1305
|
}
|
|
1243
|
-
|
|
1306
|
+
Kr(null), Lr(null), Ur(null), Gr(null), document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
|
|
1244
1307
|
};
|
|
1245
1308
|
document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
|
|
1246
1309
|
}, Z = (e, t) => {
|
|
1247
1310
|
if (!F) return;
|
|
1248
|
-
if (q) {
|
|
1311
|
+
if (Pt.current = null, q) {
|
|
1249
1312
|
F.casting.remoteSeek(e);
|
|
1250
1313
|
return;
|
|
1251
1314
|
}
|
|
1252
|
-
let n = Math.max(0,
|
|
1315
|
+
let n = Math.max(0, rn > 0 ? Math.min(e, rn) : e);
|
|
1253
1316
|
if (t) {
|
|
1254
1317
|
let { eventType: e, ...n } = t;
|
|
1255
1318
|
F.attributeNextSeek(e, n);
|
|
1256
1319
|
}
|
|
1257
1320
|
let r = F.getCurrentTime();
|
|
1258
1321
|
if (n > r && z.current.length > 0) {
|
|
1259
|
-
let e = z.current.filter((e) => e.startTime < n && e.endTime > r && !
|
|
1322
|
+
let e = z.current.filter((e) => e.startTime < n && e.endTime > r && !En.current.has(e.startTime)).sort((e, t) => e.startTime - t.startTime);
|
|
1260
1323
|
if (e.length > 0) {
|
|
1261
|
-
|
|
1324
|
+
Dt.current = n;
|
|
1262
1325
|
let t = e[e.length - 1], i = Math.max(t.startTime, r);
|
|
1263
|
-
E.current = !0, D.current = i, O.current = r,
|
|
1264
|
-
E.current = !1,
|
|
1326
|
+
E.current = !0, D.current = i, O.current = r, nn(i), ei.current = !0, $r(!0), A.current && (A.current.style.opacity = "1"), Ct(F.getVideoElement()), F.seek(i), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
|
|
1327
|
+
E.current = !1, ei.current = !1, $r(!1), D.current = null, O.current = null, k.current = null, xt.current = !1, A.current && (A.current.style.opacity = "0"), wt(F.getVideoElement());
|
|
1265
1328
|
}, 3e3);
|
|
1266
1329
|
return;
|
|
1267
1330
|
}
|
|
1268
1331
|
}
|
|
1269
|
-
|
|
1270
|
-
let i = z.current.find((e) =>
|
|
1271
|
-
E.current = !0, D.current = a, O.current = r,
|
|
1272
|
-
E.current = !1, D.current = null, O.current = null, k.current = null, A.current && (A.current.style.opacity = "0");
|
|
1332
|
+
Dt.current = null;
|
|
1333
|
+
let i = z.current.find((e) => En.current.has(e.startTime) && n >= e.startTime - .5 && n < e.endTime + 2), a = i ? Math.max(n, i.endTime + .5) : n;
|
|
1334
|
+
E.current = !0, D.current = a, O.current = r, nn(a), xt.current = !1, A.current && (A.current.style.opacity = "0"), wt(F.getVideoElement()), F.seek(a), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
|
|
1335
|
+
E.current = !1, D.current = null, O.current = null, k.current = null, xt.current = !1, A.current && (A.current.style.opacity = "0");
|
|
1273
1336
|
}, 3e3);
|
|
1274
1337
|
};
|
|
1275
|
-
|
|
1276
|
-
let
|
|
1338
|
+
Ot.current = Z;
|
|
1339
|
+
let pi = () => {
|
|
1277
1340
|
if (!F) return;
|
|
1278
1341
|
if (q) {
|
|
1279
|
-
F.casting.remoteSetMute(!(
|
|
1342
|
+
F.casting.remoteSetMute(!(Dr?.isMuted ?? !1));
|
|
1280
1343
|
return;
|
|
1281
1344
|
}
|
|
1282
|
-
let e = !
|
|
1283
|
-
F.setMute(e),
|
|
1284
|
-
},
|
|
1285
|
-
F && (F.setPlaybackRate(e),
|
|
1286
|
-
},
|
|
1345
|
+
let e = !cn;
|
|
1346
|
+
F.setMute(e), ln(e);
|
|
1347
|
+
}, mi = (e) => {
|
|
1348
|
+
F && (F.setPlaybackRate(e), hr(e), K("none"), xr(`Playback speed: ${e === 1 ? "Normal" : `${e}x`}`));
|
|
1349
|
+
}, hi = (e) => {
|
|
1287
1350
|
if (!F) return;
|
|
1288
1351
|
F.setQuality(e);
|
|
1289
|
-
let t =
|
|
1290
|
-
t && (
|
|
1291
|
-
},
|
|
1292
|
-
if (F) if (F.subtitles.setActiveTrack(e),
|
|
1352
|
+
let t = Qn.find((t) => t.id === e);
|
|
1353
|
+
t && (tr(t), xr(`Quality: ${t.label}`)), K("none");
|
|
1354
|
+
}, gi = (e) => {
|
|
1355
|
+
if (F) if (F.subtitles.setActiveTrack(e), ir(e), K("none"), e === "off") xr("Captions off");
|
|
1293
1356
|
else {
|
|
1294
|
-
let t =
|
|
1295
|
-
|
|
1357
|
+
let t = ar.find((t) => t.id === e);
|
|
1358
|
+
xr(`Captions: ${t ? b(t) : "on"}`);
|
|
1296
1359
|
}
|
|
1297
|
-
},
|
|
1298
|
-
F && (j.current &&= (clearTimeout(j.current), null),
|
|
1299
|
-
},
|
|
1360
|
+
}, _i = (e) => {
|
|
1361
|
+
F && (j.current &&= (clearTimeout(j.current), null), Cr(null), M.current && (M.current.style.opacity = "1"), dn(!0), At.current === null && (kt.current = F.getCurrentTime()), At.current = { targetIdx: e }, K("none"), xr(`Source: ${S?.[e]?.label ?? ""}`), ct?.(e));
|
|
1362
|
+
}, vi = (e, t) => {
|
|
1300
1363
|
Z(e, {
|
|
1301
1364
|
eventType: "key_moments",
|
|
1302
1365
|
momentTitle: t?.title ?? "",
|
|
1303
1366
|
momentTime: e
|
|
1304
1367
|
}), K("none");
|
|
1305
|
-
},
|
|
1306
|
-
if (!
|
|
1368
|
+
}, yi = o(() => {
|
|
1369
|
+
if (!It.current) return;
|
|
1307
1370
|
let e = F?.getVideoElement?.();
|
|
1308
|
-
e && C.current && e.ownerDocument !== document && (e.classList.remove("gb-pip-video"), e.style.objectFit = "", C.current.insertBefore(e, C.current.firstChild)),
|
|
1309
|
-
}, [F]),
|
|
1371
|
+
e && C.current && e.ownerDocument !== document && (e.classList.remove("gb-pip-video"), e.style.objectFit = "", C.current.insertBefore(e, C.current.firstChild)), It.current = null, Sn(null), bn(!1);
|
|
1372
|
+
}, [F]), bi = async () => {
|
|
1310
1373
|
if (!F) return;
|
|
1311
1374
|
let e = window.documentPictureInPicture;
|
|
1312
1375
|
if (!e) {
|
|
1313
1376
|
F.togglePictureInPicture();
|
|
1314
1377
|
return;
|
|
1315
1378
|
}
|
|
1316
|
-
if (
|
|
1317
|
-
|
|
1379
|
+
if (It.current) {
|
|
1380
|
+
It.current.close();
|
|
1318
1381
|
return;
|
|
1319
1382
|
}
|
|
1320
1383
|
try {
|
|
@@ -1322,138 +1385,138 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1322
1385
|
width: 360,
|
|
1323
1386
|
height: Math.round(360 / n)
|
|
1324
1387
|
}), i = r.document.createElement("style");
|
|
1325
|
-
i.textContent =
|
|
1388
|
+
i.textContent = je, r.document.head.appendChild(i), t.classList.add("gb-pip-video"), r.document.body.appendChild(t), r.addEventListener("pagehide", () => yi(), { once: !0 }), It.current = r, Sn(r), bn(!0);
|
|
1326
1389
|
} catch (e) {
|
|
1327
1390
|
console.error("[PlayerSDK PiP] Failed to open custom Picture-in-Picture window:", e);
|
|
1328
1391
|
}
|
|
1329
|
-
},
|
|
1330
|
-
if (Y ||
|
|
1392
|
+
}, xi = (e) => {
|
|
1393
|
+
if (Y || Qr) return;
|
|
1331
1394
|
let t = e.currentTarget.getBoundingClientRect();
|
|
1332
1395
|
Z(H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B));
|
|
1333
|
-
},
|
|
1396
|
+
}, Si = () => {
|
|
1334
1397
|
if (!C.current) return;
|
|
1335
1398
|
let e = C.current, t = document, n = e, r = !!(document.fullscreenElement || t.webkitFullscreenElement), i = () => {
|
|
1336
|
-
|
|
1399
|
+
hn(!0), pn(!0), document.body.style.overflow = "hidden", document.body.style.touchAction = "none", F?.analytics.track("fullscreen_enter", F.getVideoElement());
|
|
1337
1400
|
}, a = () => {
|
|
1338
|
-
|
|
1401
|
+
hn(!1), pn(!1), document.body.style.overflow = "", document.body.style.touchAction = "", F?.analytics.track("fullscreen_exit", F.getVideoElement());
|
|
1339
1402
|
};
|
|
1340
|
-
if (r ||
|
|
1403
|
+
if (r || mn) _n(!1), document.fullscreenElement ? document.exitFullscreen() : t.webkitFullscreenElement ? t.webkitExitFullscreen?.() : a();
|
|
1341
1404
|
else {
|
|
1342
|
-
|
|
1405
|
+
_n(zt.current);
|
|
1343
1406
|
let t = e.requestFullscreen?.bind(e) ?? n.webkitRequestFullscreen?.bind(n);
|
|
1344
1407
|
t ? t().catch(i) : i();
|
|
1345
1408
|
}
|
|
1346
1409
|
};
|
|
1347
1410
|
c(() => {
|
|
1348
|
-
|
|
1411
|
+
bt.current = Si;
|
|
1349
1412
|
});
|
|
1350
|
-
let
|
|
1413
|
+
let Ci = () => {
|
|
1351
1414
|
if (!Y) return;
|
|
1352
|
-
let e = R.find((e) => L >= e.startTime && L < e.endTime), t =
|
|
1415
|
+
let e = R.find((e) => L >= e.startTime && L < e.endTime), t = Wn.find((e) => L >= e.startTimeSeconds && L < e.endTimeSeconds);
|
|
1353
1416
|
if (t) {
|
|
1354
1417
|
let n = t.podIndex >= t.podTotal - 1;
|
|
1355
|
-
|
|
1418
|
+
Tt.current?.(n ? e?.endTime ?? t.endTimeSeconds : t.endTimeSeconds, !n);
|
|
1356
1419
|
return;
|
|
1357
1420
|
}
|
|
1358
|
-
e &&
|
|
1359
|
-
},
|
|
1360
|
-
|
|
1361
|
-
},
|
|
1421
|
+
e && Tt.current?.(e.endTime);
|
|
1422
|
+
}, wi = () => {
|
|
1423
|
+
Hn.current && Un.current.add(Hn.current.availId), Bn(null), Hn.current = null;
|
|
1424
|
+
}, Ti = (e) => {
|
|
1362
1425
|
e.clickTrackingUrl && fetch(e.clickTrackingUrl, { mode: "no-cors" }).catch(() => {}), e.clickThrough && window.open(e.clickThrough, "_blank", "noopener,noreferrer");
|
|
1363
|
-
},
|
|
1426
|
+
}, Ei = (e) => {
|
|
1364
1427
|
window.open(e.url, "_blank", "noopener,noreferrer");
|
|
1365
|
-
},
|
|
1428
|
+
}, Di = () => {
|
|
1366
1429
|
F && (q ? F.casting.stopCasting() : F.casting.requestSession(r, L));
|
|
1367
|
-
},
|
|
1430
|
+
}, Oi = () => {
|
|
1368
1431
|
if (!F) return;
|
|
1369
1432
|
let e = F.getVideoElement();
|
|
1370
|
-
if (
|
|
1433
|
+
if (Mr) {
|
|
1371
1434
|
F.casting.stopAirPlay(e);
|
|
1372
1435
|
return;
|
|
1373
1436
|
}
|
|
1374
1437
|
typeof e.webkitShowPlaybackTargetPicker == "function" || F.casting.isAirPlayAvailable() ? F.casting.requestAirPlaySession(e) : console.warn("[PlayerSDK AirPlay] AirPlay is not available on this device.");
|
|
1375
|
-
},
|
|
1376
|
-
if (!w.current || B === 0 || !F || Y ||
|
|
1438
|
+
}, ki = (e) => {
|
|
1439
|
+
if (!w.current || B === 0 || !F || Y || Qr) return;
|
|
1377
1440
|
let t = w.current.getBoundingClientRect();
|
|
1378
|
-
|
|
1441
|
+
mt.current = t.width, zr(Math.max(192 / 2, Math.min(e.clientX - t.left, t.width - 192 / 2)));
|
|
1379
1442
|
let n = H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
|
|
1380
|
-
|
|
1443
|
+
Lr(e.clientX - t.left), Vr(n), _t.current && window.clearTimeout(_t.current), _t.current = window.setTimeout(() => {
|
|
1381
1444
|
T.current && (T.current.currentTime = n);
|
|
1382
|
-
}, 100),
|
|
1383
|
-
},
|
|
1445
|
+
}, 100), Gr(F.keyMoments.getCurrentMoment(n).keyMoment);
|
|
1446
|
+
}, Ai = (e) => {
|
|
1384
1447
|
if (!w.current || B === 0) return 0;
|
|
1385
1448
|
let t = w.current.getBoundingClientRect();
|
|
1386
1449
|
return H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
|
|
1387
|
-
},
|
|
1388
|
-
if (!F || Y ||
|
|
1389
|
-
e.preventDefault(),
|
|
1450
|
+
}, ji = (e) => {
|
|
1451
|
+
if (!F || Y || Qr || B === 0) return;
|
|
1452
|
+
e.preventDefault(), vt.current = !0, Kr(Ai(e.touches[0]));
|
|
1390
1453
|
let t = (e) => {
|
|
1391
|
-
if (!
|
|
1454
|
+
if (!vt.current || !w.current) return;
|
|
1392
1455
|
let t = e.touches[0], n = w.current.getBoundingClientRect(), r = H(Math.max(0, Math.min(1, (t.clientX - n.left) / n.width)) * B);
|
|
1393
|
-
|
|
1456
|
+
Kr(r), Vr(r), oi();
|
|
1394
1457
|
}, n = (e) => {
|
|
1395
|
-
if (
|
|
1458
|
+
if (vt.current = !1, w.current && e.changedTouches[0]) {
|
|
1396
1459
|
let t = e.changedTouches[0], n = w.current.getBoundingClientRect();
|
|
1397
1460
|
Z(H(Math.max(0, Math.min(1, (t.clientX - n.left) / n.width)) * B));
|
|
1398
1461
|
}
|
|
1399
|
-
|
|
1462
|
+
Kr(null), document.removeEventListener("touchmove", t), document.removeEventListener("touchend", n);
|
|
1400
1463
|
};
|
|
1401
1464
|
document.addEventListener("touchmove", t, { passive: !1 }), document.addEventListener("touchend", n);
|
|
1402
|
-
},
|
|
1403
|
-
|
|
1465
|
+
}, Mi = () => {
|
|
1466
|
+
Lr(null), Ur(null), Gr(null), _t.current && window.clearTimeout(_t.current);
|
|
1404
1467
|
}, Q = (e) => {
|
|
1405
1468
|
if (isNaN(e) || e < 0) return "00:00";
|
|
1406
1469
|
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");
|
|
1407
1470
|
return n > 0 ? `${a(n)}:${a(r)}:${a(i)}` : `${a(r)}:${a(i)}`;
|
|
1408
1471
|
};
|
|
1409
1472
|
c(() => {
|
|
1410
|
-
|
|
1411
|
-
}, [
|
|
1412
|
-
|
|
1413
|
-
}, [
|
|
1414
|
-
|
|
1473
|
+
wr.current && xr(en ? "Playing" : "Paused");
|
|
1474
|
+
}, [en]), c(() => {
|
|
1475
|
+
wr.current && xr(cn ? "Muted" : "Unmuted");
|
|
1476
|
+
}, [cn]), c(() => {
|
|
1477
|
+
wr.current = !0;
|
|
1415
1478
|
}, []), c(() => {
|
|
1416
1479
|
let e = (e) => {
|
|
1417
|
-
e.key === "Escape" &&
|
|
1480
|
+
e.key === "Escape" && ii.current !== "none" && (e.preventDefault(), K("none"));
|
|
1418
1481
|
};
|
|
1419
1482
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1420
1483
|
}, []);
|
|
1421
|
-
let
|
|
1422
|
-
if (Y ||
|
|
1423
|
-
let t = Date.now(), n = C.current?.getBoundingClientRect(), r = e.clientX - (n?.left ?? 0), i =
|
|
1484
|
+
let Ni = q ? !(Dr?.isPaused ?? !0) : en, $ = q ? Dr?.currentTime ?? 0 : L, Pi = q ? Dr?.duration ?? 0 : B, Fi = q ? Dr?.volumeLevel ?? 1 : on, Ii = q ? Dr?.isMuted ?? !1 : cn, Li = o((e) => {
|
|
1485
|
+
if (Y || Qr || e.target.closest(".sdk-mobile-ctrl")) return;
|
|
1486
|
+
let t = Date.now(), n = C.current?.getBoundingClientRect(), r = e.clientX - (n?.left ?? 0), i = Bt.current;
|
|
1424
1487
|
if (i && t - i.time < 300) {
|
|
1425
|
-
|
|
1488
|
+
Bt.current = null;
|
|
1426
1489
|
let e = r < (n?.width ?? 0) / 2, t = e ? -10 : 10;
|
|
1427
1490
|
Z(H(Math.max(0, Math.min(B, V($) + t))), {
|
|
1428
1491
|
eventType: e ? "fast_backward" : "fast_forward",
|
|
1429
1492
|
skipSeconds: 10
|
|
1430
|
-
}),
|
|
1431
|
-
} else
|
|
1493
|
+
}), Ht(e ? "left" : "right"), window.setTimeout(() => Ht(null), 700), oi();
|
|
1494
|
+
} else Bt.current = {
|
|
1432
1495
|
time: t,
|
|
1433
1496
|
x: r
|
|
1434
|
-
},
|
|
1497
|
+
}, Yr ? (Xr(!1), ti.current && window.clearTimeout(ti.current)) : oi();
|
|
1435
1498
|
}, [
|
|
1436
1499
|
Y,
|
|
1437
|
-
|
|
1500
|
+
Qr,
|
|
1438
1501
|
B,
|
|
1439
1502
|
V,
|
|
1440
1503
|
$,
|
|
1441
1504
|
H,
|
|
1442
1505
|
Z,
|
|
1443
|
-
|
|
1444
|
-
]),
|
|
1506
|
+
Yr
|
|
1507
|
+
]), Ri = () => f(Ii || Fi === 0 ? De : Fi < .3 ? Oe : Fi < .7 ? Te : Ee, { size: 18 }), zi = (e) => (t) => {
|
|
1445
1508
|
t.key === "Enter" || t.key === " " ? (t.preventDefault(), e()) : t.key === "Escape" && (t.preventDefault(), K("none"));
|
|
1446
|
-
},
|
|
1509
|
+
}, Bi = (e) => (t) => {
|
|
1447
1510
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), e());
|
|
1448
|
-
},
|
|
1449
|
-
if (!(Y ||
|
|
1511
|
+
}, Vi = (e) => {
|
|
1512
|
+
if (!(Y || Qr)) if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
1450
1513
|
e.preventDefault();
|
|
1451
1514
|
let t = e.key === "ArrowLeft" ? -5 : 5;
|
|
1452
1515
|
Z(H(Math.max(0, Math.min(B, V($) + t))));
|
|
1453
1516
|
} else e.key === "Home" ? (e.preventDefault(), Z(H(0))) : e.key === "End" && (e.preventDefault(), Z(H(B)));
|
|
1454
|
-
},
|
|
1517
|
+
}, Hi = (e) => {
|
|
1455
1518
|
K(G === e ? "none" : e);
|
|
1456
|
-
},
|
|
1519
|
+
}, Ui = o((e) => {
|
|
1457
1520
|
if (!e) return;
|
|
1458
1521
|
e.style.left = "";
|
|
1459
1522
|
let t = C.current;
|
|
@@ -1464,19 +1527,19 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1464
1527
|
return /* @__PURE__ */ p("div", {
|
|
1465
1528
|
ref: C,
|
|
1466
1529
|
role: "region",
|
|
1467
|
-
"aria-label":
|
|
1468
|
-
className: `sdk-player-container ${
|
|
1469
|
-
onMouseMove:
|
|
1470
|
-
onTouchStart:
|
|
1530
|
+
"aria-label": x || qr ? `${x || qr} video player` : "Video player",
|
|
1531
|
+
className: `sdk-player-container ${Yr ? "controls-active" : ""} ${mn ? "sdk-fs-simulated" : ""}`,
|
|
1532
|
+
onMouseMove: ci,
|
|
1533
|
+
onTouchStart: vn ? void 0 : oi,
|
|
1471
1534
|
onMouseLeave: () => {},
|
|
1472
1535
|
style: {
|
|
1473
|
-
border:
|
|
1474
|
-
"--sdk-theme-color":
|
|
1475
|
-
"--sdk-theme-color-rgb":
|
|
1536
|
+
border: mn ? "none" : "1px solid rgba(255, 255, 255, 0.08)",
|
|
1537
|
+
"--sdk-theme-color": h,
|
|
1538
|
+
"--sdk-theme-color-rgb": Fe(h)
|
|
1476
1539
|
},
|
|
1477
1540
|
children: [
|
|
1478
1541
|
/* @__PURE__ */ f("canvas", {
|
|
1479
|
-
ref:
|
|
1542
|
+
ref: ht,
|
|
1480
1543
|
width: 160,
|
|
1481
1544
|
height: 90,
|
|
1482
1545
|
style: {
|
|
@@ -1491,7 +1554,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1491
1554
|
"aria-live": "polite",
|
|
1492
1555
|
"aria-atomic": "true",
|
|
1493
1556
|
className: "sdk-sr-only",
|
|
1494
|
-
children:
|
|
1557
|
+
children: br
|
|
1495
1558
|
}),
|
|
1496
1559
|
/* @__PURE__ */ f("div", {
|
|
1497
1560
|
ref: A,
|
|
@@ -1506,10 +1569,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1506
1569
|
},
|
|
1507
1570
|
"aria-hidden": "true"
|
|
1508
1571
|
}),
|
|
1509
|
-
|
|
1572
|
+
xn && /* @__PURE__ */ p("div", {
|
|
1510
1573
|
className: "sdk-pip-placeholder",
|
|
1511
1574
|
"aria-hidden": "true",
|
|
1512
|
-
children: [/* @__PURE__ */ f(
|
|
1575
|
+
children: [/* @__PURE__ */ f(xe, {
|
|
1513
1576
|
size: 32,
|
|
1514
1577
|
"aria-hidden": "true"
|
|
1515
1578
|
}), /* @__PURE__ */ f("span", { children: "Playing in Picture-in-Picture" })]
|
|
@@ -1517,7 +1580,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1517
1580
|
/* @__PURE__ */ f("div", {
|
|
1518
1581
|
ref: M,
|
|
1519
1582
|
style: {
|
|
1520
|
-
opacity:
|
|
1583
|
+
opacity: lt && lt > 0 ? 1 : 0,
|
|
1521
1584
|
position: "absolute",
|
|
1522
1585
|
inset: 0,
|
|
1523
1586
|
background: "#000",
|
|
@@ -1528,11 +1591,11 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1528
1591
|
"aria-hidden": "true"
|
|
1529
1592
|
}),
|
|
1530
1593
|
/* @__PURE__ */ f("div", {
|
|
1531
|
-
className: `sdk-spinner-overlay ${
|
|
1594
|
+
className: `sdk-spinner-overlay ${un ? "active" : ""}`,
|
|
1532
1595
|
"aria-hidden": "true",
|
|
1533
1596
|
children: /* @__PURE__ */ f("div", { className: "sdk-spinner" })
|
|
1534
1597
|
}),
|
|
1535
|
-
|
|
1598
|
+
Xt && /* @__PURE__ */ f("div", {
|
|
1536
1599
|
style: {
|
|
1537
1600
|
position: "absolute",
|
|
1538
1601
|
inset: 0,
|
|
@@ -1546,10 +1609,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1546
1609
|
padding: "0 24px"
|
|
1547
1610
|
},
|
|
1548
1611
|
children: /* @__PURE__ */ f(re, { onRetry: () => {
|
|
1549
|
-
|
|
1612
|
+
Zt(!1), $t((e) => e + 1);
|
|
1550
1613
|
} })
|
|
1551
1614
|
}),
|
|
1552
|
-
|
|
1615
|
+
Sr && /* @__PURE__ */ f("div", {
|
|
1553
1616
|
style: {
|
|
1554
1617
|
position: "absolute",
|
|
1555
1618
|
top: "50%",
|
|
@@ -1568,24 +1631,24 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1568
1631
|
backdropFilter: "blur(8px)",
|
|
1569
1632
|
border: "1px solid rgba(255,255,255,0.12)"
|
|
1570
1633
|
},
|
|
1571
|
-
children:
|
|
1634
|
+
children: Sr
|
|
1572
1635
|
}),
|
|
1573
|
-
I.enableSubtitles && !Y &&
|
|
1636
|
+
I.enableSubtitles && !Y && nr && U !== "off" && /* @__PURE__ */ f("div", {
|
|
1574
1637
|
className: "sdk-subtitles-overlay",
|
|
1575
1638
|
children: /* @__PURE__ */ f("span", {
|
|
1576
1639
|
className: "sdk-subtitles-text",
|
|
1577
1640
|
style: {
|
|
1578
|
-
fontSize:
|
|
1579
|
-
color:
|
|
1580
|
-
background:
|
|
1581
|
-
border:
|
|
1582
|
-
backdropFilter:
|
|
1641
|
+
fontSize: Xe.size === "small" ? "14px" : Xe.size === "large" ? "24px" : "18px",
|
|
1642
|
+
color: Xe.color ?? "#ffffff",
|
|
1643
|
+
background: Xe.background === "none" ? "transparent" : Xe.background === "solid" ? "rgba(0, 0, 0, 0.92)" : "rgba(15, 23, 42, 0.78)",
|
|
1644
|
+
border: Xe.background === "none" ? "none" : "1px solid rgba(255,255,255,0.08)",
|
|
1645
|
+
backdropFilter: Xe.background === "none" ? "none" : "blur(8px)"
|
|
1583
1646
|
},
|
|
1584
|
-
dangerouslySetInnerHTML: { __html:
|
|
1647
|
+
dangerouslySetInnerHTML: { __html: nr }
|
|
1585
1648
|
})
|
|
1586
1649
|
}),
|
|
1587
|
-
|
|
1588
|
-
className: `sdk-overlay-ad sdk-overlay-ad--${
|
|
1650
|
+
zn && /* @__PURE__ */ p("div", {
|
|
1651
|
+
className: `sdk-overlay-ad sdk-overlay-ad--${zn.position}`,
|
|
1589
1652
|
role: "complementary",
|
|
1590
1653
|
"aria-label": "Advertisement",
|
|
1591
1654
|
children: [/* @__PURE__ */ p("div", {
|
|
@@ -1593,23 +1656,23 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1593
1656
|
children: [/* @__PURE__ */ f("span", {
|
|
1594
1657
|
className: "sdk-overlay-ad-label",
|
|
1595
1658
|
children: "Ad"
|
|
1596
|
-
}),
|
|
1659
|
+
}), zn.dismissible && /* @__PURE__ */ f("button", {
|
|
1597
1660
|
className: "sdk-overlay-ad-close",
|
|
1598
|
-
onClick:
|
|
1661
|
+
onClick: wi,
|
|
1599
1662
|
"aria-label": "Close advertisement",
|
|
1600
1663
|
children: "✕"
|
|
1601
1664
|
})]
|
|
1602
1665
|
}), /* @__PURE__ */ f("img", {
|
|
1603
|
-
src:
|
|
1604
|
-
width:
|
|
1605
|
-
height:
|
|
1606
|
-
alt:
|
|
1666
|
+
src: zn.imageUrl,
|
|
1667
|
+
width: zn.imageWidth,
|
|
1668
|
+
height: zn.imageHeight,
|
|
1669
|
+
alt: zn.title || "Advertisement",
|
|
1607
1670
|
className: "sdk-overlay-ad-img",
|
|
1608
|
-
onClick: () =>
|
|
1671
|
+
onClick: () => Ti(zn)
|
|
1609
1672
|
})]
|
|
1610
1673
|
}),
|
|
1611
1674
|
Y && (() => {
|
|
1612
|
-
let e =
|
|
1675
|
+
let e = Wn.find((e) => L >= e.startTimeSeconds && L < e.endTimeSeconds), t = R.find((e) => L >= e.startTime && L < e.endTime), n = e ? Math.max(0, e.endTimeSeconds - L) : t ? Math.max(0, t.endTime - L) : 0, r = e ? L - e.startTimeSeconds : t ? L - t.startTime : 0, i = !!e && e.podTotal > 1, a = e ? e.skippable : rt, o = e ? e.skipOffsetSeconds : it, s = a && r >= o, c = Math.ceil(o - r);
|
|
1613
1676
|
return /* @__PURE__ */ p(te, { children: [
|
|
1614
1677
|
/* @__PURE__ */ p("div", {
|
|
1615
1678
|
className: "sdk-ad-countdown",
|
|
@@ -1636,7 +1699,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1636
1699
|
}),
|
|
1637
1700
|
a && /* @__PURE__ */ f("button", {
|
|
1638
1701
|
className: `sdk-skip-ad-btn ${s ? "sdk-skip-ad-btn--ready" : ""}`,
|
|
1639
|
-
onClick: s ?
|
|
1702
|
+
onClick: s ? Ci : void 0,
|
|
1640
1703
|
disabled: !s,
|
|
1641
1704
|
"aria-label": s ? "Skip advertisement" : `Skip advertisement available in ${c} seconds`,
|
|
1642
1705
|
"aria-disabled": !s,
|
|
@@ -1645,12 +1708,12 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1645
1708
|
e?.cta && (() => {
|
|
1646
1709
|
let t = e.cta, n = /* @__PURE__ */ p("button", {
|
|
1647
1710
|
className: "sdk-ad-cta-btn",
|
|
1648
|
-
onClick: () =>
|
|
1711
|
+
onClick: () => Ei(t),
|
|
1649
1712
|
"aria-label": `${t.text} — opens advertiser site in a new tab`,
|
|
1650
1713
|
children: [/* @__PURE__ */ f("span", {
|
|
1651
1714
|
className: "sdk-ad-cta-btn-text",
|
|
1652
1715
|
children: t.text
|
|
1653
|
-
}), /* @__PURE__ */ f(
|
|
1716
|
+
}), /* @__PURE__ */ f(he, {
|
|
1654
1717
|
size: 15,
|
|
1655
1718
|
"aria-hidden": "true"
|
|
1656
1719
|
})]
|
|
@@ -1676,7 +1739,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1676
1739
|
})()
|
|
1677
1740
|
] });
|
|
1678
1741
|
})(),
|
|
1679
|
-
|
|
1742
|
+
Yt && /* @__PURE__ */ f("div", {
|
|
1680
1743
|
style: {
|
|
1681
1744
|
position: "absolute",
|
|
1682
1745
|
inset: 0,
|
|
@@ -1702,35 +1765,35 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1702
1765
|
})]
|
|
1703
1766
|
})
|
|
1704
1767
|
}),
|
|
1705
|
-
(q ||
|
|
1706
|
-
|
|
1707
|
-
className: `sdk-mobile-overlay ${
|
|
1708
|
-
onClick:
|
|
1709
|
-
children: [
|
|
1710
|
-
className: `sdk-mobile-doubletap ${
|
|
1768
|
+
(q || Mr) && /* @__PURE__ */ f("div", { className: "sdk-cast-bg" }),
|
|
1769
|
+
vn && /* @__PURE__ */ p("div", {
|
|
1770
|
+
className: `sdk-mobile-overlay ${Yr ? "active" : ""}`,
|
|
1771
|
+
onClick: Li,
|
|
1772
|
+
children: [Vt && /* @__PURE__ */ f("div", {
|
|
1773
|
+
className: `sdk-mobile-doubletap ${Vt}`,
|
|
1711
1774
|
children: /* @__PURE__ */ p("div", {
|
|
1712
1775
|
className: "sdk-mobile-doubletap-icon",
|
|
1713
|
-
children: [f(
|
|
1776
|
+
children: [f(Vt === "left" ? Ce : we, { size: 26 }), /* @__PURE__ */ f("span", {
|
|
1714
1777
|
className: "sdk-mobile-doubletap-label",
|
|
1715
1778
|
children: "10s"
|
|
1716
1779
|
})]
|
|
1717
1780
|
})
|
|
1718
|
-
}),
|
|
1781
|
+
}), g && /* @__PURE__ */ p(te, { children: [
|
|
1719
1782
|
/* @__PURE__ */ p("div", {
|
|
1720
1783
|
className: "sdk-mobile-header sdk-mobile-ctrl",
|
|
1721
1784
|
children: [/* @__PURE__ */ p("div", {
|
|
1722
1785
|
className: "sdk-mobile-header-left",
|
|
1723
|
-
children: [(
|
|
1786
|
+
children: [(fn || mn) && /* @__PURE__ */ f("button", {
|
|
1724
1787
|
className: "sdk-mobile-back-btn",
|
|
1725
|
-
onClick:
|
|
1788
|
+
onClick: Si,
|
|
1726
1789
|
"aria-label": "Exit fullscreen",
|
|
1727
|
-
children: /* @__PURE__ */ f(
|
|
1790
|
+
children: /* @__PURE__ */ f(me, {
|
|
1728
1791
|
size: 22,
|
|
1729
1792
|
"aria-hidden": "true"
|
|
1730
1793
|
})
|
|
1731
|
-
}), (
|
|
1794
|
+
}), (x || qr) && /* @__PURE__ */ f("div", {
|
|
1732
1795
|
className: "sdk-mobile-title",
|
|
1733
|
-
children:
|
|
1796
|
+
children: x || qr
|
|
1734
1797
|
})]
|
|
1735
1798
|
}), /* @__PURE__ */ p("div", {
|
|
1736
1799
|
className: "sdk-mobile-header-actions",
|
|
@@ -1738,36 +1801,36 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1738
1801
|
I.enablePiP && /* @__PURE__ */ f("button", {
|
|
1739
1802
|
className: "sdk-mobile-hdr-btn",
|
|
1740
1803
|
onClick: () => {
|
|
1741
|
-
Y ||
|
|
1804
|
+
Y || bi();
|
|
1742
1805
|
},
|
|
1743
|
-
style: { color:
|
|
1744
|
-
"aria-label":
|
|
1745
|
-
"aria-pressed":
|
|
1746
|
-
children: /* @__PURE__ */ f(
|
|
1806
|
+
style: { color: yn ? h : "" },
|
|
1807
|
+
"aria-label": yn ? "Exit picture-in-picture" : "Enter picture-in-picture",
|
|
1808
|
+
"aria-pressed": yn,
|
|
1809
|
+
children: /* @__PURE__ */ f(xe, {
|
|
1747
1810
|
size: 20,
|
|
1748
1811
|
"aria-hidden": "true"
|
|
1749
1812
|
})
|
|
1750
1813
|
}),
|
|
1751
1814
|
I.enableChromecast && !Y && /* @__PURE__ */ f("button", {
|
|
1752
1815
|
className: "sdk-mobile-hdr-btn",
|
|
1753
|
-
onClick:
|
|
1816
|
+
onClick: Di,
|
|
1754
1817
|
"data-tooltip": q ? `Casting to ${q} — tap to disconnect` : "Cast to device",
|
|
1755
1818
|
"aria-label": q ? `Stop casting to ${q}` : "Cast to device",
|
|
1756
1819
|
"aria-pressed": !!q,
|
|
1757
1820
|
style: { color: q ? "#3b82f6" : "" },
|
|
1758
|
-
children: /* @__PURE__ */ f(
|
|
1821
|
+
children: /* @__PURE__ */ f(pe, {
|
|
1759
1822
|
size: 20,
|
|
1760
1823
|
fill: q ? "currentColor" : "none",
|
|
1761
1824
|
"aria-hidden": "true"
|
|
1762
1825
|
})
|
|
1763
1826
|
}),
|
|
1764
|
-
I.allowAirplay &&
|
|
1827
|
+
I.allowAirplay && Ar && /* @__PURE__ */ f("button", {
|
|
1765
1828
|
className: "sdk-mobile-hdr-btn",
|
|
1766
|
-
onClick:
|
|
1767
|
-
"aria-label":
|
|
1768
|
-
"aria-pressed":
|
|
1769
|
-
style: { color:
|
|
1770
|
-
children: /* @__PURE__ */ f(
|
|
1829
|
+
onClick: Oi,
|
|
1830
|
+
"aria-label": Mr ? `Stop AirPlay to ${Pr || "device"}` : "AirPlay to device",
|
|
1831
|
+
"aria-pressed": Mr,
|
|
1832
|
+
style: { color: Mr ? h : "" },
|
|
1833
|
+
children: /* @__PURE__ */ f(de, {
|
|
1771
1834
|
size: 20,
|
|
1772
1835
|
"aria-hidden": "true"
|
|
1773
1836
|
})
|
|
@@ -1785,7 +1848,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1785
1848
|
skipSeconds: 10
|
|
1786
1849
|
}),
|
|
1787
1850
|
"aria-label": "Rewind 10 seconds",
|
|
1788
|
-
children: [/* @__PURE__ */ f(
|
|
1851
|
+
children: [/* @__PURE__ */ f(Ce, {
|
|
1789
1852
|
size: 22,
|
|
1790
1853
|
"aria-hidden": "true"
|
|
1791
1854
|
}), /* @__PURE__ */ f("span", {
|
|
@@ -1796,16 +1859,16 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1796
1859
|
}),
|
|
1797
1860
|
/* @__PURE__ */ f("button", {
|
|
1798
1861
|
className: "sdk-mobile-play-btn",
|
|
1799
|
-
onClick:
|
|
1800
|
-
"aria-label":
|
|
1801
|
-
children:
|
|
1862
|
+
onClick: ui,
|
|
1863
|
+
"aria-label": Cn ? "Replay" : Ni ? "Pause" : "Play",
|
|
1864
|
+
children: Cn ? /* @__PURE__ */ f(Ce, {
|
|
1802
1865
|
size: 38,
|
|
1803
1866
|
"aria-hidden": "true"
|
|
1804
|
-
}) :
|
|
1867
|
+
}) : Ni ? /* @__PURE__ */ f(v, {
|
|
1805
1868
|
size: 38,
|
|
1806
1869
|
fill: "currentColor",
|
|
1807
1870
|
"aria-hidden": "true"
|
|
1808
|
-
}) : /* @__PURE__ */ f(
|
|
1871
|
+
}) : /* @__PURE__ */ f(Se, {
|
|
1809
1872
|
size: 38,
|
|
1810
1873
|
fill: "currentColor",
|
|
1811
1874
|
style: { marginLeft: "3px" },
|
|
@@ -1819,7 +1882,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1819
1882
|
skipSeconds: 10
|
|
1820
1883
|
}),
|
|
1821
1884
|
"aria-label": "Skip forward 10 seconds",
|
|
1822
|
-
children: [/* @__PURE__ */ f(
|
|
1885
|
+
children: [/* @__PURE__ */ f(we, {
|
|
1823
1886
|
size: 22,
|
|
1824
1887
|
"aria-hidden": "true"
|
|
1825
1888
|
}), /* @__PURE__ */ f("span", {
|
|
@@ -1833,25 +1896,25 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1833
1896
|
/* @__PURE__ */ p("div", {
|
|
1834
1897
|
className: "sdk-mobile-bottom-bar sdk-mobile-ctrl",
|
|
1835
1898
|
children: [
|
|
1836
|
-
I.enableKeyMoments &&
|
|
1899
|
+
I.enableKeyMoments && gr && W.length > 0 && /* @__PURE__ */ f("div", {
|
|
1837
1900
|
className: "sdk-mobile-chapters-scroll",
|
|
1838
1901
|
children: W.map((e, t) => {
|
|
1839
|
-
let n =
|
|
1902
|
+
let n = dr.index === t;
|
|
1840
1903
|
return /* @__PURE__ */ p("div", {
|
|
1841
1904
|
role: "button",
|
|
1842
1905
|
tabIndex: 0,
|
|
1843
1906
|
className: `sdk-mobile-chapter-card${n ? " active" : ""}`,
|
|
1844
|
-
style: { borderColor: n ?
|
|
1907
|
+
style: { borderColor: n ? h : void 0 },
|
|
1845
1908
|
"aria-label": `${e.title}, ${Q(e.startTime)}${n ? ", current chapter" : ""}`,
|
|
1846
1909
|
"aria-current": n ? "true" : void 0,
|
|
1847
1910
|
onClick: () => {
|
|
1848
|
-
|
|
1911
|
+
vi(e.startTime, e);
|
|
1849
1912
|
},
|
|
1850
|
-
onKeyDown:
|
|
1913
|
+
onKeyDown: Bi(() => vi(e.startTime, e)),
|
|
1851
1914
|
children: [/* @__PURE__ */ p("div", {
|
|
1852
1915
|
className: "sdk-mobile-chapter-thumb",
|
|
1853
|
-
children: [
|
|
1854
|
-
src:
|
|
1916
|
+
children: [vr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
|
|
1917
|
+
src: vr[t] || e.thumbnail,
|
|
1855
1918
|
alt: "",
|
|
1856
1919
|
"aria-hidden": "true",
|
|
1857
1920
|
style: {
|
|
@@ -1860,10 +1923,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1860
1923
|
objectFit: "cover",
|
|
1861
1924
|
display: "block"
|
|
1862
1925
|
}
|
|
1863
|
-
}) : /* @__PURE__ */ f(
|
|
1926
|
+
}) : /* @__PURE__ */ f(ve, {
|
|
1864
1927
|
size: 16,
|
|
1865
1928
|
"aria-hidden": "true",
|
|
1866
|
-
style: { color: n ?
|
|
1929
|
+
style: { color: n ? h : "rgba(255,255,255,0.3)" }
|
|
1867
1930
|
}), /* @__PURE__ */ f("span", {
|
|
1868
1931
|
className: "sdk-mobile-chapter-time-badge",
|
|
1869
1932
|
"aria-hidden": "true",
|
|
@@ -1871,7 +1934,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1871
1934
|
})]
|
|
1872
1935
|
}), /* @__PURE__ */ f("div", {
|
|
1873
1936
|
className: "sdk-mobile-chapter-title",
|
|
1874
|
-
style: { color: n ?
|
|
1937
|
+
style: { color: n ? h : void 0 },
|
|
1875
1938
|
children: e.title
|
|
1876
1939
|
})]
|
|
1877
1940
|
}, t);
|
|
@@ -1887,11 +1950,11 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1887
1950
|
"aria-valuetext": X ? void 0 : `${Q(V(J === null ? L : J))} of ${Q(B)}`,
|
|
1888
1951
|
tabIndex: X ? void 0 : 0,
|
|
1889
1952
|
className: `sdk-seekbar-container sdk-mobile-seekbar${Y ? " sdk-ad-mode" : ""}`,
|
|
1890
|
-
onMouseDown: X ? void 0 :
|
|
1891
|
-
onMouseMove: X ? void 0 :
|
|
1892
|
-
onMouseLeave: X ? void 0 :
|
|
1893
|
-
onTouchStart: X ? void 0 :
|
|
1894
|
-
onKeyDown: X ? void 0 :
|
|
1953
|
+
onMouseDown: X ? void 0 : fi,
|
|
1954
|
+
onMouseMove: X ? void 0 : ki,
|
|
1955
|
+
onMouseLeave: X ? void 0 : Mi,
|
|
1956
|
+
onTouchStart: X ? void 0 : ji,
|
|
1957
|
+
onKeyDown: X ? void 0 : Vi,
|
|
1895
1958
|
style: {
|
|
1896
1959
|
pointerEvents: X ? "none" : void 0,
|
|
1897
1960
|
touchAction: "none"
|
|
@@ -1899,15 +1962,15 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1899
1962
|
children: Y ? /* @__PURE__ */ f("div", {
|
|
1900
1963
|
className: "sdk-ad-progress-fill",
|
|
1901
1964
|
style: { width: (() => {
|
|
1902
|
-
let e = F ? F.getCurrentTime() : L, t =
|
|
1965
|
+
let e = F ? F.getCurrentTime() : L, t = Yn(e);
|
|
1903
1966
|
return t ? `${Math.min(100, Math.max(0, (e - t.start) / (t.end - t.start) * 100))}%` : "0%";
|
|
1904
1967
|
})() }
|
|
1905
1968
|
}) : /* @__PURE__ */ p(te, { children: [
|
|
1906
1969
|
/* @__PURE__ */ f("div", {
|
|
1907
1970
|
className: "sdk-seekbar-buffered",
|
|
1908
|
-
style: { width: `${
|
|
1971
|
+
style: { width: `${rn ? (F && F.getBufferedRanges()[0]?.end || 0) / rn * 100 : 0}%` }
|
|
1909
1972
|
}),
|
|
1910
|
-
B > 0 && R.filter((e) => !
|
|
1973
|
+
B > 0 && R.filter((e) => !On.has(e.startTime)).map((e, t) => /* @__PURE__ */ f("div", {
|
|
1911
1974
|
className: "sdk-seekbar-adbreak",
|
|
1912
1975
|
style: {
|
|
1913
1976
|
left: `${V(e.startTime) / B * 100}%`,
|
|
@@ -1917,7 +1980,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1917
1980
|
/* @__PURE__ */ f("div", {
|
|
1918
1981
|
className: "sdk-seekbar-progress",
|
|
1919
1982
|
style: {
|
|
1920
|
-
width: q ? `${
|
|
1983
|
+
width: q ? `${Pi > 0 ? $ / Pi * 100 : 0}%` : `${B ? V(J === null ? L : J) / B * 100 : 0}%`,
|
|
1921
1984
|
background: "#ffffff",
|
|
1922
1985
|
boxShadow: "none"
|
|
1923
1986
|
},
|
|
@@ -1939,38 +2002,38 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1939
2002
|
className: "sdk-mobile-controls-row",
|
|
1940
2003
|
children: [!Y && /* @__PURE__ */ f("span", {
|
|
1941
2004
|
className: "sdk-time-display",
|
|
1942
|
-
children: q ? `${Q($)} / ${Q(
|
|
2005
|
+
children: q ? `${Q($)} / ${Q(Pi)}` : `${Q(V(J === null ? L : J))} / ${Q(B)}`
|
|
1943
2006
|
}), /* @__PURE__ */ p("div", {
|
|
1944
2007
|
className: "sdk-mobile-bottom-icons",
|
|
1945
2008
|
children: [
|
|
1946
2009
|
I.enableKeyMoments && W.length > 0 && !Y && /* @__PURE__ */ f("button", {
|
|
1947
|
-
className: `sdk-mobile-icon-btn${
|
|
2010
|
+
className: `sdk-mobile-icon-btn${gr ? " active" : ""}`,
|
|
1948
2011
|
onClick: () => {
|
|
1949
|
-
|
|
2012
|
+
_r(!gr);
|
|
1950
2013
|
},
|
|
1951
|
-
"aria-label":
|
|
1952
|
-
"aria-pressed":
|
|
1953
|
-
children: /* @__PURE__ */ f(
|
|
2014
|
+
"aria-label": gr ? "Hide chapters" : "Show chapters",
|
|
2015
|
+
"aria-pressed": gr,
|
|
2016
|
+
children: /* @__PURE__ */ f(ve, {
|
|
1954
2017
|
size: 18,
|
|
1955
2018
|
"aria-hidden": "true"
|
|
1956
2019
|
})
|
|
1957
2020
|
}),
|
|
1958
|
-
I.enableSubtitles && !Y &&
|
|
2021
|
+
I.enableSubtitles && !Y && ar.some((e) => !e.isNative) && /* @__PURE__ */ p("div", {
|
|
1959
2022
|
className: "sdk-menu-container",
|
|
1960
2023
|
children: [/* @__PURE__ */ f("button", {
|
|
1961
2024
|
className: `sdk-mobile-icon-btn${U === "off" ? "" : " active"}`,
|
|
1962
2025
|
onClick: () => {
|
|
1963
|
-
|
|
2026
|
+
Hi("subtitles");
|
|
1964
2027
|
},
|
|
1965
2028
|
"aria-label": "Captions",
|
|
1966
2029
|
"aria-haspopup": "listbox",
|
|
1967
2030
|
"aria-expanded": G === "subtitles",
|
|
1968
|
-
children: /* @__PURE__ */ f(
|
|
2031
|
+
children: /* @__PURE__ */ f(fe, {
|
|
1969
2032
|
size: 18,
|
|
1970
2033
|
"aria-hidden": "true"
|
|
1971
2034
|
})
|
|
1972
2035
|
}), G === "subtitles" && /* @__PURE__ */ p("div", {
|
|
1973
|
-
ref:
|
|
2036
|
+
ref: Ui,
|
|
1974
2037
|
className: "sdk-dropup-menu",
|
|
1975
2038
|
role: "listbox",
|
|
1976
2039
|
"aria-label": "Captions",
|
|
@@ -1985,21 +2048,21 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
1985
2048
|
"aria-selected": U === "off",
|
|
1986
2049
|
tabIndex: 0,
|
|
1987
2050
|
className: `sdk-dropup-item ${U === "off" ? "active" : ""}`,
|
|
1988
|
-
onClick: () =>
|
|
1989
|
-
onKeyDown:
|
|
1990
|
-
children: [/* @__PURE__ */ f("span", { children: "Off" }), U === "off" && /* @__PURE__ */ f(
|
|
2051
|
+
onClick: () => gi("off"),
|
|
2052
|
+
onKeyDown: zi(() => gi("off")),
|
|
2053
|
+
children: [/* @__PURE__ */ f("span", { children: "Off" }), U === "off" && /* @__PURE__ */ f(_, {
|
|
1991
2054
|
size: 12,
|
|
1992
2055
|
"aria-hidden": "true"
|
|
1993
2056
|
})]
|
|
1994
2057
|
}),
|
|
1995
|
-
|
|
2058
|
+
ar.map((e) => /* @__PURE__ */ p("div", {
|
|
1996
2059
|
role: "option",
|
|
1997
2060
|
"aria-selected": U === e.id,
|
|
1998
2061
|
tabIndex: 0,
|
|
1999
2062
|
className: `sdk-dropup-item ${U === e.id ? "active" : ""}`,
|
|
2000
|
-
onClick: () =>
|
|
2001
|
-
onKeyDown:
|
|
2002
|
-
children: [/* @__PURE__ */ f("span", { children:
|
|
2063
|
+
onClick: () => gi(e.id),
|
|
2064
|
+
onKeyDown: zi(() => gi(e.id)),
|
|
2065
|
+
children: [/* @__PURE__ */ f("span", { children: b(e) }), U === e.id && /* @__PURE__ */ f(_, {
|
|
2003
2066
|
size: 12,
|
|
2004
2067
|
"aria-hidden": "true"
|
|
2005
2068
|
})]
|
|
@@ -2007,22 +2070,22 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2007
2070
|
]
|
|
2008
2071
|
})]
|
|
2009
2072
|
}),
|
|
2010
|
-
I.allowMultipleAudio &&
|
|
2073
|
+
I.allowMultipleAudio && sr.length > 1 && !Y && /* @__PURE__ */ p("div", {
|
|
2011
2074
|
className: "sdk-menu-container",
|
|
2012
2075
|
children: [/* @__PURE__ */ f("button", {
|
|
2013
2076
|
className: `sdk-mobile-icon-btn${G === "audio" ? " active" : ""}`,
|
|
2014
2077
|
onClick: () => {
|
|
2015
|
-
|
|
2078
|
+
Hi("audio");
|
|
2016
2079
|
},
|
|
2017
2080
|
"aria-label": "Audio track",
|
|
2018
2081
|
"aria-haspopup": "listbox",
|
|
2019
2082
|
"aria-expanded": G === "audio",
|
|
2020
|
-
children: /* @__PURE__ */ f(
|
|
2083
|
+
children: /* @__PURE__ */ f(_e, {
|
|
2021
2084
|
size: 18,
|
|
2022
2085
|
"aria-hidden": "true"
|
|
2023
2086
|
})
|
|
2024
2087
|
}), G === "audio" && /* @__PURE__ */ p("div", {
|
|
2025
|
-
ref:
|
|
2088
|
+
ref: Ui,
|
|
2026
2089
|
className: "sdk-dropup-menu",
|
|
2027
2090
|
role: "listbox",
|
|
2028
2091
|
"aria-label": "Audio track",
|
|
@@ -2030,18 +2093,18 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2030
2093
|
className: "sdk-dropup-header",
|
|
2031
2094
|
"aria-hidden": "true",
|
|
2032
2095
|
children: "Audio Track"
|
|
2033
|
-
}),
|
|
2096
|
+
}), sr.map((e) => /* @__PURE__ */ p("div", {
|
|
2034
2097
|
role: "option",
|
|
2035
|
-
"aria-selected":
|
|
2098
|
+
"aria-selected": lr === e.id,
|
|
2036
2099
|
tabIndex: 0,
|
|
2037
|
-
className: `sdk-dropup-item ${
|
|
2100
|
+
className: `sdk-dropup-item ${lr === e.id ? "active" : ""}`,
|
|
2038
2101
|
onClick: () => {
|
|
2039
|
-
F?.setAudioTrack(e.id),
|
|
2102
|
+
F?.setAudioTrack(e.id), ur(e.id), K("none"), xr(`Audio: ${b(e)}`);
|
|
2040
2103
|
},
|
|
2041
|
-
onKeyDown:
|
|
2042
|
-
F?.setAudioTrack(e.id),
|
|
2104
|
+
onKeyDown: zi(() => {
|
|
2105
|
+
F?.setAudioTrack(e.id), ur(e.id), K("none"), xr(`Audio: ${b(e)}`);
|
|
2043
2106
|
}),
|
|
2044
|
-
children: [/* @__PURE__ */ f("span", { children:
|
|
2107
|
+
children: [/* @__PURE__ */ f("span", { children: b(e) }), lr === e.id && /* @__PURE__ */ f(_, {
|
|
2045
2108
|
size: 12,
|
|
2046
2109
|
"aria-hidden": "true"
|
|
2047
2110
|
})]
|
|
@@ -2053,17 +2116,17 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2053
2116
|
children: [/* @__PURE__ */ f("button", {
|
|
2054
2117
|
className: `sdk-mobile-icon-btn${G === "speed" ? " active" : ""}`,
|
|
2055
2118
|
onClick: () => {
|
|
2056
|
-
|
|
2119
|
+
Hi("speed");
|
|
2057
2120
|
},
|
|
2058
2121
|
"aria-label": "Playback speed",
|
|
2059
2122
|
"aria-haspopup": "listbox",
|
|
2060
2123
|
"aria-expanded": G === "speed",
|
|
2061
|
-
children: /* @__PURE__ */ f(
|
|
2124
|
+
children: /* @__PURE__ */ f(ge, {
|
|
2062
2125
|
size: 18,
|
|
2063
2126
|
"aria-hidden": "true"
|
|
2064
2127
|
})
|
|
2065
2128
|
}), G === "speed" && /* @__PURE__ */ p("div", {
|
|
2066
|
-
ref:
|
|
2129
|
+
ref: Ui,
|
|
2067
2130
|
className: "sdk-dropup-menu",
|
|
2068
2131
|
role: "listbox",
|
|
2069
2132
|
"aria-label": "Playback speed",
|
|
@@ -2080,12 +2143,12 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2080
2143
|
2
|
|
2081
2144
|
].map((e) => /* @__PURE__ */ p("div", {
|
|
2082
2145
|
role: "option",
|
|
2083
|
-
"aria-selected":
|
|
2146
|
+
"aria-selected": mr === e,
|
|
2084
2147
|
tabIndex: 0,
|
|
2085
|
-
className: `sdk-dropup-item ${
|
|
2086
|
-
onClick: () =>
|
|
2087
|
-
onKeyDown:
|
|
2088
|
-
children: [/* @__PURE__ */ f("span", { children: e === 1 ? "Normal" : `${e}x` }),
|
|
2148
|
+
className: `sdk-dropup-item ${mr === e ? "active" : ""}`,
|
|
2149
|
+
onClick: () => mi(e),
|
|
2150
|
+
onKeyDown: zi(() => mi(e)),
|
|
2151
|
+
children: [/* @__PURE__ */ f("span", { children: e === 1 ? "Normal" : `${e}x` }), mr === e && /* @__PURE__ */ f(_, {
|
|
2089
2152
|
size: 12,
|
|
2090
2153
|
"aria-hidden": "true"
|
|
2091
2154
|
})]
|
|
@@ -2095,19 +2158,19 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2095
2158
|
I.enableQuality && !Y && /* @__PURE__ */ p("div", {
|
|
2096
2159
|
className: "sdk-menu-container",
|
|
2097
2160
|
children: [/* @__PURE__ */ f("button", {
|
|
2098
|
-
className: `sdk-mobile-icon-btn${
|
|
2161
|
+
className: `sdk-mobile-icon-btn${er.id === -1 ? "" : " active"}`,
|
|
2099
2162
|
onClick: () => {
|
|
2100
|
-
|
|
2163
|
+
Hi("quality");
|
|
2101
2164
|
},
|
|
2102
2165
|
"aria-label": "Video quality",
|
|
2103
2166
|
"aria-haspopup": "listbox",
|
|
2104
2167
|
"aria-expanded": G === "quality",
|
|
2105
|
-
children: /* @__PURE__ */ f(
|
|
2168
|
+
children: /* @__PURE__ */ f(Ne, {
|
|
2106
2169
|
size: 18,
|
|
2107
2170
|
"aria-hidden": "true"
|
|
2108
2171
|
})
|
|
2109
2172
|
}), G === "quality" && /* @__PURE__ */ p("div", {
|
|
2110
|
-
ref:
|
|
2173
|
+
ref: Ui,
|
|
2111
2174
|
className: "sdk-dropup-menu large",
|
|
2112
2175
|
role: "listbox",
|
|
2113
2176
|
"aria-label": "Video quality",
|
|
@@ -2115,36 +2178,36 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2115
2178
|
className: "sdk-dropup-header",
|
|
2116
2179
|
"aria-hidden": "true",
|
|
2117
2180
|
children: "Quality"
|
|
2118
|
-
}),
|
|
2181
|
+
}), Qn.map((e) => /* @__PURE__ */ p("div", {
|
|
2119
2182
|
role: "option",
|
|
2120
|
-
"aria-selected":
|
|
2183
|
+
"aria-selected": er.id === e.id,
|
|
2121
2184
|
tabIndex: 0,
|
|
2122
|
-
className: `sdk-dropup-item ${
|
|
2123
|
-
onClick: () =>
|
|
2124
|
-
onKeyDown:
|
|
2125
|
-
children: [/* @__PURE__ */ f("span", { children: e.label }),
|
|
2185
|
+
className: `sdk-dropup-item ${er.id === e.id ? "active" : ""}`,
|
|
2186
|
+
onClick: () => hi(e.id),
|
|
2187
|
+
onKeyDown: zi(() => hi(e.id)),
|
|
2188
|
+
children: [/* @__PURE__ */ f("span", { children: e.label }), er.id === e.id && /* @__PURE__ */ f(_, {
|
|
2126
2189
|
size: 12,
|
|
2127
2190
|
"aria-hidden": "true"
|
|
2128
2191
|
})]
|
|
2129
2192
|
}, e.id))]
|
|
2130
2193
|
})]
|
|
2131
2194
|
}),
|
|
2132
|
-
|
|
2195
|
+
S && S.length > 1 && !Y && /* @__PURE__ */ p("div", {
|
|
2133
2196
|
className: "sdk-menu-container",
|
|
2134
2197
|
children: [/* @__PURE__ */ f("button", {
|
|
2135
2198
|
className: `sdk-mobile-icon-btn${G === "sources" ? " active" : ""}`,
|
|
2136
2199
|
onClick: () => {
|
|
2137
|
-
|
|
2200
|
+
Hi("sources");
|
|
2138
2201
|
},
|
|
2139
2202
|
"aria-label": "Select source",
|
|
2140
2203
|
"aria-haspopup": "listbox",
|
|
2141
2204
|
"aria-expanded": G === "sources",
|
|
2142
|
-
children: /* @__PURE__ */ f(
|
|
2205
|
+
children: /* @__PURE__ */ f(Pe, {
|
|
2143
2206
|
size: 18,
|
|
2144
2207
|
"aria-hidden": "true"
|
|
2145
2208
|
})
|
|
2146
2209
|
}), G === "sources" && /* @__PURE__ */ p("div", {
|
|
2147
|
-
ref:
|
|
2210
|
+
ref: Ui,
|
|
2148
2211
|
className: "sdk-dropup-menu",
|
|
2149
2212
|
role: "listbox",
|
|
2150
2213
|
"aria-label": "Select source",
|
|
@@ -2152,14 +2215,14 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2152
2215
|
className: "sdk-dropup-header",
|
|
2153
2216
|
"aria-hidden": "true",
|
|
2154
2217
|
children: "Source"
|
|
2155
|
-
}),
|
|
2218
|
+
}), S.map((e, t) => /* @__PURE__ */ p("div", {
|
|
2156
2219
|
role: "option",
|
|
2157
|
-
"aria-selected":
|
|
2220
|
+
"aria-selected": st === t,
|
|
2158
2221
|
tabIndex: 0,
|
|
2159
|
-
className: `sdk-dropup-item ${
|
|
2160
|
-
onClick: () =>
|
|
2161
|
-
onKeyDown:
|
|
2162
|
-
children: [/* @__PURE__ */ f("span", { children: e.label }),
|
|
2222
|
+
className: `sdk-dropup-item ${st === t ? "active" : ""}`,
|
|
2223
|
+
onClick: () => _i(t),
|
|
2224
|
+
onKeyDown: zi(() => _i(t)),
|
|
2225
|
+
children: [/* @__PURE__ */ f("span", { children: e.label }), st === t && /* @__PURE__ */ f(_, {
|
|
2163
2226
|
size: 12,
|
|
2164
2227
|
"aria-hidden": "true"
|
|
2165
2228
|
})]
|
|
@@ -2168,10 +2231,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2168
2231
|
}),
|
|
2169
2232
|
/* @__PURE__ */ f("button", {
|
|
2170
2233
|
className: "sdk-mobile-icon-btn",
|
|
2171
|
-
onClick:
|
|
2172
|
-
"aria-label":
|
|
2173
|
-
"aria-pressed":
|
|
2174
|
-
children: f(
|
|
2234
|
+
onClick: Si,
|
|
2235
|
+
"aria-label": fn || mn ? "Exit fullscreen" : "Enter fullscreen",
|
|
2236
|
+
"aria-pressed": fn || mn,
|
|
2237
|
+
children: f(fn ? be : ye, {
|
|
2175
2238
|
size: 18,
|
|
2176
2239
|
"aria-hidden": "true"
|
|
2177
2240
|
})
|
|
@@ -2183,28 +2246,28 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2183
2246
|
})
|
|
2184
2247
|
] })]
|
|
2185
2248
|
}),
|
|
2186
|
-
!
|
|
2249
|
+
!vn && /* @__PURE__ */ p("div", {
|
|
2187
2250
|
className: "sdk-controls-overlay",
|
|
2188
2251
|
onClick: (e) => {
|
|
2189
|
-
Y || e.target.closest(".sdk-desktop-header") || e.target.closest(".sdk-desktop-center-controls") || e.target.closest(".sdk-desktop-bottom") ||
|
|
2252
|
+
Y || e.target.closest(".sdk-desktop-header") || e.target.closest(".sdk-desktop-center-controls") || e.target.closest(".sdk-desktop-bottom") || ui();
|
|
2190
2253
|
},
|
|
2191
2254
|
children: [/* @__PURE__ */ p("div", {
|
|
2192
2255
|
className: "sdk-desktop-header",
|
|
2193
2256
|
children: [/* @__PURE__ */ p("div", {
|
|
2194
2257
|
className: "sdk-desktop-header-left",
|
|
2195
|
-
children: [(
|
|
2258
|
+
children: [(fn || mn) && /* @__PURE__ */ f("button", {
|
|
2196
2259
|
className: "sdk-desktop-back-btn",
|
|
2197
2260
|
onClick: (e) => {
|
|
2198
|
-
e.stopPropagation(),
|
|
2261
|
+
e.stopPropagation(), Si();
|
|
2199
2262
|
},
|
|
2200
2263
|
"aria-label": "Exit fullscreen",
|
|
2201
|
-
children: /* @__PURE__ */ f(
|
|
2264
|
+
children: /* @__PURE__ */ f(me, {
|
|
2202
2265
|
size: 22,
|
|
2203
2266
|
"aria-hidden": "true"
|
|
2204
2267
|
})
|
|
2205
|
-
}), (
|
|
2268
|
+
}), (x || qr) && /* @__PURE__ */ f("span", {
|
|
2206
2269
|
className: "sdk-desktop-title",
|
|
2207
|
-
children:
|
|
2270
|
+
children: x || qr
|
|
2208
2271
|
})]
|
|
2209
2272
|
}), /* @__PURE__ */ p("div", {
|
|
2210
2273
|
className: "sdk-desktop-header-right",
|
|
@@ -2212,13 +2275,13 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2212
2275
|
I.enableChromecast && !Y && /* @__PURE__ */ f("button", {
|
|
2213
2276
|
className: "sdk-desktop-hdr-btn",
|
|
2214
2277
|
onClick: (e) => {
|
|
2215
|
-
e.stopPropagation(),
|
|
2278
|
+
e.stopPropagation(), Di();
|
|
2216
2279
|
},
|
|
2217
2280
|
"data-tooltip": q ? `Casting to ${q} — click to disconnect` : "Cast to device",
|
|
2218
2281
|
"aria-label": q ? `Stop casting to ${q}` : "Cast to device",
|
|
2219
2282
|
"aria-pressed": !!q,
|
|
2220
2283
|
style: { color: q ? "#3b82f6" : "" },
|
|
2221
|
-
children: /* @__PURE__ */ f(
|
|
2284
|
+
children: /* @__PURE__ */ f(pe, {
|
|
2222
2285
|
size: 20,
|
|
2223
2286
|
fill: q ? "currentColor" : "none",
|
|
2224
2287
|
"aria-hidden": "true"
|
|
@@ -2227,29 +2290,29 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2227
2290
|
q && /* @__PURE__ */ p("span", {
|
|
2228
2291
|
className: "sdk-cast-indicator",
|
|
2229
2292
|
"aria-hidden": "true",
|
|
2230
|
-
children: [/* @__PURE__ */ f(
|
|
2293
|
+
children: [/* @__PURE__ */ f(pe, {
|
|
2231
2294
|
size: 10,
|
|
2232
2295
|
fill: "currentColor",
|
|
2233
2296
|
"aria-hidden": "true"
|
|
2234
2297
|
}), q]
|
|
2235
2298
|
}),
|
|
2236
|
-
I.allowAirplay &&
|
|
2299
|
+
I.allowAirplay && Ar && /* @__PURE__ */ f("button", {
|
|
2237
2300
|
className: "sdk-desktop-hdr-btn",
|
|
2238
2301
|
onClick: (e) => {
|
|
2239
|
-
e.stopPropagation(),
|
|
2302
|
+
e.stopPropagation(), Oi();
|
|
2240
2303
|
},
|
|
2241
|
-
"data-tooltip":
|
|
2242
|
-
"aria-label":
|
|
2243
|
-
"aria-pressed":
|
|
2244
|
-
style: { color:
|
|
2245
|
-
children: /* @__PURE__ */ f(
|
|
2304
|
+
"data-tooltip": Mr ? `AirPlay to ${Pr || "device"} — click to disconnect` : "AirPlay to device",
|
|
2305
|
+
"aria-label": Mr ? `Stop AirPlay to ${Pr || "device"}` : "AirPlay to device",
|
|
2306
|
+
"aria-pressed": Mr,
|
|
2307
|
+
style: { color: Mr ? h : "" },
|
|
2308
|
+
children: /* @__PURE__ */ f(de, {
|
|
2246
2309
|
size: 20,
|
|
2247
2310
|
"aria-hidden": "true"
|
|
2248
2311
|
})
|
|
2249
2312
|
})
|
|
2250
2313
|
]
|
|
2251
2314
|
})]
|
|
2252
|
-
}),
|
|
2315
|
+
}), g && /* @__PURE__ */ p(te, { children: [
|
|
2253
2316
|
/* @__PURE__ */ p("div", {
|
|
2254
2317
|
className: "sdk-desktop-center-controls",
|
|
2255
2318
|
style: { pointerEvents: "none" },
|
|
@@ -2271,7 +2334,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2271
2334
|
alignItems: "center",
|
|
2272
2335
|
justifyContent: "center"
|
|
2273
2336
|
},
|
|
2274
|
-
children: [/* @__PURE__ */ f(
|
|
2337
|
+
children: [/* @__PURE__ */ f(Ce, {
|
|
2275
2338
|
size: 30,
|
|
2276
2339
|
"aria-hidden": "true"
|
|
2277
2340
|
}), /* @__PURE__ */ f("span", {
|
|
@@ -2285,17 +2348,17 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2285
2348
|
className: "sdk-desktop-play-btn",
|
|
2286
2349
|
style: { pointerEvents: "auto" },
|
|
2287
2350
|
onClick: (e) => {
|
|
2288
|
-
e.stopPropagation(),
|
|
2351
|
+
e.stopPropagation(), ui();
|
|
2289
2352
|
},
|
|
2290
|
-
"aria-label":
|
|
2291
|
-
children:
|
|
2353
|
+
"aria-label": Cn ? "Replay" : Ni ? "Pause" : "Play",
|
|
2354
|
+
children: Cn ? /* @__PURE__ */ f(Ce, {
|
|
2292
2355
|
size: 38,
|
|
2293
2356
|
"aria-hidden": "true"
|
|
2294
|
-
}) :
|
|
2357
|
+
}) : Ni ? /* @__PURE__ */ f(v, {
|
|
2295
2358
|
size: 38,
|
|
2296
2359
|
fill: "currentColor",
|
|
2297
2360
|
"aria-hidden": "true"
|
|
2298
|
-
}) : /* @__PURE__ */ f(
|
|
2361
|
+
}) : /* @__PURE__ */ f(Se, {
|
|
2299
2362
|
size: 38,
|
|
2300
2363
|
fill: "currentColor",
|
|
2301
2364
|
style: { marginLeft: "4px" },
|
|
@@ -2319,7 +2382,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2319
2382
|
alignItems: "center",
|
|
2320
2383
|
justifyContent: "center"
|
|
2321
2384
|
},
|
|
2322
|
-
children: [/* @__PURE__ */ f(
|
|
2385
|
+
children: [/* @__PURE__ */ f(we, {
|
|
2323
2386
|
size: 30,
|
|
2324
2387
|
"aria-hidden": "true"
|
|
2325
2388
|
}), /* @__PURE__ */ f("span", {
|
|
@@ -2331,7 +2394,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2331
2394
|
})
|
|
2332
2395
|
]
|
|
2333
2396
|
}),
|
|
2334
|
-
I.enableKeyMoments &&
|
|
2397
|
+
I.enableKeyMoments && gr && W.length > 0 && $e === "panel" && /* @__PURE__ */ p("div", {
|
|
2335
2398
|
className: "sdk-chapters-panel",
|
|
2336
2399
|
onClick: (e) => e.stopPropagation(),
|
|
2337
2400
|
children: [/* @__PURE__ */ f("div", {
|
|
@@ -2343,19 +2406,19 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2343
2406
|
}), /* @__PURE__ */ f("div", {
|
|
2344
2407
|
className: "sdk-chapters-panel-list",
|
|
2345
2408
|
children: W.map((e, t) => {
|
|
2346
|
-
let n =
|
|
2409
|
+
let n = dr.index === t;
|
|
2347
2410
|
return /* @__PURE__ */ p("div", {
|
|
2348
2411
|
role: "button",
|
|
2349
2412
|
tabIndex: 0,
|
|
2350
2413
|
className: `sdk-chapters-panel-item${n ? " active" : ""}`,
|
|
2351
2414
|
"aria-label": `${e.title}, ${Q(e.startTime)}${n ? ", current chapter" : ""}`,
|
|
2352
2415
|
"aria-current": n ? "true" : void 0,
|
|
2353
|
-
onClick: () =>
|
|
2354
|
-
onKeyDown:
|
|
2416
|
+
onClick: () => vi(e.startTime, e),
|
|
2417
|
+
onKeyDown: Bi(() => vi(e.startTime, e)),
|
|
2355
2418
|
children: [/* @__PURE__ */ f("div", {
|
|
2356
2419
|
className: "sdk-chapters-panel-thumb",
|
|
2357
|
-
children:
|
|
2358
|
-
src:
|
|
2420
|
+
children: vr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
|
|
2421
|
+
src: vr[t] || e.thumbnail,
|
|
2359
2422
|
alt: "",
|
|
2360
2423
|
"aria-hidden": "true",
|
|
2361
2424
|
style: {
|
|
@@ -2364,7 +2427,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2364
2427
|
objectFit: "cover",
|
|
2365
2428
|
display: "block"
|
|
2366
2429
|
}
|
|
2367
|
-
}) : /* @__PURE__ */ f(
|
|
2430
|
+
}) : /* @__PURE__ */ f(ve, {
|
|
2368
2431
|
size: 18,
|
|
2369
2432
|
"aria-hidden": "true",
|
|
2370
2433
|
style: { color: "rgba(255,255,255,0.3)" }
|
|
@@ -2394,10 +2457,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2394
2457
|
/* @__PURE__ */ p("div", {
|
|
2395
2458
|
className: "sdk-desktop-bottom",
|
|
2396
2459
|
children: [
|
|
2397
|
-
I.enableKeyMoments &&
|
|
2460
|
+
I.enableKeyMoments && gr && W.length > 0 && $e === "strip" && /* @__PURE__ */ f("div", {
|
|
2398
2461
|
className: "sdk-desktop-chapters-strip",
|
|
2399
2462
|
children: W.map((e, t) => {
|
|
2400
|
-
let n =
|
|
2463
|
+
let n = dr.index === t;
|
|
2401
2464
|
return /* @__PURE__ */ p("div", {
|
|
2402
2465
|
role: "button",
|
|
2403
2466
|
tabIndex: 0,
|
|
@@ -2405,14 +2468,14 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2405
2468
|
"aria-label": `${e.title}, ${Q(e.startTime)}${n ? ", current chapter" : ""}`,
|
|
2406
2469
|
"aria-current": n ? "true" : void 0,
|
|
2407
2470
|
onClick: (t) => {
|
|
2408
|
-
t.stopPropagation(),
|
|
2471
|
+
t.stopPropagation(), vi(e.startTime, e);
|
|
2409
2472
|
},
|
|
2410
|
-
onKeyDown:
|
|
2473
|
+
onKeyDown: Bi(() => vi(e.startTime, e)),
|
|
2411
2474
|
children: [
|
|
2412
2475
|
/* @__PURE__ */ f("div", {
|
|
2413
2476
|
className: "sdk-desktop-chapter-thumb",
|
|
2414
|
-
children:
|
|
2415
|
-
src:
|
|
2477
|
+
children: vr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
|
|
2478
|
+
src: vr[t] || e.thumbnail,
|
|
2416
2479
|
alt: "",
|
|
2417
2480
|
"aria-hidden": "true",
|
|
2418
2481
|
style: {
|
|
@@ -2421,7 +2484,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2421
2484
|
objectFit: "cover",
|
|
2422
2485
|
display: "block"
|
|
2423
2486
|
}
|
|
2424
|
-
}) : /* @__PURE__ */ f(
|
|
2487
|
+
}) : /* @__PURE__ */ f(ve, {
|
|
2425
2488
|
size: 18,
|
|
2426
2489
|
"aria-hidden": "true",
|
|
2427
2490
|
style: { color: "rgba(255,255,255,0.35)" }
|
|
@@ -2450,24 +2513,24 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2450
2513
|
"aria-valuetext": X ? void 0 : `${Q(V(J === null ? L : J))} of ${Q(B)}`,
|
|
2451
2514
|
tabIndex: X ? void 0 : 0,
|
|
2452
2515
|
className: `sdk-seekbar-container sdk-desktop-seekbar${Y ? " sdk-ad-mode" : ""}`,
|
|
2453
|
-
onMouseDown: X ? void 0 :
|
|
2454
|
-
onMouseMove: X ? void 0 :
|
|
2455
|
-
onMouseLeave: X ? void 0 :
|
|
2456
|
-
onTouchStart: X ? void 0 :
|
|
2457
|
-
onKeyDown: X ? void 0 :
|
|
2516
|
+
onMouseDown: X ? void 0 : fi,
|
|
2517
|
+
onMouseMove: X ? void 0 : ki,
|
|
2518
|
+
onMouseLeave: X ? void 0 : Mi,
|
|
2519
|
+
onTouchStart: X ? void 0 : ji,
|
|
2520
|
+
onKeyDown: X ? void 0 : Vi,
|
|
2458
2521
|
style: { pointerEvents: X ? "none" : void 0 },
|
|
2459
2522
|
children: Y ? /* @__PURE__ */ f("div", {
|
|
2460
2523
|
className: "sdk-ad-progress-fill",
|
|
2461
2524
|
style: { width: (() => {
|
|
2462
|
-
let e = F ? F.getCurrentTime() : L, t =
|
|
2525
|
+
let e = F ? F.getCurrentTime() : L, t = Yn(e);
|
|
2463
2526
|
return t ? `${Math.min(100, Math.max(0, (e - t.start) / (t.end - t.start) * 100))}%` : "0%";
|
|
2464
2527
|
})() }
|
|
2465
2528
|
}) : /* @__PURE__ */ p(te, { children: [
|
|
2466
2529
|
/* @__PURE__ */ f("div", {
|
|
2467
2530
|
className: "sdk-seekbar-buffered",
|
|
2468
|
-
style: { width: `${
|
|
2531
|
+
style: { width: `${rn ? (F && F.getBufferedRanges()[0]?.end || 0) / rn * 100 : 0}%` }
|
|
2469
2532
|
}),
|
|
2470
|
-
B > 0 && R.filter((e) => !
|
|
2533
|
+
B > 0 && R.filter((e) => !On.has(e.startTime)).map((e, t) => /* @__PURE__ */ f("div", {
|
|
2471
2534
|
className: "sdk-seekbar-adbreak",
|
|
2472
2535
|
style: {
|
|
2473
2536
|
left: `${V(e.startTime) / B * 100}%`,
|
|
@@ -2477,7 +2540,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2477
2540
|
/* @__PURE__ */ f("div", {
|
|
2478
2541
|
className: "sdk-seekbar-progress",
|
|
2479
2542
|
style: {
|
|
2480
|
-
width: q ? `${
|
|
2543
|
+
width: q ? `${Pi > 0 ? $ / Pi * 100 : 0}%` : `${B ? V(J === null ? L : J) / B * 100 : 0}%`,
|
|
2481
2544
|
background: "#ffffff",
|
|
2482
2545
|
boxShadow: "none"
|
|
2483
2546
|
},
|
|
@@ -2487,14 +2550,14 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2487
2550
|
className: "sdk-seekbar-chapter-marker sdk-desktop-chapter-dot",
|
|
2488
2551
|
style: { left: `${V(e.startTime) / B * 100}%` }
|
|
2489
2552
|
}, t)),
|
|
2490
|
-
|
|
2553
|
+
Ir !== null && Hr && /* @__PURE__ */ p("div", {
|
|
2491
2554
|
className: "sdk-thumbnail-tooltip",
|
|
2492
|
-
style: { left: `${
|
|
2555
|
+
style: { left: `${Rr}px` },
|
|
2493
2556
|
children: [
|
|
2494
2557
|
/* @__PURE__ */ f("div", {
|
|
2495
2558
|
className: "sdk-thumbnail-preview",
|
|
2496
2559
|
children: /* @__PURE__ */ f("img", {
|
|
2497
|
-
src:
|
|
2560
|
+
src: Hr,
|
|
2498
2561
|
alt: "preview",
|
|
2499
2562
|
style: {
|
|
2500
2563
|
width: "100%",
|
|
@@ -2505,13 +2568,13 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2505
2568
|
}
|
|
2506
2569
|
})
|
|
2507
2570
|
}),
|
|
2508
|
-
|
|
2571
|
+
Wr && /* @__PURE__ */ f("div", {
|
|
2509
2572
|
className: "sdk-thumbnail-chapter-name",
|
|
2510
|
-
children:
|
|
2573
|
+
children: Wr.title
|
|
2511
2574
|
}),
|
|
2512
2575
|
/* @__PURE__ */ f("div", {
|
|
2513
2576
|
className: "sdk-thumbnail-time-label",
|
|
2514
|
-
children: Q(V(
|
|
2577
|
+
children: Q(V(Br))
|
|
2515
2578
|
})
|
|
2516
2579
|
]
|
|
2517
2580
|
})
|
|
@@ -2523,31 +2586,31 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2523
2586
|
className: "sdk-desktop-left-controls",
|
|
2524
2587
|
children: [!Y && /* @__PURE__ */ f("div", {
|
|
2525
2588
|
className: "sdk-time-display",
|
|
2526
|
-
children: q ? `${Q($)} / ${Q(
|
|
2527
|
-
}),
|
|
2589
|
+
children: q ? `${Q($)} / ${Q(Pi)}` : `${Q(V(J === null ? L : J))} / ${Q(B)}`
|
|
2590
|
+
}), et === "slider" && /* @__PURE__ */ p("div", {
|
|
2528
2591
|
className: "sdk-volume-control",
|
|
2529
2592
|
children: [/* @__PURE__ */ f("button", {
|
|
2530
2593
|
className: "sdk-desktop-icon-btn",
|
|
2531
2594
|
onClick: (e) => {
|
|
2532
|
-
e.stopPropagation(),
|
|
2595
|
+
e.stopPropagation(), pi();
|
|
2533
2596
|
},
|
|
2534
|
-
"data-tooltip":
|
|
2535
|
-
"aria-label":
|
|
2536
|
-
"aria-pressed":
|
|
2537
|
-
children:
|
|
2597
|
+
"data-tooltip": Ii ? "Unmute" : "Mute",
|
|
2598
|
+
"aria-label": Ii ? "Unmute" : "Mute",
|
|
2599
|
+
"aria-pressed": Ii,
|
|
2600
|
+
children: Ri()
|
|
2538
2601
|
}), /* @__PURE__ */ f("input", {
|
|
2539
2602
|
type: "range",
|
|
2540
2603
|
className: "sdk-volume-slider",
|
|
2541
2604
|
min: 0,
|
|
2542
2605
|
max: 1,
|
|
2543
2606
|
step: .02,
|
|
2544
|
-
value:
|
|
2607
|
+
value: Ii ? 0 : Fi,
|
|
2545
2608
|
"aria-label": "Volume",
|
|
2546
|
-
"aria-valuetext":
|
|
2547
|
-
style: { "--vol-pct": Math.round((
|
|
2609
|
+
"aria-valuetext": Ii ? "Muted" : `${Math.round(Fi * 100)}%`,
|
|
2610
|
+
style: { "--vol-pct": Math.round((Ii ? 0 : Fi) * 100) },
|
|
2548
2611
|
onChange: (e) => {
|
|
2549
2612
|
let t = parseFloat(e.target.value);
|
|
2550
|
-
q ? (F?.casting.remoteSetVolume(t), t > 0 && F?.casting.remoteSetMute(!1)) : (F?.setVolume(t), t > 0 &&
|
|
2613
|
+
q ? (F?.casting.remoteSetVolume(t), t > 0 && F?.casting.remoteSetMute(!1)) : (F?.setVolume(t), t > 0 && cn && F?.setMute(!1));
|
|
2551
2614
|
},
|
|
2552
2615
|
onClick: (e) => e.stopPropagation()
|
|
2553
2616
|
})]
|
|
@@ -2556,35 +2619,35 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2556
2619
|
className: "sdk-desktop-right-icons",
|
|
2557
2620
|
children: [
|
|
2558
2621
|
I.enableKeyMoments && W.length > 0 && !Y && /* @__PURE__ */ f("button", {
|
|
2559
|
-
className: `sdk-desktop-icon-btn${
|
|
2622
|
+
className: `sdk-desktop-icon-btn${gr ? " active" : ""}`,
|
|
2560
2623
|
onClick: (e) => {
|
|
2561
|
-
e.stopPropagation(),
|
|
2624
|
+
e.stopPropagation(), _r(!gr);
|
|
2562
2625
|
},
|
|
2563
2626
|
"data-tooltip": "Key Moments",
|
|
2564
|
-
"aria-label":
|
|
2565
|
-
"aria-pressed":
|
|
2566
|
-
children: /* @__PURE__ */ f(
|
|
2627
|
+
"aria-label": gr ? "Hide chapters" : "Show chapters",
|
|
2628
|
+
"aria-pressed": gr,
|
|
2629
|
+
children: /* @__PURE__ */ f(ve, {
|
|
2567
2630
|
size: 20,
|
|
2568
2631
|
"aria-hidden": "true"
|
|
2569
2632
|
})
|
|
2570
2633
|
}),
|
|
2571
|
-
I.enableSubtitles && !Y &&
|
|
2634
|
+
I.enableSubtitles && !Y && ar.some((e) => !e.isNative) && /* @__PURE__ */ p("div", {
|
|
2572
2635
|
className: "sdk-menu-container",
|
|
2573
2636
|
children: [/* @__PURE__ */ f("button", {
|
|
2574
2637
|
className: `sdk-desktop-icon-btn${U === "off" ? "" : " active"}`,
|
|
2575
2638
|
onClick: (e) => {
|
|
2576
|
-
e.stopPropagation(),
|
|
2639
|
+
e.stopPropagation(), Hi("subtitles");
|
|
2577
2640
|
},
|
|
2578
2641
|
"data-tooltip": "Captions",
|
|
2579
2642
|
"aria-label": "Captions",
|
|
2580
2643
|
"aria-haspopup": "listbox",
|
|
2581
2644
|
"aria-expanded": G === "subtitles",
|
|
2582
|
-
children: /* @__PURE__ */ f(
|
|
2645
|
+
children: /* @__PURE__ */ f(fe, {
|
|
2583
2646
|
size: 20,
|
|
2584
2647
|
"aria-hidden": "true"
|
|
2585
2648
|
})
|
|
2586
2649
|
}), G === "subtitles" && /* @__PURE__ */ p("div", {
|
|
2587
|
-
ref:
|
|
2650
|
+
ref: Ui,
|
|
2588
2651
|
className: "sdk-dropup-menu",
|
|
2589
2652
|
role: "listbox",
|
|
2590
2653
|
"aria-label": "Captions",
|
|
@@ -2599,21 +2662,21 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2599
2662
|
"aria-selected": U === "off",
|
|
2600
2663
|
tabIndex: 0,
|
|
2601
2664
|
className: `sdk-dropup-item ${U === "off" ? "active" : ""}`,
|
|
2602
|
-
onClick: () =>
|
|
2603
|
-
onKeyDown:
|
|
2604
|
-
children: [/* @__PURE__ */ f("span", { children: "Off" }), U === "off" && /* @__PURE__ */ f(
|
|
2665
|
+
onClick: () => gi("off"),
|
|
2666
|
+
onKeyDown: zi(() => gi("off")),
|
|
2667
|
+
children: [/* @__PURE__ */ f("span", { children: "Off" }), U === "off" && /* @__PURE__ */ f(_, {
|
|
2605
2668
|
size: 12,
|
|
2606
2669
|
"aria-hidden": "true"
|
|
2607
2670
|
})]
|
|
2608
2671
|
}),
|
|
2609
|
-
|
|
2672
|
+
ar.map((e) => /* @__PURE__ */ p("div", {
|
|
2610
2673
|
role: "option",
|
|
2611
2674
|
"aria-selected": U === e.id,
|
|
2612
2675
|
tabIndex: 0,
|
|
2613
2676
|
className: `sdk-dropup-item ${U === e.id ? "active" : ""}`,
|
|
2614
|
-
onClick: () =>
|
|
2615
|
-
onKeyDown:
|
|
2616
|
-
children: [/* @__PURE__ */ f("span", { children:
|
|
2677
|
+
onClick: () => gi(e.id),
|
|
2678
|
+
onKeyDown: zi(() => gi(e.id)),
|
|
2679
|
+
children: [/* @__PURE__ */ f("span", { children: b(e) }), U === e.id && /* @__PURE__ */ f(_, {
|
|
2617
2680
|
size: 12,
|
|
2618
2681
|
"aria-hidden": "true"
|
|
2619
2682
|
})]
|
|
@@ -2621,23 +2684,23 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2621
2684
|
]
|
|
2622
2685
|
})]
|
|
2623
2686
|
}),
|
|
2624
|
-
I.allowMultipleAudio &&
|
|
2687
|
+
I.allowMultipleAudio && sr.length > 1 && !Y && /* @__PURE__ */ p("div", {
|
|
2625
2688
|
className: "sdk-menu-container",
|
|
2626
2689
|
children: [/* @__PURE__ */ f("button", {
|
|
2627
2690
|
className: `sdk-desktop-icon-btn${G === "audio" ? " active" : ""}`,
|
|
2628
2691
|
onClick: (e) => {
|
|
2629
|
-
e.stopPropagation(),
|
|
2692
|
+
e.stopPropagation(), Hi("audio");
|
|
2630
2693
|
},
|
|
2631
2694
|
"data-tooltip": "Audio Track",
|
|
2632
2695
|
"aria-label": "Audio track",
|
|
2633
2696
|
"aria-haspopup": "listbox",
|
|
2634
2697
|
"aria-expanded": G === "audio",
|
|
2635
|
-
children: /* @__PURE__ */ f(
|
|
2698
|
+
children: /* @__PURE__ */ f(_e, {
|
|
2636
2699
|
size: 20,
|
|
2637
2700
|
"aria-hidden": "true"
|
|
2638
2701
|
})
|
|
2639
2702
|
}), G === "audio" && /* @__PURE__ */ p("div", {
|
|
2640
|
-
ref:
|
|
2703
|
+
ref: Ui,
|
|
2641
2704
|
className: "sdk-dropup-menu",
|
|
2642
2705
|
role: "listbox",
|
|
2643
2706
|
"aria-label": "Audio track",
|
|
@@ -2645,18 +2708,18 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2645
2708
|
className: "sdk-dropup-header",
|
|
2646
2709
|
"aria-hidden": "true",
|
|
2647
2710
|
children: "Audio Track"
|
|
2648
|
-
}),
|
|
2711
|
+
}), sr.map((e) => /* @__PURE__ */ p("div", {
|
|
2649
2712
|
role: "option",
|
|
2650
|
-
"aria-selected":
|
|
2713
|
+
"aria-selected": lr === e.id,
|
|
2651
2714
|
tabIndex: 0,
|
|
2652
|
-
className: `sdk-dropup-item ${
|
|
2715
|
+
className: `sdk-dropup-item ${lr === e.id ? "active" : ""}`,
|
|
2653
2716
|
onClick: () => {
|
|
2654
|
-
F?.setAudioTrack(e.id),
|
|
2717
|
+
F?.setAudioTrack(e.id), ur(e.id), K("none"), xr(`Audio: ${b(e)}`);
|
|
2655
2718
|
},
|
|
2656
|
-
onKeyDown:
|
|
2657
|
-
F?.setAudioTrack(e.id),
|
|
2719
|
+
onKeyDown: zi(() => {
|
|
2720
|
+
F?.setAudioTrack(e.id), ur(e.id), K("none"), xr(`Audio: ${b(e)}`);
|
|
2658
2721
|
}),
|
|
2659
|
-
children: [/* @__PURE__ */ f("span", { children:
|
|
2722
|
+
children: [/* @__PURE__ */ f("span", { children: b(e) }), lr === e.id && /* @__PURE__ */ f(_, {
|
|
2660
2723
|
size: 12,
|
|
2661
2724
|
"aria-hidden": "true"
|
|
2662
2725
|
})]
|
|
@@ -2668,18 +2731,18 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2668
2731
|
children: [/* @__PURE__ */ f("button", {
|
|
2669
2732
|
className: `sdk-desktop-icon-btn${G === "speed" ? " active" : ""}`,
|
|
2670
2733
|
onClick: (e) => {
|
|
2671
|
-
e.stopPropagation(),
|
|
2734
|
+
e.stopPropagation(), Hi("speed");
|
|
2672
2735
|
},
|
|
2673
2736
|
"data-tooltip": "Playback Speed",
|
|
2674
2737
|
"aria-label": "Playback speed",
|
|
2675
2738
|
"aria-haspopup": "listbox",
|
|
2676
2739
|
"aria-expanded": G === "speed",
|
|
2677
|
-
children: /* @__PURE__ */ f(
|
|
2740
|
+
children: /* @__PURE__ */ f(ge, {
|
|
2678
2741
|
size: 20,
|
|
2679
2742
|
"aria-hidden": "true"
|
|
2680
2743
|
})
|
|
2681
2744
|
}), G === "speed" && /* @__PURE__ */ p("div", {
|
|
2682
|
-
ref:
|
|
2745
|
+
ref: Ui,
|
|
2683
2746
|
className: "sdk-dropup-menu",
|
|
2684
2747
|
role: "listbox",
|
|
2685
2748
|
"aria-label": "Playback speed",
|
|
@@ -2696,12 +2759,12 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2696
2759
|
2
|
|
2697
2760
|
].map((e) => /* @__PURE__ */ p("div", {
|
|
2698
2761
|
role: "option",
|
|
2699
|
-
"aria-selected":
|
|
2762
|
+
"aria-selected": mr === e,
|
|
2700
2763
|
tabIndex: 0,
|
|
2701
|
-
className: `sdk-dropup-item ${
|
|
2702
|
-
onClick: () =>
|
|
2703
|
-
onKeyDown:
|
|
2704
|
-
children: [/* @__PURE__ */ f("span", { children: e === 1 ? "Normal" : `${e}x` }),
|
|
2764
|
+
className: `sdk-dropup-item ${mr === e ? "active" : ""}`,
|
|
2765
|
+
onClick: () => mi(e),
|
|
2766
|
+
onKeyDown: zi(() => mi(e)),
|
|
2767
|
+
children: [/* @__PURE__ */ f("span", { children: e === 1 ? "Normal" : `${e}x` }), mr === e && /* @__PURE__ */ f(_, {
|
|
2705
2768
|
size: 12,
|
|
2706
2769
|
"aria-hidden": "true"
|
|
2707
2770
|
})]
|
|
@@ -2711,20 +2774,20 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2711
2774
|
I.enableQuality && !Y && /* @__PURE__ */ p("div", {
|
|
2712
2775
|
className: "sdk-menu-container",
|
|
2713
2776
|
children: [/* @__PURE__ */ f("button", {
|
|
2714
|
-
className: `sdk-desktop-icon-btn${
|
|
2777
|
+
className: `sdk-desktop-icon-btn${er.id === -1 ? "" : " active"}`,
|
|
2715
2778
|
onClick: (e) => {
|
|
2716
|
-
e.stopPropagation(),
|
|
2779
|
+
e.stopPropagation(), Hi("quality");
|
|
2717
2780
|
},
|
|
2718
2781
|
"data-tooltip": "Quality",
|
|
2719
2782
|
"aria-label": "Video quality",
|
|
2720
2783
|
"aria-haspopup": "listbox",
|
|
2721
2784
|
"aria-expanded": G === "quality",
|
|
2722
|
-
children: /* @__PURE__ */ f(
|
|
2785
|
+
children: /* @__PURE__ */ f(Ne, {
|
|
2723
2786
|
size: 20,
|
|
2724
2787
|
"aria-hidden": "true"
|
|
2725
2788
|
})
|
|
2726
2789
|
}), G === "quality" && /* @__PURE__ */ p("div", {
|
|
2727
|
-
ref:
|
|
2790
|
+
ref: Ui,
|
|
2728
2791
|
className: "sdk-dropup-menu large",
|
|
2729
2792
|
role: "listbox",
|
|
2730
2793
|
"aria-label": "Video quality",
|
|
@@ -2732,37 +2795,37 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2732
2795
|
className: "sdk-dropup-header",
|
|
2733
2796
|
"aria-hidden": "true",
|
|
2734
2797
|
children: "Quality"
|
|
2735
|
-
}),
|
|
2798
|
+
}), Qn.map((e) => /* @__PURE__ */ p("div", {
|
|
2736
2799
|
role: "option",
|
|
2737
|
-
"aria-selected":
|
|
2800
|
+
"aria-selected": er.id === e.id,
|
|
2738
2801
|
tabIndex: 0,
|
|
2739
|
-
className: `sdk-dropup-item ${
|
|
2740
|
-
onClick: () =>
|
|
2741
|
-
onKeyDown:
|
|
2742
|
-
children: [/* @__PURE__ */ f("span", { children: e.label }),
|
|
2802
|
+
className: `sdk-dropup-item ${er.id === e.id ? "active" : ""}`,
|
|
2803
|
+
onClick: () => hi(e.id),
|
|
2804
|
+
onKeyDown: zi(() => hi(e.id)),
|
|
2805
|
+
children: [/* @__PURE__ */ f("span", { children: e.label }), er.id === e.id && /* @__PURE__ */ f(_, {
|
|
2743
2806
|
size: 12,
|
|
2744
2807
|
"aria-hidden": "true"
|
|
2745
2808
|
})]
|
|
2746
2809
|
}, e.id))]
|
|
2747
2810
|
})]
|
|
2748
2811
|
}),
|
|
2749
|
-
|
|
2812
|
+
S && S.length > 1 && !Y && /* @__PURE__ */ p("div", {
|
|
2750
2813
|
className: "sdk-menu-container",
|
|
2751
2814
|
children: [/* @__PURE__ */ f("button", {
|
|
2752
2815
|
className: `sdk-desktop-icon-btn${G === "sources" ? " active" : ""}`,
|
|
2753
2816
|
onClick: (e) => {
|
|
2754
|
-
e.stopPropagation(),
|
|
2817
|
+
e.stopPropagation(), Hi("sources");
|
|
2755
2818
|
},
|
|
2756
2819
|
"data-tooltip": "Select Source",
|
|
2757
2820
|
"aria-label": "Select source",
|
|
2758
2821
|
"aria-haspopup": "listbox",
|
|
2759
2822
|
"aria-expanded": G === "sources",
|
|
2760
|
-
children: /* @__PURE__ */ f(
|
|
2823
|
+
children: /* @__PURE__ */ f(Pe, {
|
|
2761
2824
|
size: 20,
|
|
2762
2825
|
"aria-hidden": "true"
|
|
2763
2826
|
})
|
|
2764
2827
|
}), G === "sources" && /* @__PURE__ */ p("div", {
|
|
2765
|
-
ref:
|
|
2828
|
+
ref: Ui,
|
|
2766
2829
|
className: "sdk-dropup-menu",
|
|
2767
2830
|
role: "listbox",
|
|
2768
2831
|
"aria-label": "Select source",
|
|
@@ -2770,14 +2833,14 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2770
2833
|
className: "sdk-dropup-header",
|
|
2771
2834
|
"aria-hidden": "true",
|
|
2772
2835
|
children: "Source"
|
|
2773
|
-
}),
|
|
2836
|
+
}), S.map((e, t) => /* @__PURE__ */ p("div", {
|
|
2774
2837
|
role: "option",
|
|
2775
|
-
"aria-selected":
|
|
2838
|
+
"aria-selected": st === t,
|
|
2776
2839
|
tabIndex: 0,
|
|
2777
|
-
className: `sdk-dropup-item ${
|
|
2778
|
-
onClick: () =>
|
|
2779
|
-
onKeyDown:
|
|
2780
|
-
children: [/* @__PURE__ */ f("span", { children: e.label }),
|
|
2840
|
+
className: `sdk-dropup-item ${st === t ? "active" : ""}`,
|
|
2841
|
+
onClick: () => _i(t),
|
|
2842
|
+
onKeyDown: zi(() => _i(t)),
|
|
2843
|
+
children: [/* @__PURE__ */ f("span", { children: e.label }), st === t && /* @__PURE__ */ f(_, {
|
|
2781
2844
|
size: 12,
|
|
2782
2845
|
"aria-hidden": "true"
|
|
2783
2846
|
})]
|
|
@@ -2785,37 +2848,37 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2785
2848
|
})]
|
|
2786
2849
|
}),
|
|
2787
2850
|
I.enablePiP && !Y && /* @__PURE__ */ f("button", {
|
|
2788
|
-
className: `sdk-desktop-icon-btn${
|
|
2851
|
+
className: `sdk-desktop-icon-btn${yn ? " active" : ""}`,
|
|
2789
2852
|
onClick: (e) => {
|
|
2790
|
-
e.stopPropagation(),
|
|
2853
|
+
e.stopPropagation(), bi();
|
|
2791
2854
|
},
|
|
2792
2855
|
"data-tooltip": "Picture-in-Picture",
|
|
2793
|
-
"aria-label":
|
|
2794
|
-
"aria-pressed":
|
|
2795
|
-
children: /* @__PURE__ */ f(
|
|
2856
|
+
"aria-label": yn ? "Exit picture-in-picture" : "Enter picture-in-picture",
|
|
2857
|
+
"aria-pressed": yn,
|
|
2858
|
+
children: /* @__PURE__ */ f(xe, {
|
|
2796
2859
|
size: 20,
|
|
2797
2860
|
"aria-hidden": "true"
|
|
2798
2861
|
})
|
|
2799
2862
|
}),
|
|
2800
|
-
|
|
2863
|
+
et === "button" && /* @__PURE__ */ f("button", {
|
|
2801
2864
|
className: "sdk-desktop-icon-btn",
|
|
2802
2865
|
onClick: (e) => {
|
|
2803
|
-
e.stopPropagation(),
|
|
2866
|
+
e.stopPropagation(), pi();
|
|
2804
2867
|
},
|
|
2805
|
-
"data-tooltip":
|
|
2806
|
-
"aria-label":
|
|
2807
|
-
"aria-pressed":
|
|
2808
|
-
children:
|
|
2868
|
+
"data-tooltip": Ii ? "Unmute" : "Mute",
|
|
2869
|
+
"aria-label": Ii ? "Unmute" : "Mute",
|
|
2870
|
+
"aria-pressed": Ii,
|
|
2871
|
+
children: Ri()
|
|
2809
2872
|
}),
|
|
2810
|
-
|
|
2873
|
+
qe && /* @__PURE__ */ f("button", {
|
|
2811
2874
|
className: "sdk-desktop-icon-btn",
|
|
2812
2875
|
onClick: (e) => {
|
|
2813
|
-
e.stopPropagation(),
|
|
2876
|
+
e.stopPropagation(), Si();
|
|
2814
2877
|
},
|
|
2815
|
-
"data-tooltip":
|
|
2816
|
-
"aria-label":
|
|
2817
|
-
"aria-pressed":
|
|
2818
|
-
children: f(
|
|
2878
|
+
"data-tooltip": fn || mn ? "Exit fullscreen" : "Fullscreen",
|
|
2879
|
+
"aria-label": fn || mn ? "Exit fullscreen" : "Enter fullscreen",
|
|
2880
|
+
"aria-pressed": fn || mn,
|
|
2881
|
+
children: f(fn ? be : ye, {
|
|
2819
2882
|
size: 20,
|
|
2820
2883
|
"aria-hidden": "true"
|
|
2821
2884
|
})
|
|
@@ -2827,10 +2890,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2827
2890
|
})
|
|
2828
2891
|
] })]
|
|
2829
2892
|
}),
|
|
2830
|
-
|
|
2893
|
+
xn && (() => {
|
|
2831
2894
|
let e = R.find((e) => $ >= e.startTime && $ < e.endTime), t = e ? e.endTime - e.startTime : B, n = e ? Math.max(0, $ - e.startTime) : V($);
|
|
2832
2895
|
return ee(/* @__PURE__ */ p("div", {
|
|
2833
|
-
className: `gb-pip-overlay${
|
|
2896
|
+
className: `gb-pip-overlay${Ni ? "" : " gb-pip-paused"}`,
|
|
2834
2897
|
children: [
|
|
2835
2898
|
/* @__PURE__ */ f("div", {}),
|
|
2836
2899
|
/* @__PURE__ */ p("div", {
|
|
@@ -2844,22 +2907,22 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2844
2907
|
}),
|
|
2845
2908
|
"aria-label": "Rewind 10 seconds",
|
|
2846
2909
|
disabled: Y,
|
|
2847
|
-
children: /* @__PURE__ */ f(
|
|
2910
|
+
children: /* @__PURE__ */ f(Ce, {
|
|
2848
2911
|
size: 20,
|
|
2849
2912
|
"aria-hidden": "true"
|
|
2850
2913
|
})
|
|
2851
2914
|
}),
|
|
2852
2915
|
/* @__PURE__ */ f("button", {
|
|
2853
2916
|
className: "gb-pip-btn gb-pip-play",
|
|
2854
|
-
onClick:
|
|
2855
|
-
"aria-label":
|
|
2856
|
-
children:
|
|
2917
|
+
onClick: ui,
|
|
2918
|
+
"aria-label": Cn ? "Replay" : Ni ? "Pause" : "Play",
|
|
2919
|
+
children: Cn ? /* @__PURE__ */ f(Ce, {
|
|
2857
2920
|
size: 24,
|
|
2858
2921
|
"aria-hidden": "true"
|
|
2859
|
-
}) :
|
|
2922
|
+
}) : Ni ? /* @__PURE__ */ f(v, {
|
|
2860
2923
|
size: 24,
|
|
2861
2924
|
"aria-hidden": "true"
|
|
2862
|
-
}) : /* @__PURE__ */ f(
|
|
2925
|
+
}) : /* @__PURE__ */ f(Se, {
|
|
2863
2926
|
size: 24,
|
|
2864
2927
|
"aria-hidden": "true",
|
|
2865
2928
|
style: { marginLeft: 2 }
|
|
@@ -2873,7 +2936,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2873
2936
|
}),
|
|
2874
2937
|
"aria-label": "Skip forward 10 seconds",
|
|
2875
2938
|
disabled: Y,
|
|
2876
|
-
children: /* @__PURE__ */ f(
|
|
2939
|
+
children: /* @__PURE__ */ f(we, {
|
|
2877
2940
|
size: 20,
|
|
2878
2941
|
"aria-hidden": "true"
|
|
2879
2942
|
})
|
|
@@ -2884,7 +2947,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2884
2947
|
className: "gb-pip-bottom",
|
|
2885
2948
|
children: [/* @__PURE__ */ f("div", {
|
|
2886
2949
|
className: "gb-pip-progress",
|
|
2887
|
-
onClick:
|
|
2950
|
+
onClick: xi,
|
|
2888
2951
|
children: /* @__PURE__ */ f("div", {
|
|
2889
2952
|
className: "gb-pip-progress-fill",
|
|
2890
2953
|
style: { width: `${t ? n / t * 100 : 0}%` }
|
|
@@ -2899,79 +2962,90 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
2899
2962
|
})]
|
|
2900
2963
|
})
|
|
2901
2964
|
]
|
|
2902
|
-
}),
|
|
2965
|
+
}), xn.document.body);
|
|
2903
2966
|
})()
|
|
2904
2967
|
]
|
|
2905
2968
|
});
|
|
2906
|
-
},
|
|
2907
|
-
function
|
|
2969
|
+
}, Ge = "https://dev-api.go-boss.com";
|
|
2970
|
+
function Ke(e) {
|
|
2908
2971
|
return {
|
|
2909
2972
|
"x-player-key": e,
|
|
2910
2973
|
"Content-Type": "application/json"
|
|
2911
2974
|
};
|
|
2912
2975
|
}
|
|
2913
|
-
async function
|
|
2914
|
-
let
|
|
2976
|
+
async function qe(e, t = Ge, n = {}) {
|
|
2977
|
+
let r = await fetch(`${t}/api/player/sdk/init`, {
|
|
2915
2978
|
method: "POST",
|
|
2916
|
-
headers:
|
|
2917
|
-
body: JSON.stringify({})
|
|
2979
|
+
headers: Ke(e),
|
|
2980
|
+
body: JSON.stringify({ videoUrl: n.videoUrl })
|
|
2918
2981
|
});
|
|
2919
|
-
if (!
|
|
2920
|
-
return await
|
|
2982
|
+
if (!r.ok) throw Error(`SDK init failed: ${r.status}`);
|
|
2983
|
+
return await r.json();
|
|
2921
2984
|
}
|
|
2922
|
-
async function
|
|
2923
|
-
let i = await fetch(`${
|
|
2985
|
+
async function Je(e, t, n = Ge) {
|
|
2986
|
+
let { sessionId: r, videoId: i, videoTitle: a, videoUrl: o, contentDurationSec: s } = t, c = await fetch(`${n}/api/player/sdk/session/start`, {
|
|
2924
2987
|
method: "POST",
|
|
2925
|
-
headers:
|
|
2988
|
+
headers: Ke(e),
|
|
2926
2989
|
body: JSON.stringify({
|
|
2927
|
-
sessionId:
|
|
2928
|
-
videoId:
|
|
2990
|
+
sessionId: r,
|
|
2991
|
+
videoId: i,
|
|
2992
|
+
videoTitle: a,
|
|
2993
|
+
videoUrl: o,
|
|
2994
|
+
contentDurationSec: typeof s == "number" && Number.isFinite(s) && s > 0 ? s : void 0
|
|
2929
2995
|
})
|
|
2930
2996
|
});
|
|
2931
|
-
if (!
|
|
2997
|
+
if (!c.ok) throw Error(`Session start failed: ${c.status}`);
|
|
2932
2998
|
}
|
|
2933
|
-
async function
|
|
2999
|
+
async function Ye(e, t, n, r, i = Ge) {
|
|
2934
3000
|
let a = {
|
|
2935
3001
|
sessionId: t,
|
|
2936
3002
|
currentTime: n,
|
|
2937
3003
|
duration: r
|
|
2938
3004
|
}, o = await fetch(`${i}/api/player/sdk/session/heartbeat`, {
|
|
2939
3005
|
method: "POST",
|
|
2940
|
-
headers:
|
|
3006
|
+
headers: Ke(e),
|
|
2941
3007
|
body: JSON.stringify(a)
|
|
2942
3008
|
});
|
|
2943
3009
|
if (!o.ok) throw Error(`Heartbeat failed: ${o.status}`);
|
|
2944
3010
|
}
|
|
2945
|
-
async function
|
|
2946
|
-
let
|
|
3011
|
+
async function Xe(e, t, n = 0, r = 0, i = Ge) {
|
|
3012
|
+
let a = await fetch(`${i}/api/player/sdk/session/end`, {
|
|
2947
3013
|
method: "POST",
|
|
2948
|
-
headers:
|
|
2949
|
-
body: JSON.stringify({
|
|
3014
|
+
headers: Ke(e),
|
|
3015
|
+
body: JSON.stringify({
|
|
3016
|
+
sessionId: t,
|
|
3017
|
+
currentTime: n,
|
|
3018
|
+
duration: r
|
|
3019
|
+
})
|
|
2950
3020
|
});
|
|
2951
|
-
if (!
|
|
3021
|
+
if (!a.ok) throw Error(`Session end failed: ${a.status}`);
|
|
2952
3022
|
}
|
|
2953
|
-
async function
|
|
3023
|
+
async function Ze(e, t, n = Ge) {
|
|
2954
3024
|
let r = await fetch(`${n}/api/player/sdk/events`, {
|
|
2955
3025
|
method: "POST",
|
|
2956
|
-
headers:
|
|
3026
|
+
headers: Ke(e),
|
|
2957
3027
|
body: JSON.stringify(t)
|
|
2958
3028
|
});
|
|
2959
3029
|
if (!r.ok) throw Error(`Event ${t.eventType} failed: ${r.status}`);
|
|
2960
3030
|
}
|
|
2961
|
-
function
|
|
2962
|
-
fetch(`${
|
|
3031
|
+
function Qe(e, t, n = 0, r = 0, i = Ge) {
|
|
3032
|
+
fetch(`${i}/api/player/sdk/session/end`, {
|
|
2963
3033
|
method: "POST",
|
|
2964
|
-
headers:
|
|
2965
|
-
body: JSON.stringify({
|
|
3034
|
+
headers: Ke(e),
|
|
3035
|
+
body: JSON.stringify({
|
|
3036
|
+
sessionId: t,
|
|
3037
|
+
currentTime: n,
|
|
3038
|
+
duration: r
|
|
3039
|
+
}),
|
|
2966
3040
|
keepalive: !0
|
|
2967
3041
|
});
|
|
2968
3042
|
}
|
|
2969
3043
|
//#endregion
|
|
2970
3044
|
//#region src/delegate.ts
|
|
2971
|
-
function
|
|
3045
|
+
function x() {
|
|
2972
3046
|
if (!(typeof screen > "u")) return screen.orientation?.type ?? void 0;
|
|
2973
3047
|
}
|
|
2974
|
-
var
|
|
3048
|
+
var $e = class {
|
|
2975
3049
|
constructor() {
|
|
2976
3050
|
this.autoplay = !1, this.keyMoments = [], this.isPlaybackActive = !1, this.hasFinished = !1, this.hasDismissed = !1, this.lastCurrentTime = 0, this.lastDuration = 0, this.lastWatchDuration = 0, this.prevSpeed = 1, this.pendingSeek = null;
|
|
2977
3051
|
}
|
|
@@ -3033,10 +3107,10 @@ var Ze = class {
|
|
|
3033
3107
|
break;
|
|
3034
3108
|
}
|
|
3035
3109
|
case "fullscreen_enter":
|
|
3036
|
-
this.call("playerDidEnterFullscreen",
|
|
3110
|
+
this.call("playerDidEnterFullscreen", x());
|
|
3037
3111
|
break;
|
|
3038
3112
|
case "fullscreen_exit":
|
|
3039
|
-
this.call("playerDidExitFullscreen",
|
|
3113
|
+
this.call("playerDidExitFullscreen", x());
|
|
3040
3114
|
break;
|
|
3041
3115
|
case "key_moments": {
|
|
3042
3116
|
let t = e.momentTitle ?? "", n = e.momentTime ?? e.currentTime, r = this.keyMoments, i = r.findIndex((e) => t && e.title === t || e.startTime === n), a = i >= 0 ? r[i] : void 0;
|
|
@@ -3083,7 +3157,7 @@ var Ze = class {
|
|
|
3083
3157
|
console.error(`[PlayerSDK Delegate] ${String(e)} callback failed:`, t);
|
|
3084
3158
|
}
|
|
3085
3159
|
}
|
|
3086
|
-
},
|
|
3160
|
+
}, et = {
|
|
3087
3161
|
subtitles: "subtitle_support",
|
|
3088
3162
|
ads: "ad_support",
|
|
3089
3163
|
chapterMarkers: "key_moments",
|
|
@@ -3097,7 +3171,7 @@ var Ze = class {
|
|
|
3097
3171
|
screenRecordingPrevention: "screen_recording_prevention",
|
|
3098
3172
|
signalStrength: "signal_strength"
|
|
3099
3173
|
};
|
|
3100
|
-
function
|
|
3174
|
+
function tt(e) {
|
|
3101
3175
|
let t = {
|
|
3102
3176
|
m3u8_playback: !0,
|
|
3103
3177
|
subtitle_support: !1,
|
|
@@ -3113,10 +3187,10 @@ function $e(e) {
|
|
|
3113
3187
|
signal_strength: !1,
|
|
3114
3188
|
ad_support: !1
|
|
3115
3189
|
};
|
|
3116
|
-
for (let [n, r] of Object.entries(
|
|
3190
|
+
for (let [n, r] of Object.entries(et)) n in e && (t[r] = e[n]);
|
|
3117
3191
|
return t;
|
|
3118
3192
|
}
|
|
3119
|
-
function
|
|
3193
|
+
function nt(e) {
|
|
3120
3194
|
if (!e) return (e) => e;
|
|
3121
3195
|
let t = [];
|
|
3122
3196
|
for (let n of e.split(",")) {
|
|
@@ -3136,12 +3210,12 @@ function et(e) {
|
|
|
3136
3210
|
return e;
|
|
3137
3211
|
};
|
|
3138
3212
|
}
|
|
3139
|
-
function
|
|
3213
|
+
function rt(e) {
|
|
3140
3214
|
let t = e.replace("#", "");
|
|
3141
3215
|
return t.length === 6 ? `${parseInt(t.substring(0, 2), 16)}, ${parseInt(t.substring(2, 4), 16)}, ${parseInt(t.substring(4, 6), 16)}` : "99, 102, 241";
|
|
3142
3216
|
}
|
|
3143
|
-
var
|
|
3144
|
-
function
|
|
3217
|
+
var it = 30 * 1e3;
|
|
3218
|
+
function at(e, t) {
|
|
3145
3219
|
switch (e.eventType) {
|
|
3146
3220
|
case "pause": return {
|
|
3147
3221
|
eventType: "pause",
|
|
@@ -3235,119 +3309,141 @@ function rt(e, t) {
|
|
|
3235
3309
|
default: return null;
|
|
3236
3310
|
}
|
|
3237
3311
|
}
|
|
3238
|
-
function
|
|
3239
|
-
let [
|
|
3312
|
+
function ot({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i = "#6366f1", firebaseConfig: a, proxyDomains: s, apiBaseUrl: l, adTrackingUrl: ee, overlayAdUrl: te, videoId: ne, title: m, watermark: ie, autoplay: h = !1, muted: ae = !1, autoFullscreen: oe = !1, enableControls: se = !0, enableSkipAd: ce, skipAdAfterSeconds: le, chaptersDisplayMode: ue = "strip", volumeControlType: g = "slider", subtitleStyle: de, drmConfig: fe, onAnalyticsEvent: pe, delegate: _, onKeyMomentsLoaded: me, initialTime: he, onTimeUpdate: ge }) {
|
|
3313
|
+
let [_e, ve] = d([]), [ye, be] = d(0), [v] = d(() => new $e());
|
|
3240
3314
|
c(() => {
|
|
3241
|
-
|
|
3315
|
+
v.setDelegate(_), v.setAutoplay(h);
|
|
3242
3316
|
}, [
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
]), c(() => () =>
|
|
3247
|
-
let
|
|
3317
|
+
v,
|
|
3318
|
+
_,
|
|
3319
|
+
h
|
|
3320
|
+
]), c(() => () => v.notifyDismissed(), [v]);
|
|
3321
|
+
let xe = Array.isArray(t) ? t : [{
|
|
3248
3322
|
label: "Default",
|
|
3249
3323
|
url: t
|
|
3250
|
-
}],
|
|
3324
|
+
}], Se = xe[ye]?.url ?? xe[0]?.url ?? "", [Ce, we] = d("loading"), [Te, Ee] = d(null), [De, Oe] = d(0), [ke, Ae] = d("network"), je = u(null), Me = u(!1), y = u(""), Ne = u(!1), Pe = u(!1), Fe = u(void 0), Ie = u(!1), Le = u(it), b = u(null), Re = u(0), ze = u(null), Be = u({
|
|
3251
3325
|
currentTime: 0,
|
|
3252
3326
|
duration: 0
|
|
3253
|
-
}),
|
|
3327
|
+
}), Ve = u(() => {}), He = Se.split("/").filter(Boolean), Ue = ne || (He[He.length - 1] ?? "").replace(/\.m3u8.*$/, "") || "video", Ge = u(Se);
|
|
3254
3328
|
c(() => {
|
|
3255
|
-
|
|
3256
|
-
}, [
|
|
3329
|
+
Ge.current = Se;
|
|
3330
|
+
}, [Se]);
|
|
3331
|
+
let Ke = o(() => nt(s), [s])(), x = rt(i);
|
|
3332
|
+
c(() => {
|
|
3333
|
+
document.documentElement.style.setProperty("--accent-indigo", i), document.documentElement.style.setProperty("--accent-indigo-rgb", x);
|
|
3334
|
+
}, [i, x]), c(() => {
|
|
3257
3335
|
let t = !1;
|
|
3258
|
-
return
|
|
3336
|
+
return qe(e, l, { videoUrl: Ge.current }).then((e) => {
|
|
3259
3337
|
if (t) return;
|
|
3260
|
-
|
|
3261
|
-
let { features: n, planTier: r } = e.result.data
|
|
3338
|
+
je.current = e;
|
|
3339
|
+
let { features: n, planTier: r, heartbeatIntervalSeconds: i } = e.result.data;
|
|
3340
|
+
Le.current = typeof i == "number" && i > 0 ? i * 1e3 : it;
|
|
3341
|
+
let a = {
|
|
3262
3342
|
package: r,
|
|
3263
3343
|
is_active: !0,
|
|
3264
|
-
features:
|
|
3344
|
+
features: tt(n),
|
|
3265
3345
|
limits: { streaming_minutes: 0 }
|
|
3266
3346
|
};
|
|
3267
|
-
console.log("[SDK] Player key validated. Features:",
|
|
3347
|
+
console.log("[SDK] Player key validated. Features:", a.features), Ee(a), we("ready");
|
|
3268
3348
|
}).catch((e) => {
|
|
3269
3349
|
if (t) return;
|
|
3270
3350
|
console.error("[SDK] Player key validation failed:", e);
|
|
3271
3351
|
let n = e.message ?? "";
|
|
3272
|
-
|
|
3352
|
+
Ae(/init failed: 4\d\d/.test(n) ? "auth" : "network"), we("error");
|
|
3273
3353
|
}), () => {
|
|
3274
|
-
t = !0,
|
|
3354
|
+
t = !0, b.current &&= (clearTimeout(b.current), null), Re.current = 0, ze.current = null, we("loading"), Ee(null), Ne.current = !1, y.current = "", Pe.current = !1, Fe.current = void 0;
|
|
3275
3355
|
};
|
|
3276
3356
|
}, [
|
|
3277
3357
|
e,
|
|
3278
3358
|
l,
|
|
3279
|
-
|
|
3359
|
+
De
|
|
3280
3360
|
]);
|
|
3281
|
-
let
|
|
3282
|
-
|
|
3283
|
-
}, []),
|
|
3284
|
-
|
|
3361
|
+
let et = o(() => {
|
|
3362
|
+
b.current && (clearTimeout(b.current), b.current = null, ze.current !== null && (Re.current += Date.now() - ze.current, ze.current = null));
|
|
3363
|
+
}, []), ot = o(() => {
|
|
3364
|
+
b.current &&= (clearTimeout(b.current), null), Re.current = 0, ze.current = null;
|
|
3285
3365
|
}, []), S = o(() => {
|
|
3286
|
-
if (
|
|
3287
|
-
|
|
3288
|
-
let t =
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
let { currentTime: t, duration: n } =
|
|
3292
|
-
console.log(
|
|
3366
|
+
if (b.current || !y.current) return;
|
|
3367
|
+
ze.current = Date.now();
|
|
3368
|
+
let t = Le.current - Re.current;
|
|
3369
|
+
b.current = setTimeout(() => {
|
|
3370
|
+
b.current = null, Re.current = 0, ze.current = null;
|
|
3371
|
+
let { currentTime: t, duration: n } = Be.current;
|
|
3372
|
+
console.log(`[SDK] Heartbeat timer fired — ${Le.current / 1e3}s of real content elapsed`), Ye(e, y.current, t, n, l).catch((e) => console.warn("[SDK] Heartbeat failed:", e.message)), Ve.current();
|
|
3293
3373
|
}, t);
|
|
3294
3374
|
}, [e, l]);
|
|
3295
3375
|
c(() => {
|
|
3296
|
-
|
|
3376
|
+
Ve.current = S;
|
|
3297
3377
|
}, [S]);
|
|
3298
|
-
let
|
|
3378
|
+
let st = u(!0);
|
|
3299
3379
|
c(() => {
|
|
3300
|
-
if (
|
|
3301
|
-
|
|
3380
|
+
if (st.current) {
|
|
3381
|
+
st.current = !1;
|
|
3302
3382
|
return;
|
|
3303
3383
|
}
|
|
3304
|
-
|
|
3305
|
-
}, [
|
|
3384
|
+
Ie.current = !0, Fe.current = void 0, et();
|
|
3385
|
+
}, [ye, et]), c(() => {
|
|
3306
3386
|
let t = () => {
|
|
3307
|
-
|
|
3387
|
+
if (v.notifyDismissed(), !y.current) return;
|
|
3388
|
+
Pe.current = !0, ot();
|
|
3389
|
+
let { currentTime: t, duration: n } = Be.current;
|
|
3390
|
+
Qe(e, y.current, t, n, l);
|
|
3308
3391
|
};
|
|
3309
3392
|
return window.addEventListener("beforeunload", t), () => {
|
|
3310
|
-
window.removeEventListener("beforeunload", t),
|
|
3393
|
+
window.removeEventListener("beforeunload", t), ot();
|
|
3311
3394
|
};
|
|
3312
3395
|
}, [
|
|
3313
3396
|
e,
|
|
3314
3397
|
l,
|
|
3315
|
-
|
|
3316
|
-
|
|
3398
|
+
ot,
|
|
3399
|
+
v
|
|
3317
3400
|
]);
|
|
3318
|
-
let
|
|
3401
|
+
let ct = o((t) => {
|
|
3319
3402
|
let n = t;
|
|
3320
|
-
if (t.currentTime !== void 0 && (
|
|
3403
|
+
if (t.currentTime !== void 0 && (Be.current = {
|
|
3321
3404
|
currentTime: t.currentTime,
|
|
3322
3405
|
duration: t.duration
|
|
3323
|
-
}), t.eventType === "session_start" && !
|
|
3324
|
-
|
|
3325
|
-
|
|
3406
|
+
}), t.eventType === "session_start" && !Ne.current && (Ne.current = !0, Pe.current = !1, y.current = typeof n.sessionId == "string" ? n.sessionId : "", Je(e, {
|
|
3407
|
+
sessionId: y.current,
|
|
3408
|
+
videoId: Ue,
|
|
3409
|
+
videoTitle: m,
|
|
3410
|
+
videoUrl: Ge.current,
|
|
3411
|
+
contentDurationSec: t.duration
|
|
3412
|
+
}, l).catch((e) => console.warn("[SDK] Session start failed:", e.message)), Me.current || S()), t.eventType === "play" && Ne.current && !Me.current && !Ie.current && S(), t.eventType === "pause" && et(), t.eventType === "buffering_start" && et(), t.eventType === "buffering_end" && Ne.current && !Me.current && (Ie.current = !1, S()), t.eventType === "ended" && (ot(), y.current)) {
|
|
3413
|
+
Pe.current = !0;
|
|
3414
|
+
let { currentTime: t, duration: n } = Be.current;
|
|
3415
|
+
Xe(e, y.current, t, n, l).catch((e) => console.warn("[SDK] Session end failed:", e.message));
|
|
3416
|
+
}
|
|
3417
|
+
if (Ne.current && y.current && !Pe.current) {
|
|
3418
|
+
let n = at(t, Fe.current);
|
|
3419
|
+
n && Ze(e, {
|
|
3326
3420
|
eventType: n.eventType,
|
|
3327
|
-
sessionId:
|
|
3421
|
+
sessionId: y.current,
|
|
3328
3422
|
currentTime: t.currentTime ?? 0,
|
|
3329
3423
|
videoId: Ue,
|
|
3424
|
+
videoTitle: m,
|
|
3330
3425
|
...n.extras
|
|
3331
3426
|
}, l).catch((e) => console.warn(`[SDK] Event ${n.eventType} failed:`, e.message));
|
|
3332
3427
|
}
|
|
3333
|
-
t.eventType === "quality_change" && t.rendition && (
|
|
3428
|
+
t.eventType === "quality_change" && t.rendition && (Fe.current = t.rendition), console.log("[SDK Analytics]", t), v.handleAnalyticsEvent(t), pe?.(t);
|
|
3334
3429
|
}, [
|
|
3335
3430
|
e,
|
|
3336
3431
|
l,
|
|
3337
3432
|
Ue,
|
|
3433
|
+
m,
|
|
3338
3434
|
S,
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
]),
|
|
3344
|
-
|
|
3345
|
-
}, [
|
|
3346
|
-
|
|
3347
|
-
}, [
|
|
3348
|
-
|
|
3349
|
-
}, [
|
|
3350
|
-
if (
|
|
3435
|
+
et,
|
|
3436
|
+
ot,
|
|
3437
|
+
pe,
|
|
3438
|
+
v
|
|
3439
|
+
]), lt = o((e) => {
|
|
3440
|
+
Me.current = e, e ? (et(), console.log("[SDK] Ad break started — heartbeat timer paused")) : (Ne.current && S(), console.log("[SDK] Ad break ended — heartbeat timer resumed"));
|
|
3441
|
+
}, [et, S]), ut = o((e) => {
|
|
3442
|
+
v.setKeyMoments(e), ve(e), me?.(e);
|
|
3443
|
+
}, [me, v]), dt = o((e) => {
|
|
3444
|
+
v.handleTimeUpdate(e), ge?.(e);
|
|
3445
|
+
}, [ge, v]);
|
|
3446
|
+
if (Ce === "loading") return /* @__PURE__ */ p("div", {
|
|
3351
3447
|
style: {
|
|
3352
3448
|
width: "100%",
|
|
3353
3449
|
aspectRatio: "16 / 9",
|
|
@@ -3361,15 +3457,15 @@ function b({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i =
|
|
|
3361
3457
|
width: 60,
|
|
3362
3458
|
height: 60,
|
|
3363
3459
|
borderRadius: "50%",
|
|
3364
|
-
border: `4px solid rgba(${
|
|
3460
|
+
border: `4px solid rgba(${x}, 0.1)`,
|
|
3365
3461
|
borderLeftColor: i,
|
|
3366
|
-
borderRightColor: `rgba(${
|
|
3367
|
-
filter: `drop-shadow(0 0 10px rgba(${
|
|
3462
|
+
borderRightColor: `rgba(${x}, 0.2)`,
|
|
3463
|
+
filter: `drop-shadow(0 0 10px rgba(${x}, 0.5))`,
|
|
3368
3464
|
animation: "boss-sdk-spin 1s linear infinite"
|
|
3369
3465
|
} })]
|
|
3370
3466
|
});
|
|
3371
|
-
if (
|
|
3372
|
-
let e =
|
|
3467
|
+
if (Ce === "error") {
|
|
3468
|
+
let e = ke === "auth";
|
|
3373
3469
|
return /* @__PURE__ */ f("div", {
|
|
3374
3470
|
style: {
|
|
3375
3471
|
width: "100%",
|
|
@@ -3385,53 +3481,54 @@ function b({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i =
|
|
|
3385
3481
|
children: /* @__PURE__ */ f(re, {
|
|
3386
3482
|
title: e ? "Invalid Player Key" : "Something Went Wrong",
|
|
3387
3483
|
subtitle: e ? "Your player key is invalid or expired.\nPlease check your configuration." : "We encountered an error while connecting.\nPlease try again.",
|
|
3388
|
-
onRetry: () =>
|
|
3484
|
+
onRetry: () => Oe((e) => e + 1)
|
|
3389
3485
|
})
|
|
3390
3486
|
});
|
|
3391
3487
|
}
|
|
3392
|
-
return /* @__PURE__ */ f(
|
|
3393
|
-
src:
|
|
3394
|
-
sources:
|
|
3395
|
-
activeSourceIndex:
|
|
3396
|
-
onSourceChange: (e) =>
|
|
3488
|
+
return /* @__PURE__ */ f(We, {
|
|
3489
|
+
src: Se,
|
|
3490
|
+
sources: xe,
|
|
3491
|
+
activeSourceIndex: ye,
|
|
3492
|
+
onSourceChange: (e) => be(e),
|
|
3397
3493
|
subtitles: n,
|
|
3398
|
-
keyMoments:
|
|
3494
|
+
keyMoments: _e,
|
|
3399
3495
|
themeColor: i,
|
|
3400
3496
|
firebaseConfig: a,
|
|
3401
|
-
resolvedEntitlement:
|
|
3497
|
+
resolvedEntitlement: Te,
|
|
3402
3498
|
licenseKey: r,
|
|
3403
|
-
title:
|
|
3499
|
+
title: m,
|
|
3404
3500
|
watermark: ie,
|
|
3405
|
-
autoplay:
|
|
3406
|
-
muted:
|
|
3407
|
-
autoFullscreen:
|
|
3408
|
-
enableControls:
|
|
3409
|
-
enableSkipAd:
|
|
3410
|
-
skipAdAfterSeconds:
|
|
3411
|
-
chaptersDisplayMode:
|
|
3412
|
-
volumeControlType:
|
|
3413
|
-
subtitleStyle:
|
|
3414
|
-
drmConfig:
|
|
3501
|
+
autoplay: h,
|
|
3502
|
+
muted: ae,
|
|
3503
|
+
autoFullscreen: oe,
|
|
3504
|
+
enableControls: se,
|
|
3505
|
+
enableSkipAd: ce,
|
|
3506
|
+
skipAdAfterSeconds: le,
|
|
3507
|
+
chaptersDisplayMode: ue,
|
|
3508
|
+
volumeControlType: g,
|
|
3509
|
+
subtitleStyle: de,
|
|
3510
|
+
drmConfig: fe,
|
|
3415
3511
|
overlayAdUrl: te,
|
|
3416
3512
|
adTrackingUrl: ee,
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3513
|
+
videoId: Ue,
|
|
3514
|
+
urlTransformer: Ke,
|
|
3515
|
+
onAnalyticsEvent: ct,
|
|
3516
|
+
onAdBreakChange: lt,
|
|
3517
|
+
onKeyMomentsLoaded: ut,
|
|
3518
|
+
initialTime: he,
|
|
3519
|
+
onTimeUpdate: dt
|
|
3423
3520
|
});
|
|
3424
3521
|
}
|
|
3425
3522
|
//#endregion
|
|
3426
3523
|
//#region src/create-player.ts
|
|
3427
|
-
function
|
|
3524
|
+
function S(e, t) {
|
|
3428
3525
|
let n = ne(e), r = t;
|
|
3429
|
-
return n.render(i(
|
|
3526
|
+
return n.render(i(ot, r)), {
|
|
3430
3527
|
update(e) {
|
|
3431
3528
|
r = {
|
|
3432
3529
|
...r,
|
|
3433
3530
|
...e
|
|
3434
|
-
}, n.render(i(
|
|
3531
|
+
}, n.render(i(ot, r));
|
|
3435
3532
|
},
|
|
3436
3533
|
destroy() {
|
|
3437
3534
|
n.unmount();
|
|
@@ -3439,6 +3536,6 @@ function x(e, t) {
|
|
|
3439
3536
|
};
|
|
3440
3537
|
}
|
|
3441
3538
|
//#endregion
|
|
3442
|
-
export {
|
|
3539
|
+
export { ot as BossVideoPlayer, e as FirebaseAnalyticsProvider, t as VideoPlayerSDK, We as WebVideoPlayer, S as createPlayer, Xe as endSession, qe as initSdk, Ze as sendEvent, Ye as sendHeartbeat, Je as startSession };
|
|
3443
3540
|
|
|
3444
3541
|
//# sourceMappingURL=index.js.map
|