boss-web-player-sdk 1.1.21 → 1.1.23
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 +1147 -1039
- 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,23 +492,23 @@ 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,
|
|
507
507
|
3e3,
|
|
508
508
|
5e3,
|
|
509
509
|
8e3
|
|
510
|
-
];
|
|
511
|
-
function
|
|
510
|
+
], He = 700, Ue = 8;
|
|
511
|
+
function We(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 dt = tt ?? ((e) => e),
|
|
533
|
-
!e ||
|
|
534
|
-
},
|
|
535
|
-
|
|
536
|
-
},
|
|
531
|
+
var Ge = ({ 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: Ge, enablePlaybackSpeed: Ke, enablePiP: S, enableFullscreen: qe = !0, autoFullscreen: Je = !1, watchProgressInterval: Ye = 30, subtitleStyle: Xe = {}, resolvedEntitlement: Ze, licenseKey: Qe, title: C, chaptersDisplayMode: $e = "strip", volumeControlType: et = "slider", urlTransformer: tt, pauseAdOnTabSwitch: nt = !0, enableSkipAd: rt = !1, skipAdAfterSeconds: it = 5, overlayAdUrl: at, adTrackingUrl: ot, sources: w, activeSourceIndex: st = 0, onSourceChange: ct, initialTime: lt, onTimeUpdate: ut }) => {
|
|
532
|
+
let dt = tt ?? ((e) => e), T = u(null), ft = u(null), pt = u(!1), E = u(null), mt = u(0), ht = u(null), gt = u(null), _t = u(null), vt = u(null), yt = u(!1), D = u(!1), O = u(null), k = u(null), A = u(null), bt = u(null), xt = u(() => {}), j = u(null), St = u(!1), Ct = u(null), wt = (e) => {
|
|
533
|
+
!e || Ct.current !== null || (Ct.current = e.muted, e.muted = !0);
|
|
534
|
+
}, Tt = (e) => {
|
|
535
|
+
Ct.current !== null && (e && (e.muted = Ct.current), Ct.current = null);
|
|
536
|
+
}, Et = u(null), Dt = u(!1), Ot = u(null), kt = u(null), At = u(null), jt = u(null), Mt = u(null), Nt = u(null), Pt = u(w), Ft = u(ct), It = u(!1), M = u(null), N = u(null), P = u(null), Lt = u(null), Rt = u(0), zt = u(null), [Bt, Vt] = d(!1), Ht = u(!1), Ut = u(null), [Wt, Gt] = 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 = T.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 = T.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) Vt(t.contentRect.width <= 768);
|
|
551
551
|
});
|
|
552
|
-
return t.observe(e),
|
|
552
|
+
return t.observe(e), Vt(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, Kt] = d(null), [qt, Jt] = d(!1), Yt = Ze ?? null, Xt = Yt != null, Zt = Yt?.features ?? {}, Qt = Xt ? !!(Zt.drm_protection && !Qe) : !1, I = {
|
|
555
|
+
enableSubtitles: Xt ? !!Zt.subtitle_support : typeof Ve == "boolean" ? Ve : !0,
|
|
556
|
+
enableChromecast: Xt ? !!Zt.chromecast : typeof Fe == "boolean" ? Fe : !0,
|
|
557
|
+
enableKeyMoments: Xt ? !!Zt.key_moments : typeof Ie == "boolean" ? Ie : !0,
|
|
558
|
+
enableQuality: Xt ? !!Zt.multiple_resolution : typeof Ge == "boolean" ? Ge : !0,
|
|
559
|
+
enablePlaybackSpeed: Xt ? !!Zt.playback_speed : typeof Ke == "boolean" ? Ke : !0,
|
|
560
|
+
enablePiP: Xt ? !!Zt.picture_in_picture : typeof S == "boolean" ? S : !0,
|
|
561
|
+
allowAirplay: Xt ? !!Zt.airplay : !1,
|
|
562
|
+
allowMultipleAudio: Xt ? !!Zt.multiple_audio : !0,
|
|
563
|
+
m3u8_playback: Xt ? !!Zt.m3u8_playback : !0,
|
|
564
|
+
drm_protection: Xt ? !!Zt.drm_protection : !1
|
|
565
|
+
}, [$t, en] = d(!1), [tn, nn] = d(0), [rn, an] = d(!1), [L, on] = d(0), [sn, cn] = d(0), [ln, un] = d(1), [dn, fn] = d(!1), [pn, mn] = d(!1), [hn, gn] = d(!1), [_n, vn] = d(!1), [yn, bn] = d(!1), xn = Bt || (hn || _n) && yn, [Sn, Cn] = d(!1), [wn, Tn] = d(null), [En, Dn] = d(!1), [R, On] = d([]), z = u([]), kn = u(/* @__PURE__ */ new Set()), An = w && w.length > 0 ? w.map((e) => e.url).join("|") : r, [jn, Mn] = d(/* @__PURE__ */ new Set()), [Nn, Pn] = d(An), Fn = u(null), In = u(!1), Ln = u(null);
|
|
566
|
+
Nn !== An && (Pn(An), Mn(/* @__PURE__ */ new Set()), kn.current = /* @__PURE__ */ new Set(), Fn.current = null, In.current = !1);
|
|
567
|
+
let Rn = u(null), zn = u(!1), [Bn, Vn] = d([]), [Hn, Un] = d(null), Wn = u([]), Gn = u(null), Kn = u(/* @__PURE__ */ new Set()), [qn, Jn] = d([]), Yn = u([]), Xn = u(null), [Zn, Qn] = d({
|
|
568
|
+
w: 0,
|
|
569
|
+
h: 0
|
|
570
|
+
}), [$n, er] = d([]), [tr, nr] = d(0), rr = u(0), ir = u(0), ar = (e) => {
|
|
571
|
+
let t = Yn.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
|
+
}, or = l(() => R.reduce((e, t) => e + (t.endTime - t.startTime), 0), [R]), sr = sn > 0 ? Math.max(0, sn - or) : 0, B = R.length > 0 && sr > 0 ? sr : sn, 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]), [cr, lr] = d([]), [ur, dr] = d({
|
|
587
590
|
id: -1,
|
|
588
591
|
height: 0,
|
|
589
592
|
width: 0,
|
|
590
593
|
bitrate: 0,
|
|
591
594
|
label: "Auto"
|
|
592
|
-
}), [
|
|
595
|
+
}), [fr, pr] = d(""), [U, mr] = d("off"), [hr, gr] = d(Le(h)), [_r, vr] = d([]), [yr, br] = d(0);
|
|
593
596
|
c(() => {
|
|
594
597
|
if (F) {
|
|
595
598
|
let e = F.subtitles.getTracks();
|
|
596
|
-
|
|
597
|
-
} else
|
|
598
|
-
}, [
|
|
599
|
-
let [
|
|
599
|
+
gr(Le([...h, ...e.filter((e) => !h.some((t) => t.id === e.id))]));
|
|
600
|
+
} else gr(Le(h));
|
|
601
|
+
}, [h.map((e) => e.id).join(","), F]);
|
|
602
|
+
let [xr, Sr] = d({
|
|
600
603
|
chapter: null,
|
|
601
604
|
index: -1
|
|
602
|
-
}), [W,
|
|
605
|
+
}), [W, Cr] = d(te || s || []), [G, K] = d("none"), [wr, Tr] = d(1), [Er, Dr] = d(!1), [Or, kr] = d({}), [Ar, jr] = d(""), [Mr, Nr] = d(null), Pr = u(!1), Fr = JSON.stringify(W.map((e) => ({
|
|
603
606
|
title: e.title,
|
|
604
607
|
startTime: e.startTime
|
|
605
608
|
})));
|
|
606
609
|
c(() => {
|
|
607
|
-
|
|
608
|
-
}, [(
|
|
610
|
+
Cr(te || s || []);
|
|
611
|
+
}, [(te || s || []).map((e) => `${e.startTime}:${e.title}`).join(",")]), c(() => {
|
|
609
612
|
if (!r || !W || W.length === 0) return;
|
|
610
|
-
|
|
613
|
+
kr({});
|
|
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
|
+
kr((e) => ({
|
|
627
630
|
...e,
|
|
628
631
|
[s]: t
|
|
629
632
|
})), s++, l();
|
|
@@ -635,7 +638,7 @@ 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
643
|
let r = dt(t), i = new URL(r, window.location.origin);
|
|
641
644
|
n && i.searchParams.set("token", n), e.open("GET", i.toString(), !0);
|
|
@@ -644,25 +647,25 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
644
647
|
}
|
|
645
648
|
}
|
|
646
649
|
}), t.loadSource(dt(r)), t.attachMedia(e)) : e.src = r, e.readyState >= 2 && d();
|
|
647
|
-
let
|
|
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, Fr]);
|
|
655
|
+
let [q, Ir] = d(null), [Lr, Rr] = d(null), zr = u(!1), [Br, Vr] = d(!1), [Hr, Ur] = d(!1), [Wr, Gr] = d(null), [Kr, qr] = d(null), [Jr, Yr] = d(0), [Xr, Zr] = d(0), [Qr, $r] = d(null), [ei, ti] = d(null), [J, ni] = d(null);
|
|
653
656
|
c(() => {
|
|
654
|
-
if (
|
|
657
|
+
if (bt.current && !bt.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", bt.current.appendChild(e);
|
|
657
660
|
}
|
|
658
661
|
}, []), c(() => {
|
|
659
662
|
if (!F) {
|
|
660
|
-
|
|
663
|
+
Vr(!1), Ur(!1), Gr(null);
|
|
661
664
|
return;
|
|
662
665
|
}
|
|
663
|
-
let e = (e) =>
|
|
666
|
+
let e = (e) => Vr(e), t = () => {
|
|
664
667
|
let e = F.getVideoElement(), t = !!e?.webkitCurrentPlaybackTargetIsWireless;
|
|
665
|
-
|
|
668
|
+
Ur(t), Gr(t ? e.webkitCurrentPlaybackTargetName || "AirPlay device" : null);
|
|
666
669
|
};
|
|
667
670
|
e(F.casting.isAirPlayAvailable()), t();
|
|
668
671
|
let n = F.getVideoElement(), r = (t) => {
|
|
@@ -674,28 +677,28 @@ 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 [ri, ii] = d(""), [ai, oi] = d(!0), [Y, si] = d(!1), [ci, li] = d(!1), ui = u(!1), di = u(null), fi = u(!1), pi = u(!1), mi = u("none"), hi = u(h), gi = () => {
|
|
681
|
+
oi(!0), di.current && window.clearTimeout(di.current);
|
|
682
|
+
let e = Ht.current ? 3500 : 1e4;
|
|
683
|
+
di.current = window.setTimeout(() => {
|
|
684
|
+
fi.current && mi.current === "none" && oi(!1);
|
|
682
685
|
}, e);
|
|
683
|
-
},
|
|
684
|
-
|
|
685
|
-
let t =
|
|
686
|
-
|
|
686
|
+
}, _i = o((e) => {
|
|
687
|
+
Mt.current &&= (clearTimeout(Mt.current), null);
|
|
688
|
+
let t = Pt.current, n = t?.[e]?.label ?? "This format", r = t?.[0]?.label ?? "default";
|
|
689
|
+
Nt.current = null, Nr(`${n} isn't supported on this device. Switched to ${r}.`), window.setTimeout(() => Nr(null), 4e3), Ft.current?.(0);
|
|
687
690
|
}, []);
|
|
688
691
|
c(() => {
|
|
689
|
-
if (!
|
|
692
|
+
if (!T.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), gt.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
703
|
let r = dt(t), i = new URL(r, window.location.origin);
|
|
701
704
|
n && i.searchParams.set("token", n), e.open("GET", i.toString(), !0);
|
|
@@ -704,15 +707,15 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
704
707
|
}
|
|
705
708
|
}
|
|
706
709
|
});
|
|
707
|
-
e.loadSource(dt(r)), e.attachMedia(o),
|
|
708
|
-
if (
|
|
709
|
-
let n =
|
|
710
|
-
n &&
|
|
710
|
+
e.loadSource(dt(r)), e.attachMedia(o), _t.current = e, e.on(n.Events.MANIFEST_LOADED, (e, t) => {
|
|
711
|
+
if (C) return;
|
|
712
|
+
let n = Ae(t?.networkDetails?.responseText ?? "");
|
|
713
|
+
n && ii(n);
|
|
711
714
|
}), e.on(n.Events.FRAG_PARSING_METADATA, (e, t) => {
|
|
712
|
-
if (!(
|
|
713
|
-
let t =
|
|
715
|
+
if (!(C || ri)) for (let e of t?.samples ?? []) {
|
|
716
|
+
let t = je(e.data);
|
|
714
717
|
if (t) {
|
|
715
|
-
|
|
718
|
+
ii(t);
|
|
716
719
|
break;
|
|
717
720
|
}
|
|
718
721
|
}
|
|
@@ -722,76 +725,86 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
722
725
|
let e = ht.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), $r(e.toDataURL("image/jpeg", .82)));
|
|
726
729
|
});
|
|
727
730
|
let c;
|
|
728
|
-
if (
|
|
729
|
-
let t = new e(
|
|
731
|
+
if (ie) {
|
|
732
|
+
let t = new e(ie);
|
|
730
733
|
ft.current = t, c = t.createCallback();
|
|
731
734
|
}
|
|
732
|
-
if (
|
|
735
|
+
if (Qt) return;
|
|
733
736
|
let l = new t({
|
|
734
|
-
container:
|
|
737
|
+
container: T.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 && (Fn.current === null ? Fn.current = e.sessionId : e.sessionId !== Fn.current && (e = {
|
|
752
755
|
...e,
|
|
753
|
-
sessionId:
|
|
756
|
+
sessionId: Fn.current
|
|
754
757
|
})), e.eventType === "session_start") {
|
|
755
|
-
if (
|
|
756
|
-
|
|
758
|
+
if (In.current) return;
|
|
759
|
+
In.current = !0;
|
|
757
760
|
}
|
|
758
|
-
c?.(e),
|
|
761
|
+
c?.(e), oe && oe(e);
|
|
759
762
|
},
|
|
760
|
-
analyticsSessionSeed:
|
|
763
|
+
analyticsSessionSeed: Ln.current?.key === An ? Ln.current.snapshot : void 0,
|
|
761
764
|
watchProgressInterval: Ye * 1e3,
|
|
762
|
-
themeColor:
|
|
765
|
+
themeColor: _,
|
|
763
766
|
urlTransformer: tt
|
|
764
767
|
});
|
|
765
768
|
l.on("keymomentsloaded", (e) => {
|
|
766
|
-
|
|
769
|
+
Cr(e), ce && ce(e);
|
|
767
770
|
}), l.on("chaptersloaded", (e) => {
|
|
768
|
-
|
|
771
|
+
Cr(e), ce && ce(e);
|
|
769
772
|
}), l.on("play", () => {
|
|
770
|
-
|
|
773
|
+
an(!0), Dn(!1), ee(l.getCurrentTime(), !1);
|
|
771
774
|
}), l.on("pause", () => {
|
|
772
|
-
|
|
775
|
+
an(!1), ee(l.getCurrentTime(), !0);
|
|
773
776
|
}), l.on("ended", () => {
|
|
774
|
-
|
|
777
|
+
an(!1), Dn(!0);
|
|
775
778
|
});
|
|
776
779
|
let u = () => {
|
|
777
|
-
|
|
780
|
+
St.current = !0, mn(!1), j.current && (j.current.style.opacity = "1"), wt(l.getVideoElement());
|
|
778
781
|
}, d = () => {
|
|
779
782
|
requestAnimationFrame(() => {
|
|
780
783
|
requestAnimationFrame(() => {
|
|
781
|
-
|
|
784
|
+
St.current = !1, j.current && (j.current.style.opacity = "0"), Tt(l.getVideoElement());
|
|
782
785
|
let e = l.getVideoElement();
|
|
783
|
-
e && !e.paused && e.readyState < 3 &&
|
|
786
|
+
e && !e.paused && e.readyState < 3 && mn(!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 : Ot.current ?? e + .5;
|
|
792
|
+
t || (Ot.current = null), Dt.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 = Dt.current;
|
|
798
|
+
Dt.current = !1, (t || Ot.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, Dt.current = !1, d();
|
|
791
804
|
}, 3e3);
|
|
792
805
|
};
|
|
793
|
-
|
|
794
|
-
let
|
|
806
|
+
Et.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) => kn.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
|
+
Ot.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 = Dt.current;
|
|
848
|
+
Dt.current = !1, (n || !t && Ot.current === null) && d();
|
|
836
849
|
} else return;
|
|
837
850
|
}
|
|
838
|
-
|
|
851
|
+
on(e), Rt.current = e;
|
|
839
852
|
let t = l.getDuration();
|
|
840
|
-
if (
|
|
853
|
+
if (cn(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) => kn.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
|
-
|
|
862
|
+
if (!It.current && At.current === null && lt && lt > 0 && t > 0 && lt < t) {
|
|
863
|
+
It.current = !0;
|
|
851
864
|
let e = z.current.find((e) => lt >= e.startTime && lt < e.endTime), t = e ? e.startTime : lt;
|
|
852
|
-
|
|
865
|
+
Lt.current = e ? null : lt, 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 (ut?.(e),
|
|
857
|
-
let t =
|
|
858
|
-
(e >= t.startTimeSeconds + t.durationSeconds || e < t.startTimeSeconds) && (
|
|
869
|
+
if (ut?.(e), Wn.current.length > 0) if (Gn.current) {
|
|
870
|
+
let t = Gn.current;
|
|
871
|
+
(e >= t.startTimeSeconds + t.durationSeconds || e < t.startTimeSeconds) && (Un(null), Gn.current = null);
|
|
859
872
|
} else {
|
|
860
|
-
let t =
|
|
861
|
-
t && (
|
|
873
|
+
let t = Wn.current.find((t) => e >= t.startTimeSeconds && e < t.startTimeSeconds + t.durationSeconds && !Kn.current.has(t.availId));
|
|
874
|
+
t && (Un(t), Gn.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
|
+
Sr({
|
|
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
|
+
lr(e);
|
|
885
|
+
let t = jt.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), dr(n)) : dr({
|
|
889
|
+
id: -1,
|
|
890
|
+
height: 0,
|
|
891
|
+
width: 0,
|
|
892
|
+
bitrate: 0,
|
|
893
|
+
label: "Auto"
|
|
894
|
+
});
|
|
872
895
|
}), l.on("qualitychange", (e) => {
|
|
873
|
-
|
|
896
|
+
dr(e);
|
|
874
897
|
}), l.on("buffering", (e) => {
|
|
875
|
-
if (
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
898
|
+
if (mn(e && !St.current), !e) {
|
|
899
|
+
Mt.current &&= (clearTimeout(Mt.current), null), Nt.current = null;
|
|
900
|
+
let e = jt.current;
|
|
901
|
+
if (e && (jt.current = null, e.playbackRate !== 1 && l.setPlaybackRate(e.playbackRate), l.setVolume(e.volume), l.setMute(e.muted)), At.current !== null) {
|
|
902
|
+
let e = At.current;
|
|
903
|
+
At.current = null, It.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 (ui.current = !1, li(!1), t && kn.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 && (Rn.current = t.startTime), si(!0), K("none"), d();
|
|
916
|
+
} else if (Rn.current !== null && (kn.current.add(Rn.current), Mn(new Set(kn.current)), Rn.current = null), si(!1), Ot.current !== null) {
|
|
917
|
+
let e = Ot.current;
|
|
918
|
+
Ot.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, On(e);
|
|
924
|
+
let t = Lt.current;
|
|
898
925
|
if (t === null) return;
|
|
899
|
-
|
|
926
|
+
Lt.current = null;
|
|
900
927
|
let n = e.find((e) => t >= e.startTime && t < e.endTime);
|
|
901
|
-
if (!n ||
|
|
928
|
+
if (!n || kn.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
|
+
un(e.volume), Ct.current === null && fn(e.muted);
|
|
908
935
|
}), l.on("pipchange", (e) => {
|
|
909
|
-
|
|
936
|
+
Cn(e);
|
|
910
937
|
}), l.on("error", () => {
|
|
911
|
-
|
|
938
|
+
en(!0), mn(!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 = Nt.current;
|
|
941
|
+
e && e.targetIdx !== 0 && (Pt.current?.length ?? 0) > 1 && _i(e.targetIdx);
|
|
915
942
|
}), l.subtitles.onSubtitleChange((e) => {
|
|
916
|
-
|
|
943
|
+
pr(e);
|
|
917
944
|
}), l.on("subtitlesloaded", (e) => {
|
|
918
945
|
if (!I.enableSubtitles) return;
|
|
919
|
-
|
|
920
|
-
let t =
|
|
921
|
-
|
|
946
|
+
gr(Le([...e]));
|
|
947
|
+
let t = jt.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), mr(n);
|
|
952
|
+
return;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
let n = e.find((e) => e.isDefault);
|
|
956
|
+
n && (l.subtitles.setActiveTrack(n.id), mr(n.id));
|
|
922
957
|
}), l.on("audiotracksloaded", (e) => {
|
|
923
|
-
|
|
958
|
+
vr(e);
|
|
959
|
+
let t = jt.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), br(n.id);
|
|
962
|
+
return;
|
|
963
|
+
}
|
|
964
|
+
br(e[0]?.id ?? 0);
|
|
924
965
|
}), l.on("audiotrackchange", (e) => {
|
|
925
|
-
|
|
966
|
+
br(e);
|
|
926
967
|
}), l.casting.onCastStateChange((e, t) => {
|
|
927
968
|
if (e) {
|
|
928
|
-
|
|
969
|
+
zr.current = l.isMuted(), l.pause();
|
|
929
970
|
let e = l.getVideoElement();
|
|
930
|
-
e.muted = !0,
|
|
971
|
+
e.muted = !0, Ir(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 = zr.current, Ir(null), Rr(null);
|
|
938
979
|
}
|
|
939
980
|
}), l.casting.onRemoteStateChange((e) => {
|
|
940
|
-
|
|
941
|
-
}),
|
|
981
|
+
Rr(e);
|
|
982
|
+
}), un(l.getVolume()), fn(l.isMuted()), "mediaSession" in navigator) try {
|
|
942
983
|
navigator.mediaSession.setActionHandler("seekto", (e) => {
|
|
943
|
-
if (e.seekTime == null ||
|
|
984
|
+
if (e.seekTime == null || pi.current || ui.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
|
+
kt.current?.(t);
|
|
947
988
|
});
|
|
948
989
|
let e = (e, t) => {
|
|
949
|
-
if (
|
|
990
|
+
if (pi.current || ui.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
|
+
kt.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
|
+
kt.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 || At.current !== null) return;
|
|
1013
|
+
let e = p.currentTime, t = Rt.current;
|
|
973
1014
|
if (!(Math.abs(e - t) < .5)) {
|
|
974
|
-
if (
|
|
975
|
-
|
|
1015
|
+
if (pi.current) {
|
|
1016
|
+
p.currentTime = t;
|
|
976
1017
|
return;
|
|
977
1018
|
}
|
|
978
|
-
|
|
1019
|
+
p.currentTime = t, kt.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)), Je &&
|
|
1022
|
+
p.addEventListener("seeking", m), Kt(l);
|
|
1023
|
+
let te = Nt.current;
|
|
1024
|
+
te && te.targetIdx !== 0 && (Mt.current && clearTimeout(Mt.current), Mt.current = setTimeout(() => {
|
|
1025
|
+
Mt.current = null, !l.getBufferedRanges().some((e) => e.end > e.start) && _i(te.targetIdx);
|
|
1026
|
+
}, De)), At.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"), mn(!1);
|
|
1028
|
+
}, 12e3)), Je && T.current && (pt.current = !0, T.current.requestFullscreen().catch(() => {
|
|
988
1029
|
pt.current = !1;
|
|
989
1030
|
}));
|
|
990
|
-
let
|
|
1031
|
+
let ne = () => {
|
|
991
1032
|
let e = document, t = !!(document.fullscreenElement || e.webkitFullscreenElement);
|
|
992
|
-
|
|
1033
|
+
gn(t), t || vn(!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 (gt.current && !gt.current.paused) try {
|
|
1052
|
+
gt.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(), !pi.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
|
+
kt.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(), !pi.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
|
+
kt.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(), xt.current();
|
|
1052
1093
|
break;
|
|
1053
1094
|
case "p":
|
|
1054
|
-
e.preventDefault(),
|
|
1095
|
+
e.preventDefault(), pi.current || l.togglePictureInPicture();
|
|
1055
1096
|
break;
|
|
1056
1097
|
case "c":
|
|
1057
|
-
if (e.preventDefault(), I.enableSubtitles && !
|
|
1098
|
+
if (e.preventDefault(), I.enableSubtitles && !pi.current) if (l.subtitles.getActiveTrackId() !== "off") l.subtitles.setActiveTrack("off"), mr("off");
|
|
1058
1099
|
else {
|
|
1059
|
-
let e =
|
|
1060
|
-
e && e.length > 0 && (l.subtitles.setActiveTrack(e[0].id),
|
|
1100
|
+
let e = hi.current;
|
|
1101
|
+
e && e.length > 0 && (l.subtitles.setActiveTrack(e[0].id), mr(e[0].id));
|
|
1061
1102
|
}
|
|
1062
1103
|
break;
|
|
1063
1104
|
default: return;
|
|
1064
1105
|
}
|
|
1065
|
-
|
|
1106
|
+
gi();
|
|
1066
1107
|
}
|
|
1067
1108
|
};
|
|
1068
|
-
return document.addEventListener("keydown",
|
|
1069
|
-
if (
|
|
1070
|
-
key:
|
|
1109
|
+
return document.addEventListener("keydown", v), gi(), () => {
|
|
1110
|
+
if (Ln.current = {
|
|
1111
|
+
key: An,
|
|
1071
1112
|
snapshot: l.analytics.getSessionSnapshot()
|
|
1072
|
-
},
|
|
1073
|
-
let e =
|
|
1074
|
-
|
|
1113
|
+
}, zt.current) {
|
|
1114
|
+
let e = zt.current, t = l.getVideoElement();
|
|
1115
|
+
T.current && t.ownerDocument !== document && (t.classList.remove("gb-pip-video"), T.current.insertBefore(t, T.current.firstChild)), zt.current = null, Tn(null), Cn(!1), e.close();
|
|
1075
1116
|
}
|
|
1076
|
-
if (l.destroy(), ft.current?.destroy(), ft.current = null, document.body.style.overflow = "", document.body.style.touchAction = "", document.removeEventListener("fullscreenchange",
|
|
1117
|
+
if (l.destroy(), ft.current?.destroy(), ft.current = null, document.body.style.overflow = "", document.body.style.touchAction = "", document.removeEventListener("fullscreenchange", ne), document.removeEventListener("webkitfullscreenchange", ne), document.removeEventListener("keydown", v), di.current && window.clearTimeout(di.current), A.current &&= (window.clearTimeout(A.current), null), Mt.current &&= (clearTimeout(Mt.current), null), St.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
|
+
_t.current &&= (_t.current.destroy(), null), gt.current &&= (document.body.removeChild(gt.current), null), It.current = !1, N.current = null, P.current &&= (window.clearTimeout(P.current), null);
|
|
1088
1129
|
};
|
|
1089
1130
|
}, [
|
|
1090
1131
|
r,
|
|
1091
|
-
|
|
1092
|
-
|
|
1132
|
+
g,
|
|
1133
|
+
tn
|
|
1093
1134
|
]), c(() => {
|
|
1094
1135
|
if (F) {
|
|
1095
1136
|
F.keyMoments.setKeyMoments(W);
|
|
1096
|
-
let e =
|
|
1137
|
+
let e = T.current?.querySelector("video");
|
|
1097
1138
|
if (e) {
|
|
1098
1139
|
let t = F.keyMoments.getCurrentMoment(e.currentTime);
|
|
1099
|
-
|
|
1140
|
+
Sr({
|
|
1100
1141
|
chapter: t.keyMoment,
|
|
1101
1142
|
index: t.index
|
|
1102
1143
|
});
|
|
1103
1144
|
}
|
|
1104
1145
|
}
|
|
1105
|
-
}, [
|
|
1146
|
+
}, [Fr, 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
|
+
fi.current = rn;
|
|
1155
|
+
}, [rn]), c(() => {
|
|
1156
|
+
pi.current = Y;
|
|
1116
1157
|
}, [Y]), c(() => {
|
|
1117
|
-
|
|
1118
|
-
}, [
|
|
1119
|
-
let X = Y ||
|
|
1158
|
+
ui.current = ci;
|
|
1159
|
+
}, [ci]);
|
|
1160
|
+
let X = Y || ci;
|
|
1120
1161
|
c(() => {
|
|
1121
|
-
|
|
1122
|
-
}, [
|
|
1123
|
-
|
|
1162
|
+
zt.current = wn;
|
|
1163
|
+
}, [wn]), c(() => {
|
|
1164
|
+
mi.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 = ar(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
|
+
(T.current?.querySelectorAll(".sdk-ad-progress-fill"))?.forEach((e) => {
|
|
1137
1178
|
e.style.width = `${t}%`;
|
|
1138
1179
|
});
|
|
1139
1180
|
}
|
|
@@ -1141,38 +1182,53 @@ 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
|
+
hi.current = hr;
|
|
1186
|
+
}, [hr]), c(() => {
|
|
1187
|
+
Ht.current = Bt;
|
|
1188
|
+
}, [Bt]), c(() => {
|
|
1148
1189
|
z.current = R;
|
|
1149
1190
|
}, [R]), c(() => {
|
|
1150
|
-
|
|
1151
|
-
}, [
|
|
1152
|
-
|
|
1153
|
-
}, [
|
|
1154
|
-
|
|
1155
|
-
}, [
|
|
1156
|
-
|
|
1157
|
-
}, [
|
|
1158
|
-
|
|
1191
|
+
Wn.current = Bn;
|
|
1192
|
+
}, [Bn]), c(() => {
|
|
1193
|
+
Gn.current = Hn;
|
|
1194
|
+
}, [Hn]), c(() => {
|
|
1195
|
+
Yn.current = qn;
|
|
1196
|
+
}, [qn]), c(() => {
|
|
1197
|
+
ir.current = L;
|
|
1198
|
+
}, [L]), c(() => {
|
|
1199
|
+
Pt.current = w;
|
|
1200
|
+
}, [w]), c(() => {
|
|
1201
|
+
let e = Xn.current;
|
|
1202
|
+
if (!Y || !e || typeof ResizeObserver > "u") return;
|
|
1203
|
+
let t = () => {
|
|
1204
|
+
let t = e.getBoundingClientRect();
|
|
1205
|
+
Qn((e) => e.w === t.width && e.h === t.height ? e : {
|
|
1206
|
+
w: t.width,
|
|
1207
|
+
h: t.height
|
|
1208
|
+
});
|
|
1209
|
+
};
|
|
1210
|
+
t();
|
|
1211
|
+
let n = new ResizeObserver(t);
|
|
1212
|
+
return n.observe(e), () => n.disconnect();
|
|
1213
|
+
}, [Y, qn]), c(() => {
|
|
1214
|
+
Ft.current = ct;
|
|
1159
1215
|
}, [ct]), c(() => {
|
|
1160
|
-
|
|
1216
|
+
Rn.current = null, zn.current = !1, Ot.current = null, Lt.current = null, Un(null), Gn.current = null, Kn.current = /* @__PURE__ */ new Set(), en(!1);
|
|
1161
1217
|
}, [r]), c(() => {
|
|
1162
|
-
|
|
1218
|
+
Jt(!1);
|
|
1163
1219
|
}, [r]), c(() => {
|
|
1164
1220
|
if (!F) return;
|
|
1165
1221
|
let e = F.getVideoElement();
|
|
1166
1222
|
if (e && e.readyState >= 1) {
|
|
1167
|
-
|
|
1223
|
+
Jt(!0);
|
|
1168
1224
|
return;
|
|
1169
1225
|
}
|
|
1170
|
-
let t = () =>
|
|
1226
|
+
let t = () => Jt(!0);
|
|
1171
1227
|
return F.on("qualitylevels", t), e?.addEventListener("loadedmetadata", t), () => {
|
|
1172
1228
|
F.off("qualitylevels", t), e?.removeEventListener("loadedmetadata", t);
|
|
1173
1229
|
};
|
|
1174
1230
|
}, [F]), c(() => {
|
|
1175
|
-
if (
|
|
1231
|
+
if (Vn([]), !(!at || !qt)) return We(at, (e) => {
|
|
1176
1232
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
1177
1233
|
for (let r of e.nonLinearAvails ?? []) {
|
|
1178
1234
|
if (t.has(r.availId)) continue;
|
|
@@ -1186,13 +1242,13 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1186
1242
|
let s = o.position ?? "bottom_center";
|
|
1187
1243
|
n.push({
|
|
1188
1244
|
availId: r.availId,
|
|
1189
|
-
startTimeSeconds:
|
|
1190
|
-
durationSeconds:
|
|
1245
|
+
startTimeSeconds: Re(r.startTime ?? ""),
|
|
1246
|
+
durationSeconds: Re(i.minSuggestedDuration ?? "00:00:15"),
|
|
1191
1247
|
imageUrl: i.staticResource,
|
|
1192
1248
|
imageWidth: parseInt(i.width ?? "320", 10),
|
|
1193
1249
|
imageHeight: parseInt(i.height ?? "50", 10),
|
|
1194
1250
|
title: i.adTitle ?? "",
|
|
1195
|
-
clickThrough:
|
|
1251
|
+
clickThrough: ze(i.clickThrough) ? i.clickThrough : "",
|
|
1196
1252
|
clickTrackingUrl: i.clickTracking ?? "",
|
|
1197
1253
|
impressionBeacons: a,
|
|
1198
1254
|
position: s,
|
|
@@ -1200,13 +1256,15 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1200
1256
|
});
|
|
1201
1257
|
}
|
|
1202
1258
|
return n.length > 0 ? n : null;
|
|
1203
|
-
},
|
|
1259
|
+
}, Vn);
|
|
1204
1260
|
}, [
|
|
1205
1261
|
at,
|
|
1206
1262
|
r,
|
|
1207
|
-
|
|
1263
|
+
qt
|
|
1208
1264
|
]), c(() => {
|
|
1209
|
-
|
|
1265
|
+
Jn([]), er([]), rr.current = 0;
|
|
1266
|
+
}, [r]), c(() => {
|
|
1267
|
+
if (ot) return We(ot, (e) => {
|
|
1210
1268
|
let t = [], n = [];
|
|
1211
1269
|
for (let r of e.avails ?? []) {
|
|
1212
1270
|
let e = r.ads ?? [];
|
|
@@ -1216,11 +1274,11 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1216
1274
|
startTime: i,
|
|
1217
1275
|
endTime: r.durationInSeconds == null ? Math.max(o, i) : i + r.durationInSeconds
|
|
1218
1276
|
}), e.forEach((n, r) => {
|
|
1219
|
-
let i =
|
|
1277
|
+
let i = Be(n?.skipOffset), a = i !== null, o = {};
|
|
1220
1278
|
try {
|
|
1221
1279
|
o = JSON.parse(n?.adParameters ?? "{}");
|
|
1222
1280
|
} catch {}
|
|
1223
|
-
let s = o.ctaText &&
|
|
1281
|
+
let s = o.ctaText && ze(o.redirectUrl) ? {
|
|
1224
1282
|
text: o.ctaText,
|
|
1225
1283
|
url: o.redirectUrl,
|
|
1226
1284
|
title: o.title || void 0,
|
|
@@ -1243,141 +1301,164 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1243
1301
|
breaks: n
|
|
1244
1302
|
} : null;
|
|
1245
1303
|
}, ({ pods: e, breaks: t }) => {
|
|
1246
|
-
|
|
1304
|
+
Jn(e), er(t);
|
|
1247
1305
|
});
|
|
1248
1306
|
}, [
|
|
1249
1307
|
ot,
|
|
1250
1308
|
r,
|
|
1251
|
-
|
|
1309
|
+
tr
|
|
1252
1310
|
]), c(() => {
|
|
1253
|
-
!
|
|
1254
|
-
|
|
1311
|
+
if (!ot || !Y) return;
|
|
1312
|
+
let e = setInterval(() => {
|
|
1313
|
+
let e = ir.current;
|
|
1314
|
+
Yn.current.some((t) => e >= t.startTimeSeconds && e < t.endTimeSeconds) || rr.current >= Ue || (rr.current += 1, nr((e) => e + 1));
|
|
1315
|
+
}, He);
|
|
1316
|
+
return () => clearInterval(e);
|
|
1317
|
+
}, [ot, Y]), c(() => {
|
|
1318
|
+
!F || $n.length === 0 || F.setAdBreaks($n);
|
|
1319
|
+
}, [F, $n]), c(() => {
|
|
1255
1320
|
if (!F) return;
|
|
1256
1321
|
let e = () => {
|
|
1257
|
-
document.hidden ? nt &&
|
|
1322
|
+
document.hidden ? nt && pi.current && fi.current && (F.pause(), zn.current = !0) : zn.current &&= (F.play(), !1);
|
|
1258
1323
|
};
|
|
1259
1324
|
return document.addEventListener("visibilitychange", e), () => {
|
|
1260
1325
|
document.removeEventListener("visibilitychange", e);
|
|
1261
1326
|
};
|
|
1262
1327
|
}, [F, nt]);
|
|
1263
|
-
let
|
|
1264
|
-
|
|
1265
|
-
},
|
|
1266
|
-
Je && !pt.current &&
|
|
1267
|
-
},
|
|
1328
|
+
let vi = () => {
|
|
1329
|
+
gi();
|
|
1330
|
+
}, yi = () => {
|
|
1331
|
+
Je && !pt.current && T.current && (pt.current = !0, T.current.requestFullscreen().catch(() => {}));
|
|
1332
|
+
}, bi = () => {
|
|
1268
1333
|
if (F) {
|
|
1269
1334
|
if (q) {
|
|
1270
|
-
F.casting.remotePlayPause(),
|
|
1335
|
+
F.casting.remotePlayPause(), gi();
|
|
1271
1336
|
return;
|
|
1272
1337
|
}
|
|
1273
|
-
if (
|
|
1274
|
-
else if (
|
|
1338
|
+
if (En) Z(0), yi(), F.play(), Dn(!1);
|
|
1339
|
+
else if (rn) {
|
|
1275
1340
|
F.pause();
|
|
1276
1341
|
try {
|
|
1277
1342
|
let e = F.getVideoElement?.();
|
|
1278
1343
|
e && !e.paused && e.pause();
|
|
1279
1344
|
} catch {}
|
|
1280
|
-
if (
|
|
1345
|
+
if (T.current && T.current.querySelectorAll("video").forEach((e) => {
|
|
1281
1346
|
try {
|
|
1282
1347
|
e.pause();
|
|
1283
1348
|
} catch {}
|
|
1284
|
-
}),
|
|
1285
|
-
|
|
1349
|
+
}), gt.current && !gt.current.paused) try {
|
|
1350
|
+
gt.current.pause();
|
|
1286
1351
|
} catch {}
|
|
1287
|
-
} else
|
|
1288
|
-
|
|
1352
|
+
} else yi(), F.play();
|
|
1353
|
+
gi();
|
|
1289
1354
|
}
|
|
1290
|
-
},
|
|
1291
|
-
if (!
|
|
1292
|
-
let t =
|
|
1355
|
+
}, xi = (e) => {
|
|
1356
|
+
if (!E.current || !F || B === 0) return 0;
|
|
1357
|
+
let t = E.current.getBoundingClientRect();
|
|
1293
1358
|
return H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
|
|
1294
|
-
},
|
|
1295
|
-
if (!F || Y ||
|
|
1296
|
-
|
|
1359
|
+
}, Si = (e) => {
|
|
1360
|
+
if (!F || Y || ci) return;
|
|
1361
|
+
yt.current = !0, ni(xi(e));
|
|
1297
1362
|
let t = (e) => {
|
|
1298
|
-
if (!
|
|
1299
|
-
let t =
|
|
1300
|
-
|
|
1363
|
+
if (!yt.current || !E.current) return;
|
|
1364
|
+
let t = E.current.getBoundingClientRect(), n = H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
|
|
1365
|
+
ni(n), qr(e.clientX - t.left), Zr(n), gt.current && (gt.current.currentTime = n), gi();
|
|
1301
1366
|
}, n = (e) => {
|
|
1302
|
-
if (
|
|
1303
|
-
let t =
|
|
1367
|
+
if (yt.current = !1, E.current) {
|
|
1368
|
+
let t = E.current.getBoundingClientRect();
|
|
1304
1369
|
Z(H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B));
|
|
1305
1370
|
}
|
|
1306
|
-
|
|
1371
|
+
ni(null), qr(null), $r(null), ti(null), document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
|
|
1307
1372
|
};
|
|
1308
1373
|
document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
|
|
1309
1374
|
}, Z = (e, t) => {
|
|
1310
1375
|
if (!F) return;
|
|
1311
|
-
if (
|
|
1376
|
+
if (Lt.current = null, q) {
|
|
1312
1377
|
F.casting.remoteSeek(e);
|
|
1313
1378
|
return;
|
|
1314
1379
|
}
|
|
1315
|
-
let n = Math.max(0,
|
|
1380
|
+
let n = Math.max(0, sn > 0 ? Math.min(e, sn) : e);
|
|
1316
1381
|
if (t) {
|
|
1317
1382
|
let { eventType: e, ...n } = t;
|
|
1318
1383
|
F.attributeNextSeek(e, n);
|
|
1319
1384
|
}
|
|
1320
1385
|
let r = F.getCurrentTime();
|
|
1321
1386
|
if (n > r && z.current.length > 0) {
|
|
1322
|
-
let e = z.current.filter((e) => e.startTime < n && e.endTime > r && !
|
|
1387
|
+
let e = z.current.filter((e) => e.startTime < n && e.endTime > r && !kn.current.has(e.startTime)).sort((e, t) => e.startTime - t.startTime);
|
|
1323
1388
|
if (e.length > 0) {
|
|
1324
|
-
|
|
1389
|
+
Ot.current = n;
|
|
1325
1390
|
let t = e[e.length - 1], i = Math.max(t.startTime, r);
|
|
1326
|
-
|
|
1327
|
-
|
|
1391
|
+
D.current = !0, O.current = i, k.current = r, on(i), ui.current = !0, li(!0), j.current && (j.current.style.opacity = "1"), wt(F.getVideoElement()), F.seek(i), A.current && window.clearTimeout(A.current), A.current = window.setTimeout(() => {
|
|
1392
|
+
D.current = !1, ui.current = !1, li(!1), O.current = null, k.current = null, A.current = null, St.current = !1, j.current && (j.current.style.opacity = "0"), Tt(F.getVideoElement());
|
|
1328
1393
|
}, 3e3);
|
|
1329
1394
|
return;
|
|
1330
1395
|
}
|
|
1331
1396
|
}
|
|
1332
|
-
|
|
1333
|
-
let i = z.current.find((e) =>
|
|
1334
|
-
|
|
1335
|
-
|
|
1397
|
+
Ot.current = null;
|
|
1398
|
+
let i = z.current.find((e) => kn.current.has(e.startTime) && n >= e.startTime - .5 && n < e.endTime + 2), a = i ? Math.max(n, i.endTime + .5) : n;
|
|
1399
|
+
D.current = !0, O.current = a, k.current = r, on(a), St.current = !1, j.current && (j.current.style.opacity = "0"), Tt(F.getVideoElement()), F.seek(a), A.current && window.clearTimeout(A.current), A.current = window.setTimeout(() => {
|
|
1400
|
+
D.current = !1, O.current = null, k.current = null, A.current = null, St.current = !1, j.current && (j.current.style.opacity = "0");
|
|
1336
1401
|
}, 3e3);
|
|
1337
1402
|
};
|
|
1338
|
-
|
|
1339
|
-
let
|
|
1403
|
+
kt.current = Z;
|
|
1404
|
+
let Ci = () => {
|
|
1340
1405
|
if (!F) return;
|
|
1341
1406
|
if (q) {
|
|
1342
|
-
F.casting.remoteSetMute(!(
|
|
1407
|
+
F.casting.remoteSetMute(!(Lr?.isMuted ?? !1));
|
|
1343
1408
|
return;
|
|
1344
1409
|
}
|
|
1345
|
-
let e = !
|
|
1346
|
-
F.setMute(e),
|
|
1347
|
-
},
|
|
1348
|
-
F && (F.setPlaybackRate(e),
|
|
1349
|
-
},
|
|
1410
|
+
let e = !dn;
|
|
1411
|
+
F.setMute(e), fn(e);
|
|
1412
|
+
}, wi = (e) => {
|
|
1413
|
+
F && (F.setPlaybackRate(e), Tr(e), K("none"), jr(`Playback speed: ${e === 1 ? "Normal" : `${e}x`}`));
|
|
1414
|
+
}, Ti = (e) => {
|
|
1350
1415
|
if (!F) return;
|
|
1351
1416
|
F.setQuality(e);
|
|
1352
|
-
let t =
|
|
1353
|
-
t && (
|
|
1354
|
-
},
|
|
1355
|
-
if (F) if (F.subtitles.setActiveTrack(e),
|
|
1417
|
+
let t = cr.find((t) => t.id === e);
|
|
1418
|
+
t && (dr(t), jr(`Quality: ${t.label}`)), K("none");
|
|
1419
|
+
}, Ei = (e) => {
|
|
1420
|
+
if (F) if (F.subtitles.setActiveTrack(e), mr(e), K("none"), e === "off") jr("Captions off");
|
|
1356
1421
|
else {
|
|
1357
|
-
let t =
|
|
1358
|
-
|
|
1422
|
+
let t = hr.find((t) => t.id === e);
|
|
1423
|
+
jr(`Captions: ${t ? x(t) : "on"}`);
|
|
1359
1424
|
}
|
|
1360
|
-
},
|
|
1361
|
-
|
|
1362
|
-
|
|
1425
|
+
}, Di = (e) => {
|
|
1426
|
+
if (F) {
|
|
1427
|
+
if (Mt.current &&= (clearTimeout(Mt.current), null), Nr(null), M.current && (M.current.style.opacity = "1"), mn(!0), Nt.current === null) {
|
|
1428
|
+
At.current = F.getCurrentTime();
|
|
1429
|
+
let e = hr.find((e) => e.id === U), t = _r.find((e) => e.id === yr);
|
|
1430
|
+
jt.current = {
|
|
1431
|
+
playbackRate: wr,
|
|
1432
|
+
volume: ln,
|
|
1433
|
+
muted: dn,
|
|
1434
|
+
subtitleId: U,
|
|
1435
|
+
subtitleLang: e?.lang ?? null,
|
|
1436
|
+
audioLang: t && yr !== 0 ? t.lang : null,
|
|
1437
|
+
audioLabel: t && yr !== 0 ? t.label : null,
|
|
1438
|
+
qualityHeight: ur.id === -1 ? null : ur.height
|
|
1439
|
+
};
|
|
1440
|
+
}
|
|
1441
|
+
Nt.current = { targetIdx: e }, K("none"), jr(`Source: ${w?.[e]?.label ?? ""}`), ct?.(e);
|
|
1442
|
+
}
|
|
1443
|
+
}, Oi = (e, t) => {
|
|
1363
1444
|
Z(e, {
|
|
1364
1445
|
eventType: "key_moments",
|
|
1365
1446
|
momentTitle: t?.title ?? "",
|
|
1366
1447
|
momentTime: e
|
|
1367
1448
|
}), K("none");
|
|
1368
|
-
},
|
|
1369
|
-
if (!
|
|
1449
|
+
}, ki = o(() => {
|
|
1450
|
+
if (!zt.current) return;
|
|
1370
1451
|
let e = F?.getVideoElement?.();
|
|
1371
|
-
e &&
|
|
1372
|
-
}, [F]),
|
|
1452
|
+
e && T.current && e.ownerDocument !== document && (e.classList.remove("gb-pip-video"), e.style.objectFit = "", T.current.insertBefore(e, T.current.firstChild)), zt.current = null, Tn(null), Cn(!1);
|
|
1453
|
+
}, [F]), Ai = async () => {
|
|
1373
1454
|
if (!F) return;
|
|
1374
1455
|
let e = window.documentPictureInPicture;
|
|
1375
1456
|
if (!e) {
|
|
1376
1457
|
F.togglePictureInPicture();
|
|
1377
1458
|
return;
|
|
1378
1459
|
}
|
|
1379
|
-
if (
|
|
1380
|
-
|
|
1460
|
+
if (zt.current) {
|
|
1461
|
+
zt.current.close();
|
|
1381
1462
|
return;
|
|
1382
1463
|
}
|
|
1383
1464
|
try {
|
|
@@ -1385,160 +1466,160 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1385
1466
|
width: 360,
|
|
1386
1467
|
height: Math.round(360 / n)
|
|
1387
1468
|
}), i = r.document.createElement("style");
|
|
1388
|
-
i.textContent =
|
|
1469
|
+
i.textContent = ke, r.document.head.appendChild(i), t.classList.add("gb-pip-video"), r.document.body.appendChild(t), r.addEventListener("pagehide", () => ki(), { once: !0 }), zt.current = r, Tn(r), Cn(!0);
|
|
1389
1470
|
} catch (e) {
|
|
1390
1471
|
console.error("[PlayerSDK PiP] Failed to open custom Picture-in-Picture window:", e);
|
|
1391
1472
|
}
|
|
1392
|
-
},
|
|
1393
|
-
if (Y ||
|
|
1473
|
+
}, ji = (e) => {
|
|
1474
|
+
if (Y || ci) return;
|
|
1394
1475
|
let t = e.currentTarget.getBoundingClientRect();
|
|
1395
1476
|
Z(H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B));
|
|
1396
|
-
},
|
|
1397
|
-
if (!
|
|
1398
|
-
let e =
|
|
1399
|
-
|
|
1477
|
+
}, Mi = () => {
|
|
1478
|
+
if (!T.current) return;
|
|
1479
|
+
let e = T.current, t = document, n = e, r = !!(document.fullscreenElement || t.webkitFullscreenElement), i = () => {
|
|
1480
|
+
vn(!0), gn(!0), document.body.style.overflow = "hidden", document.body.style.touchAction = "none", F?.analytics.track("fullscreen_enter", F.getVideoElement());
|
|
1400
1481
|
}, a = () => {
|
|
1401
|
-
|
|
1482
|
+
vn(!1), gn(!1), document.body.style.overflow = "", document.body.style.touchAction = "", F?.analytics.track("fullscreen_exit", F.getVideoElement());
|
|
1402
1483
|
};
|
|
1403
|
-
if (r ||
|
|
1484
|
+
if (r || _n) bn(!1), document.fullscreenElement ? document.exitFullscreen() : t.webkitFullscreenElement ? t.webkitExitFullscreen?.() : a();
|
|
1404
1485
|
else {
|
|
1405
|
-
|
|
1486
|
+
bn(Ht.current);
|
|
1406
1487
|
let t = e.requestFullscreen?.bind(e) ?? n.webkitRequestFullscreen?.bind(n);
|
|
1407
1488
|
t ? t().catch(i) : i();
|
|
1408
1489
|
}
|
|
1409
1490
|
};
|
|
1410
1491
|
c(() => {
|
|
1411
|
-
|
|
1492
|
+
xt.current = Mi;
|
|
1412
1493
|
});
|
|
1413
|
-
let
|
|
1494
|
+
let Ni = () => {
|
|
1414
1495
|
if (!Y) return;
|
|
1415
|
-
let e = R.find((e) => L >= e.startTime && L < e.endTime), t =
|
|
1496
|
+
let e = R.find((e) => L >= e.startTime && L < e.endTime), t = qn.find((e) => L >= e.startTimeSeconds && L < e.endTimeSeconds);
|
|
1416
1497
|
if (t) {
|
|
1417
1498
|
let n = t.podIndex >= t.podTotal - 1;
|
|
1418
|
-
|
|
1499
|
+
Et.current?.(n ? e?.endTime ?? t.endTimeSeconds : t.endTimeSeconds, !n);
|
|
1419
1500
|
return;
|
|
1420
1501
|
}
|
|
1421
|
-
e &&
|
|
1422
|
-
},
|
|
1423
|
-
|
|
1424
|
-
},
|
|
1502
|
+
e && Et.current?.(e.endTime);
|
|
1503
|
+
}, Pi = () => {
|
|
1504
|
+
Gn.current && Kn.current.add(Gn.current.availId), Un(null), Gn.current = null;
|
|
1505
|
+
}, Fi = (e) => {
|
|
1425
1506
|
e.clickTrackingUrl && fetch(e.clickTrackingUrl, { mode: "no-cors" }).catch(() => {}), e.clickThrough && window.open(e.clickThrough, "_blank", "noopener,noreferrer");
|
|
1426
|
-
},
|
|
1507
|
+
}, Ii = (e) => {
|
|
1427
1508
|
window.open(e.url, "_blank", "noopener,noreferrer");
|
|
1428
|
-
},
|
|
1509
|
+
}, Li = () => {
|
|
1429
1510
|
F && (q ? F.casting.stopCasting() : F.casting.requestSession(r, L));
|
|
1430
|
-
},
|
|
1511
|
+
}, Ri = () => {
|
|
1431
1512
|
if (!F) return;
|
|
1432
1513
|
let e = F.getVideoElement();
|
|
1433
|
-
if (
|
|
1514
|
+
if (Hr) {
|
|
1434
1515
|
F.casting.stopAirPlay(e);
|
|
1435
1516
|
return;
|
|
1436
1517
|
}
|
|
1437
1518
|
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
|
-
mt.current = t.width,
|
|
1519
|
+
}, zi = (e) => {
|
|
1520
|
+
if (!E.current || B === 0 || !F || Y || ci) return;
|
|
1521
|
+
let t = E.current.getBoundingClientRect();
|
|
1522
|
+
mt.current = t.width, Yr(Math.max(192 / 2, Math.min(e.clientX - t.left, t.width - 192 / 2)));
|
|
1442
1523
|
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 =
|
|
1524
|
+
qr(e.clientX - t.left), Zr(n), vt.current && window.clearTimeout(vt.current), vt.current = window.setTimeout(() => {
|
|
1525
|
+
gt.current && (gt.current.currentTime = n);
|
|
1526
|
+
}, 100), ti(F.keyMoments.getCurrentMoment(n).keyMoment);
|
|
1527
|
+
}, Bi = (e) => {
|
|
1528
|
+
if (!E.current || B === 0) return 0;
|
|
1529
|
+
let t = E.current.getBoundingClientRect();
|
|
1449
1530
|
return H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
|
|
1450
|
-
},
|
|
1451
|
-
if (!F || Y ||
|
|
1452
|
-
e.preventDefault(),
|
|
1531
|
+
}, Vi = (e) => {
|
|
1532
|
+
if (!F || Y || ci || B === 0) return;
|
|
1533
|
+
e.preventDefault(), yt.current = !0, ni(Bi(e.touches[0]));
|
|
1453
1534
|
let t = (e) => {
|
|
1454
|
-
if (!
|
|
1455
|
-
let t = e.touches[0], n =
|
|
1456
|
-
|
|
1535
|
+
if (!yt.current || !E.current) return;
|
|
1536
|
+
let t = e.touches[0], n = E.current.getBoundingClientRect(), r = H(Math.max(0, Math.min(1, (t.clientX - n.left) / n.width)) * B);
|
|
1537
|
+
ni(r), Zr(r), gi();
|
|
1457
1538
|
}, n = (e) => {
|
|
1458
|
-
if (
|
|
1459
|
-
let t = e.changedTouches[0], n =
|
|
1539
|
+
if (yt.current = !1, E.current && e.changedTouches[0]) {
|
|
1540
|
+
let t = e.changedTouches[0], n = E.current.getBoundingClientRect();
|
|
1460
1541
|
Z(H(Math.max(0, Math.min(1, (t.clientX - n.left) / n.width)) * B));
|
|
1461
1542
|
}
|
|
1462
|
-
|
|
1543
|
+
ni(null), document.removeEventListener("touchmove", t), document.removeEventListener("touchend", n);
|
|
1463
1544
|
};
|
|
1464
1545
|
document.addEventListener("touchmove", t, { passive: !1 }), document.addEventListener("touchend", n);
|
|
1465
|
-
},
|
|
1466
|
-
|
|
1546
|
+
}, Hi = () => {
|
|
1547
|
+
qr(null), $r(null), ti(null), vt.current && window.clearTimeout(vt.current);
|
|
1467
1548
|
}, Q = (e) => {
|
|
1468
1549
|
if (isNaN(e) || e < 0) return "00:00";
|
|
1469
1550
|
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
1551
|
return n > 0 ? `${a(n)}:${a(r)}:${a(i)}` : `${a(r)}:${a(i)}`;
|
|
1471
1552
|
};
|
|
1472
1553
|
c(() => {
|
|
1473
|
-
|
|
1474
|
-
}, [
|
|
1475
|
-
|
|
1476
|
-
}, [
|
|
1477
|
-
|
|
1554
|
+
Pr.current && jr(rn ? "Playing" : "Paused");
|
|
1555
|
+
}, [rn]), c(() => {
|
|
1556
|
+
Pr.current && jr(dn ? "Muted" : "Unmuted");
|
|
1557
|
+
}, [dn]), c(() => {
|
|
1558
|
+
Pr.current = !0;
|
|
1478
1559
|
}, []), c(() => {
|
|
1479
1560
|
let e = (e) => {
|
|
1480
|
-
e.key === "Escape" &&
|
|
1561
|
+
e.key === "Escape" && mi.current !== "none" && (e.preventDefault(), K("none"));
|
|
1481
1562
|
};
|
|
1482
1563
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1483
1564
|
}, []);
|
|
1484
|
-
let
|
|
1485
|
-
if (Y ||
|
|
1486
|
-
let t = Date.now(), n =
|
|
1565
|
+
let Ui = q ? !(Lr?.isPaused ?? !0) : rn, $ = q ? Lr?.currentTime ?? 0 : L, Wi = q ? Lr?.duration ?? 0 : B, Gi = q ? Lr?.volumeLevel ?? 1 : ln, Ki = q ? Lr?.isMuted ?? !1 : dn, qi = o((e) => {
|
|
1566
|
+
if (Y || ci || e.target.closest(".sdk-mobile-ctrl")) return;
|
|
1567
|
+
let t = Date.now(), n = T.current?.getBoundingClientRect(), r = e.clientX - (n?.left ?? 0), i = Ut.current;
|
|
1487
1568
|
if (i && t - i.time < 300) {
|
|
1488
|
-
|
|
1569
|
+
Ut.current = null;
|
|
1489
1570
|
let e = r < (n?.width ?? 0) / 2, t = e ? -10 : 10;
|
|
1490
1571
|
Z(H(Math.max(0, Math.min(B, V($) + t))), {
|
|
1491
1572
|
eventType: e ? "fast_backward" : "fast_forward",
|
|
1492
1573
|
skipSeconds: 10
|
|
1493
|
-
}),
|
|
1494
|
-
} else
|
|
1574
|
+
}), Gt(e ? "left" : "right"), window.setTimeout(() => Gt(null), 700), gi();
|
|
1575
|
+
} else Ut.current = {
|
|
1495
1576
|
time: t,
|
|
1496
1577
|
x: r
|
|
1497
|
-
},
|
|
1578
|
+
}, ai ? (oi(!1), di.current && window.clearTimeout(di.current)) : gi();
|
|
1498
1579
|
}, [
|
|
1499
1580
|
Y,
|
|
1500
|
-
|
|
1581
|
+
ci,
|
|
1501
1582
|
B,
|
|
1502
1583
|
V,
|
|
1503
1584
|
$,
|
|
1504
1585
|
H,
|
|
1505
1586
|
Z,
|
|
1506
|
-
|
|
1507
|
-
]),
|
|
1587
|
+
ai
|
|
1588
|
+
]), Ji = () => p(Ki || Gi === 0 ? Te : Gi < .3 ? Ee : Gi < .7 ? Ce : we, { size: 18 }), Yi = (e) => (t) => {
|
|
1508
1589
|
t.key === "Enter" || t.key === " " ? (t.preventDefault(), e()) : t.key === "Escape" && (t.preventDefault(), K("none"));
|
|
1509
|
-
},
|
|
1590
|
+
}, Xi = (e) => (t) => {
|
|
1510
1591
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), e());
|
|
1511
|
-
},
|
|
1512
|
-
if (!(Y ||
|
|
1592
|
+
}, Zi = (e) => {
|
|
1593
|
+
if (!(Y || ci)) if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
1513
1594
|
e.preventDefault();
|
|
1514
1595
|
let t = e.key === "ArrowLeft" ? -5 : 5;
|
|
1515
1596
|
Z(H(Math.max(0, Math.min(B, V($) + t))));
|
|
1516
1597
|
} else e.key === "Home" ? (e.preventDefault(), Z(H(0))) : e.key === "End" && (e.preventDefault(), Z(H(B)));
|
|
1517
|
-
},
|
|
1598
|
+
}, Qi = (e) => {
|
|
1518
1599
|
K(G === e ? "none" : e);
|
|
1519
|
-
},
|
|
1600
|
+
}, $i = o((e) => {
|
|
1520
1601
|
if (!e) return;
|
|
1521
1602
|
e.style.left = "";
|
|
1522
|
-
let t =
|
|
1603
|
+
let t = T.current;
|
|
1523
1604
|
if (!t) return;
|
|
1524
1605
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = n.right - (r.right - 8), a = r.left + 8 - n.left;
|
|
1525
1606
|
i > 0 ? e.style.left = `calc(50% - ${Math.ceil(i)}px)` : a > 0 && (e.style.left = `calc(50% + ${Math.ceil(a)}px)`);
|
|
1526
1607
|
}, []);
|
|
1527
|
-
return /* @__PURE__ */
|
|
1528
|
-
ref:
|
|
1608
|
+
return /* @__PURE__ */ m("div", {
|
|
1609
|
+
ref: T,
|
|
1529
1610
|
role: "region",
|
|
1530
|
-
"aria-label":
|
|
1531
|
-
className: `sdk-player-container ${
|
|
1532
|
-
onMouseMove:
|
|
1533
|
-
onTouchStart:
|
|
1611
|
+
"aria-label": C || ri ? `${C || ri} video player` : "Video player",
|
|
1612
|
+
className: `sdk-player-container ${ai ? "controls-active" : ""} ${_n ? "sdk-fs-simulated" : ""}`,
|
|
1613
|
+
onMouseMove: vi,
|
|
1614
|
+
onTouchStart: xn ? void 0 : gi,
|
|
1534
1615
|
onMouseLeave: () => {},
|
|
1535
1616
|
style: {
|
|
1536
|
-
border:
|
|
1537
|
-
"--sdk-theme-color":
|
|
1538
|
-
"--sdk-theme-color-rgb":
|
|
1617
|
+
border: _n ? "none" : "1px solid rgba(255, 255, 255, 0.08)",
|
|
1618
|
+
"--sdk-theme-color": _,
|
|
1619
|
+
"--sdk-theme-color-rgb": Pe(_)
|
|
1539
1620
|
},
|
|
1540
1621
|
children: [
|
|
1541
|
-
/* @__PURE__ */
|
|
1622
|
+
/* @__PURE__ */ p("canvas", {
|
|
1542
1623
|
ref: ht,
|
|
1543
1624
|
width: 160,
|
|
1544
1625
|
height: 90,
|
|
@@ -1549,15 +1630,15 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1549
1630
|
},
|
|
1550
1631
|
"aria-hidden": "true"
|
|
1551
1632
|
}),
|
|
1552
|
-
/* @__PURE__ */
|
|
1633
|
+
/* @__PURE__ */ p("div", {
|
|
1553
1634
|
role: "status",
|
|
1554
1635
|
"aria-live": "polite",
|
|
1555
1636
|
"aria-atomic": "true",
|
|
1556
1637
|
className: "sdk-sr-only",
|
|
1557
|
-
children:
|
|
1638
|
+
children: Ar
|
|
1558
1639
|
}),
|
|
1559
|
-
/* @__PURE__ */
|
|
1560
|
-
ref:
|
|
1640
|
+
/* @__PURE__ */ p("div", {
|
|
1641
|
+
ref: j,
|
|
1561
1642
|
style: {
|
|
1562
1643
|
opacity: 0,
|
|
1563
1644
|
position: "absolute",
|
|
@@ -1569,15 +1650,15 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1569
1650
|
},
|
|
1570
1651
|
"aria-hidden": "true"
|
|
1571
1652
|
}),
|
|
1572
|
-
|
|
1653
|
+
wn && /* @__PURE__ */ m("div", {
|
|
1573
1654
|
className: "sdk-pip-placeholder",
|
|
1574
1655
|
"aria-hidden": "true",
|
|
1575
|
-
children: [/* @__PURE__ */
|
|
1656
|
+
children: [/* @__PURE__ */ p(ye, {
|
|
1576
1657
|
size: 32,
|
|
1577
1658
|
"aria-hidden": "true"
|
|
1578
|
-
}), /* @__PURE__ */
|
|
1659
|
+
}), /* @__PURE__ */ p("span", { children: "Playing in Picture-in-Picture" })]
|
|
1579
1660
|
}),
|
|
1580
|
-
/* @__PURE__ */
|
|
1661
|
+
/* @__PURE__ */ p("div", {
|
|
1581
1662
|
ref: M,
|
|
1582
1663
|
style: {
|
|
1583
1664
|
opacity: lt && lt > 0 ? 1 : 0,
|
|
@@ -1590,12 +1671,12 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1590
1671
|
},
|
|
1591
1672
|
"aria-hidden": "true"
|
|
1592
1673
|
}),
|
|
1593
|
-
/* @__PURE__ */
|
|
1594
|
-
className: `sdk-spinner-overlay ${
|
|
1674
|
+
/* @__PURE__ */ p("div", {
|
|
1675
|
+
className: `sdk-spinner-overlay ${pn ? "active" : ""}`,
|
|
1595
1676
|
"aria-hidden": "true",
|
|
1596
|
-
children: /* @__PURE__ */
|
|
1677
|
+
children: /* @__PURE__ */ p("div", { className: "sdk-spinner" })
|
|
1597
1678
|
}),
|
|
1598
|
-
|
|
1679
|
+
$t && /* @__PURE__ */ p("div", {
|
|
1599
1680
|
style: {
|
|
1600
1681
|
position: "absolute",
|
|
1601
1682
|
inset: 0,
|
|
@@ -1608,11 +1689,11 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1608
1689
|
gap: 20,
|
|
1609
1690
|
padding: "0 24px"
|
|
1610
1691
|
},
|
|
1611
|
-
children: /* @__PURE__ */
|
|
1612
|
-
|
|
1692
|
+
children: /* @__PURE__ */ p(ne, { onRetry: () => {
|
|
1693
|
+
en(!1), nn((e) => e + 1);
|
|
1613
1694
|
} })
|
|
1614
1695
|
}),
|
|
1615
|
-
|
|
1696
|
+
Mr && /* @__PURE__ */ p("div", {
|
|
1616
1697
|
style: {
|
|
1617
1698
|
position: "absolute",
|
|
1618
1699
|
top: "50%",
|
|
@@ -1631,11 +1712,11 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1631
1712
|
backdropFilter: "blur(8px)",
|
|
1632
1713
|
border: "1px solid rgba(255,255,255,0.12)"
|
|
1633
1714
|
},
|
|
1634
|
-
children:
|
|
1715
|
+
children: Mr
|
|
1635
1716
|
}),
|
|
1636
|
-
I.enableSubtitles && !Y &&
|
|
1717
|
+
I.enableSubtitles && !Y && fr && U !== "off" && /* @__PURE__ */ p("div", {
|
|
1637
1718
|
className: "sdk-subtitles-overlay",
|
|
1638
|
-
children: /* @__PURE__ */
|
|
1719
|
+
children: /* @__PURE__ */ p("span", {
|
|
1639
1720
|
className: "sdk-subtitles-text",
|
|
1640
1721
|
style: {
|
|
1641
1722
|
fontSize: Xe.size === "small" ? "14px" : Xe.size === "large" ? "24px" : "18px",
|
|
@@ -1644,92 +1725,119 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1644
1725
|
border: Xe.background === "none" ? "none" : "1px solid rgba(255,255,255,0.08)",
|
|
1645
1726
|
backdropFilter: Xe.background === "none" ? "none" : "blur(8px)"
|
|
1646
1727
|
},
|
|
1647
|
-
dangerouslySetInnerHTML: { __html:
|
|
1728
|
+
dangerouslySetInnerHTML: { __html: fr }
|
|
1648
1729
|
})
|
|
1649
1730
|
}),
|
|
1650
|
-
|
|
1651
|
-
className: `sdk-overlay-ad sdk-overlay-ad--${
|
|
1731
|
+
Hn && /* @__PURE__ */ m("div", {
|
|
1732
|
+
className: `sdk-overlay-ad sdk-overlay-ad--${Hn.position}`,
|
|
1652
1733
|
role: "complementary",
|
|
1653
1734
|
"aria-label": "Advertisement",
|
|
1654
|
-
children: [/* @__PURE__ */
|
|
1735
|
+
children: [/* @__PURE__ */ m("div", {
|
|
1655
1736
|
className: "sdk-overlay-ad-topbar",
|
|
1656
|
-
children: [/* @__PURE__ */
|
|
1737
|
+
children: [/* @__PURE__ */ p("span", {
|
|
1657
1738
|
className: "sdk-overlay-ad-label",
|
|
1658
1739
|
children: "Ad"
|
|
1659
|
-
}),
|
|
1740
|
+
}), Hn.dismissible && /* @__PURE__ */ p("button", {
|
|
1660
1741
|
className: "sdk-overlay-ad-close",
|
|
1661
|
-
onClick:
|
|
1742
|
+
onClick: Pi,
|
|
1662
1743
|
"aria-label": "Close advertisement",
|
|
1663
1744
|
children: "✕"
|
|
1664
1745
|
})]
|
|
1665
|
-
}), /* @__PURE__ */
|
|
1666
|
-
src:
|
|
1667
|
-
width:
|
|
1668
|
-
height:
|
|
1669
|
-
alt:
|
|
1746
|
+
}), /* @__PURE__ */ p("img", {
|
|
1747
|
+
src: Hn.imageUrl,
|
|
1748
|
+
width: Hn.imageWidth,
|
|
1749
|
+
height: Hn.imageHeight,
|
|
1750
|
+
alt: Hn.title || "Advertisement",
|
|
1670
1751
|
className: "sdk-overlay-ad-img",
|
|
1671
|
-
onClick: () =>
|
|
1752
|
+
onClick: () => Fi(Hn)
|
|
1672
1753
|
})]
|
|
1673
1754
|
}),
|
|
1674
1755
|
Y && (() => {
|
|
1675
|
-
let e =
|
|
1676
|
-
return /* @__PURE__ */
|
|
1677
|
-
/* @__PURE__ */
|
|
1756
|
+
let e = qn.find((e) => L >= e.startTimeSeconds && L < e.endTimeSeconds), t = R.find((e) => L >= e.startTime && L < e.endTime), n = e ? Math.max(0, e.endTimeSeconds - L) : t ? Math.max(0, t.endTime - L) : 0, r = e ? L - e.startTimeSeconds : t ? L - t.startTime : 0, i = !!e && e.podTotal > 1, a = e ? e.skippable : rt, o = e ? e.skipOffsetSeconds : it, s = a && r >= o, c = Math.ceil(o - r), l = r + n, u = l > 0 ? Math.min(1, Math.max(0, r / l)) : 0, d = 2.5, { w: f, h: te } = Zn, 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;
|
|
1757
|
+
return /* @__PURE__ */ m(ee, { children: [
|
|
1758
|
+
/* @__PURE__ */ m("div", {
|
|
1759
|
+
ref: Xn,
|
|
1678
1760
|
className: "sdk-ad-countdown",
|
|
1679
1761
|
role: "timer",
|
|
1680
1762
|
"aria-label": i ? `Advertisement ${e.podIndex + 1} of ${e.podTotal} — ${Q(n)} remaining` : `Advertisement — ${Q(n)} remaining`,
|
|
1681
1763
|
"aria-live": "off",
|
|
1682
1764
|
children: [
|
|
1683
|
-
/* @__PURE__ */
|
|
1684
|
-
className: "sdk-ad-countdown-
|
|
1765
|
+
f > 0 && te > 0 && /* @__PURE__ */ m("svg", {
|
|
1766
|
+
className: "sdk-ad-countdown-border",
|
|
1767
|
+
width: f,
|
|
1768
|
+
height: te,
|
|
1769
|
+
viewBox: `0 0 ${f} ${te}`,
|
|
1685
1770
|
"aria-hidden": "true",
|
|
1686
|
-
children:
|
|
1771
|
+
children: [/* @__PURE__ */ p("path", {
|
|
1772
|
+
className: "sdk-ad-countdown-border-track",
|
|
1773
|
+
d: ie,
|
|
1774
|
+
strokeWidth: d
|
|
1775
|
+
}), /* @__PURE__ */ p("path", {
|
|
1776
|
+
className: "sdk-ad-countdown-border-fill",
|
|
1777
|
+
d: ie,
|
|
1778
|
+
strokeWidth: d,
|
|
1779
|
+
strokeDasharray: ae,
|
|
1780
|
+
strokeDashoffset: ae * (1 - u)
|
|
1781
|
+
})]
|
|
1687
1782
|
}),
|
|
1688
|
-
|
|
1689
|
-
className: "sdk-ad-countdown-
|
|
1783
|
+
/* @__PURE__ */ p("span", {
|
|
1784
|
+
className: "sdk-ad-countdown-badge",
|
|
1785
|
+
"aria-hidden": "true",
|
|
1786
|
+
children: "Ad"
|
|
1787
|
+
}),
|
|
1788
|
+
i && /* @__PURE__ */ m("span", {
|
|
1789
|
+
className: "sdk-ad-countdown-count",
|
|
1690
1790
|
"aria-hidden": "true",
|
|
1691
|
-
children:
|
|
1791
|
+
children: [
|
|
1792
|
+
e.podIndex + 1,
|
|
1793
|
+
" of ",
|
|
1794
|
+
e.podTotal
|
|
1795
|
+
]
|
|
1692
1796
|
}),
|
|
1693
|
-
/* @__PURE__ */
|
|
1797
|
+
/* @__PURE__ */ p("span", {
|
|
1798
|
+
className: "sdk-ad-countdown-sep",
|
|
1799
|
+
"aria-hidden": "true"
|
|
1800
|
+
}),
|
|
1801
|
+
/* @__PURE__ */ p("span", {
|
|
1694
1802
|
className: "sdk-ad-countdown-time",
|
|
1695
1803
|
"aria-hidden": "true",
|
|
1696
1804
|
children: Q(n)
|
|
1697
1805
|
})
|
|
1698
1806
|
]
|
|
1699
1807
|
}),
|
|
1700
|
-
a && /* @__PURE__ */
|
|
1808
|
+
a && /* @__PURE__ */ p("button", {
|
|
1701
1809
|
className: `sdk-skip-ad-btn ${s ? "sdk-skip-ad-btn--ready" : ""}`,
|
|
1702
|
-
onClick: s ?
|
|
1810
|
+
onClick: s ? Ni : void 0,
|
|
1703
1811
|
disabled: !s,
|
|
1704
1812
|
"aria-label": s ? "Skip advertisement" : `Skip advertisement available in ${c} seconds`,
|
|
1705
1813
|
"aria-disabled": !s,
|
|
1706
1814
|
children: s ? "Skip Ad ›" : `Skip in ${c}s`
|
|
1707
1815
|
}),
|
|
1708
1816
|
e?.cta && (() => {
|
|
1709
|
-
let t = e.cta, n = /* @__PURE__ */
|
|
1817
|
+
let t = e.cta, n = /* @__PURE__ */ m("button", {
|
|
1710
1818
|
className: "sdk-ad-cta-btn",
|
|
1711
|
-
onClick: () =>
|
|
1819
|
+
onClick: () => Ii(t),
|
|
1712
1820
|
"aria-label": `${t.text} — opens advertiser site in a new tab`,
|
|
1713
|
-
children: [/* @__PURE__ */
|
|
1821
|
+
children: [/* @__PURE__ */ p("span", {
|
|
1714
1822
|
className: "sdk-ad-cta-btn-text",
|
|
1715
1823
|
children: t.text
|
|
1716
|
-
}), /* @__PURE__ */
|
|
1824
|
+
}), /* @__PURE__ */ p(pe, {
|
|
1717
1825
|
size: 15,
|
|
1718
1826
|
"aria-hidden": "true"
|
|
1719
1827
|
})]
|
|
1720
1828
|
});
|
|
1721
|
-
return /* @__PURE__ */
|
|
1829
|
+
return /* @__PURE__ */ p("div", {
|
|
1722
1830
|
className: "sdk-ad-cta",
|
|
1723
1831
|
role: "complementary",
|
|
1724
1832
|
"aria-label": "Advertisement call to action",
|
|
1725
|
-
children: t.title ? /* @__PURE__ */
|
|
1833
|
+
children: t.title ? /* @__PURE__ */ m("div", {
|
|
1726
1834
|
className: "sdk-ad-cta-card",
|
|
1727
|
-
children: [/* @__PURE__ */
|
|
1835
|
+
children: [/* @__PURE__ */ m("div", {
|
|
1728
1836
|
className: "sdk-ad-cta-info",
|
|
1729
|
-
children: [/* @__PURE__ */
|
|
1837
|
+
children: [/* @__PURE__ */ p("div", {
|
|
1730
1838
|
className: "sdk-ad-cta-title",
|
|
1731
1839
|
children: t.title
|
|
1732
|
-
}), t.description && /* @__PURE__ */
|
|
1840
|
+
}), t.description && /* @__PURE__ */ p("div", {
|
|
1733
1841
|
className: "sdk-ad-cta-desc",
|
|
1734
1842
|
children: t.description
|
|
1735
1843
|
})]
|
|
@@ -1739,7 +1847,7 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1739
1847
|
})()
|
|
1740
1848
|
] });
|
|
1741
1849
|
})(),
|
|
1742
|
-
|
|
1850
|
+
Qt && /* @__PURE__ */ p("div", {
|
|
1743
1851
|
style: {
|
|
1744
1852
|
position: "absolute",
|
|
1745
1853
|
inset: 0,
|
|
@@ -1750,87 +1858,87 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1750
1858
|
color: "#fff",
|
|
1751
1859
|
zIndex: 60
|
|
1752
1860
|
},
|
|
1753
|
-
children: /* @__PURE__ */
|
|
1861
|
+
children: /* @__PURE__ */ m("div", {
|
|
1754
1862
|
style: {
|
|
1755
1863
|
maxWidth: 480,
|
|
1756
1864
|
textAlign: "center",
|
|
1757
1865
|
padding: 24
|
|
1758
1866
|
},
|
|
1759
|
-
children: [/* @__PURE__ */
|
|
1867
|
+
children: [/* @__PURE__ */ p("h3", {
|
|
1760
1868
|
style: { margin: "0 0 8px" },
|
|
1761
1869
|
children: "Playback restricted"
|
|
1762
|
-
}), /* @__PURE__ */
|
|
1870
|
+
}), /* @__PURE__ */ p("p", {
|
|
1763
1871
|
style: { margin: 0 },
|
|
1764
1872
|
children: "Your account is missing a required license key. Please contact your administrator."
|
|
1765
1873
|
})]
|
|
1766
1874
|
})
|
|
1767
1875
|
}),
|
|
1768
|
-
(q ||
|
|
1769
|
-
|
|
1770
|
-
className: `sdk-mobile-overlay ${
|
|
1771
|
-
onClick:
|
|
1772
|
-
children: [
|
|
1773
|
-
className: `sdk-mobile-doubletap ${
|
|
1774
|
-
children: /* @__PURE__ */
|
|
1876
|
+
(q || Hr) && /* @__PURE__ */ p("div", { className: "sdk-cast-bg" }),
|
|
1877
|
+
xn && /* @__PURE__ */ m("div", {
|
|
1878
|
+
className: `sdk-mobile-overlay ${ai ? "active" : ""}`,
|
|
1879
|
+
onClick: qi,
|
|
1880
|
+
children: [Wt && /* @__PURE__ */ p("div", {
|
|
1881
|
+
className: `sdk-mobile-doubletap ${Wt}`,
|
|
1882
|
+
children: /* @__PURE__ */ m("div", {
|
|
1775
1883
|
className: "sdk-mobile-doubletap-icon",
|
|
1776
|
-
children: [
|
|
1884
|
+
children: [p(Wt === "left" ? xe : Se, { size: 26 }), /* @__PURE__ */ p("span", {
|
|
1777
1885
|
className: "sdk-mobile-doubletap-label",
|
|
1778
1886
|
children: "10s"
|
|
1779
1887
|
})]
|
|
1780
1888
|
})
|
|
1781
|
-
}),
|
|
1782
|
-
/* @__PURE__ */
|
|
1889
|
+
}), v && /* @__PURE__ */ m(ee, { children: [
|
|
1890
|
+
/* @__PURE__ */ m("div", {
|
|
1783
1891
|
className: "sdk-mobile-header sdk-mobile-ctrl",
|
|
1784
|
-
children: [/* @__PURE__ */
|
|
1892
|
+
children: [/* @__PURE__ */ m("div", {
|
|
1785
1893
|
className: "sdk-mobile-header-left",
|
|
1786
|
-
children: [(
|
|
1894
|
+
children: [(hn || _n) && /* @__PURE__ */ p("button", {
|
|
1787
1895
|
className: "sdk-mobile-back-btn",
|
|
1788
|
-
onClick:
|
|
1896
|
+
onClick: Mi,
|
|
1789
1897
|
"aria-label": "Exit fullscreen",
|
|
1790
|
-
children: /* @__PURE__ */
|
|
1898
|
+
children: /* @__PURE__ */ p(fe, {
|
|
1791
1899
|
size: 22,
|
|
1792
1900
|
"aria-hidden": "true"
|
|
1793
1901
|
})
|
|
1794
|
-
}), (
|
|
1902
|
+
}), (C || ri) && /* @__PURE__ */ p("div", {
|
|
1795
1903
|
className: "sdk-mobile-title",
|
|
1796
|
-
children:
|
|
1904
|
+
children: C || ri
|
|
1797
1905
|
})]
|
|
1798
|
-
}), /* @__PURE__ */
|
|
1906
|
+
}), /* @__PURE__ */ m("div", {
|
|
1799
1907
|
className: "sdk-mobile-header-actions",
|
|
1800
1908
|
children: [
|
|
1801
|
-
I.enablePiP && /* @__PURE__ */
|
|
1909
|
+
I.enablePiP && /* @__PURE__ */ p("button", {
|
|
1802
1910
|
className: "sdk-mobile-hdr-btn",
|
|
1803
1911
|
onClick: () => {
|
|
1804
|
-
Y ||
|
|
1912
|
+
Y || Ai();
|
|
1805
1913
|
},
|
|
1806
|
-
style: { color:
|
|
1807
|
-
"aria-label":
|
|
1808
|
-
"aria-pressed":
|
|
1809
|
-
children: /* @__PURE__ */
|
|
1914
|
+
style: { color: Sn ? _ : "" },
|
|
1915
|
+
"aria-label": Sn ? "Exit picture-in-picture" : "Enter picture-in-picture",
|
|
1916
|
+
"aria-pressed": Sn,
|
|
1917
|
+
children: /* @__PURE__ */ p(ye, {
|
|
1810
1918
|
size: 20,
|
|
1811
1919
|
"aria-hidden": "true"
|
|
1812
1920
|
})
|
|
1813
1921
|
}),
|
|
1814
|
-
I.enableChromecast && !Y && /* @__PURE__ */
|
|
1922
|
+
I.enableChromecast && !Y && /* @__PURE__ */ p("button", {
|
|
1815
1923
|
className: "sdk-mobile-hdr-btn",
|
|
1816
|
-
onClick:
|
|
1924
|
+
onClick: Li,
|
|
1817
1925
|
"data-tooltip": q ? `Casting to ${q} — tap to disconnect` : "Cast to device",
|
|
1818
1926
|
"aria-label": q ? `Stop casting to ${q}` : "Cast to device",
|
|
1819
1927
|
"aria-pressed": !!q,
|
|
1820
1928
|
style: { color: q ? "#3b82f6" : "" },
|
|
1821
|
-
children: /* @__PURE__ */
|
|
1929
|
+
children: /* @__PURE__ */ p(de, {
|
|
1822
1930
|
size: 20,
|
|
1823
1931
|
fill: q ? "currentColor" : "none",
|
|
1824
1932
|
"aria-hidden": "true"
|
|
1825
1933
|
})
|
|
1826
1934
|
}),
|
|
1827
|
-
I.allowAirplay &&
|
|
1935
|
+
I.allowAirplay && Br && /* @__PURE__ */ p("button", {
|
|
1828
1936
|
className: "sdk-mobile-hdr-btn",
|
|
1829
|
-
onClick:
|
|
1830
|
-
"aria-label":
|
|
1831
|
-
"aria-pressed":
|
|
1832
|
-
style: { color:
|
|
1833
|
-
children: /* @__PURE__ */
|
|
1937
|
+
onClick: Ri,
|
|
1938
|
+
"aria-label": Hr ? `Stop AirPlay to ${Wr || "device"}` : "AirPlay to device",
|
|
1939
|
+
"aria-pressed": Hr,
|
|
1940
|
+
style: { color: Hr ? _ : "" },
|
|
1941
|
+
children: /* @__PURE__ */ p(le, {
|
|
1834
1942
|
size: 20,
|
|
1835
1943
|
"aria-hidden": "true"
|
|
1836
1944
|
})
|
|
@@ -1838,54 +1946,54 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1838
1946
|
]
|
|
1839
1947
|
})]
|
|
1840
1948
|
}),
|
|
1841
|
-
/* @__PURE__ */
|
|
1949
|
+
/* @__PURE__ */ m("div", {
|
|
1842
1950
|
className: "sdk-mobile-center-controls sdk-mobile-ctrl",
|
|
1843
1951
|
children: [
|
|
1844
|
-
!Y && /* @__PURE__ */
|
|
1952
|
+
!Y && /* @__PURE__ */ m("button", {
|
|
1845
1953
|
className: "sdk-mobile-seek-btn",
|
|
1846
1954
|
onClick: () => Z(H(Math.max(0, V($) - 10)), {
|
|
1847
1955
|
eventType: "fast_backward",
|
|
1848
1956
|
skipSeconds: 10
|
|
1849
1957
|
}),
|
|
1850
1958
|
"aria-label": "Rewind 10 seconds",
|
|
1851
|
-
children: [/* @__PURE__ */
|
|
1959
|
+
children: [/* @__PURE__ */ p(xe, {
|
|
1852
1960
|
size: 22,
|
|
1853
1961
|
"aria-hidden": "true"
|
|
1854
|
-
}), /* @__PURE__ */
|
|
1962
|
+
}), /* @__PURE__ */ p("span", {
|
|
1855
1963
|
className: "sdk-mobile-seek-label",
|
|
1856
1964
|
"aria-hidden": "true",
|
|
1857
1965
|
children: "10"
|
|
1858
1966
|
})]
|
|
1859
1967
|
}),
|
|
1860
|
-
/* @__PURE__ */
|
|
1968
|
+
/* @__PURE__ */ p("button", {
|
|
1861
1969
|
className: "sdk-mobile-play-btn",
|
|
1862
|
-
onClick:
|
|
1863
|
-
"aria-label":
|
|
1864
|
-
children:
|
|
1970
|
+
onClick: bi,
|
|
1971
|
+
"aria-label": En ? "Replay" : Ui ? "Pause" : "Play",
|
|
1972
|
+
children: En ? /* @__PURE__ */ p(xe, {
|
|
1865
1973
|
size: 38,
|
|
1866
1974
|
"aria-hidden": "true"
|
|
1867
|
-
}) :
|
|
1975
|
+
}) : Ui ? /* @__PURE__ */ p(b, {
|
|
1868
1976
|
size: 38,
|
|
1869
1977
|
fill: "currentColor",
|
|
1870
1978
|
"aria-hidden": "true"
|
|
1871
|
-
}) : /* @__PURE__ */
|
|
1979
|
+
}) : /* @__PURE__ */ p(be, {
|
|
1872
1980
|
size: 38,
|
|
1873
1981
|
fill: "currentColor",
|
|
1874
1982
|
style: { marginLeft: "3px" },
|
|
1875
1983
|
"aria-hidden": "true"
|
|
1876
1984
|
})
|
|
1877
1985
|
}),
|
|
1878
|
-
!Y && /* @__PURE__ */
|
|
1986
|
+
!Y && /* @__PURE__ */ m("button", {
|
|
1879
1987
|
className: "sdk-mobile-seek-btn",
|
|
1880
1988
|
onClick: () => Z(H(Math.min(B, V($) + 10)), {
|
|
1881
1989
|
eventType: "fast_forward",
|
|
1882
1990
|
skipSeconds: 10
|
|
1883
1991
|
}),
|
|
1884
1992
|
"aria-label": "Skip forward 10 seconds",
|
|
1885
|
-
children: [/* @__PURE__ */
|
|
1993
|
+
children: [/* @__PURE__ */ p(Se, {
|
|
1886
1994
|
size: 22,
|
|
1887
1995
|
"aria-hidden": "true"
|
|
1888
|
-
}), /* @__PURE__ */
|
|
1996
|
+
}), /* @__PURE__ */ p("span", {
|
|
1889
1997
|
className: "sdk-mobile-seek-label",
|
|
1890
1998
|
"aria-hidden": "true",
|
|
1891
1999
|
children: "10"
|
|
@@ -1893,28 +2001,28 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1893
2001
|
})
|
|
1894
2002
|
]
|
|
1895
2003
|
}),
|
|
1896
|
-
/* @__PURE__ */
|
|
2004
|
+
/* @__PURE__ */ m("div", {
|
|
1897
2005
|
className: "sdk-mobile-bottom-bar sdk-mobile-ctrl",
|
|
1898
2006
|
children: [
|
|
1899
|
-
I.enableKeyMoments &&
|
|
2007
|
+
I.enableKeyMoments && Er && W.length > 0 && /* @__PURE__ */ p("div", {
|
|
1900
2008
|
className: "sdk-mobile-chapters-scroll",
|
|
1901
2009
|
children: W.map((e, t) => {
|
|
1902
|
-
let n =
|
|
1903
|
-
return /* @__PURE__ */
|
|
2010
|
+
let n = xr.index === t;
|
|
2011
|
+
return /* @__PURE__ */ m("div", {
|
|
1904
2012
|
role: "button",
|
|
1905
2013
|
tabIndex: 0,
|
|
1906
2014
|
className: `sdk-mobile-chapter-card${n ? " active" : ""}`,
|
|
1907
|
-
style: { borderColor: n ?
|
|
2015
|
+
style: { borderColor: n ? _ : void 0 },
|
|
1908
2016
|
"aria-label": `${e.title}, ${Q(e.startTime)}${n ? ", current chapter" : ""}`,
|
|
1909
2017
|
"aria-current": n ? "true" : void 0,
|
|
1910
2018
|
onClick: () => {
|
|
1911
|
-
|
|
2019
|
+
Oi(e.startTime, e);
|
|
1912
2020
|
},
|
|
1913
|
-
onKeyDown:
|
|
1914
|
-
children: [/* @__PURE__ */
|
|
2021
|
+
onKeyDown: Xi(() => Oi(e.startTime, e)),
|
|
2022
|
+
children: [/* @__PURE__ */ m("div", {
|
|
1915
2023
|
className: "sdk-mobile-chapter-thumb",
|
|
1916
|
-
children: [
|
|
1917
|
-
src:
|
|
2024
|
+
children: [Or[t] || e.thumbnail ? /* @__PURE__ */ p("img", {
|
|
2025
|
+
src: Or[t] || e.thumbnail,
|
|
1918
2026
|
alt: "",
|
|
1919
2027
|
"aria-hidden": "true",
|
|
1920
2028
|
style: {
|
|
@@ -1923,25 +2031,25 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1923
2031
|
objectFit: "cover",
|
|
1924
2032
|
display: "block"
|
|
1925
2033
|
}
|
|
1926
|
-
}) : /* @__PURE__ */
|
|
2034
|
+
}) : /* @__PURE__ */ p(ge, {
|
|
1927
2035
|
size: 16,
|
|
1928
2036
|
"aria-hidden": "true",
|
|
1929
|
-
style: { color: n ?
|
|
1930
|
-
}), /* @__PURE__ */
|
|
2037
|
+
style: { color: n ? _ : "rgba(255,255,255,0.3)" }
|
|
2038
|
+
}), /* @__PURE__ */ p("span", {
|
|
1931
2039
|
className: "sdk-mobile-chapter-time-badge",
|
|
1932
2040
|
"aria-hidden": "true",
|
|
1933
2041
|
children: Q(e.startTime)
|
|
1934
2042
|
})]
|
|
1935
|
-
}), /* @__PURE__ */
|
|
2043
|
+
}), /* @__PURE__ */ p("div", {
|
|
1936
2044
|
className: "sdk-mobile-chapter-title",
|
|
1937
|
-
style: { color: n ?
|
|
2045
|
+
style: { color: n ? _ : void 0 },
|
|
1938
2046
|
children: e.title
|
|
1939
2047
|
})]
|
|
1940
2048
|
}, t);
|
|
1941
2049
|
})
|
|
1942
2050
|
}),
|
|
1943
|
-
/* @__PURE__ */
|
|
1944
|
-
ref:
|
|
2051
|
+
/* @__PURE__ */ p("div", {
|
|
2052
|
+
ref: E,
|
|
1945
2053
|
role: X ? void 0 : "slider",
|
|
1946
2054
|
"aria-label": X ? void 0 : "Seek",
|
|
1947
2055
|
"aria-valuemin": X ? void 0 : 0,
|
|
@@ -1950,41 +2058,41 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1950
2058
|
"aria-valuetext": X ? void 0 : `${Q(V(J === null ? L : J))} of ${Q(B)}`,
|
|
1951
2059
|
tabIndex: X ? void 0 : 0,
|
|
1952
2060
|
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 :
|
|
2061
|
+
onMouseDown: X ? void 0 : Si,
|
|
2062
|
+
onMouseMove: X ? void 0 : zi,
|
|
2063
|
+
onMouseLeave: X ? void 0 : Hi,
|
|
2064
|
+
onTouchStart: X ? void 0 : Vi,
|
|
2065
|
+
onKeyDown: X ? void 0 : Zi,
|
|
1958
2066
|
style: {
|
|
1959
2067
|
pointerEvents: X ? "none" : void 0,
|
|
1960
2068
|
touchAction: "none"
|
|
1961
2069
|
},
|
|
1962
|
-
children: Y ? /* @__PURE__ */
|
|
2070
|
+
children: Y ? /* @__PURE__ */ p("div", {
|
|
1963
2071
|
className: "sdk-ad-progress-fill",
|
|
1964
2072
|
style: { width: (() => {
|
|
1965
|
-
let e = F ? F.getCurrentTime() : L, t =
|
|
2073
|
+
let e = F ? F.getCurrentTime() : L, t = ar(e);
|
|
1966
2074
|
return t ? `${Math.min(100, Math.max(0, (e - t.start) / (t.end - t.start) * 100))}%` : "0%";
|
|
1967
2075
|
})() }
|
|
1968
|
-
}) : /* @__PURE__ */
|
|
1969
|
-
/* @__PURE__ */
|
|
2076
|
+
}) : /* @__PURE__ */ m(ee, { children: [
|
|
2077
|
+
/* @__PURE__ */ p("div", {
|
|
1970
2078
|
className: "sdk-seekbar-buffered",
|
|
1971
|
-
style: { width: `${
|
|
2079
|
+
style: { width: `${sn ? (F && F.getBufferedRanges()[0]?.end || 0) / sn * 100 : 0}%` }
|
|
1972
2080
|
}),
|
|
1973
|
-
B > 0 && R.filter((e) => !
|
|
2081
|
+
B > 0 && R.filter((e) => !jn.has(e.startTime)).map((e, t) => /* @__PURE__ */ p("div", {
|
|
1974
2082
|
className: "sdk-seekbar-adbreak",
|
|
1975
2083
|
style: {
|
|
1976
2084
|
left: `${V(e.startTime) / B * 100}%`,
|
|
1977
2085
|
width: "3px"
|
|
1978
2086
|
}
|
|
1979
2087
|
}, t)),
|
|
1980
|
-
/* @__PURE__ */
|
|
2088
|
+
/* @__PURE__ */ p("div", {
|
|
1981
2089
|
className: "sdk-seekbar-progress",
|
|
1982
2090
|
style: {
|
|
1983
|
-
width: q ? `${
|
|
2091
|
+
width: q ? `${Wi > 0 ? $ / Wi * 100 : 0}%` : `${B ? V(J === null ? L : J) / B * 100 : 0}%`,
|
|
1984
2092
|
background: "#ffffff",
|
|
1985
2093
|
boxShadow: "none"
|
|
1986
2094
|
},
|
|
1987
|
-
children: /* @__PURE__ */
|
|
2095
|
+
children: /* @__PURE__ */ p("div", {
|
|
1988
2096
|
className: "sdk-seekbar-handle",
|
|
1989
2097
|
style: {
|
|
1990
2098
|
opacity: 1,
|
|
@@ -1992,77 +2100,77 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
1992
2100
|
}
|
|
1993
2101
|
})
|
|
1994
2102
|
}),
|
|
1995
|
-
I.enableKeyMoments && W.map((e, t) => B === 0 ? null : /* @__PURE__ */
|
|
2103
|
+
I.enableKeyMoments && W.map((e, t) => B === 0 ? null : /* @__PURE__ */ p("div", {
|
|
1996
2104
|
className: "sdk-seekbar-chapter-marker sdk-desktop-chapter-dot",
|
|
1997
2105
|
style: { left: `${V(e.startTime) / B * 100}%` }
|
|
1998
2106
|
}, t))
|
|
1999
2107
|
] })
|
|
2000
2108
|
}),
|
|
2001
|
-
/* @__PURE__ */
|
|
2109
|
+
/* @__PURE__ */ m("div", {
|
|
2002
2110
|
className: "sdk-mobile-controls-row",
|
|
2003
|
-
children: [!Y && /* @__PURE__ */
|
|
2111
|
+
children: [!Y && /* @__PURE__ */ p("span", {
|
|
2004
2112
|
className: "sdk-time-display",
|
|
2005
|
-
children: q ? `${Q($)} / ${Q(
|
|
2006
|
-
}), /* @__PURE__ */
|
|
2113
|
+
children: q ? `${Q($)} / ${Q(Wi)}` : `${Q(V(J === null ? L : J))} / ${Q(B)}`
|
|
2114
|
+
}), /* @__PURE__ */ m("div", {
|
|
2007
2115
|
className: "sdk-mobile-bottom-icons",
|
|
2008
2116
|
children: [
|
|
2009
|
-
I.enableKeyMoments && W.length > 0 && !Y && /* @__PURE__ */
|
|
2010
|
-
className: `sdk-mobile-icon-btn${
|
|
2117
|
+
I.enableKeyMoments && W.length > 0 && !Y && /* @__PURE__ */ p("button", {
|
|
2118
|
+
className: `sdk-mobile-icon-btn${Er ? " active" : ""}`,
|
|
2011
2119
|
onClick: () => {
|
|
2012
|
-
|
|
2120
|
+
Dr(!Er);
|
|
2013
2121
|
},
|
|
2014
|
-
"aria-label":
|
|
2015
|
-
"aria-pressed":
|
|
2016
|
-
children: /* @__PURE__ */
|
|
2122
|
+
"aria-label": Er ? "Hide chapters" : "Show chapters",
|
|
2123
|
+
"aria-pressed": Er,
|
|
2124
|
+
children: /* @__PURE__ */ p(ge, {
|
|
2017
2125
|
size: 18,
|
|
2018
2126
|
"aria-hidden": "true"
|
|
2019
2127
|
})
|
|
2020
2128
|
}),
|
|
2021
|
-
I.enableSubtitles && !Y &&
|
|
2129
|
+
I.enableSubtitles && !Y && hr.some((e) => !e.isNative) && /* @__PURE__ */ m("div", {
|
|
2022
2130
|
className: "sdk-menu-container",
|
|
2023
|
-
children: [/* @__PURE__ */
|
|
2131
|
+
children: [/* @__PURE__ */ p("button", {
|
|
2024
2132
|
className: `sdk-mobile-icon-btn${U === "off" ? "" : " active"}`,
|
|
2025
2133
|
onClick: () => {
|
|
2026
|
-
|
|
2134
|
+
Qi("subtitles");
|
|
2027
2135
|
},
|
|
2028
2136
|
"aria-label": "Captions",
|
|
2029
2137
|
"aria-haspopup": "listbox",
|
|
2030
2138
|
"aria-expanded": G === "subtitles",
|
|
2031
|
-
children: /* @__PURE__ */
|
|
2139
|
+
children: /* @__PURE__ */ p(ue, {
|
|
2032
2140
|
size: 18,
|
|
2033
2141
|
"aria-hidden": "true"
|
|
2034
2142
|
})
|
|
2035
|
-
}), G === "subtitles" && /* @__PURE__ */
|
|
2036
|
-
ref:
|
|
2143
|
+
}), G === "subtitles" && /* @__PURE__ */ m("div", {
|
|
2144
|
+
ref: $i,
|
|
2037
2145
|
className: "sdk-dropup-menu",
|
|
2038
2146
|
role: "listbox",
|
|
2039
2147
|
"aria-label": "Captions",
|
|
2040
2148
|
children: [
|
|
2041
|
-
/* @__PURE__ */
|
|
2149
|
+
/* @__PURE__ */ p("div", {
|
|
2042
2150
|
className: "sdk-dropup-header",
|
|
2043
2151
|
"aria-hidden": "true",
|
|
2044
2152
|
children: "Subtitles"
|
|
2045
2153
|
}),
|
|
2046
|
-
/* @__PURE__ */
|
|
2154
|
+
/* @__PURE__ */ m("div", {
|
|
2047
2155
|
role: "option",
|
|
2048
2156
|
"aria-selected": U === "off",
|
|
2049
2157
|
tabIndex: 0,
|
|
2050
2158
|
className: `sdk-dropup-item ${U === "off" ? "active" : ""}`,
|
|
2051
|
-
onClick: () =>
|
|
2052
|
-
onKeyDown:
|
|
2053
|
-
children: [/* @__PURE__ */
|
|
2159
|
+
onClick: () => Ei("off"),
|
|
2160
|
+
onKeyDown: Yi(() => Ei("off")),
|
|
2161
|
+
children: [/* @__PURE__ */ p("span", { children: "Off" }), U === "off" && /* @__PURE__ */ p(y, {
|
|
2054
2162
|
size: 12,
|
|
2055
2163
|
"aria-hidden": "true"
|
|
2056
2164
|
})]
|
|
2057
2165
|
}),
|
|
2058
|
-
|
|
2166
|
+
hr.map((e) => /* @__PURE__ */ m("div", {
|
|
2059
2167
|
role: "option",
|
|
2060
2168
|
"aria-selected": U === e.id,
|
|
2061
2169
|
tabIndex: 0,
|
|
2062
2170
|
className: `sdk-dropup-item ${U === e.id ? "active" : ""}`,
|
|
2063
|
-
onClick: () =>
|
|
2064
|
-
onKeyDown:
|
|
2065
|
-
children: [/* @__PURE__ */
|
|
2171
|
+
onClick: () => Ei(e.id),
|
|
2172
|
+
onKeyDown: Yi(() => Ei(e.id)),
|
|
2173
|
+
children: [/* @__PURE__ */ p("span", { children: x(e) }), U === e.id && /* @__PURE__ */ p(y, {
|
|
2066
2174
|
size: 12,
|
|
2067
2175
|
"aria-hidden": "true"
|
|
2068
2176
|
})]
|
|
@@ -2070,67 +2178,67 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2070
2178
|
]
|
|
2071
2179
|
})]
|
|
2072
2180
|
}),
|
|
2073
|
-
I.allowMultipleAudio &&
|
|
2181
|
+
I.allowMultipleAudio && _r.length > 1 && !Y && /* @__PURE__ */ m("div", {
|
|
2074
2182
|
className: "sdk-menu-container",
|
|
2075
|
-
children: [/* @__PURE__ */
|
|
2183
|
+
children: [/* @__PURE__ */ p("button", {
|
|
2076
2184
|
className: `sdk-mobile-icon-btn${G === "audio" ? " active" : ""}`,
|
|
2077
2185
|
onClick: () => {
|
|
2078
|
-
|
|
2186
|
+
Qi("audio");
|
|
2079
2187
|
},
|
|
2080
2188
|
"aria-label": "Audio track",
|
|
2081
2189
|
"aria-haspopup": "listbox",
|
|
2082
2190
|
"aria-expanded": G === "audio",
|
|
2083
|
-
children: /* @__PURE__ */
|
|
2191
|
+
children: /* @__PURE__ */ p(he, {
|
|
2084
2192
|
size: 18,
|
|
2085
2193
|
"aria-hidden": "true"
|
|
2086
2194
|
})
|
|
2087
|
-
}), G === "audio" && /* @__PURE__ */
|
|
2088
|
-
ref:
|
|
2195
|
+
}), G === "audio" && /* @__PURE__ */ m("div", {
|
|
2196
|
+
ref: $i,
|
|
2089
2197
|
className: "sdk-dropup-menu",
|
|
2090
2198
|
role: "listbox",
|
|
2091
2199
|
"aria-label": "Audio track",
|
|
2092
|
-
children: [/* @__PURE__ */
|
|
2200
|
+
children: [/* @__PURE__ */ p("div", {
|
|
2093
2201
|
className: "sdk-dropup-header",
|
|
2094
2202
|
"aria-hidden": "true",
|
|
2095
2203
|
children: "Audio Track"
|
|
2096
|
-
}),
|
|
2204
|
+
}), _r.map((e) => /* @__PURE__ */ m("div", {
|
|
2097
2205
|
role: "option",
|
|
2098
|
-
"aria-selected":
|
|
2206
|
+
"aria-selected": yr === e.id,
|
|
2099
2207
|
tabIndex: 0,
|
|
2100
|
-
className: `sdk-dropup-item ${
|
|
2208
|
+
className: `sdk-dropup-item ${yr === e.id ? "active" : ""}`,
|
|
2101
2209
|
onClick: () => {
|
|
2102
|
-
F?.setAudioTrack(e.id),
|
|
2210
|
+
F?.setAudioTrack(e.id), br(e.id), K("none"), jr(`Audio: ${x(e)}`);
|
|
2103
2211
|
},
|
|
2104
|
-
onKeyDown:
|
|
2105
|
-
F?.setAudioTrack(e.id),
|
|
2212
|
+
onKeyDown: Yi(() => {
|
|
2213
|
+
F?.setAudioTrack(e.id), br(e.id), K("none"), jr(`Audio: ${x(e)}`);
|
|
2106
2214
|
}),
|
|
2107
|
-
children: [/* @__PURE__ */
|
|
2215
|
+
children: [/* @__PURE__ */ p("span", { children: x(e) }), yr === e.id && /* @__PURE__ */ p(y, {
|
|
2108
2216
|
size: 12,
|
|
2109
2217
|
"aria-hidden": "true"
|
|
2110
2218
|
})]
|
|
2111
2219
|
}, e.id))]
|
|
2112
2220
|
})]
|
|
2113
2221
|
}),
|
|
2114
|
-
I.enablePlaybackSpeed && !Y && /* @__PURE__ */
|
|
2222
|
+
I.enablePlaybackSpeed && !Y && /* @__PURE__ */ m("div", {
|
|
2115
2223
|
className: "sdk-menu-container",
|
|
2116
|
-
children: [/* @__PURE__ */
|
|
2224
|
+
children: [/* @__PURE__ */ p("button", {
|
|
2117
2225
|
className: `sdk-mobile-icon-btn${G === "speed" ? " active" : ""}`,
|
|
2118
2226
|
onClick: () => {
|
|
2119
|
-
|
|
2227
|
+
Qi("speed");
|
|
2120
2228
|
},
|
|
2121
2229
|
"aria-label": "Playback speed",
|
|
2122
2230
|
"aria-haspopup": "listbox",
|
|
2123
2231
|
"aria-expanded": G === "speed",
|
|
2124
|
-
children: /* @__PURE__ */
|
|
2232
|
+
children: /* @__PURE__ */ p(me, {
|
|
2125
2233
|
size: 18,
|
|
2126
2234
|
"aria-hidden": "true"
|
|
2127
2235
|
})
|
|
2128
|
-
}), G === "speed" && /* @__PURE__ */
|
|
2129
|
-
ref:
|
|
2236
|
+
}), G === "speed" && /* @__PURE__ */ m("div", {
|
|
2237
|
+
ref: $i,
|
|
2130
2238
|
className: "sdk-dropup-menu",
|
|
2131
2239
|
role: "listbox",
|
|
2132
2240
|
"aria-label": "Playback speed",
|
|
2133
|
-
children: [/* @__PURE__ */
|
|
2241
|
+
children: [/* @__PURE__ */ p("div", {
|
|
2134
2242
|
className: "sdk-dropup-header",
|
|
2135
2243
|
"aria-hidden": "true",
|
|
2136
2244
|
children: "Speed"
|
|
@@ -2141,100 +2249,100 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2141
2249
|
1.25,
|
|
2142
2250
|
1.5,
|
|
2143
2251
|
2
|
|
2144
|
-
].map((e) => /* @__PURE__ */
|
|
2252
|
+
].map((e) => /* @__PURE__ */ m("div", {
|
|
2145
2253
|
role: "option",
|
|
2146
|
-
"aria-selected":
|
|
2254
|
+
"aria-selected": wr === e,
|
|
2147
2255
|
tabIndex: 0,
|
|
2148
|
-
className: `sdk-dropup-item ${
|
|
2149
|
-
onClick: () =>
|
|
2150
|
-
onKeyDown:
|
|
2151
|
-
children: [/* @__PURE__ */
|
|
2256
|
+
className: `sdk-dropup-item ${wr === e ? "active" : ""}`,
|
|
2257
|
+
onClick: () => wi(e),
|
|
2258
|
+
onKeyDown: Yi(() => wi(e)),
|
|
2259
|
+
children: [/* @__PURE__ */ p("span", { children: e === 1 ? "Normal" : `${e}x` }), wr === e && /* @__PURE__ */ p(y, {
|
|
2152
2260
|
size: 12,
|
|
2153
2261
|
"aria-hidden": "true"
|
|
2154
2262
|
})]
|
|
2155
2263
|
}, e))]
|
|
2156
2264
|
})]
|
|
2157
2265
|
}),
|
|
2158
|
-
I.enableQuality && !Y && /* @__PURE__ */
|
|
2266
|
+
I.enableQuality && !Y && /* @__PURE__ */ m("div", {
|
|
2159
2267
|
className: "sdk-menu-container",
|
|
2160
|
-
children: [/* @__PURE__ */
|
|
2161
|
-
className: `sdk-mobile-icon-btn${
|
|
2268
|
+
children: [/* @__PURE__ */ p("button", {
|
|
2269
|
+
className: `sdk-mobile-icon-btn${ur.id === -1 ? "" : " active"}`,
|
|
2162
2270
|
onClick: () => {
|
|
2163
|
-
|
|
2271
|
+
Qi("quality");
|
|
2164
2272
|
},
|
|
2165
2273
|
"aria-label": "Video quality",
|
|
2166
2274
|
"aria-haspopup": "listbox",
|
|
2167
2275
|
"aria-expanded": G === "quality",
|
|
2168
|
-
children: /* @__PURE__ */
|
|
2276
|
+
children: /* @__PURE__ */ p(Me, {
|
|
2169
2277
|
size: 18,
|
|
2170
2278
|
"aria-hidden": "true"
|
|
2171
2279
|
})
|
|
2172
|
-
}), G === "quality" && /* @__PURE__ */
|
|
2173
|
-
ref:
|
|
2280
|
+
}), G === "quality" && /* @__PURE__ */ m("div", {
|
|
2281
|
+
ref: $i,
|
|
2174
2282
|
className: "sdk-dropup-menu large",
|
|
2175
2283
|
role: "listbox",
|
|
2176
2284
|
"aria-label": "Video quality",
|
|
2177
|
-
children: [/* @__PURE__ */
|
|
2285
|
+
children: [/* @__PURE__ */ p("div", {
|
|
2178
2286
|
className: "sdk-dropup-header",
|
|
2179
2287
|
"aria-hidden": "true",
|
|
2180
2288
|
children: "Quality"
|
|
2181
|
-
}),
|
|
2289
|
+
}), cr.map((e) => /* @__PURE__ */ m("div", {
|
|
2182
2290
|
role: "option",
|
|
2183
|
-
"aria-selected":
|
|
2291
|
+
"aria-selected": ur.id === e.id,
|
|
2184
2292
|
tabIndex: 0,
|
|
2185
|
-
className: `sdk-dropup-item ${
|
|
2186
|
-
onClick: () =>
|
|
2187
|
-
onKeyDown:
|
|
2188
|
-
children: [/* @__PURE__ */
|
|
2293
|
+
className: `sdk-dropup-item ${ur.id === e.id ? "active" : ""}`,
|
|
2294
|
+
onClick: () => Ti(e.id),
|
|
2295
|
+
onKeyDown: Yi(() => Ti(e.id)),
|
|
2296
|
+
children: [/* @__PURE__ */ p("span", { children: e.label }), ur.id === e.id && /* @__PURE__ */ p(y, {
|
|
2189
2297
|
size: 12,
|
|
2190
2298
|
"aria-hidden": "true"
|
|
2191
2299
|
})]
|
|
2192
2300
|
}, e.id))]
|
|
2193
2301
|
})]
|
|
2194
2302
|
}),
|
|
2195
|
-
|
|
2303
|
+
w && w.length > 1 && !Y && /* @__PURE__ */ m("div", {
|
|
2196
2304
|
className: "sdk-menu-container",
|
|
2197
|
-
children: [/* @__PURE__ */
|
|
2305
|
+
children: [/* @__PURE__ */ p("button", {
|
|
2198
2306
|
className: `sdk-mobile-icon-btn${G === "sources" ? " active" : ""}`,
|
|
2199
2307
|
onClick: () => {
|
|
2200
|
-
|
|
2308
|
+
Qi("sources");
|
|
2201
2309
|
},
|
|
2202
2310
|
"aria-label": "Select source",
|
|
2203
2311
|
"aria-haspopup": "listbox",
|
|
2204
2312
|
"aria-expanded": G === "sources",
|
|
2205
|
-
children: /* @__PURE__ */
|
|
2313
|
+
children: /* @__PURE__ */ p(Ne, {
|
|
2206
2314
|
size: 18,
|
|
2207
2315
|
"aria-hidden": "true"
|
|
2208
2316
|
})
|
|
2209
|
-
}), G === "sources" && /* @__PURE__ */
|
|
2210
|
-
ref:
|
|
2317
|
+
}), G === "sources" && /* @__PURE__ */ m("div", {
|
|
2318
|
+
ref: $i,
|
|
2211
2319
|
className: "sdk-dropup-menu",
|
|
2212
2320
|
role: "listbox",
|
|
2213
2321
|
"aria-label": "Select source",
|
|
2214
|
-
children: [/* @__PURE__ */
|
|
2322
|
+
children: [/* @__PURE__ */ p("div", {
|
|
2215
2323
|
className: "sdk-dropup-header",
|
|
2216
2324
|
"aria-hidden": "true",
|
|
2217
2325
|
children: "Source"
|
|
2218
|
-
}),
|
|
2326
|
+
}), w.map((e, t) => /* @__PURE__ */ m("div", {
|
|
2219
2327
|
role: "option",
|
|
2220
2328
|
"aria-selected": st === t,
|
|
2221
2329
|
tabIndex: 0,
|
|
2222
2330
|
className: `sdk-dropup-item ${st === t ? "active" : ""}`,
|
|
2223
|
-
onClick: () =>
|
|
2224
|
-
onKeyDown:
|
|
2225
|
-
children: [/* @__PURE__ */
|
|
2331
|
+
onClick: () => Di(t),
|
|
2332
|
+
onKeyDown: Yi(() => Di(t)),
|
|
2333
|
+
children: [/* @__PURE__ */ p("span", { children: e.label }), st === t && /* @__PURE__ */ p(y, {
|
|
2226
2334
|
size: 12,
|
|
2227
2335
|
"aria-hidden": "true"
|
|
2228
2336
|
})]
|
|
2229
2337
|
}, t))]
|
|
2230
2338
|
})]
|
|
2231
2339
|
}),
|
|
2232
|
-
/* @__PURE__ */
|
|
2340
|
+
/* @__PURE__ */ p("button", {
|
|
2233
2341
|
className: "sdk-mobile-icon-btn",
|
|
2234
|
-
onClick:
|
|
2235
|
-
"aria-label":
|
|
2236
|
-
"aria-pressed":
|
|
2237
|
-
children:
|
|
2342
|
+
onClick: Mi,
|
|
2343
|
+
"aria-label": hn || _n ? "Exit fullscreen" : "Enter fullscreen",
|
|
2344
|
+
"aria-pressed": hn || _n,
|
|
2345
|
+
children: p(hn ? ve : _e, {
|
|
2238
2346
|
size: 18,
|
|
2239
2347
|
"aria-hidden": "true"
|
|
2240
2348
|
})
|
|
@@ -2246,78 +2354,78 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2246
2354
|
})
|
|
2247
2355
|
] })]
|
|
2248
2356
|
}),
|
|
2249
|
-
!
|
|
2357
|
+
!xn && /* @__PURE__ */ m("div", {
|
|
2250
2358
|
className: "sdk-controls-overlay",
|
|
2251
2359
|
onClick: (e) => {
|
|
2252
|
-
Y || e.target.closest(".sdk-desktop-header") || e.target.closest(".sdk-desktop-center-controls") || e.target.closest(".sdk-desktop-bottom") ||
|
|
2360
|
+
Y || e.target.closest(".sdk-desktop-header") || e.target.closest(".sdk-desktop-center-controls") || e.target.closest(".sdk-desktop-bottom") || bi();
|
|
2253
2361
|
},
|
|
2254
|
-
children: [/* @__PURE__ */
|
|
2362
|
+
children: [/* @__PURE__ */ m("div", {
|
|
2255
2363
|
className: "sdk-desktop-header",
|
|
2256
|
-
children: [/* @__PURE__ */
|
|
2364
|
+
children: [/* @__PURE__ */ m("div", {
|
|
2257
2365
|
className: "sdk-desktop-header-left",
|
|
2258
|
-
children: [(
|
|
2366
|
+
children: [(hn || _n) && /* @__PURE__ */ p("button", {
|
|
2259
2367
|
className: "sdk-desktop-back-btn",
|
|
2260
2368
|
onClick: (e) => {
|
|
2261
|
-
e.stopPropagation(),
|
|
2369
|
+
e.stopPropagation(), Mi();
|
|
2262
2370
|
},
|
|
2263
2371
|
"aria-label": "Exit fullscreen",
|
|
2264
|
-
children: /* @__PURE__ */
|
|
2372
|
+
children: /* @__PURE__ */ p(fe, {
|
|
2265
2373
|
size: 22,
|
|
2266
2374
|
"aria-hidden": "true"
|
|
2267
2375
|
})
|
|
2268
|
-
}), (
|
|
2376
|
+
}), (C || ri) && /* @__PURE__ */ p("span", {
|
|
2269
2377
|
className: "sdk-desktop-title",
|
|
2270
|
-
children:
|
|
2378
|
+
children: C || ri
|
|
2271
2379
|
})]
|
|
2272
|
-
}), /* @__PURE__ */
|
|
2380
|
+
}), /* @__PURE__ */ m("div", {
|
|
2273
2381
|
className: "sdk-desktop-header-right",
|
|
2274
2382
|
children: [
|
|
2275
|
-
I.enableChromecast && !Y && /* @__PURE__ */
|
|
2383
|
+
I.enableChromecast && !Y && /* @__PURE__ */ p("button", {
|
|
2276
2384
|
className: "sdk-desktop-hdr-btn",
|
|
2277
2385
|
onClick: (e) => {
|
|
2278
|
-
e.stopPropagation(),
|
|
2386
|
+
e.stopPropagation(), Li();
|
|
2279
2387
|
},
|
|
2280
2388
|
"data-tooltip": q ? `Casting to ${q} — click to disconnect` : "Cast to device",
|
|
2281
2389
|
"aria-label": q ? `Stop casting to ${q}` : "Cast to device",
|
|
2282
2390
|
"aria-pressed": !!q,
|
|
2283
2391
|
style: { color: q ? "#3b82f6" : "" },
|
|
2284
|
-
children: /* @__PURE__ */
|
|
2392
|
+
children: /* @__PURE__ */ p(de, {
|
|
2285
2393
|
size: 20,
|
|
2286
2394
|
fill: q ? "currentColor" : "none",
|
|
2287
2395
|
"aria-hidden": "true"
|
|
2288
2396
|
})
|
|
2289
2397
|
}),
|
|
2290
|
-
q && /* @__PURE__ */
|
|
2398
|
+
q && /* @__PURE__ */ m("span", {
|
|
2291
2399
|
className: "sdk-cast-indicator",
|
|
2292
2400
|
"aria-hidden": "true",
|
|
2293
|
-
children: [/* @__PURE__ */
|
|
2401
|
+
children: [/* @__PURE__ */ p(de, {
|
|
2294
2402
|
size: 10,
|
|
2295
2403
|
fill: "currentColor",
|
|
2296
2404
|
"aria-hidden": "true"
|
|
2297
2405
|
}), q]
|
|
2298
2406
|
}),
|
|
2299
|
-
I.allowAirplay &&
|
|
2407
|
+
I.allowAirplay && Br && /* @__PURE__ */ p("button", {
|
|
2300
2408
|
className: "sdk-desktop-hdr-btn",
|
|
2301
2409
|
onClick: (e) => {
|
|
2302
|
-
e.stopPropagation(),
|
|
2410
|
+
e.stopPropagation(), Ri();
|
|
2303
2411
|
},
|
|
2304
|
-
"data-tooltip":
|
|
2305
|
-
"aria-label":
|
|
2306
|
-
"aria-pressed":
|
|
2307
|
-
style: { color:
|
|
2308
|
-
children: /* @__PURE__ */
|
|
2412
|
+
"data-tooltip": Hr ? `AirPlay to ${Wr || "device"} — click to disconnect` : "AirPlay to device",
|
|
2413
|
+
"aria-label": Hr ? `Stop AirPlay to ${Wr || "device"}` : "AirPlay to device",
|
|
2414
|
+
"aria-pressed": Hr,
|
|
2415
|
+
style: { color: Hr ? _ : "" },
|
|
2416
|
+
children: /* @__PURE__ */ p(le, {
|
|
2309
2417
|
size: 20,
|
|
2310
2418
|
"aria-hidden": "true"
|
|
2311
2419
|
})
|
|
2312
2420
|
})
|
|
2313
2421
|
]
|
|
2314
2422
|
})]
|
|
2315
|
-
}),
|
|
2316
|
-
/* @__PURE__ */
|
|
2423
|
+
}), v && /* @__PURE__ */ m(ee, { children: [
|
|
2424
|
+
/* @__PURE__ */ m("div", {
|
|
2317
2425
|
className: "sdk-desktop-center-controls",
|
|
2318
2426
|
style: { pointerEvents: "none" },
|
|
2319
2427
|
children: [
|
|
2320
|
-
!Y && /* @__PURE__ */
|
|
2428
|
+
!Y && /* @__PURE__ */ p("button", {
|
|
2321
2429
|
className: "sdk-desktop-seek-btn",
|
|
2322
2430
|
style: { pointerEvents: "auto" },
|
|
2323
2431
|
onClick: (e) => {
|
|
@@ -2327,45 +2435,45 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2327
2435
|
});
|
|
2328
2436
|
},
|
|
2329
2437
|
"aria-label": "Rewind 10 seconds",
|
|
2330
|
-
children: /* @__PURE__ */
|
|
2438
|
+
children: /* @__PURE__ */ m("div", {
|
|
2331
2439
|
style: {
|
|
2332
2440
|
position: "relative",
|
|
2333
2441
|
display: "flex",
|
|
2334
2442
|
alignItems: "center",
|
|
2335
2443
|
justifyContent: "center"
|
|
2336
2444
|
},
|
|
2337
|
-
children: [/* @__PURE__ */
|
|
2445
|
+
children: [/* @__PURE__ */ p(xe, {
|
|
2338
2446
|
size: 30,
|
|
2339
2447
|
"aria-hidden": "true"
|
|
2340
|
-
}), /* @__PURE__ */
|
|
2448
|
+
}), /* @__PURE__ */ p("span", {
|
|
2341
2449
|
className: "sdk-desktop-seek-label",
|
|
2342
2450
|
"aria-hidden": "true",
|
|
2343
2451
|
children: "10"
|
|
2344
2452
|
})]
|
|
2345
2453
|
})
|
|
2346
2454
|
}),
|
|
2347
|
-
/* @__PURE__ */
|
|
2455
|
+
/* @__PURE__ */ p("button", {
|
|
2348
2456
|
className: "sdk-desktop-play-btn",
|
|
2349
2457
|
style: { pointerEvents: "auto" },
|
|
2350
2458
|
onClick: (e) => {
|
|
2351
|
-
e.stopPropagation(),
|
|
2459
|
+
e.stopPropagation(), bi();
|
|
2352
2460
|
},
|
|
2353
|
-
"aria-label":
|
|
2354
|
-
children:
|
|
2461
|
+
"aria-label": En ? "Replay" : Ui ? "Pause" : "Play",
|
|
2462
|
+
children: En ? /* @__PURE__ */ p(xe, {
|
|
2355
2463
|
size: 38,
|
|
2356
2464
|
"aria-hidden": "true"
|
|
2357
|
-
}) :
|
|
2465
|
+
}) : Ui ? /* @__PURE__ */ p(b, {
|
|
2358
2466
|
size: 38,
|
|
2359
2467
|
fill: "currentColor",
|
|
2360
2468
|
"aria-hidden": "true"
|
|
2361
|
-
}) : /* @__PURE__ */
|
|
2469
|
+
}) : /* @__PURE__ */ p(be, {
|
|
2362
2470
|
size: 38,
|
|
2363
2471
|
fill: "currentColor",
|
|
2364
2472
|
style: { marginLeft: "4px" },
|
|
2365
2473
|
"aria-hidden": "true"
|
|
2366
2474
|
})
|
|
2367
2475
|
}),
|
|
2368
|
-
!Y && /* @__PURE__ */
|
|
2476
|
+
!Y && /* @__PURE__ */ p("button", {
|
|
2369
2477
|
className: "sdk-desktop-seek-btn",
|
|
2370
2478
|
style: { pointerEvents: "auto" },
|
|
2371
2479
|
onClick: (e) => {
|
|
@@ -2375,17 +2483,17 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2375
2483
|
});
|
|
2376
2484
|
},
|
|
2377
2485
|
"aria-label": "Skip forward 10 seconds",
|
|
2378
|
-
children: /* @__PURE__ */
|
|
2486
|
+
children: /* @__PURE__ */ m("div", {
|
|
2379
2487
|
style: {
|
|
2380
2488
|
position: "relative",
|
|
2381
2489
|
display: "flex",
|
|
2382
2490
|
alignItems: "center",
|
|
2383
2491
|
justifyContent: "center"
|
|
2384
2492
|
},
|
|
2385
|
-
children: [/* @__PURE__ */
|
|
2493
|
+
children: [/* @__PURE__ */ p(Se, {
|
|
2386
2494
|
size: 30,
|
|
2387
2495
|
"aria-hidden": "true"
|
|
2388
|
-
}), /* @__PURE__ */
|
|
2496
|
+
}), /* @__PURE__ */ p("span", {
|
|
2389
2497
|
className: "sdk-desktop-seek-label",
|
|
2390
2498
|
"aria-hidden": "true",
|
|
2391
2499
|
children: "10"
|
|
@@ -2394,31 +2502,31 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2394
2502
|
})
|
|
2395
2503
|
]
|
|
2396
2504
|
}),
|
|
2397
|
-
I.enableKeyMoments &&
|
|
2505
|
+
I.enableKeyMoments && Er && W.length > 0 && $e === "panel" && /* @__PURE__ */ m("div", {
|
|
2398
2506
|
className: "sdk-chapters-panel",
|
|
2399
2507
|
onClick: (e) => e.stopPropagation(),
|
|
2400
|
-
children: [/* @__PURE__ */
|
|
2508
|
+
children: [/* @__PURE__ */ p("div", {
|
|
2401
2509
|
className: "sdk-chapters-panel-header",
|
|
2402
|
-
children: /* @__PURE__ */
|
|
2510
|
+
children: /* @__PURE__ */ p("span", {
|
|
2403
2511
|
className: "sdk-chapters-panel-title",
|
|
2404
2512
|
children: "Chapters"
|
|
2405
2513
|
})
|
|
2406
|
-
}), /* @__PURE__ */
|
|
2514
|
+
}), /* @__PURE__ */ p("div", {
|
|
2407
2515
|
className: "sdk-chapters-panel-list",
|
|
2408
2516
|
children: W.map((e, t) => {
|
|
2409
|
-
let n =
|
|
2410
|
-
return /* @__PURE__ */
|
|
2517
|
+
let n = xr.index === t;
|
|
2518
|
+
return /* @__PURE__ */ m("div", {
|
|
2411
2519
|
role: "button",
|
|
2412
2520
|
tabIndex: 0,
|
|
2413
2521
|
className: `sdk-chapters-panel-item${n ? " active" : ""}`,
|
|
2414
2522
|
"aria-label": `${e.title}, ${Q(e.startTime)}${n ? ", current chapter" : ""}`,
|
|
2415
2523
|
"aria-current": n ? "true" : void 0,
|
|
2416
|
-
onClick: () =>
|
|
2417
|
-
onKeyDown:
|
|
2418
|
-
children: [/* @__PURE__ */
|
|
2524
|
+
onClick: () => Oi(e.startTime, e),
|
|
2525
|
+
onKeyDown: Xi(() => Oi(e.startTime, e)),
|
|
2526
|
+
children: [/* @__PURE__ */ p("div", {
|
|
2419
2527
|
className: "sdk-chapters-panel-thumb",
|
|
2420
|
-
children:
|
|
2421
|
-
src:
|
|
2528
|
+
children: Or[t] || e.thumbnail ? /* @__PURE__ */ p("img", {
|
|
2529
|
+
src: Or[t] || e.thumbnail,
|
|
2422
2530
|
alt: "",
|
|
2423
2531
|
"aria-hidden": "true",
|
|
2424
2532
|
style: {
|
|
@@ -2427,23 +2535,23 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2427
2535
|
objectFit: "cover",
|
|
2428
2536
|
display: "block"
|
|
2429
2537
|
}
|
|
2430
|
-
}) : /* @__PURE__ */
|
|
2538
|
+
}) : /* @__PURE__ */ p(ge, {
|
|
2431
2539
|
size: 18,
|
|
2432
2540
|
"aria-hidden": "true",
|
|
2433
2541
|
style: { color: "rgba(255,255,255,0.3)" }
|
|
2434
2542
|
})
|
|
2435
|
-
}), /* @__PURE__ */
|
|
2543
|
+
}), /* @__PURE__ */ m("div", {
|
|
2436
2544
|
className: "sdk-chapters-panel-info",
|
|
2437
2545
|
children: [
|
|
2438
|
-
/* @__PURE__ */
|
|
2546
|
+
/* @__PURE__ */ p("div", {
|
|
2439
2547
|
className: "sdk-chapters-panel-item-title",
|
|
2440
2548
|
children: e.title
|
|
2441
2549
|
}),
|
|
2442
|
-
e.description && /* @__PURE__ */
|
|
2550
|
+
e.description && /* @__PURE__ */ p("div", {
|
|
2443
2551
|
className: "sdk-chapters-panel-item-desc",
|
|
2444
2552
|
children: e.description
|
|
2445
2553
|
}),
|
|
2446
|
-
/* @__PURE__ */
|
|
2554
|
+
/* @__PURE__ */ p("div", {
|
|
2447
2555
|
className: "sdk-chapters-panel-item-time",
|
|
2448
2556
|
"aria-hidden": "true",
|
|
2449
2557
|
children: Q(e.startTime)
|
|
@@ -2454,28 +2562,28 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2454
2562
|
})
|
|
2455
2563
|
})]
|
|
2456
2564
|
}),
|
|
2457
|
-
/* @__PURE__ */
|
|
2565
|
+
/* @__PURE__ */ m("div", {
|
|
2458
2566
|
className: "sdk-desktop-bottom",
|
|
2459
2567
|
children: [
|
|
2460
|
-
I.enableKeyMoments &&
|
|
2568
|
+
I.enableKeyMoments && Er && W.length > 0 && $e === "strip" && /* @__PURE__ */ p("div", {
|
|
2461
2569
|
className: "sdk-desktop-chapters-strip",
|
|
2462
2570
|
children: W.map((e, t) => {
|
|
2463
|
-
let n =
|
|
2464
|
-
return /* @__PURE__ */
|
|
2571
|
+
let n = xr.index === t;
|
|
2572
|
+
return /* @__PURE__ */ m("div", {
|
|
2465
2573
|
role: "button",
|
|
2466
2574
|
tabIndex: 0,
|
|
2467
2575
|
className: `sdk-desktop-chapter-card${n ? " active" : ""}`,
|
|
2468
2576
|
"aria-label": `${e.title}, ${Q(e.startTime)}${n ? ", current chapter" : ""}`,
|
|
2469
2577
|
"aria-current": n ? "true" : void 0,
|
|
2470
2578
|
onClick: (t) => {
|
|
2471
|
-
t.stopPropagation(),
|
|
2579
|
+
t.stopPropagation(), Oi(e.startTime, e);
|
|
2472
2580
|
},
|
|
2473
|
-
onKeyDown:
|
|
2581
|
+
onKeyDown: Xi(() => Oi(e.startTime, e)),
|
|
2474
2582
|
children: [
|
|
2475
|
-
/* @__PURE__ */
|
|
2583
|
+
/* @__PURE__ */ p("div", {
|
|
2476
2584
|
className: "sdk-desktop-chapter-thumb",
|
|
2477
|
-
children:
|
|
2478
|
-
src:
|
|
2585
|
+
children: Or[t] || e.thumbnail ? /* @__PURE__ */ p("img", {
|
|
2586
|
+
src: Or[t] || e.thumbnail,
|
|
2479
2587
|
alt: "",
|
|
2480
2588
|
"aria-hidden": "true",
|
|
2481
2589
|
style: {
|
|
@@ -2484,17 +2592,17 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2484
2592
|
objectFit: "cover",
|
|
2485
2593
|
display: "block"
|
|
2486
2594
|
}
|
|
2487
|
-
}) : /* @__PURE__ */
|
|
2595
|
+
}) : /* @__PURE__ */ p(ge, {
|
|
2488
2596
|
size: 18,
|
|
2489
2597
|
"aria-hidden": "true",
|
|
2490
2598
|
style: { color: "rgba(255,255,255,0.35)" }
|
|
2491
2599
|
})
|
|
2492
2600
|
}),
|
|
2493
|
-
/* @__PURE__ */
|
|
2601
|
+
/* @__PURE__ */ p("div", {
|
|
2494
2602
|
className: "sdk-desktop-chapter-title",
|
|
2495
2603
|
children: e.title
|
|
2496
2604
|
}),
|
|
2497
|
-
/* @__PURE__ */
|
|
2605
|
+
/* @__PURE__ */ p("div", {
|
|
2498
2606
|
className: "sdk-desktop-chapter-time",
|
|
2499
2607
|
"aria-hidden": "true",
|
|
2500
2608
|
children: Q(e.startTime)
|
|
@@ -2503,8 +2611,8 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2503
2611
|
}, t);
|
|
2504
2612
|
})
|
|
2505
2613
|
}),
|
|
2506
|
-
/* @__PURE__ */
|
|
2507
|
-
ref:
|
|
2614
|
+
/* @__PURE__ */ p("div", {
|
|
2615
|
+
ref: E,
|
|
2508
2616
|
role: X ? void 0 : "slider",
|
|
2509
2617
|
"aria-label": X ? void 0 : "Seek",
|
|
2510
2618
|
"aria-valuemin": X ? void 0 : 0,
|
|
@@ -2513,51 +2621,51 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2513
2621
|
"aria-valuetext": X ? void 0 : `${Q(V(J === null ? L : J))} of ${Q(B)}`,
|
|
2514
2622
|
tabIndex: X ? void 0 : 0,
|
|
2515
2623
|
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 :
|
|
2624
|
+
onMouseDown: X ? void 0 : Si,
|
|
2625
|
+
onMouseMove: X ? void 0 : zi,
|
|
2626
|
+
onMouseLeave: X ? void 0 : Hi,
|
|
2627
|
+
onTouchStart: X ? void 0 : Vi,
|
|
2628
|
+
onKeyDown: X ? void 0 : Zi,
|
|
2521
2629
|
style: { pointerEvents: X ? "none" : void 0 },
|
|
2522
|
-
children: Y ? /* @__PURE__ */
|
|
2630
|
+
children: Y ? /* @__PURE__ */ p("div", {
|
|
2523
2631
|
className: "sdk-ad-progress-fill",
|
|
2524
2632
|
style: { width: (() => {
|
|
2525
|
-
let e = F ? F.getCurrentTime() : L, t =
|
|
2633
|
+
let e = F ? F.getCurrentTime() : L, t = ar(e);
|
|
2526
2634
|
return t ? `${Math.min(100, Math.max(0, (e - t.start) / (t.end - t.start) * 100))}%` : "0%";
|
|
2527
2635
|
})() }
|
|
2528
|
-
}) : /* @__PURE__ */
|
|
2529
|
-
/* @__PURE__ */
|
|
2636
|
+
}) : /* @__PURE__ */ m(ee, { children: [
|
|
2637
|
+
/* @__PURE__ */ p("div", {
|
|
2530
2638
|
className: "sdk-seekbar-buffered",
|
|
2531
|
-
style: { width: `${
|
|
2639
|
+
style: { width: `${sn ? (F && F.getBufferedRanges()[0]?.end || 0) / sn * 100 : 0}%` }
|
|
2532
2640
|
}),
|
|
2533
|
-
B > 0 && R.filter((e) => !
|
|
2641
|
+
B > 0 && R.filter((e) => !jn.has(e.startTime)).map((e, t) => /* @__PURE__ */ p("div", {
|
|
2534
2642
|
className: "sdk-seekbar-adbreak",
|
|
2535
2643
|
style: {
|
|
2536
2644
|
left: `${V(e.startTime) / B * 100}%`,
|
|
2537
2645
|
width: "3px"
|
|
2538
2646
|
}
|
|
2539
2647
|
}, t)),
|
|
2540
|
-
/* @__PURE__ */
|
|
2648
|
+
/* @__PURE__ */ p("div", {
|
|
2541
2649
|
className: "sdk-seekbar-progress",
|
|
2542
2650
|
style: {
|
|
2543
|
-
width: q ? `${
|
|
2651
|
+
width: q ? `${Wi > 0 ? $ / Wi * 100 : 0}%` : `${B ? V(J === null ? L : J) / B * 100 : 0}%`,
|
|
2544
2652
|
background: "#ffffff",
|
|
2545
2653
|
boxShadow: "none"
|
|
2546
2654
|
},
|
|
2547
|
-
children: /* @__PURE__ */
|
|
2655
|
+
children: /* @__PURE__ */ p("div", { className: "sdk-seekbar-handle" })
|
|
2548
2656
|
}),
|
|
2549
|
-
I.enableKeyMoments && W.map((e, t) => B === 0 ? null : /* @__PURE__ */
|
|
2657
|
+
I.enableKeyMoments && W.map((e, t) => B === 0 ? null : /* @__PURE__ */ p("div", {
|
|
2550
2658
|
className: "sdk-seekbar-chapter-marker sdk-desktop-chapter-dot",
|
|
2551
2659
|
style: { left: `${V(e.startTime) / B * 100}%` }
|
|
2552
2660
|
}, t)),
|
|
2553
|
-
|
|
2661
|
+
Kr !== null && Qr && /* @__PURE__ */ m("div", {
|
|
2554
2662
|
className: "sdk-thumbnail-tooltip",
|
|
2555
|
-
style: { left: `${
|
|
2663
|
+
style: { left: `${Jr}px` },
|
|
2556
2664
|
children: [
|
|
2557
|
-
/* @__PURE__ */
|
|
2665
|
+
/* @__PURE__ */ p("div", {
|
|
2558
2666
|
className: "sdk-thumbnail-preview",
|
|
2559
|
-
children: /* @__PURE__ */
|
|
2560
|
-
src:
|
|
2667
|
+
children: /* @__PURE__ */ p("img", {
|
|
2668
|
+
src: Qr,
|
|
2561
2669
|
alt: "preview",
|
|
2562
2670
|
style: {
|
|
2563
2671
|
width: "100%",
|
|
@@ -2568,115 +2676,115 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2568
2676
|
}
|
|
2569
2677
|
})
|
|
2570
2678
|
}),
|
|
2571
|
-
|
|
2679
|
+
ei && /* @__PURE__ */ p("div", {
|
|
2572
2680
|
className: "sdk-thumbnail-chapter-name",
|
|
2573
|
-
children:
|
|
2681
|
+
children: ei.title
|
|
2574
2682
|
}),
|
|
2575
|
-
/* @__PURE__ */
|
|
2683
|
+
/* @__PURE__ */ p("div", {
|
|
2576
2684
|
className: "sdk-thumbnail-time-label",
|
|
2577
|
-
children: Q(V(
|
|
2685
|
+
children: Q(V(Xr))
|
|
2578
2686
|
})
|
|
2579
2687
|
]
|
|
2580
2688
|
})
|
|
2581
2689
|
] })
|
|
2582
2690
|
}),
|
|
2583
|
-
/* @__PURE__ */
|
|
2691
|
+
/* @__PURE__ */ m("div", {
|
|
2584
2692
|
className: "sdk-desktop-controls-row",
|
|
2585
|
-
children: [/* @__PURE__ */
|
|
2693
|
+
children: [/* @__PURE__ */ m("div", {
|
|
2586
2694
|
className: "sdk-desktop-left-controls",
|
|
2587
|
-
children: [!Y && /* @__PURE__ */
|
|
2695
|
+
children: [!Y && /* @__PURE__ */ p("div", {
|
|
2588
2696
|
className: "sdk-time-display",
|
|
2589
|
-
children: q ? `${Q($)} / ${Q(
|
|
2590
|
-
}), et === "slider" && /* @__PURE__ */
|
|
2697
|
+
children: q ? `${Q($)} / ${Q(Wi)}` : `${Q(V(J === null ? L : J))} / ${Q(B)}`
|
|
2698
|
+
}), et === "slider" && /* @__PURE__ */ m("div", {
|
|
2591
2699
|
className: "sdk-volume-control",
|
|
2592
|
-
children: [/* @__PURE__ */
|
|
2700
|
+
children: [/* @__PURE__ */ p("button", {
|
|
2593
2701
|
className: "sdk-desktop-icon-btn",
|
|
2594
2702
|
onClick: (e) => {
|
|
2595
|
-
e.stopPropagation(),
|
|
2703
|
+
e.stopPropagation(), Ci();
|
|
2596
2704
|
},
|
|
2597
|
-
"data-tooltip":
|
|
2598
|
-
"aria-label":
|
|
2599
|
-
"aria-pressed":
|
|
2600
|
-
children:
|
|
2601
|
-
}), /* @__PURE__ */
|
|
2705
|
+
"data-tooltip": Ki ? "Unmute" : "Mute",
|
|
2706
|
+
"aria-label": Ki ? "Unmute" : "Mute",
|
|
2707
|
+
"aria-pressed": Ki,
|
|
2708
|
+
children: Ji()
|
|
2709
|
+
}), /* @__PURE__ */ p("input", {
|
|
2602
2710
|
type: "range",
|
|
2603
2711
|
className: "sdk-volume-slider",
|
|
2604
2712
|
min: 0,
|
|
2605
2713
|
max: 1,
|
|
2606
2714
|
step: .02,
|
|
2607
|
-
value:
|
|
2715
|
+
value: Ki ? 0 : Gi,
|
|
2608
2716
|
"aria-label": "Volume",
|
|
2609
|
-
"aria-valuetext":
|
|
2610
|
-
style: { "--vol-pct": Math.round((
|
|
2717
|
+
"aria-valuetext": Ki ? "Muted" : `${Math.round(Gi * 100)}%`,
|
|
2718
|
+
style: { "--vol-pct": Math.round((Ki ? 0 : Gi) * 100) },
|
|
2611
2719
|
onChange: (e) => {
|
|
2612
2720
|
let t = parseFloat(e.target.value);
|
|
2613
|
-
q ? (F?.casting.remoteSetVolume(t), t > 0 && F?.casting.remoteSetMute(!1)) : (F?.setVolume(t), t > 0 &&
|
|
2721
|
+
q ? (F?.casting.remoteSetVolume(t), t > 0 && F?.casting.remoteSetMute(!1)) : (F?.setVolume(t), t > 0 && dn && F?.setMute(!1));
|
|
2614
2722
|
},
|
|
2615
2723
|
onClick: (e) => e.stopPropagation()
|
|
2616
2724
|
})]
|
|
2617
2725
|
})]
|
|
2618
|
-
}), /* @__PURE__ */
|
|
2726
|
+
}), /* @__PURE__ */ m("div", {
|
|
2619
2727
|
className: "sdk-desktop-right-icons",
|
|
2620
2728
|
children: [
|
|
2621
|
-
I.enableKeyMoments && W.length > 0 && !Y && /* @__PURE__ */
|
|
2622
|
-
className: `sdk-desktop-icon-btn${
|
|
2729
|
+
I.enableKeyMoments && W.length > 0 && !Y && /* @__PURE__ */ p("button", {
|
|
2730
|
+
className: `sdk-desktop-icon-btn${Er ? " active" : ""}`,
|
|
2623
2731
|
onClick: (e) => {
|
|
2624
|
-
e.stopPropagation(),
|
|
2732
|
+
e.stopPropagation(), Dr(!Er);
|
|
2625
2733
|
},
|
|
2626
2734
|
"data-tooltip": "Key Moments",
|
|
2627
|
-
"aria-label":
|
|
2628
|
-
"aria-pressed":
|
|
2629
|
-
children: /* @__PURE__ */
|
|
2735
|
+
"aria-label": Er ? "Hide chapters" : "Show chapters",
|
|
2736
|
+
"aria-pressed": Er,
|
|
2737
|
+
children: /* @__PURE__ */ p(ge, {
|
|
2630
2738
|
size: 20,
|
|
2631
2739
|
"aria-hidden": "true"
|
|
2632
2740
|
})
|
|
2633
2741
|
}),
|
|
2634
|
-
I.enableSubtitles && !Y &&
|
|
2742
|
+
I.enableSubtitles && !Y && hr.some((e) => !e.isNative) && /* @__PURE__ */ m("div", {
|
|
2635
2743
|
className: "sdk-menu-container",
|
|
2636
|
-
children: [/* @__PURE__ */
|
|
2744
|
+
children: [/* @__PURE__ */ p("button", {
|
|
2637
2745
|
className: `sdk-desktop-icon-btn${U === "off" ? "" : " active"}`,
|
|
2638
2746
|
onClick: (e) => {
|
|
2639
|
-
e.stopPropagation(),
|
|
2747
|
+
e.stopPropagation(), Qi("subtitles");
|
|
2640
2748
|
},
|
|
2641
2749
|
"data-tooltip": "Captions",
|
|
2642
2750
|
"aria-label": "Captions",
|
|
2643
2751
|
"aria-haspopup": "listbox",
|
|
2644
2752
|
"aria-expanded": G === "subtitles",
|
|
2645
|
-
children: /* @__PURE__ */
|
|
2753
|
+
children: /* @__PURE__ */ p(ue, {
|
|
2646
2754
|
size: 20,
|
|
2647
2755
|
"aria-hidden": "true"
|
|
2648
2756
|
})
|
|
2649
|
-
}), G === "subtitles" && /* @__PURE__ */
|
|
2650
|
-
ref:
|
|
2757
|
+
}), G === "subtitles" && /* @__PURE__ */ m("div", {
|
|
2758
|
+
ref: $i,
|
|
2651
2759
|
className: "sdk-dropup-menu",
|
|
2652
2760
|
role: "listbox",
|
|
2653
2761
|
"aria-label": "Captions",
|
|
2654
2762
|
children: [
|
|
2655
|
-
/* @__PURE__ */
|
|
2763
|
+
/* @__PURE__ */ p("div", {
|
|
2656
2764
|
className: "sdk-dropup-header",
|
|
2657
2765
|
"aria-hidden": "true",
|
|
2658
2766
|
children: "Subtitles"
|
|
2659
2767
|
}),
|
|
2660
|
-
/* @__PURE__ */
|
|
2768
|
+
/* @__PURE__ */ m("div", {
|
|
2661
2769
|
role: "option",
|
|
2662
2770
|
"aria-selected": U === "off",
|
|
2663
2771
|
tabIndex: 0,
|
|
2664
2772
|
className: `sdk-dropup-item ${U === "off" ? "active" : ""}`,
|
|
2665
|
-
onClick: () =>
|
|
2666
|
-
onKeyDown:
|
|
2667
|
-
children: [/* @__PURE__ */
|
|
2773
|
+
onClick: () => Ei("off"),
|
|
2774
|
+
onKeyDown: Yi(() => Ei("off")),
|
|
2775
|
+
children: [/* @__PURE__ */ p("span", { children: "Off" }), U === "off" && /* @__PURE__ */ p(y, {
|
|
2668
2776
|
size: 12,
|
|
2669
2777
|
"aria-hidden": "true"
|
|
2670
2778
|
})]
|
|
2671
2779
|
}),
|
|
2672
|
-
|
|
2780
|
+
hr.map((e) => /* @__PURE__ */ m("div", {
|
|
2673
2781
|
role: "option",
|
|
2674
2782
|
"aria-selected": U === e.id,
|
|
2675
2783
|
tabIndex: 0,
|
|
2676
2784
|
className: `sdk-dropup-item ${U === e.id ? "active" : ""}`,
|
|
2677
|
-
onClick: () =>
|
|
2678
|
-
onKeyDown:
|
|
2679
|
-
children: [/* @__PURE__ */
|
|
2785
|
+
onClick: () => Ei(e.id),
|
|
2786
|
+
onKeyDown: Yi(() => Ei(e.id)),
|
|
2787
|
+
children: [/* @__PURE__ */ p("span", { children: x(e) }), U === e.id && /* @__PURE__ */ p(y, {
|
|
2680
2788
|
size: 12,
|
|
2681
2789
|
"aria-hidden": "true"
|
|
2682
2790
|
})]
|
|
@@ -2684,69 +2792,69 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2684
2792
|
]
|
|
2685
2793
|
})]
|
|
2686
2794
|
}),
|
|
2687
|
-
I.allowMultipleAudio &&
|
|
2795
|
+
I.allowMultipleAudio && _r.length > 1 && !Y && /* @__PURE__ */ m("div", {
|
|
2688
2796
|
className: "sdk-menu-container",
|
|
2689
|
-
children: [/* @__PURE__ */
|
|
2797
|
+
children: [/* @__PURE__ */ p("button", {
|
|
2690
2798
|
className: `sdk-desktop-icon-btn${G === "audio" ? " active" : ""}`,
|
|
2691
2799
|
onClick: (e) => {
|
|
2692
|
-
e.stopPropagation(),
|
|
2800
|
+
e.stopPropagation(), Qi("audio");
|
|
2693
2801
|
},
|
|
2694
2802
|
"data-tooltip": "Audio Track",
|
|
2695
2803
|
"aria-label": "Audio track",
|
|
2696
2804
|
"aria-haspopup": "listbox",
|
|
2697
2805
|
"aria-expanded": G === "audio",
|
|
2698
|
-
children: /* @__PURE__ */
|
|
2806
|
+
children: /* @__PURE__ */ p(he, {
|
|
2699
2807
|
size: 20,
|
|
2700
2808
|
"aria-hidden": "true"
|
|
2701
2809
|
})
|
|
2702
|
-
}), G === "audio" && /* @__PURE__ */
|
|
2703
|
-
ref:
|
|
2810
|
+
}), G === "audio" && /* @__PURE__ */ m("div", {
|
|
2811
|
+
ref: $i,
|
|
2704
2812
|
className: "sdk-dropup-menu",
|
|
2705
2813
|
role: "listbox",
|
|
2706
2814
|
"aria-label": "Audio track",
|
|
2707
|
-
children: [/* @__PURE__ */
|
|
2815
|
+
children: [/* @__PURE__ */ p("div", {
|
|
2708
2816
|
className: "sdk-dropup-header",
|
|
2709
2817
|
"aria-hidden": "true",
|
|
2710
2818
|
children: "Audio Track"
|
|
2711
|
-
}),
|
|
2819
|
+
}), _r.map((e) => /* @__PURE__ */ m("div", {
|
|
2712
2820
|
role: "option",
|
|
2713
|
-
"aria-selected":
|
|
2821
|
+
"aria-selected": yr === e.id,
|
|
2714
2822
|
tabIndex: 0,
|
|
2715
|
-
className: `sdk-dropup-item ${
|
|
2823
|
+
className: `sdk-dropup-item ${yr === e.id ? "active" : ""}`,
|
|
2716
2824
|
onClick: () => {
|
|
2717
|
-
F?.setAudioTrack(e.id),
|
|
2825
|
+
F?.setAudioTrack(e.id), br(e.id), K("none"), jr(`Audio: ${x(e)}`);
|
|
2718
2826
|
},
|
|
2719
|
-
onKeyDown:
|
|
2720
|
-
F?.setAudioTrack(e.id),
|
|
2827
|
+
onKeyDown: Yi(() => {
|
|
2828
|
+
F?.setAudioTrack(e.id), br(e.id), K("none"), jr(`Audio: ${x(e)}`);
|
|
2721
2829
|
}),
|
|
2722
|
-
children: [/* @__PURE__ */
|
|
2830
|
+
children: [/* @__PURE__ */ p("span", { children: x(e) }), yr === e.id && /* @__PURE__ */ p(y, {
|
|
2723
2831
|
size: 12,
|
|
2724
2832
|
"aria-hidden": "true"
|
|
2725
2833
|
})]
|
|
2726
2834
|
}, e.id))]
|
|
2727
2835
|
})]
|
|
2728
2836
|
}),
|
|
2729
|
-
I.enablePlaybackSpeed && !Y && /* @__PURE__ */
|
|
2837
|
+
I.enablePlaybackSpeed && !Y && /* @__PURE__ */ m("div", {
|
|
2730
2838
|
className: "sdk-menu-container",
|
|
2731
|
-
children: [/* @__PURE__ */
|
|
2839
|
+
children: [/* @__PURE__ */ p("button", {
|
|
2732
2840
|
className: `sdk-desktop-icon-btn${G === "speed" ? " active" : ""}`,
|
|
2733
2841
|
onClick: (e) => {
|
|
2734
|
-
e.stopPropagation(),
|
|
2842
|
+
e.stopPropagation(), Qi("speed");
|
|
2735
2843
|
},
|
|
2736
2844
|
"data-tooltip": "Playback Speed",
|
|
2737
2845
|
"aria-label": "Playback speed",
|
|
2738
2846
|
"aria-haspopup": "listbox",
|
|
2739
2847
|
"aria-expanded": G === "speed",
|
|
2740
|
-
children: /* @__PURE__ */
|
|
2848
|
+
children: /* @__PURE__ */ p(me, {
|
|
2741
2849
|
size: 20,
|
|
2742
2850
|
"aria-hidden": "true"
|
|
2743
2851
|
})
|
|
2744
|
-
}), G === "speed" && /* @__PURE__ */
|
|
2745
|
-
ref:
|
|
2852
|
+
}), G === "speed" && /* @__PURE__ */ m("div", {
|
|
2853
|
+
ref: $i,
|
|
2746
2854
|
className: "sdk-dropup-menu",
|
|
2747
2855
|
role: "listbox",
|
|
2748
2856
|
"aria-label": "Playback speed",
|
|
2749
|
-
children: [/* @__PURE__ */
|
|
2857
|
+
children: [/* @__PURE__ */ p("div", {
|
|
2750
2858
|
className: "sdk-dropup-header",
|
|
2751
2859
|
"aria-hidden": "true",
|
|
2752
2860
|
children: "Speed"
|
|
@@ -2757,128 +2865,128 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2757
2865
|
1.25,
|
|
2758
2866
|
1.5,
|
|
2759
2867
|
2
|
|
2760
|
-
].map((e) => /* @__PURE__ */
|
|
2868
|
+
].map((e) => /* @__PURE__ */ m("div", {
|
|
2761
2869
|
role: "option",
|
|
2762
|
-
"aria-selected":
|
|
2870
|
+
"aria-selected": wr === e,
|
|
2763
2871
|
tabIndex: 0,
|
|
2764
|
-
className: `sdk-dropup-item ${
|
|
2765
|
-
onClick: () =>
|
|
2766
|
-
onKeyDown:
|
|
2767
|
-
children: [/* @__PURE__ */
|
|
2872
|
+
className: `sdk-dropup-item ${wr === e ? "active" : ""}`,
|
|
2873
|
+
onClick: () => wi(e),
|
|
2874
|
+
onKeyDown: Yi(() => wi(e)),
|
|
2875
|
+
children: [/* @__PURE__ */ p("span", { children: e === 1 ? "Normal" : `${e}x` }), wr === e && /* @__PURE__ */ p(y, {
|
|
2768
2876
|
size: 12,
|
|
2769
2877
|
"aria-hidden": "true"
|
|
2770
2878
|
})]
|
|
2771
2879
|
}, e))]
|
|
2772
2880
|
})]
|
|
2773
2881
|
}),
|
|
2774
|
-
I.enableQuality && !Y && /* @__PURE__ */
|
|
2882
|
+
I.enableQuality && !Y && /* @__PURE__ */ m("div", {
|
|
2775
2883
|
className: "sdk-menu-container",
|
|
2776
|
-
children: [/* @__PURE__ */
|
|
2777
|
-
className: `sdk-desktop-icon-btn${
|
|
2884
|
+
children: [/* @__PURE__ */ p("button", {
|
|
2885
|
+
className: `sdk-desktop-icon-btn${ur.id === -1 ? "" : " active"}`,
|
|
2778
2886
|
onClick: (e) => {
|
|
2779
|
-
e.stopPropagation(),
|
|
2887
|
+
e.stopPropagation(), Qi("quality");
|
|
2780
2888
|
},
|
|
2781
2889
|
"data-tooltip": "Quality",
|
|
2782
2890
|
"aria-label": "Video quality",
|
|
2783
2891
|
"aria-haspopup": "listbox",
|
|
2784
2892
|
"aria-expanded": G === "quality",
|
|
2785
|
-
children: /* @__PURE__ */
|
|
2893
|
+
children: /* @__PURE__ */ p(Me, {
|
|
2786
2894
|
size: 20,
|
|
2787
2895
|
"aria-hidden": "true"
|
|
2788
2896
|
})
|
|
2789
|
-
}), G === "quality" && /* @__PURE__ */
|
|
2790
|
-
ref:
|
|
2897
|
+
}), G === "quality" && /* @__PURE__ */ m("div", {
|
|
2898
|
+
ref: $i,
|
|
2791
2899
|
className: "sdk-dropup-menu large",
|
|
2792
2900
|
role: "listbox",
|
|
2793
2901
|
"aria-label": "Video quality",
|
|
2794
|
-
children: [/* @__PURE__ */
|
|
2902
|
+
children: [/* @__PURE__ */ p("div", {
|
|
2795
2903
|
className: "sdk-dropup-header",
|
|
2796
2904
|
"aria-hidden": "true",
|
|
2797
2905
|
children: "Quality"
|
|
2798
|
-
}),
|
|
2906
|
+
}), cr.map((e) => /* @__PURE__ */ m("div", {
|
|
2799
2907
|
role: "option",
|
|
2800
|
-
"aria-selected":
|
|
2908
|
+
"aria-selected": ur.id === e.id,
|
|
2801
2909
|
tabIndex: 0,
|
|
2802
|
-
className: `sdk-dropup-item ${
|
|
2803
|
-
onClick: () =>
|
|
2804
|
-
onKeyDown:
|
|
2805
|
-
children: [/* @__PURE__ */
|
|
2910
|
+
className: `sdk-dropup-item ${ur.id === e.id ? "active" : ""}`,
|
|
2911
|
+
onClick: () => Ti(e.id),
|
|
2912
|
+
onKeyDown: Yi(() => Ti(e.id)),
|
|
2913
|
+
children: [/* @__PURE__ */ p("span", { children: e.label }), ur.id === e.id && /* @__PURE__ */ p(y, {
|
|
2806
2914
|
size: 12,
|
|
2807
2915
|
"aria-hidden": "true"
|
|
2808
2916
|
})]
|
|
2809
2917
|
}, e.id))]
|
|
2810
2918
|
})]
|
|
2811
2919
|
}),
|
|
2812
|
-
|
|
2920
|
+
w && w.length > 1 && !Y && /* @__PURE__ */ m("div", {
|
|
2813
2921
|
className: "sdk-menu-container",
|
|
2814
|
-
children: [/* @__PURE__ */
|
|
2922
|
+
children: [/* @__PURE__ */ p("button", {
|
|
2815
2923
|
className: `sdk-desktop-icon-btn${G === "sources" ? " active" : ""}`,
|
|
2816
2924
|
onClick: (e) => {
|
|
2817
|
-
e.stopPropagation(),
|
|
2925
|
+
e.stopPropagation(), Qi("sources");
|
|
2818
2926
|
},
|
|
2819
2927
|
"data-tooltip": "Select Source",
|
|
2820
2928
|
"aria-label": "Select source",
|
|
2821
2929
|
"aria-haspopup": "listbox",
|
|
2822
2930
|
"aria-expanded": G === "sources",
|
|
2823
|
-
children: /* @__PURE__ */
|
|
2931
|
+
children: /* @__PURE__ */ p(Ne, {
|
|
2824
2932
|
size: 20,
|
|
2825
2933
|
"aria-hidden": "true"
|
|
2826
2934
|
})
|
|
2827
|
-
}), G === "sources" && /* @__PURE__ */
|
|
2828
|
-
ref:
|
|
2935
|
+
}), G === "sources" && /* @__PURE__ */ m("div", {
|
|
2936
|
+
ref: $i,
|
|
2829
2937
|
className: "sdk-dropup-menu",
|
|
2830
2938
|
role: "listbox",
|
|
2831
2939
|
"aria-label": "Select source",
|
|
2832
|
-
children: [/* @__PURE__ */
|
|
2940
|
+
children: [/* @__PURE__ */ p("div", {
|
|
2833
2941
|
className: "sdk-dropup-header",
|
|
2834
2942
|
"aria-hidden": "true",
|
|
2835
2943
|
children: "Source"
|
|
2836
|
-
}),
|
|
2944
|
+
}), w.map((e, t) => /* @__PURE__ */ m("div", {
|
|
2837
2945
|
role: "option",
|
|
2838
2946
|
"aria-selected": st === t,
|
|
2839
2947
|
tabIndex: 0,
|
|
2840
2948
|
className: `sdk-dropup-item ${st === t ? "active" : ""}`,
|
|
2841
|
-
onClick: () =>
|
|
2842
|
-
onKeyDown:
|
|
2843
|
-
children: [/* @__PURE__ */
|
|
2949
|
+
onClick: () => Di(t),
|
|
2950
|
+
onKeyDown: Yi(() => Di(t)),
|
|
2951
|
+
children: [/* @__PURE__ */ p("span", { children: e.label }), st === t && /* @__PURE__ */ p(y, {
|
|
2844
2952
|
size: 12,
|
|
2845
2953
|
"aria-hidden": "true"
|
|
2846
2954
|
})]
|
|
2847
2955
|
}, t))]
|
|
2848
2956
|
})]
|
|
2849
2957
|
}),
|
|
2850
|
-
I.enablePiP && !Y && /* @__PURE__ */
|
|
2851
|
-
className: `sdk-desktop-icon-btn${
|
|
2958
|
+
I.enablePiP && !Y && /* @__PURE__ */ p("button", {
|
|
2959
|
+
className: `sdk-desktop-icon-btn${Sn ? " active" : ""}`,
|
|
2852
2960
|
onClick: (e) => {
|
|
2853
|
-
e.stopPropagation(),
|
|
2961
|
+
e.stopPropagation(), Ai();
|
|
2854
2962
|
},
|
|
2855
2963
|
"data-tooltip": "Picture-in-Picture",
|
|
2856
|
-
"aria-label":
|
|
2857
|
-
"aria-pressed":
|
|
2858
|
-
children: /* @__PURE__ */
|
|
2964
|
+
"aria-label": Sn ? "Exit picture-in-picture" : "Enter picture-in-picture",
|
|
2965
|
+
"aria-pressed": Sn,
|
|
2966
|
+
children: /* @__PURE__ */ p(ye, {
|
|
2859
2967
|
size: 20,
|
|
2860
2968
|
"aria-hidden": "true"
|
|
2861
2969
|
})
|
|
2862
2970
|
}),
|
|
2863
|
-
et === "button" && /* @__PURE__ */
|
|
2971
|
+
et === "button" && /* @__PURE__ */ p("button", {
|
|
2864
2972
|
className: "sdk-desktop-icon-btn",
|
|
2865
2973
|
onClick: (e) => {
|
|
2866
|
-
e.stopPropagation(),
|
|
2974
|
+
e.stopPropagation(), Ci();
|
|
2867
2975
|
},
|
|
2868
|
-
"data-tooltip":
|
|
2869
|
-
"aria-label":
|
|
2870
|
-
"aria-pressed":
|
|
2871
|
-
children:
|
|
2976
|
+
"data-tooltip": Ki ? "Unmute" : "Mute",
|
|
2977
|
+
"aria-label": Ki ? "Unmute" : "Mute",
|
|
2978
|
+
"aria-pressed": Ki,
|
|
2979
|
+
children: Ji()
|
|
2872
2980
|
}),
|
|
2873
|
-
qe && /* @__PURE__ */
|
|
2981
|
+
qe && /* @__PURE__ */ p("button", {
|
|
2874
2982
|
className: "sdk-desktop-icon-btn",
|
|
2875
2983
|
onClick: (e) => {
|
|
2876
|
-
e.stopPropagation(),
|
|
2984
|
+
e.stopPropagation(), Mi();
|
|
2877
2985
|
},
|
|
2878
|
-
"data-tooltip":
|
|
2879
|
-
"aria-label":
|
|
2880
|
-
"aria-pressed":
|
|
2881
|
-
children:
|
|
2986
|
+
"data-tooltip": hn || _n ? "Exit fullscreen" : "Fullscreen",
|
|
2987
|
+
"aria-label": hn || _n ? "Exit fullscreen" : "Enter fullscreen",
|
|
2988
|
+
"aria-pressed": hn || _n,
|
|
2989
|
+
children: p(hn ? ve : _e, {
|
|
2882
2990
|
size: 20,
|
|
2883
2991
|
"aria-hidden": "true"
|
|
2884
2992
|
})
|
|
@@ -2890,16 +2998,16 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2890
2998
|
})
|
|
2891
2999
|
] })]
|
|
2892
3000
|
}),
|
|
2893
|
-
|
|
3001
|
+
wn && (() => {
|
|
2894
3002
|
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${
|
|
3003
|
+
return f(/* @__PURE__ */ m("div", {
|
|
3004
|
+
className: `gb-pip-overlay${Ui ? "" : " gb-pip-paused"}`,
|
|
2897
3005
|
children: [
|
|
2898
|
-
/* @__PURE__ */
|
|
2899
|
-
/* @__PURE__ */
|
|
3006
|
+
/* @__PURE__ */ p("div", {}),
|
|
3007
|
+
/* @__PURE__ */ m("div", {
|
|
2900
3008
|
className: "gb-pip-center",
|
|
2901
3009
|
children: [
|
|
2902
|
-
/* @__PURE__ */
|
|
3010
|
+
/* @__PURE__ */ p("button", {
|
|
2903
3011
|
className: "gb-pip-btn",
|
|
2904
3012
|
onClick: () => Z(H(Math.max(0, V($) - 10)), {
|
|
2905
3013
|
eventType: "fast_backward",
|
|
@@ -2907,28 +3015,28 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2907
3015
|
}),
|
|
2908
3016
|
"aria-label": "Rewind 10 seconds",
|
|
2909
3017
|
disabled: Y,
|
|
2910
|
-
children: /* @__PURE__ */
|
|
3018
|
+
children: /* @__PURE__ */ p(xe, {
|
|
2911
3019
|
size: 20,
|
|
2912
3020
|
"aria-hidden": "true"
|
|
2913
3021
|
})
|
|
2914
3022
|
}),
|
|
2915
|
-
/* @__PURE__ */
|
|
3023
|
+
/* @__PURE__ */ p("button", {
|
|
2916
3024
|
className: "gb-pip-btn gb-pip-play",
|
|
2917
|
-
onClick:
|
|
2918
|
-
"aria-label":
|
|
2919
|
-
children:
|
|
3025
|
+
onClick: bi,
|
|
3026
|
+
"aria-label": En ? "Replay" : Ui ? "Pause" : "Play",
|
|
3027
|
+
children: En ? /* @__PURE__ */ p(xe, {
|
|
2920
3028
|
size: 24,
|
|
2921
3029
|
"aria-hidden": "true"
|
|
2922
|
-
}) :
|
|
3030
|
+
}) : Ui ? /* @__PURE__ */ p(b, {
|
|
2923
3031
|
size: 24,
|
|
2924
3032
|
"aria-hidden": "true"
|
|
2925
|
-
}) : /* @__PURE__ */
|
|
3033
|
+
}) : /* @__PURE__ */ p(be, {
|
|
2926
3034
|
size: 24,
|
|
2927
3035
|
"aria-hidden": "true",
|
|
2928
3036
|
style: { marginLeft: 2 }
|
|
2929
3037
|
})
|
|
2930
3038
|
}),
|
|
2931
|
-
/* @__PURE__ */
|
|
3039
|
+
/* @__PURE__ */ p("button", {
|
|
2932
3040
|
className: "gb-pip-btn",
|
|
2933
3041
|
onClick: () => Z(H(Math.min(B, V($) + 10)), {
|
|
2934
3042
|
eventType: "fast_forward",
|
|
@@ -2936,23 +3044,23 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2936
3044
|
}),
|
|
2937
3045
|
"aria-label": "Skip forward 10 seconds",
|
|
2938
3046
|
disabled: Y,
|
|
2939
|
-
children: /* @__PURE__ */
|
|
3047
|
+
children: /* @__PURE__ */ p(Se, {
|
|
2940
3048
|
size: 20,
|
|
2941
3049
|
"aria-hidden": "true"
|
|
2942
3050
|
})
|
|
2943
3051
|
})
|
|
2944
3052
|
]
|
|
2945
3053
|
}),
|
|
2946
|
-
/* @__PURE__ */
|
|
3054
|
+
/* @__PURE__ */ m("div", {
|
|
2947
3055
|
className: "gb-pip-bottom",
|
|
2948
|
-
children: [/* @__PURE__ */
|
|
3056
|
+
children: [/* @__PURE__ */ p("div", {
|
|
2949
3057
|
className: "gb-pip-progress",
|
|
2950
|
-
onClick:
|
|
2951
|
-
children: /* @__PURE__ */
|
|
3058
|
+
onClick: ji,
|
|
3059
|
+
children: /* @__PURE__ */ p("div", {
|
|
2952
3060
|
className: "gb-pip-progress-fill",
|
|
2953
3061
|
style: { width: `${t ? n / t * 100 : 0}%` }
|
|
2954
3062
|
})
|
|
2955
|
-
}), /* @__PURE__ */
|
|
3063
|
+
}), /* @__PURE__ */ m("div", {
|
|
2956
3064
|
className: "gb-pip-time",
|
|
2957
3065
|
children: [
|
|
2958
3066
|
Q(n),
|
|
@@ -2962,30 +3070,30 @@ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
|
|
|
2962
3070
|
})]
|
|
2963
3071
|
})
|
|
2964
3072
|
]
|
|
2965
|
-
}),
|
|
3073
|
+
}), wn.document.body);
|
|
2966
3074
|
})()
|
|
2967
3075
|
]
|
|
2968
3076
|
});
|
|
2969
|
-
},
|
|
2970
|
-
function
|
|
3077
|
+
}, Ke = "https://dev-api.go-boss.com";
|
|
3078
|
+
function S(e) {
|
|
2971
3079
|
return {
|
|
2972
3080
|
"x-player-key": e,
|
|
2973
3081
|
"Content-Type": "application/json"
|
|
2974
3082
|
};
|
|
2975
3083
|
}
|
|
2976
|
-
async function qe(e, t =
|
|
3084
|
+
async function qe(e, t = Ke, n = {}) {
|
|
2977
3085
|
let r = await fetch(`${t}/api/player/sdk/init`, {
|
|
2978
3086
|
method: "POST",
|
|
2979
|
-
headers:
|
|
3087
|
+
headers: S(e),
|
|
2980
3088
|
body: JSON.stringify({ videoUrl: n.videoUrl })
|
|
2981
3089
|
});
|
|
2982
3090
|
if (!r.ok) throw Error(`SDK init failed: ${r.status}`);
|
|
2983
3091
|
return await r.json();
|
|
2984
3092
|
}
|
|
2985
|
-
async function Je(e, t, n =
|
|
3093
|
+
async function Je(e, t, n = Ke) {
|
|
2986
3094
|
let { sessionId: r, videoId: i, videoTitle: a, videoUrl: o, contentDurationSec: s } = t, c = await fetch(`${n}/api/player/sdk/session/start`, {
|
|
2987
3095
|
method: "POST",
|
|
2988
|
-
headers:
|
|
3096
|
+
headers: S(e),
|
|
2989
3097
|
body: JSON.stringify({
|
|
2990
3098
|
sessionId: r,
|
|
2991
3099
|
videoId: i,
|
|
@@ -2996,22 +3104,22 @@ async function Je(e, t, n = Ge) {
|
|
|
2996
3104
|
});
|
|
2997
3105
|
if (!c.ok) throw Error(`Session start failed: ${c.status}`);
|
|
2998
3106
|
}
|
|
2999
|
-
async function Ye(e, t, n, r, i =
|
|
3107
|
+
async function Ye(e, t, n, r, i = Ke) {
|
|
3000
3108
|
let a = {
|
|
3001
3109
|
sessionId: t,
|
|
3002
3110
|
currentTime: n,
|
|
3003
3111
|
duration: r
|
|
3004
3112
|
}, o = await fetch(`${i}/api/player/sdk/session/heartbeat`, {
|
|
3005
3113
|
method: "POST",
|
|
3006
|
-
headers:
|
|
3114
|
+
headers: S(e),
|
|
3007
3115
|
body: JSON.stringify(a)
|
|
3008
3116
|
});
|
|
3009
3117
|
if (!o.ok) throw Error(`Heartbeat failed: ${o.status}`);
|
|
3010
3118
|
}
|
|
3011
|
-
async function Xe(e, t, n = 0, r = 0, i =
|
|
3119
|
+
async function Xe(e, t, n = 0, r = 0, i = Ke) {
|
|
3012
3120
|
let a = await fetch(`${i}/api/player/sdk/session/end`, {
|
|
3013
3121
|
method: "POST",
|
|
3014
|
-
headers:
|
|
3122
|
+
headers: S(e),
|
|
3015
3123
|
body: JSON.stringify({
|
|
3016
3124
|
sessionId: t,
|
|
3017
3125
|
currentTime: n,
|
|
@@ -3020,18 +3128,18 @@ async function Xe(e, t, n = 0, r = 0, i = Ge) {
|
|
|
3020
3128
|
});
|
|
3021
3129
|
if (!a.ok) throw Error(`Session end failed: ${a.status}`);
|
|
3022
3130
|
}
|
|
3023
|
-
async function Ze(e, t, n =
|
|
3131
|
+
async function Ze(e, t, n = Ke) {
|
|
3024
3132
|
let r = await fetch(`${n}/api/player/sdk/events`, {
|
|
3025
3133
|
method: "POST",
|
|
3026
|
-
headers:
|
|
3134
|
+
headers: S(e),
|
|
3027
3135
|
body: JSON.stringify(t)
|
|
3028
3136
|
});
|
|
3029
3137
|
if (!r.ok) throw Error(`Event ${t.eventType} failed: ${r.status}`);
|
|
3030
3138
|
}
|
|
3031
|
-
function Qe(e, t, n = 0, r = 0, i =
|
|
3139
|
+
function Qe(e, t, n = 0, r = 0, i = Ke) {
|
|
3032
3140
|
fetch(`${i}/api/player/sdk/session/end`, {
|
|
3033
3141
|
method: "POST",
|
|
3034
|
-
headers:
|
|
3142
|
+
headers: S(e),
|
|
3035
3143
|
body: JSON.stringify({
|
|
3036
3144
|
sessionId: t,
|
|
3037
3145
|
currentTime: n,
|
|
@@ -3042,7 +3150,7 @@ function Qe(e, t, n = 0, r = 0, i = Ge) {
|
|
|
3042
3150
|
}
|
|
3043
3151
|
//#endregion
|
|
3044
3152
|
//#region src/delegate.ts
|
|
3045
|
-
function
|
|
3153
|
+
function C() {
|
|
3046
3154
|
if (!(typeof screen > "u")) return screen.orientation?.type ?? void 0;
|
|
3047
3155
|
}
|
|
3048
3156
|
var $e = class {
|
|
@@ -3107,10 +3215,10 @@ var $e = class {
|
|
|
3107
3215
|
break;
|
|
3108
3216
|
}
|
|
3109
3217
|
case "fullscreen_enter":
|
|
3110
|
-
this.call("playerDidEnterFullscreen",
|
|
3218
|
+
this.call("playerDidEnterFullscreen", C());
|
|
3111
3219
|
break;
|
|
3112
3220
|
case "fullscreen_exit":
|
|
3113
|
-
this.call("playerDidExitFullscreen",
|
|
3221
|
+
this.call("playerDidExitFullscreen", C());
|
|
3114
3222
|
break;
|
|
3115
3223
|
case "key_moments": {
|
|
3116
3224
|
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;
|
|
@@ -3309,141 +3417,141 @@ function at(e, t) {
|
|
|
3309
3417
|
default: return null;
|
|
3310
3418
|
}
|
|
3311
3419
|
}
|
|
3312
|
-
function ot({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i = "#6366f1", firebaseConfig: a, proxyDomains: s, apiBaseUrl: l, adTrackingUrl:
|
|
3313
|
-
let [
|
|
3420
|
+
function ot({ 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 }) {
|
|
3421
|
+
let [he, ge] = d([]), [_e, ve] = d(0), [b] = d(() => new $e());
|
|
3314
3422
|
c(() => {
|
|
3315
|
-
|
|
3423
|
+
b.setDelegate(y), b.setAutoplay(_);
|
|
3316
3424
|
}, [
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
]), c(() => () =>
|
|
3321
|
-
let
|
|
3425
|
+
b,
|
|
3426
|
+
y,
|
|
3427
|
+
_
|
|
3428
|
+
]), c(() => () => b.notifyDismissed(), [b]);
|
|
3429
|
+
let ye = Array.isArray(t) ? t : [{
|
|
3322
3430
|
label: "Default",
|
|
3323
3431
|
url: t
|
|
3324
|
-
}],
|
|
3432
|
+
}], 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(it), x = u(null), Le = u(0), Re = u(null), ze = u({
|
|
3325
3433
|
currentTime: 0,
|
|
3326
3434
|
duration: 0
|
|
3327
|
-
}),
|
|
3435
|
+
}), Be = u(() => {}), Ve = be.split("/").filter(Boolean), He = te || (Ve[Ve.length - 1] ?? "").replace(/\.m3u8.*$/, "") || "video", Ue = u(be);
|
|
3328
3436
|
c(() => {
|
|
3329
|
-
|
|
3330
|
-
}, [
|
|
3331
|
-
let
|
|
3437
|
+
Ue.current = be;
|
|
3438
|
+
}, [be]);
|
|
3439
|
+
let We = o(() => nt(s), [s])(), Ke = rt(i);
|
|
3332
3440
|
c(() => {
|
|
3333
|
-
document.documentElement.style.setProperty("--accent-indigo", i), document.documentElement.style.setProperty("--accent-indigo-rgb",
|
|
3334
|
-
}, [i,
|
|
3441
|
+
document.documentElement.style.setProperty("--accent-indigo", i), document.documentElement.style.setProperty("--accent-indigo-rgb", Ke);
|
|
3442
|
+
}, [i, Ke]), c(() => {
|
|
3335
3443
|
let t = !1;
|
|
3336
|
-
return qe(e, l, { videoUrl:
|
|
3444
|
+
return qe(e, l, { videoUrl: Ue.current }).then((e) => {
|
|
3337
3445
|
if (t) return;
|
|
3338
|
-
|
|
3446
|
+
ke.current = e;
|
|
3339
3447
|
let { features: n, planTier: r, heartbeatIntervalSeconds: i } = e.result.data;
|
|
3340
|
-
|
|
3448
|
+
Ie.current = typeof i == "number" && i > 0 ? i * 1e3 : it;
|
|
3341
3449
|
let a = {
|
|
3342
3450
|
package: r,
|
|
3343
3451
|
is_active: !0,
|
|
3344
3452
|
features: tt(n),
|
|
3345
3453
|
limits: { streaming_minutes: 0 }
|
|
3346
3454
|
};
|
|
3347
|
-
console.log("[SDK] Player key validated. Features:", a.features),
|
|
3455
|
+
console.log("[SDK] Player key validated. Features:", a.features), we(a), Se("ready");
|
|
3348
3456
|
}).catch((e) => {
|
|
3349
3457
|
if (t) return;
|
|
3350
3458
|
console.error("[SDK] Player key validation failed:", e);
|
|
3351
3459
|
let n = e.message ?? "";
|
|
3352
|
-
|
|
3460
|
+
Oe(/init failed: 4\d\d/.test(n) ? "auth" : "network"), Se("error");
|
|
3353
3461
|
}), () => {
|
|
3354
|
-
t = !0,
|
|
3462
|
+
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
3463
|
};
|
|
3356
3464
|
}, [
|
|
3357
3465
|
e,
|
|
3358
3466
|
l,
|
|
3359
|
-
|
|
3467
|
+
Te
|
|
3360
3468
|
]);
|
|
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 — ${
|
|
3469
|
+
let S = o(() => {
|
|
3470
|
+
x.current && (clearTimeout(x.current), x.current = null, Re.current !== null && (Le.current += Date.now() - Re.current, Re.current = null));
|
|
3471
|
+
}, []), C = o(() => {
|
|
3472
|
+
x.current &&= (clearTimeout(x.current), null), Le.current = 0, Re.current = null;
|
|
3473
|
+
}, []), et = o(() => {
|
|
3474
|
+
if (x.current || !je.current) return;
|
|
3475
|
+
Re.current = Date.now();
|
|
3476
|
+
let t = Ie.current - Le.current;
|
|
3477
|
+
x.current = setTimeout(() => {
|
|
3478
|
+
x.current = null, Le.current = 0, Re.current = null;
|
|
3479
|
+
let { currentTime: t, duration: n } = ze.current;
|
|
3480
|
+
console.log(`[SDK] Heartbeat timer fired — ${Ie.current / 1e3}s of real content elapsed`), Ye(e, je.current, t, n, l).catch((e) => console.warn("[SDK] Heartbeat failed:", e.message)), Be.current();
|
|
3373
3481
|
}, t);
|
|
3374
3482
|
}, [e, l]);
|
|
3375
3483
|
c(() => {
|
|
3376
|
-
|
|
3377
|
-
}, [
|
|
3378
|
-
let
|
|
3484
|
+
Be.current = et;
|
|
3485
|
+
}, [et]);
|
|
3486
|
+
let ot = u(!0);
|
|
3379
3487
|
c(() => {
|
|
3380
|
-
if (
|
|
3381
|
-
|
|
3488
|
+
if (ot.current) {
|
|
3489
|
+
ot.current = !1;
|
|
3382
3490
|
return;
|
|
3383
3491
|
}
|
|
3384
|
-
|
|
3385
|
-
}, [
|
|
3492
|
+
Fe.current = !0, Pe.current = void 0, S();
|
|
3493
|
+
}, [_e, S]), c(() => {
|
|
3386
3494
|
let t = () => {
|
|
3387
|
-
if (
|
|
3388
|
-
|
|
3389
|
-
let { currentTime: t, duration: n } =
|
|
3390
|
-
Qe(e,
|
|
3495
|
+
if (b.notifyDismissed(), !je.current) return;
|
|
3496
|
+
Ne.current = !0, C();
|
|
3497
|
+
let { currentTime: t, duration: n } = ze.current;
|
|
3498
|
+
Qe(e, je.current, t, n, l);
|
|
3391
3499
|
};
|
|
3392
3500
|
return window.addEventListener("beforeunload", t), () => {
|
|
3393
|
-
window.removeEventListener("beforeunload", t),
|
|
3501
|
+
window.removeEventListener("beforeunload", t), C();
|
|
3394
3502
|
};
|
|
3395
3503
|
}, [
|
|
3396
3504
|
e,
|
|
3397
3505
|
l,
|
|
3398
|
-
|
|
3399
|
-
|
|
3506
|
+
C,
|
|
3507
|
+
b
|
|
3400
3508
|
]);
|
|
3401
|
-
let
|
|
3509
|
+
let w = o((t) => {
|
|
3402
3510
|
let n = t;
|
|
3403
|
-
if (t.currentTime !== void 0 && (
|
|
3511
|
+
if (t.currentTime !== void 0 && (ze.current = {
|
|
3404
3512
|
currentTime: t.currentTime,
|
|
3405
3513
|
duration: t.duration
|
|
3406
|
-
}), t.eventType === "session_start" && !
|
|
3407
|
-
sessionId:
|
|
3408
|
-
videoId:
|
|
3409
|
-
videoTitle:
|
|
3410
|
-
videoUrl:
|
|
3514
|
+
}), t.eventType === "session_start" && !Me.current && (Me.current = !0, Ne.current = !1, je.current = typeof n.sessionId == "string" ? n.sessionId : "", Je(e, {
|
|
3515
|
+
sessionId: je.current,
|
|
3516
|
+
videoId: He,
|
|
3517
|
+
videoTitle: h,
|
|
3518
|
+
videoUrl: Ue.current,
|
|
3411
3519
|
contentDurationSec: t.duration
|
|
3412
|
-
}, l).catch((e) => console.warn("[SDK] Session start failed:", e.message)),
|
|
3413
|
-
|
|
3414
|
-
let { currentTime: t, duration: n } =
|
|
3415
|
-
Xe(e,
|
|
3520
|
+
}, l).catch((e) => console.warn("[SDK] Session start failed:", e.message)), Ae.current || et()), t.eventType === "play" && Me.current && !Ae.current && !Fe.current && et(), t.eventType === "pause" && S(), t.eventType === "buffering_start" && S(), t.eventType === "buffering_end" && Me.current && !Ae.current && (Fe.current = !1, et()), t.eventType === "ended" && (C(), je.current)) {
|
|
3521
|
+
Ne.current = !0;
|
|
3522
|
+
let { currentTime: t, duration: n } = ze.current;
|
|
3523
|
+
Xe(e, je.current, t, n, l).catch((e) => console.warn("[SDK] Session end failed:", e.message));
|
|
3416
3524
|
}
|
|
3417
|
-
if (
|
|
3418
|
-
let n = at(t,
|
|
3525
|
+
if (Me.current && je.current && !Ne.current) {
|
|
3526
|
+
let n = at(t, Pe.current);
|
|
3419
3527
|
n && Ze(e, {
|
|
3420
3528
|
eventType: n.eventType,
|
|
3421
|
-
sessionId:
|
|
3529
|
+
sessionId: je.current,
|
|
3422
3530
|
currentTime: t.currentTime ?? 0,
|
|
3423
|
-
videoId:
|
|
3424
|
-
videoTitle:
|
|
3531
|
+
videoId: He,
|
|
3532
|
+
videoTitle: h,
|
|
3425
3533
|
...n.extras
|
|
3426
3534
|
}, l).catch((e) => console.warn(`[SDK] Event ${n.eventType} failed:`, e.message));
|
|
3427
3535
|
}
|
|
3428
|
-
t.eventType === "quality_change" && t.rendition && (
|
|
3536
|
+
t.eventType === "quality_change" && t.rendition && (Pe.current = t.rendition), console.log("[SDK Analytics]", t), b.handleAnalyticsEvent(t), de?.(t);
|
|
3429
3537
|
}, [
|
|
3430
3538
|
e,
|
|
3431
3539
|
l,
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
S,
|
|
3540
|
+
He,
|
|
3541
|
+
h,
|
|
3435
3542
|
et,
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3543
|
+
S,
|
|
3544
|
+
C,
|
|
3545
|
+
de,
|
|
3546
|
+
b
|
|
3547
|
+
]), st = o((e) => {
|
|
3548
|
+
Ae.current = e, e ? (S(), console.log("[SDK] Ad break started — heartbeat timer paused")) : (Me.current && et(), console.log("[SDK] Ad break ended — heartbeat timer resumed"));
|
|
3549
|
+
}, [S, et]), ct = o((e) => {
|
|
3550
|
+
b.setKeyMoments(e), ge(e), fe?.(e);
|
|
3551
|
+
}, [fe, b]), lt = o((e) => {
|
|
3552
|
+
b.handleTimeUpdate(e), me?.(e);
|
|
3553
|
+
}, [me, b]);
|
|
3554
|
+
if (xe === "loading") return /* @__PURE__ */ m("div", {
|
|
3447
3555
|
style: {
|
|
3448
3556
|
width: "100%",
|
|
3449
3557
|
aspectRatio: "16 / 9",
|
|
@@ -3453,20 +3561,20 @@ function ot({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i =
|
|
|
3453
3561
|
alignItems: "center",
|
|
3454
3562
|
justifyContent: "center"
|
|
3455
3563
|
},
|
|
3456
|
-
children: [/* @__PURE__ */
|
|
3564
|
+
children: [/* @__PURE__ */ p("style", { children: "@keyframes boss-sdk-spin{to{transform:rotate(360deg)}}" }), /* @__PURE__ */ p("div", { style: {
|
|
3457
3565
|
width: 60,
|
|
3458
3566
|
height: 60,
|
|
3459
3567
|
borderRadius: "50%",
|
|
3460
|
-
border: `4px solid rgba(${
|
|
3568
|
+
border: `4px solid rgba(${Ke}, 0.1)`,
|
|
3461
3569
|
borderLeftColor: i,
|
|
3462
|
-
borderRightColor: `rgba(${
|
|
3463
|
-
filter: `drop-shadow(0 0 10px rgba(${
|
|
3570
|
+
borderRightColor: `rgba(${Ke}, 0.2)`,
|
|
3571
|
+
filter: `drop-shadow(0 0 10px rgba(${Ke}, 0.5))`,
|
|
3464
3572
|
animation: "boss-sdk-spin 1s linear infinite"
|
|
3465
3573
|
} })]
|
|
3466
3574
|
});
|
|
3467
|
-
if (
|
|
3468
|
-
let e =
|
|
3469
|
-
return /* @__PURE__ */
|
|
3575
|
+
if (xe === "error") {
|
|
3576
|
+
let e = De === "auth";
|
|
3577
|
+
return /* @__PURE__ */ p("div", {
|
|
3470
3578
|
style: {
|
|
3471
3579
|
width: "100%",
|
|
3472
3580
|
aspectRatio: "16 / 9",
|
|
@@ -3478,51 +3586,51 @@ function ot({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i =
|
|
|
3478
3586
|
flexDirection: "column",
|
|
3479
3587
|
gap: 20
|
|
3480
3588
|
},
|
|
3481
|
-
children: /* @__PURE__ */
|
|
3589
|
+
children: /* @__PURE__ */ p(ne, {
|
|
3482
3590
|
title: e ? "Invalid Player Key" : "Something Went Wrong",
|
|
3483
3591
|
subtitle: e ? "Your player key is invalid or expired.\nPlease check your configuration." : "We encountered an error while connecting.\nPlease try again.",
|
|
3484
|
-
onRetry: () =>
|
|
3592
|
+
onRetry: () => Ee((e) => e + 1)
|
|
3485
3593
|
})
|
|
3486
3594
|
});
|
|
3487
3595
|
}
|
|
3488
|
-
return /* @__PURE__ */
|
|
3489
|
-
src:
|
|
3490
|
-
sources:
|
|
3491
|
-
activeSourceIndex:
|
|
3492
|
-
onSourceChange: (e) =>
|
|
3596
|
+
return /* @__PURE__ */ p(Ge, {
|
|
3597
|
+
src: be,
|
|
3598
|
+
sources: ye,
|
|
3599
|
+
activeSourceIndex: _e,
|
|
3600
|
+
onSourceChange: (e) => ve(e),
|
|
3493
3601
|
subtitles: n,
|
|
3494
|
-
keyMoments:
|
|
3602
|
+
keyMoments: he,
|
|
3495
3603
|
themeColor: i,
|
|
3496
3604
|
firebaseConfig: a,
|
|
3497
|
-
resolvedEntitlement:
|
|
3605
|
+
resolvedEntitlement: Ce,
|
|
3498
3606
|
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:
|
|
3607
|
+
title: h,
|
|
3608
|
+
watermark: g,
|
|
3609
|
+
autoplay: _,
|
|
3610
|
+
muted: re,
|
|
3611
|
+
autoFullscreen: ie,
|
|
3612
|
+
enableControls: ae,
|
|
3613
|
+
enableSkipAd: oe,
|
|
3614
|
+
skipAdAfterSeconds: se,
|
|
3615
|
+
chaptersDisplayMode: ce,
|
|
3616
|
+
volumeControlType: v,
|
|
3617
|
+
subtitleStyle: le,
|
|
3618
|
+
drmConfig: ue,
|
|
3619
|
+
overlayAdUrl: ee,
|
|
3620
|
+
adTrackingUrl: f,
|
|
3621
|
+
videoId: He,
|
|
3622
|
+
urlTransformer: We,
|
|
3623
|
+
onAnalyticsEvent: w,
|
|
3624
|
+
onAdBreakChange: st,
|
|
3625
|
+
onKeyMomentsLoaded: ct,
|
|
3626
|
+
initialTime: pe,
|
|
3627
|
+
onTimeUpdate: lt
|
|
3520
3628
|
});
|
|
3521
3629
|
}
|
|
3522
3630
|
//#endregion
|
|
3523
3631
|
//#region src/create-player.ts
|
|
3524
|
-
function
|
|
3525
|
-
let n =
|
|
3632
|
+
function w(e, t) {
|
|
3633
|
+
let n = te(e), r = t;
|
|
3526
3634
|
return n.render(i(ot, r)), {
|
|
3527
3635
|
update(e) {
|
|
3528
3636
|
r = {
|
|
@@ -3536,6 +3644,6 @@ function S(e, t) {
|
|
|
3536
3644
|
};
|
|
3537
3645
|
}
|
|
3538
3646
|
//#endregion
|
|
3539
|
-
export { ot as BossVideoPlayer, e as FirebaseAnalyticsProvider, t as VideoPlayerSDK,
|
|
3647
|
+
export { ot as BossVideoPlayer, e as FirebaseAnalyticsProvider, t as VideoPlayerSDK, Ge as WebVideoPlayer, w as createPlayer, Xe as endSession, qe as initSdk, Ze as sendEvent, Ye as sendHeartbeat, Je as startSession };
|
|
3540
3648
|
|
|
3541
3649
|
//# sourceMappingURL=index.js.map
|