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