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