@glitchlab/react-video-player 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -1
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +126 -2
- package/dist/index.mjs +1006 -656
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
function
|
|
6
|
-
var
|
|
7
|
-
if (typeof e == "string" || typeof e == "number")
|
|
2
|
+
import { jsxs as b, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import ct, { useState as v, useRef as $, useCallback as H, useEffect as T, useImperativeHandle as ut, useMemo as ce } from "react";
|
|
4
|
+
import Q from "hls.js";
|
|
5
|
+
function Be(e) {
|
|
6
|
+
var s, t, n = "";
|
|
7
|
+
if (typeof e == "string" || typeof e == "number") n += e;
|
|
8
8
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
9
|
-
var
|
|
10
|
-
for (
|
|
11
|
-
} else for (
|
|
12
|
-
return
|
|
9
|
+
var o = e.length;
|
|
10
|
+
for (s = 0; s < o; s++) e[s] && (t = Be(e[s])) && (n && (n += " "), n += t);
|
|
11
|
+
} else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
12
|
+
return n;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
for (var e,
|
|
16
|
-
return
|
|
14
|
+
function D() {
|
|
15
|
+
for (var e, s, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (s = Be(e)) && (n && (n += " "), n += s);
|
|
16
|
+
return n;
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const Se = "gvp-icon", S = (e) => e ? `${Se} ${e}` : Se, dt = ({ className: e }) => /* @__PURE__ */ b(
|
|
19
19
|
"svg",
|
|
20
20
|
{
|
|
21
|
-
className:
|
|
21
|
+
className: S(e),
|
|
22
22
|
width: "20",
|
|
23
23
|
height: "20",
|
|
24
24
|
viewBox: "0 0 24 24",
|
|
@@ -26,7 +26,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
26
26
|
xmlns: "http://www.w3.org/2000/svg",
|
|
27
27
|
"aria-hidden": "true",
|
|
28
28
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ r(
|
|
30
30
|
"path",
|
|
31
31
|
{
|
|
32
32
|
d: "M14 2H10C6.72077 2 5.08116 2 3.91891 2.81382C3.48891 3.1149 3.1149 3.48891 2.81382 3.91891C2 5.08116 2 6.72077 2 10C2 13.2792 2 14.9188 2.81382 16.0811C3.1149 16.5111 3.48891 16.8851 3.91891 17.1862C5.08116 18 6.72077 18 10 18H14C17.2792 18 18.9188 18 20.0811 17.1862C20.5111 16.8851 20.8851 16.5111 21.1862 16.0811C22 14.9188 22 13.2792 22 10C22 6.72077 22 5.08116 21.1862 3.91891C20.8851 3.48891 20.5111 3.1149 20.0811 2.81382C18.9188 2 17.2792 2 14 2Z",
|
|
@@ -35,7 +35,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
35
35
|
strokeLinecap: "round"
|
|
36
36
|
}
|
|
37
37
|
),
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ r(
|
|
39
39
|
"path",
|
|
40
40
|
{
|
|
41
41
|
d: "M11 15H13",
|
|
@@ -45,7 +45,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
45
45
|
strokeLinejoin: "round"
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ r(
|
|
49
49
|
"path",
|
|
50
50
|
{
|
|
51
51
|
d: "M14.5 22L14.1845 21.5811C13.4733 20.6369 13.2969 19.1944 13.7468 18M9.5 22L9.8155 21.5811C10.5267 20.6369 10.7031 19.1944 10.2532 18",
|
|
@@ -54,13 +54,13 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
54
54
|
strokeLinecap: "round"
|
|
55
55
|
}
|
|
56
56
|
),
|
|
57
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ r("path", { d: "M7 22H17", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
58
58
|
]
|
|
59
59
|
}
|
|
60
|
-
),
|
|
60
|
+
), ht = ({ className: e }) => /* @__PURE__ */ b(
|
|
61
61
|
"svg",
|
|
62
62
|
{
|
|
63
|
-
className:
|
|
63
|
+
className: S(e),
|
|
64
64
|
width: "20",
|
|
65
65
|
height: "20",
|
|
66
66
|
viewBox: "0 0 24 24",
|
|
@@ -68,7 +68,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
68
68
|
xmlns: "http://www.w3.org/2000/svg",
|
|
69
69
|
"aria-hidden": "true",
|
|
70
70
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ r(
|
|
72
72
|
"path",
|
|
73
73
|
{
|
|
74
74
|
d: "M5 9C5 5.70017 5 4.05025 6.02513 3.02513C7.05025 2 8.70017 2 12 2C15.2998 2 16.9497 2 17.9749 3.02513C19 4.05025 19 5.70017 19 9V15C19 18.2998 19 19.9497 17.9749 20.9749C16.9497 22 15.2998 22 12 22C8.70017 22 7.05025 22 6.02513 20.9749C5 19.9497 5 18.2998 5 15V9Z",
|
|
@@ -77,7 +77,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
77
77
|
strokeLinecap: "round"
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ r(
|
|
81
81
|
"path",
|
|
82
82
|
{
|
|
83
83
|
d: "M11 19H13",
|
|
@@ -87,7 +87,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
87
87
|
strokeLinejoin: "round"
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ r(
|
|
91
91
|
"path",
|
|
92
92
|
{
|
|
93
93
|
d: "M9 2L9.089 2.53402C9.28188 3.69129 9.37832 4.26993 9.77519 4.62204C10.1892 4.98934 10.7761 5 12 5C13.2239 5 13.8108 4.98934 14.2248 4.62204C14.6217 4.26993 14.7181 3.69129 14.911 2.53402L15 2",
|
|
@@ -98,17 +98,17 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
98
98
|
)
|
|
99
99
|
]
|
|
100
100
|
}
|
|
101
|
-
),
|
|
101
|
+
), mt = ({ className: e }) => /* @__PURE__ */ r(
|
|
102
102
|
"svg",
|
|
103
103
|
{
|
|
104
|
-
className:
|
|
104
|
+
className: S(e),
|
|
105
105
|
width: "14",
|
|
106
106
|
height: "14",
|
|
107
107
|
viewBox: "0 0 14 14",
|
|
108
108
|
fill: "none",
|
|
109
109
|
xmlns: "http://www.w3.org/2000/svg",
|
|
110
110
|
"aria-hidden": "true",
|
|
111
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ r(
|
|
112
112
|
"path",
|
|
113
113
|
{
|
|
114
114
|
d: "M6.94994 5.53594L12.1929 0.292938C12.5834 -0.0975275 13.2165 -0.0975279 13.6069 0.292938C13.9974 0.683403 13.9974 1.31647 13.6069 1.70694L8.36394 6.94994L13.6069 12.1929C13.9974 12.5834 13.9974 13.2165 13.6069 13.6069C13.2165 13.9974 12.5834 13.9974 12.1929 13.6069L6.94994 8.36394L1.70694 13.6069C1.31647 13.9974 0.683403 13.9974 0.292938 13.6069C-0.0975279 13.2165 -0.0975277 12.5834 0.292938 12.1929L5.53594 6.94994L0.292938 1.70694C-0.0975279 1.31647 -0.0975279 0.683403 0.292938 0.292938C0.683403 -0.0975279 1.31647 -0.0975277 1.70694 0.292938L6.94994 5.53594Z",
|
|
@@ -116,17 +116,17 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
116
116
|
}
|
|
117
117
|
)
|
|
118
118
|
}
|
|
119
|
-
),
|
|
119
|
+
), pt = ({ className: e }) => /* @__PURE__ */ r(
|
|
120
120
|
"svg",
|
|
121
121
|
{
|
|
122
|
-
className:
|
|
122
|
+
className: S(e),
|
|
123
123
|
width: "22",
|
|
124
124
|
height: "22",
|
|
125
125
|
viewBox: "0 0 16 16",
|
|
126
126
|
fill: "none",
|
|
127
127
|
xmlns: "http://www.w3.org/2000/svg",
|
|
128
128
|
"aria-hidden": "true",
|
|
129
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ r(
|
|
130
130
|
"path",
|
|
131
131
|
{
|
|
132
132
|
d: "M5.3335 11.45V4.54997C5.3335 4.36108 5.40016 4.20275 5.5335 4.07497C5.66683 3.94719 5.82238 3.8833 6.00016 3.8833C6.05572 3.8833 6.11405 3.89163 6.17516 3.9083C6.23627 3.92497 6.29461 3.94997 6.35016 3.9833L11.7835 7.4333C11.8835 7.49997 11.9585 7.5833 12.0085 7.6833C12.0585 7.7833 12.0835 7.88886 12.0835 7.99997C12.0835 8.11108 12.0585 8.21663 12.0085 8.31663C11.9585 8.41663 11.8835 8.49997 11.7835 8.56663L6.35016 12.0166C6.29461 12.05 6.23627 12.075 6.17516 12.0916C6.11405 12.1083 6.05572 12.1166 6.00016 12.1166C5.82238 12.1166 5.66683 12.0527 5.5335 11.925C5.40016 11.7972 5.3335 11.6389 5.3335 11.45Z",
|
|
@@ -134,10 +134,10 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
134
134
|
}
|
|
135
135
|
)
|
|
136
136
|
}
|
|
137
|
-
),
|
|
137
|
+
), ft = ({ className: e }) => /* @__PURE__ */ b(
|
|
138
138
|
"svg",
|
|
139
139
|
{
|
|
140
|
-
className:
|
|
140
|
+
className: S(e),
|
|
141
141
|
width: "16",
|
|
142
142
|
height: "16",
|
|
143
143
|
viewBox: "0 0 24 24",
|
|
@@ -145,7 +145,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
145
145
|
xmlns: "http://www.w3.org/2000/svg",
|
|
146
146
|
"aria-hidden": "true",
|
|
147
147
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ r(
|
|
149
149
|
"path",
|
|
150
150
|
{
|
|
151
151
|
d: "M3 14V10C3 9.44772 3.44772 9 4 9H6.58579C6.851 9 7.10536 8.89464 7.29289 8.70711L11.2929 4.70711C11.9229 4.07714 13 4.52331 13 5.41421V18.5858C13 19.4767 11.9229 19.9229 11.2929 19.2929L7.29289 15.2929C7.10536 15.1054 6.851 15 6.58579 15H4C3.44772 15 3 14.5523 3 14Z",
|
|
@@ -154,7 +154,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
154
154
|
strokeLinejoin: "round"
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ r(
|
|
158
158
|
"path",
|
|
159
159
|
{
|
|
160
160
|
d: "M16.5 8C17.5 9 18 10.5 18 12C18 13.5 17.5 15 16.5 16M19 5.5C20.5 7 21.5 9.5 21.5 12C21.5 14.5 20.5 17 19 18.5",
|
|
@@ -165,17 +165,17 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
165
165
|
)
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
|
-
),
|
|
168
|
+
), gt = ({ className: e }) => /* @__PURE__ */ r(
|
|
169
169
|
"svg",
|
|
170
170
|
{
|
|
171
|
-
className:
|
|
171
|
+
className: S(e),
|
|
172
172
|
width: "16",
|
|
173
173
|
height: "16",
|
|
174
174
|
viewBox: "0 0 24 24",
|
|
175
175
|
fill: "none",
|
|
176
176
|
xmlns: "http://www.w3.org/2000/svg",
|
|
177
177
|
"aria-hidden": "true",
|
|
178
|
-
children: /* @__PURE__ */
|
|
178
|
+
children: /* @__PURE__ */ r(
|
|
179
179
|
"path",
|
|
180
180
|
{
|
|
181
181
|
d: "M7 5.5V18.5C7 19.2659 7.84856 19.7261 8.4899 19.3071L19.0801 12.4014C19.6644 12.0204 19.6644 11.9796 19.0801 11.5986L8.4899 4.69288C7.84856 4.27388 7 4.73408 7 5.5Z",
|
|
@@ -183,10 +183,10 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
183
183
|
}
|
|
184
184
|
)
|
|
185
185
|
}
|
|
186
|
-
),
|
|
186
|
+
), vt = ({ className: e }) => /* @__PURE__ */ b(
|
|
187
187
|
"svg",
|
|
188
188
|
{
|
|
189
|
-
className:
|
|
189
|
+
className: S(e),
|
|
190
190
|
width: "16",
|
|
191
191
|
height: "16",
|
|
192
192
|
viewBox: "0 0 24 24",
|
|
@@ -194,14 +194,14 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
194
194
|
xmlns: "http://www.w3.org/2000/svg",
|
|
195
195
|
"aria-hidden": "true",
|
|
196
196
|
children: [
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ r("rect", { x: "6", y: "5", width: "4", height: "14", rx: "1", fill: "currentColor" }),
|
|
198
|
+
/* @__PURE__ */ r("rect", { x: "14", y: "5", width: "4", height: "14", rx: "1", fill: "currentColor" })
|
|
199
199
|
]
|
|
200
200
|
}
|
|
201
|
-
),
|
|
201
|
+
), bt = ({ className: e }) => /* @__PURE__ */ b(
|
|
202
202
|
"svg",
|
|
203
203
|
{
|
|
204
|
-
className:
|
|
204
|
+
className: S(e),
|
|
205
205
|
width: "18",
|
|
206
206
|
height: "18",
|
|
207
207
|
viewBox: "0 0 24 24",
|
|
@@ -209,7 +209,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
209
209
|
xmlns: "http://www.w3.org/2000/svg",
|
|
210
210
|
"aria-hidden": "true",
|
|
211
211
|
children: [
|
|
212
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ r(
|
|
213
213
|
"path",
|
|
214
214
|
{
|
|
215
215
|
d: "M3 14V10C3 9.44772 3.44772 9 4 9H6.58579C6.851 9 7.10536 8.89464 7.29289 8.70711L11.2929 4.70711C11.9229 4.07714 13 4.52331 13 5.41421V18.5858C13 19.4767 11.9229 19.9229 11.2929 19.2929L7.29289 15.2929C7.10536 15.1054 6.851 15 6.58579 15H4C3.44772 15 3 14.5523 3 14Z",
|
|
@@ -218,7 +218,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
218
218
|
strokeLinejoin: "round"
|
|
219
219
|
}
|
|
220
220
|
),
|
|
221
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ r(
|
|
222
222
|
"path",
|
|
223
223
|
{
|
|
224
224
|
d: "M16.5 8C17.5 9 18 10.5 18 12C18 13.5 17.5 15 16.5 16M19 5.5C20.5 7 21.5 9.5 21.5 12C21.5 14.5 20.5 17 19 18.5",
|
|
@@ -229,10 +229,10 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
229
229
|
)
|
|
230
230
|
]
|
|
231
231
|
}
|
|
232
|
-
),
|
|
232
|
+
), kt = ({ className: e }) => /* @__PURE__ */ b(
|
|
233
233
|
"svg",
|
|
234
234
|
{
|
|
235
|
-
className:
|
|
235
|
+
className: S(e),
|
|
236
236
|
width: "18",
|
|
237
237
|
height: "18",
|
|
238
238
|
viewBox: "0 0 24 24",
|
|
@@ -240,7 +240,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
240
240
|
xmlns: "http://www.w3.org/2000/svg",
|
|
241
241
|
"aria-hidden": "true",
|
|
242
242
|
children: [
|
|
243
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ r(
|
|
244
244
|
"path",
|
|
245
245
|
{
|
|
246
246
|
d: "M3 14V10C3 9.44772 3.44772 9 4 9H6.58579C6.851 9 7.10536 8.89464 7.29289 8.70711L11.2929 4.70711C11.9229 4.07714 13 4.52331 13 5.41421V18.5858C13 19.4767 11.9229 19.9229 11.2929 19.2929L7.29289 15.2929C7.10536 15.1054 6.851 15 6.58579 15H4C3.44772 15 3 14.5523 3 14Z",
|
|
@@ -249,7 +249,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
249
249
|
strokeLinejoin: "round"
|
|
250
250
|
}
|
|
251
251
|
),
|
|
252
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ r(
|
|
253
253
|
"path",
|
|
254
254
|
{
|
|
255
255
|
d: "M16.5 8C17.5 9 18 10.5 18 12C18 13.5 17.5 15 16.5 16",
|
|
@@ -260,10 +260,10 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
260
260
|
)
|
|
261
261
|
]
|
|
262
262
|
}
|
|
263
|
-
),
|
|
263
|
+
), wt = ({ className: e }) => /* @__PURE__ */ b(
|
|
264
264
|
"svg",
|
|
265
265
|
{
|
|
266
|
-
className:
|
|
266
|
+
className: S(e),
|
|
267
267
|
width: "18",
|
|
268
268
|
height: "18",
|
|
269
269
|
viewBox: "0 0 24 24",
|
|
@@ -271,7 +271,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
271
271
|
xmlns: "http://www.w3.org/2000/svg",
|
|
272
272
|
"aria-hidden": "true",
|
|
273
273
|
children: [
|
|
274
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ r(
|
|
275
275
|
"path",
|
|
276
276
|
{
|
|
277
277
|
d: "M3 14V10C3 9.44772 3.44772 9 4 9H6.58579C6.851 9 7.10536 8.89464 7.29289 8.70711L11.2929 4.70711C11.9229 4.07714 13 4.52331 13 5.41421V18.5858C13 19.4767 11.9229 19.9229 11.2929 19.2929L7.29289 15.2929C7.10536 15.1054 6.851 15 6.58579 15H4C3.44772 15 3 14.5523 3 14Z",
|
|
@@ -280,7 +280,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
280
280
|
strokeLinejoin: "round"
|
|
281
281
|
}
|
|
282
282
|
),
|
|
283
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ r(
|
|
284
284
|
"path",
|
|
285
285
|
{
|
|
286
286
|
d: "M16 9L22 15M22 9L16 15",
|
|
@@ -291,17 +291,17 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
291
291
|
)
|
|
292
292
|
]
|
|
293
293
|
}
|
|
294
|
-
),
|
|
294
|
+
), Ct = ({ className: e }) => /* @__PURE__ */ r(
|
|
295
295
|
"svg",
|
|
296
296
|
{
|
|
297
|
-
className:
|
|
297
|
+
className: S(e),
|
|
298
298
|
width: "18",
|
|
299
299
|
height: "18",
|
|
300
300
|
viewBox: "0 0 24 24",
|
|
301
301
|
fill: "none",
|
|
302
302
|
xmlns: "http://www.w3.org/2000/svg",
|
|
303
303
|
"aria-hidden": "true",
|
|
304
|
-
children: /* @__PURE__ */
|
|
304
|
+
children: /* @__PURE__ */ r(
|
|
305
305
|
"path",
|
|
306
306
|
{
|
|
307
307
|
d: "M4 9V4H9M15 4H20V9M20 15V20H15M9 20H4V15",
|
|
@@ -312,17 +312,17 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
312
312
|
}
|
|
313
313
|
)
|
|
314
314
|
}
|
|
315
|
-
),
|
|
315
|
+
), Lt = ({ className: e }) => /* @__PURE__ */ r(
|
|
316
316
|
"svg",
|
|
317
317
|
{
|
|
318
|
-
className:
|
|
318
|
+
className: S(e),
|
|
319
319
|
width: "18",
|
|
320
320
|
height: "18",
|
|
321
321
|
viewBox: "0 0 24 24",
|
|
322
322
|
fill: "none",
|
|
323
323
|
xmlns: "http://www.w3.org/2000/svg",
|
|
324
324
|
"aria-hidden": "true",
|
|
325
|
-
children: /* @__PURE__ */
|
|
325
|
+
children: /* @__PURE__ */ r(
|
|
326
326
|
"path",
|
|
327
327
|
{
|
|
328
328
|
d: "M9 4V9H4M15 9V4H20M15 20V15H20M9 15H4V20",
|
|
@@ -333,10 +333,10 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
333
333
|
}
|
|
334
334
|
)
|
|
335
335
|
}
|
|
336
|
-
),
|
|
336
|
+
), Et = ({ className: e }) => /* @__PURE__ */ b(
|
|
337
337
|
"svg",
|
|
338
338
|
{
|
|
339
|
-
className:
|
|
339
|
+
className: S(e),
|
|
340
340
|
width: "18",
|
|
341
341
|
height: "18",
|
|
342
342
|
viewBox: "0 0 24 24",
|
|
@@ -344,14 +344,14 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
344
344
|
xmlns: "http://www.w3.org/2000/svg",
|
|
345
345
|
"aria-hidden": "true",
|
|
346
346
|
children: [
|
|
347
|
-
/* @__PURE__ */
|
|
348
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ r("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
348
|
+
/* @__PURE__ */ r("rect", { x: "12", y: "12", width: "8", height: "5", rx: "1", fill: "currentColor" })
|
|
349
349
|
]
|
|
350
350
|
}
|
|
351
|
-
),
|
|
351
|
+
), xt = ({ className: e }) => /* @__PURE__ */ b(
|
|
352
352
|
"svg",
|
|
353
353
|
{
|
|
354
|
-
className:
|
|
354
|
+
className: S(e),
|
|
355
355
|
width: "18",
|
|
356
356
|
height: "18",
|
|
357
357
|
viewBox: "0 0 24 24",
|
|
@@ -359,14 +359,14 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
359
359
|
xmlns: "http://www.w3.org/2000/svg",
|
|
360
360
|
"aria-hidden": "true",
|
|
361
361
|
children: [
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ r("rect", { x: "2", y: "5", width: "20", height: "14", rx: "3", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
363
|
+
/* @__PURE__ */ r("path", { d: "M7 12H11M13 12H17M7 15H9M11 15H13M15 15H17", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
364
364
|
]
|
|
365
365
|
}
|
|
366
|
-
),
|
|
366
|
+
), Nt = ({ className: e }) => /* @__PURE__ */ b(
|
|
367
367
|
"svg",
|
|
368
368
|
{
|
|
369
|
-
className:
|
|
369
|
+
className: S(e),
|
|
370
370
|
width: "16",
|
|
371
371
|
height: "16",
|
|
372
372
|
viewBox: "0 0 24 24",
|
|
@@ -374,7 +374,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
374
374
|
xmlns: "http://www.w3.org/2000/svg",
|
|
375
375
|
"aria-hidden": "true",
|
|
376
376
|
children: [
|
|
377
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ r(
|
|
378
378
|
"path",
|
|
379
379
|
{
|
|
380
380
|
d: "M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z",
|
|
@@ -382,7 +382,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
382
382
|
strokeWidth: "1.5"
|
|
383
383
|
}
|
|
384
384
|
),
|
|
385
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ r(
|
|
386
386
|
"path",
|
|
387
387
|
{
|
|
388
388
|
d: "M12 8V12L14.5 14.5",
|
|
@@ -394,10 +394,10 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
394
394
|
)
|
|
395
395
|
]
|
|
396
396
|
}
|
|
397
|
-
),
|
|
397
|
+
), yt = ({ className: e }) => /* @__PURE__ */ b(
|
|
398
398
|
"svg",
|
|
399
399
|
{
|
|
400
|
-
className:
|
|
400
|
+
className: S(e),
|
|
401
401
|
width: "16",
|
|
402
402
|
height: "16",
|
|
403
403
|
viewBox: "0 0 24 24",
|
|
@@ -405,7 +405,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
405
405
|
xmlns: "http://www.w3.org/2000/svg",
|
|
406
406
|
"aria-hidden": "true",
|
|
407
407
|
children: [
|
|
408
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ r(
|
|
409
409
|
"path",
|
|
410
410
|
{
|
|
411
411
|
d: "M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z",
|
|
@@ -413,7 +413,7 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
413
413
|
strokeWidth: "1.5"
|
|
414
414
|
}
|
|
415
415
|
),
|
|
416
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ r(
|
|
417
417
|
"path",
|
|
418
418
|
{
|
|
419
419
|
d: "M3 12C3 12.6 3.08 13.18 3.23 13.73L4.6 14.5C4.86 14.65 5.02 14.94 5 15.24C4.98 15.58 4.96 15.92 5.07 16.24C5.18 16.56 5.39 16.83 5.62 17.08C5.83 17.3 6.13 17.4 6.42 17.36L7.99 17.13C8.28 17.09 8.57 17.21 8.74 17.45C9.07 17.93 9.49 18.34 9.97 18.66C10.21 18.83 10.34 19.11 10.31 19.4L10.13 20.97C10.1 21.26 10.21 21.55 10.43 21.74C10.91 22.16 11.45 22 12 22C12.55 22 13.09 22.16 13.57 21.74C13.79 21.55 13.9 21.26 13.87 20.97L13.69 19.4C13.66 19.11 13.79 18.83 14.03 18.66",
|
|
@@ -424,17 +424,17 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
424
424
|
)
|
|
425
425
|
]
|
|
426
426
|
}
|
|
427
|
-
),
|
|
427
|
+
), Mt = ({ className: e }) => /* @__PURE__ */ r(
|
|
428
428
|
"svg",
|
|
429
429
|
{
|
|
430
|
-
className:
|
|
430
|
+
className: S(e),
|
|
431
431
|
width: "12",
|
|
432
432
|
height: "12",
|
|
433
433
|
viewBox: "0 0 24 24",
|
|
434
434
|
fill: "none",
|
|
435
435
|
xmlns: "http://www.w3.org/2000/svg",
|
|
436
436
|
"aria-hidden": "true",
|
|
437
|
-
children: /* @__PURE__ */
|
|
437
|
+
children: /* @__PURE__ */ r(
|
|
438
438
|
"path",
|
|
439
439
|
{
|
|
440
440
|
d: "M6 9L12 15L18 9",
|
|
@@ -445,27 +445,157 @@ const ne = "gvp-icon", x = (e) => e ? `${ne} ${e}` : ne, ye = ({ className: e })
|
|
|
445
445
|
}
|
|
446
446
|
)
|
|
447
447
|
}
|
|
448
|
+
), Tt = ({ className: e }) => /* @__PURE__ */ b(
|
|
449
|
+
"svg",
|
|
450
|
+
{
|
|
451
|
+
className: S(e),
|
|
452
|
+
width: "16",
|
|
453
|
+
height: "16",
|
|
454
|
+
viewBox: "0 0 24 24",
|
|
455
|
+
fill: "none",
|
|
456
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
457
|
+
"aria-hidden": "true",
|
|
458
|
+
children: [
|
|
459
|
+
/* @__PURE__ */ r(
|
|
460
|
+
"path",
|
|
461
|
+
{
|
|
462
|
+
d: "M16.5 18.5V5.5C16.5 4.73408 15.6514 4.27388 15.0101 4.69288L6.91993 9.98432C6.33563 10.3653 6.33563 11.0347 6.91993 11.4157L15.0101 16.7071C15.6514 17.1261 16.5 16.6659 16.5 15.9V18.5Z",
|
|
463
|
+
fill: "currentColor"
|
|
464
|
+
}
|
|
465
|
+
),
|
|
466
|
+
/* @__PURE__ */ r("path", { d: "M6 5V19", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
467
|
+
]
|
|
468
|
+
}
|
|
469
|
+
), Pt = ({ className: e }) => /* @__PURE__ */ b(
|
|
470
|
+
"svg",
|
|
471
|
+
{
|
|
472
|
+
className: S(e),
|
|
473
|
+
width: "16",
|
|
474
|
+
height: "16",
|
|
475
|
+
viewBox: "0 0 24 24",
|
|
476
|
+
fill: "none",
|
|
477
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
478
|
+
"aria-hidden": "true",
|
|
479
|
+
children: [
|
|
480
|
+
/* @__PURE__ */ r(
|
|
481
|
+
"path",
|
|
482
|
+
{
|
|
483
|
+
d: "M7.5 5.5V18.5C7.5 19.2659 8.34856 19.7261 8.98990 19.3071L17.0801 14.0157C17.6644 13.6347 17.6644 12.9653 17.0801 12.5843L8.98990 7.29288C8.34856 6.87388 7.5 7.33408 7.5 8.1V5.5Z",
|
|
484
|
+
fill: "currentColor"
|
|
485
|
+
}
|
|
486
|
+
),
|
|
487
|
+
/* @__PURE__ */ r("path", { d: "M18 5V19", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
488
|
+
]
|
|
489
|
+
}
|
|
448
490
|
);
|
|
449
|
-
function
|
|
491
|
+
function ke(e) {
|
|
450
492
|
if (!Number.isFinite(e) || e < 0) return "--:--";
|
|
451
|
-
const
|
|
452
|
-
if (
|
|
453
|
-
const
|
|
454
|
-
return `${
|
|
493
|
+
const s = Math.floor(e), t = Math.floor(s / 3600), n = Math.floor(s % 3600 / 60), i = (s % 60).toString().padStart(2, "0");
|
|
494
|
+
if (t > 0) {
|
|
495
|
+
const a = n.toString().padStart(2, "0");
|
|
496
|
+
return `${t}:${a}:${i}`;
|
|
455
497
|
}
|
|
456
|
-
return `${
|
|
498
|
+
return `${n}:${i}`;
|
|
457
499
|
}
|
|
458
|
-
const
|
|
500
|
+
const It = {
|
|
459
501
|
index: -1
|
|
460
502
|
};
|
|
461
|
-
function
|
|
462
|
-
return e > 0 ? `${e}p` : `Level ${
|
|
503
|
+
function St(e, s) {
|
|
504
|
+
return e > 0 ? `${e}p` : `Level ${s + 1}`;
|
|
505
|
+
}
|
|
506
|
+
function Ve(e) {
|
|
507
|
+
const s = e.trim().split(":");
|
|
508
|
+
if (s.length < 2 || s.length > 3) return NaN;
|
|
509
|
+
const t = s.map(Number);
|
|
510
|
+
return t.some((n) => !Number.isFinite(n)) ? NaN : t.length === 3 ? t[0] * 3600 + t[1] * 60 + t[2] : t[0] * 60 + t[1];
|
|
511
|
+
}
|
|
512
|
+
function Vt(e, s) {
|
|
513
|
+
try {
|
|
514
|
+
return new URL(e, s).href;
|
|
515
|
+
} catch {
|
|
516
|
+
return e;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
function Ht(e, s) {
|
|
520
|
+
const t = [], n = e.replace(/\r/g, "").split(`
|
|
521
|
+
`);
|
|
522
|
+
for (let o = 0; o < n.length; o++) {
|
|
523
|
+
const i = n[o].indexOf("-->");
|
|
524
|
+
if (i === -1) continue;
|
|
525
|
+
const a = Ve(n[o].slice(0, i)), c = Ve(n[o].slice(i + 3));
|
|
526
|
+
if (!Number.isFinite(a) || !Number.isFinite(c)) continue;
|
|
527
|
+
const p = (n[o + 1] ?? "").trim();
|
|
528
|
+
if (!p) continue;
|
|
529
|
+
const u = p.indexOf("#xywh=");
|
|
530
|
+
let E = p, x = 0, l = 0, d = 0, C = 0;
|
|
531
|
+
if (u !== -1) {
|
|
532
|
+
E = p.slice(0, u);
|
|
533
|
+
const w = p.slice(u + 6).split(",").map(Number);
|
|
534
|
+
w.length === 4 && w.every(Number.isFinite) && ([x, l, d, C] = w);
|
|
535
|
+
}
|
|
536
|
+
t.push({ start: a, end: c, url: Vt(E, s), x, y: l, w: d, h: C });
|
|
537
|
+
}
|
|
538
|
+
return t.sort((o, i) => o.start - i.start), t;
|
|
539
|
+
}
|
|
540
|
+
function At(e) {
|
|
541
|
+
return {
|
|
542
|
+
cues: e,
|
|
543
|
+
cueAt(s) {
|
|
544
|
+
if (e.length === 0) return null;
|
|
545
|
+
let t = 0, n = e.length - 1, o = e[0];
|
|
546
|
+
for (; t <= n; ) {
|
|
547
|
+
const i = t + n >> 1, a = e[i];
|
|
548
|
+
if (s < a.start)
|
|
549
|
+
n = i - 1;
|
|
550
|
+
else if (s > a.end)
|
|
551
|
+
o = a, t = i + 1;
|
|
552
|
+
else
|
|
553
|
+
return a;
|
|
554
|
+
}
|
|
555
|
+
return o;
|
|
556
|
+
}
|
|
557
|
+
};
|
|
463
558
|
}
|
|
464
|
-
|
|
559
|
+
function He(e) {
|
|
560
|
+
const s = e.trim().split(":");
|
|
561
|
+
if (s.length < 2 || s.length > 3) return NaN;
|
|
562
|
+
const t = s.map(Number);
|
|
563
|
+
return t.some((n) => !Number.isFinite(n)) ? NaN : t.length === 3 ? t[0] * 3600 + t[1] * 60 + t[2] : t[0] * 60 + t[1];
|
|
564
|
+
}
|
|
565
|
+
function $t(e) {
|
|
566
|
+
const s = [], t = e.replace(/\r/g, "").split(`
|
|
567
|
+
`);
|
|
568
|
+
for (let n = 0; n < t.length; n++) {
|
|
569
|
+
const o = t[n].indexOf("-->");
|
|
570
|
+
if (o === -1) continue;
|
|
571
|
+
const i = He(t[n].slice(0, o)), a = He(t[n].slice(o + 3));
|
|
572
|
+
if (!Number.isFinite(i) || !Number.isFinite(a)) continue;
|
|
573
|
+
const c = (t[n + 1] ?? "").trim();
|
|
574
|
+
c && s.push({ start: i, end: a, title: c });
|
|
575
|
+
}
|
|
576
|
+
return s.sort((n, o) => n.start - o.start), s;
|
|
577
|
+
}
|
|
578
|
+
function Bt(e, s) {
|
|
579
|
+
const t = e.filter((n) => Number.isFinite(n.start) && n.start >= 0 && n.title).sort((n, o) => n.start - o.start);
|
|
580
|
+
return t.map((n, o) => {
|
|
581
|
+
var i;
|
|
582
|
+
return {
|
|
583
|
+
start: n.start,
|
|
584
|
+
end: Number.isFinite(n.end) ? n.end : ((i = t[o + 1]) == null ? void 0 : i.start) ?? s,
|
|
585
|
+
title: n.title
|
|
586
|
+
};
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
function Dt(e, s) {
|
|
590
|
+
for (const t of e)
|
|
591
|
+
if (s >= t.start && s < t.end) return t;
|
|
592
|
+
return null;
|
|
593
|
+
}
|
|
594
|
+
const Ae = (() => {
|
|
465
595
|
if (typeof navigator > "u") return !1;
|
|
466
596
|
const e = navigator.userAgent;
|
|
467
597
|
return /iPad|iPhone|iPod/.test(e) || e.includes("Mac") && navigator.maxTouchPoints > 1;
|
|
468
|
-
})(),
|
|
598
|
+
})(), be = typeof navigator > "u" ? !1 : /iPhone|iPod/.test(navigator.userAgent), Wt = 3e3, K = {
|
|
469
599
|
isSupported() {
|
|
470
600
|
return typeof document > "u" ? !1 : !!(document.fullscreenEnabled || document.webkitFullscreenEnabled);
|
|
471
601
|
},
|
|
@@ -473,8 +603,8 @@ const se = (() => {
|
|
|
473
603
|
return typeof document > "u" ? null : document.fullscreenElement ?? document.webkitFullscreenElement ?? null;
|
|
474
604
|
},
|
|
475
605
|
request(e) {
|
|
476
|
-
const
|
|
477
|
-
return
|
|
606
|
+
const s = e.requestFullscreen ?? e.webkitRequestFullscreen;
|
|
607
|
+
return s ? s.call(e) : Promise.reject(new Error("Fullscreen not supported"));
|
|
478
608
|
},
|
|
479
609
|
exit() {
|
|
480
610
|
const e = document.exitFullscreen ?? document.webkitExitFullscreen;
|
|
@@ -485,243 +615,378 @@ const se = (() => {
|
|
|
485
615
|
document.removeEventListener("fullscreenchange", e), document.removeEventListener("webkitfullscreenchange", e);
|
|
486
616
|
};
|
|
487
617
|
}
|
|
488
|
-
},
|
|
618
|
+
}, Rt = ({
|
|
489
619
|
video: e,
|
|
490
|
-
isPlaying:
|
|
491
|
-
container:
|
|
492
|
-
onTogglePlay:
|
|
493
|
-
qualityLevels:
|
|
494
|
-
currentLevel:
|
|
495
|
-
selectedLevel:
|
|
496
|
-
onSelectLevel:
|
|
620
|
+
isPlaying: s,
|
|
621
|
+
container: t,
|
|
622
|
+
onTogglePlay: n,
|
|
623
|
+
qualityLevels: o = [],
|
|
624
|
+
currentLevel: i = -1,
|
|
625
|
+
selectedLevel: a = -1,
|
|
626
|
+
onSelectLevel: c,
|
|
627
|
+
thumbnails: p,
|
|
628
|
+
chapters: u,
|
|
629
|
+
hasPrev: E = !1,
|
|
630
|
+
hasNext: x = !1,
|
|
631
|
+
onPrev: l,
|
|
632
|
+
onNext: d
|
|
497
633
|
}) => {
|
|
498
|
-
const [
|
|
499
|
-
|
|
500
|
-
}, []),
|
|
501
|
-
|
|
502
|
-
}, [
|
|
503
|
-
|
|
504
|
-
}, [
|
|
505
|
-
return
|
|
506
|
-
if (!
|
|
507
|
-
|
|
634
|
+
const [C, w] = v(!0), P = $(null), N = H(() => {
|
|
635
|
+
P.current !== null && (clearTimeout(P.current), P.current = null);
|
|
636
|
+
}, []), R = H(() => {
|
|
637
|
+
N(), s && (P.current = setTimeout(() => w(!1), Wt));
|
|
638
|
+
}, [N, s]), f = H(() => {
|
|
639
|
+
w(!0), R();
|
|
640
|
+
}, [R]);
|
|
641
|
+
return T(() => {
|
|
642
|
+
if (!s) {
|
|
643
|
+
N(), w(!0);
|
|
508
644
|
return;
|
|
509
645
|
}
|
|
510
|
-
return
|
|
511
|
-
}, [
|
|
512
|
-
if (!
|
|
513
|
-
const
|
|
514
|
-
return
|
|
515
|
-
|
|
646
|
+
return R(), N;
|
|
647
|
+
}, [s, R, N]), T(() => {
|
|
648
|
+
if (!t) return;
|
|
649
|
+
const g = () => f();
|
|
650
|
+
return t.addEventListener("mousemove", g), t.addEventListener("touchstart", g), t.addEventListener("focusin", g), () => {
|
|
651
|
+
t.removeEventListener("mousemove", g), t.removeEventListener("touchstart", g), t.removeEventListener("focusin", g);
|
|
516
652
|
};
|
|
517
|
-
}, [
|
|
518
|
-
if (!
|
|
519
|
-
const
|
|
520
|
-
if (!(!
|
|
521
|
-
switch (
|
|
653
|
+
}, [t, f]), T(() => {
|
|
654
|
+
if (!t || !e) return;
|
|
655
|
+
const g = (k) => {
|
|
656
|
+
if (!(!t.contains(document.activeElement) || k.target.tagName === "INPUT" && k.key !== " "))
|
|
657
|
+
switch (k.key) {
|
|
522
658
|
case " ":
|
|
523
659
|
case "k":
|
|
524
|
-
|
|
660
|
+
k.preventDefault(), n(), f();
|
|
525
661
|
break;
|
|
526
662
|
case "ArrowLeft":
|
|
527
|
-
|
|
663
|
+
k.preventDefault(), e.currentTime = Math.max(0, e.currentTime - 5), f();
|
|
528
664
|
break;
|
|
529
665
|
case "ArrowRight":
|
|
530
|
-
|
|
666
|
+
k.preventDefault(), e.currentTime = Math.min(e.duration || 0, e.currentTime + 5), f();
|
|
531
667
|
break;
|
|
532
668
|
case "ArrowUp":
|
|
533
|
-
|
|
669
|
+
k.preventDefault(), e.volume = Math.min(1, e.volume + 0.1), e.muted && (e.muted = !1), f();
|
|
534
670
|
break;
|
|
535
671
|
case "ArrowDown":
|
|
536
|
-
|
|
672
|
+
k.preventDefault(), e.volume = Math.max(0, e.volume - 0.1), f();
|
|
537
673
|
break;
|
|
538
674
|
case "m":
|
|
539
|
-
e.muted = !e.muted,
|
|
675
|
+
e.muted = !e.muted, f();
|
|
540
676
|
break;
|
|
541
677
|
case "f":
|
|
542
|
-
|
|
543
|
-
}) :
|
|
544
|
-
}),
|
|
678
|
+
K.element() === t ? K.exit().catch(() => {
|
|
679
|
+
}) : K.request(t).catch(() => {
|
|
680
|
+
}), f();
|
|
545
681
|
break;
|
|
546
682
|
case "p":
|
|
547
683
|
document.pictureInPictureElement ? document.exitPictureInPicture().catch(() => {
|
|
548
684
|
}) : document.pictureInPictureEnabled && e.requestPictureInPicture().catch(() => {
|
|
549
|
-
}),
|
|
685
|
+
}), f();
|
|
550
686
|
break;
|
|
551
687
|
}
|
|
552
688
|
};
|
|
553
|
-
return document.addEventListener("keydown",
|
|
554
|
-
}, [
|
|
689
|
+
return document.addEventListener("keydown", g), () => document.removeEventListener("keydown", g);
|
|
690
|
+
}, [t, e, n, f]), /* @__PURE__ */ r(
|
|
555
691
|
"div",
|
|
556
692
|
{
|
|
557
693
|
role: "toolbar",
|
|
558
694
|
"aria-label": "Video controls",
|
|
559
|
-
className:
|
|
560
|
-
onMouseEnter:
|
|
561
|
-
onMouseLeave:
|
|
562
|
-
children: /* @__PURE__ */
|
|
563
|
-
/* @__PURE__ */
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
695
|
+
className: D("gvp-controls", !C && "is-hidden"),
|
|
696
|
+
onMouseEnter: N,
|
|
697
|
+
onMouseLeave: R,
|
|
698
|
+
children: /* @__PURE__ */ b("div", { className: "gvp-controls-row", children: [
|
|
699
|
+
(E || x) && /* @__PURE__ */ r(
|
|
700
|
+
"button",
|
|
701
|
+
{
|
|
702
|
+
type: "button",
|
|
703
|
+
className: "gvp-ctrl-btn",
|
|
704
|
+
"aria-label": "Previous video",
|
|
705
|
+
disabled: !E,
|
|
706
|
+
onClick: l,
|
|
707
|
+
children: /* @__PURE__ */ r(Tt, {})
|
|
708
|
+
}
|
|
709
|
+
),
|
|
710
|
+
/* @__PURE__ */ r(Ft, { isPlaying: s, onToggle: n }),
|
|
711
|
+
(E || x) && /* @__PURE__ */ r(
|
|
712
|
+
"button",
|
|
713
|
+
{
|
|
714
|
+
type: "button",
|
|
715
|
+
className: "gvp-ctrl-btn",
|
|
716
|
+
"aria-label": "Next video",
|
|
717
|
+
disabled: !x,
|
|
718
|
+
onClick: d,
|
|
719
|
+
children: /* @__PURE__ */ r(Pt, {})
|
|
720
|
+
}
|
|
721
|
+
),
|
|
722
|
+
/* @__PURE__ */ r(
|
|
723
|
+
Ot,
|
|
569
724
|
{
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
onSelect: i
|
|
725
|
+
video: e,
|
|
726
|
+
thumbnails: p,
|
|
727
|
+
chapters: u
|
|
574
728
|
}
|
|
575
729
|
),
|
|
576
|
-
/* @__PURE__ */
|
|
577
|
-
/* @__PURE__ */
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
-
|
|
730
|
+
/* @__PURE__ */ r(Zt, { video: e }),
|
|
731
|
+
/* @__PURE__ */ r(zt, { video: e }),
|
|
732
|
+
/* @__PURE__ */ r(
|
|
733
|
+
Yt,
|
|
734
|
+
{
|
|
735
|
+
levels: o,
|
|
736
|
+
currentLevel: i,
|
|
737
|
+
selectedLevel: a,
|
|
738
|
+
onSelect: c
|
|
739
|
+
}
|
|
740
|
+
),
|
|
741
|
+
/* @__PURE__ */ r(Kt, { video: e }),
|
|
742
|
+
/* @__PURE__ */ r(qt, { video: e }),
|
|
743
|
+
/* @__PURE__ */ r(Jt, { video: e }),
|
|
744
|
+
/* @__PURE__ */ r(Xt, { container: t, video: e })
|
|
580
745
|
] })
|
|
581
746
|
}
|
|
582
747
|
);
|
|
583
748
|
};
|
|
584
|
-
function
|
|
585
|
-
|
|
749
|
+
function we(e, s, t) {
|
|
750
|
+
T(() => {
|
|
586
751
|
if (!e) return;
|
|
587
|
-
const
|
|
588
|
-
|
|
589
|
-
},
|
|
590
|
-
|
|
752
|
+
const n = (i) => {
|
|
753
|
+
s.current && !s.current.contains(i.target) && t();
|
|
754
|
+
}, o = (i) => {
|
|
755
|
+
i.key === "Escape" && t();
|
|
591
756
|
};
|
|
592
|
-
return document.addEventListener("mousedown",
|
|
593
|
-
document.removeEventListener("mousedown",
|
|
757
|
+
return document.addEventListener("mousedown", n), document.addEventListener("keydown", o), () => {
|
|
758
|
+
document.removeEventListener("mousedown", n), document.removeEventListener("keydown", o);
|
|
594
759
|
};
|
|
595
|
-
}, [e,
|
|
760
|
+
}, [e, s, t]);
|
|
596
761
|
}
|
|
597
|
-
const
|
|
762
|
+
const Ft = ({
|
|
598
763
|
isPlaying: e,
|
|
599
|
-
onToggle:
|
|
600
|
-
}) => /* @__PURE__ */
|
|
764
|
+
onToggle: s
|
|
765
|
+
}) => /* @__PURE__ */ r(
|
|
601
766
|
"button",
|
|
602
767
|
{
|
|
603
768
|
type: "button",
|
|
604
769
|
className: "gvp-ctrl-btn",
|
|
605
770
|
"aria-label": e ? "Pause" : "Play",
|
|
606
771
|
"aria-pressed": e,
|
|
607
|
-
onClick:
|
|
608
|
-
children: e ? /* @__PURE__ */
|
|
772
|
+
onClick: s,
|
|
773
|
+
children: e ? /* @__PURE__ */ r(vt, {}) : /* @__PURE__ */ r(gt, {})
|
|
609
774
|
}
|
|
610
|
-
)
|
|
611
|
-
|
|
612
|
-
|
|
775
|
+
);
|
|
776
|
+
function Ut(e) {
|
|
777
|
+
const [s, t] = v(null);
|
|
778
|
+
return T(() => {
|
|
779
|
+
if (!e) {
|
|
780
|
+
t(null);
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
let n = !1;
|
|
784
|
+
return fetch(e).then((o) => o.ok ? o.text() : Promise.reject(new Error("fetch failed"))).then((o) => {
|
|
785
|
+
if (n) return;
|
|
786
|
+
const i = Ht(o, new URL(e, location.href).href);
|
|
787
|
+
t(i.length > 0 ? At(i) : null);
|
|
788
|
+
}).catch(() => {
|
|
789
|
+
n || t(null);
|
|
790
|
+
}), () => {
|
|
791
|
+
n = !0;
|
|
792
|
+
};
|
|
793
|
+
}, [e]), s;
|
|
794
|
+
}
|
|
795
|
+
function jt(e, s) {
|
|
796
|
+
const [t, n] = v([]), o = typeof e == "string";
|
|
797
|
+
return T(() => {
|
|
798
|
+
if (!o || !e) {
|
|
799
|
+
n([]);
|
|
800
|
+
return;
|
|
801
|
+
}
|
|
802
|
+
let i = !1;
|
|
803
|
+
return fetch(e).then((a) => a.ok ? a.text() : Promise.reject(new Error("fetch failed"))).then((a) => {
|
|
804
|
+
i || n($t(a));
|
|
805
|
+
}).catch(() => {
|
|
806
|
+
i || n([]);
|
|
807
|
+
}), () => {
|
|
808
|
+
i = !0;
|
|
809
|
+
};
|
|
810
|
+
}, [o, e]), o ? t : Array.isArray(e) ? Bt(e, s) : [];
|
|
811
|
+
}
|
|
812
|
+
const Ot = ({ video: e, thumbnails: s, chapters: t }) => {
|
|
813
|
+
var f;
|
|
814
|
+
const [n, o] = v(0), [i, a] = v(0), [c, p] = v(0), [u, E] = v(null), x = $(null), l = Ut(s), d = jt(t, i);
|
|
815
|
+
T(() => {
|
|
613
816
|
if (!e) return;
|
|
614
|
-
const
|
|
615
|
-
const
|
|
616
|
-
if (!
|
|
617
|
-
|
|
817
|
+
const g = () => o(e.currentTime), k = () => a(Number.isFinite(e.duration) ? e.duration : 0), y = () => {
|
|
818
|
+
const V = e.buffered;
|
|
819
|
+
if (!V || V.length === 0) {
|
|
820
|
+
p(0);
|
|
618
821
|
return;
|
|
619
822
|
}
|
|
620
|
-
let
|
|
621
|
-
for (let
|
|
622
|
-
if (
|
|
623
|
-
|
|
823
|
+
let O = V.end(V.length - 1);
|
|
824
|
+
for (let U = 0; U < V.length; U++)
|
|
825
|
+
if (V.start(U) <= e.currentTime && e.currentTime <= V.end(U)) {
|
|
826
|
+
O = V.end(U);
|
|
624
827
|
break;
|
|
625
828
|
}
|
|
626
|
-
|
|
829
|
+
p(O);
|
|
627
830
|
};
|
|
628
|
-
return
|
|
629
|
-
e.removeEventListener("timeupdate",
|
|
831
|
+
return g(), k(), y(), e.addEventListener("timeupdate", g), e.addEventListener("durationchange", k), e.addEventListener("loadedmetadata", k), e.addEventListener("progress", y), e.addEventListener("timeupdate", y), () => {
|
|
832
|
+
e.removeEventListener("timeupdate", g), e.removeEventListener("durationchange", k), e.removeEventListener("loadedmetadata", k), e.removeEventListener("progress", y), e.removeEventListener("timeupdate", y);
|
|
630
833
|
};
|
|
631
834
|
}, [e]);
|
|
632
|
-
const
|
|
633
|
-
if (!e || !
|
|
634
|
-
const
|
|
635
|
-
e.currentTime =
|
|
835
|
+
const C = i > 0, w = C ? n / i * 100 : 0, P = C ? c / i * 100 : 0, N = (g) => {
|
|
836
|
+
if (!e || !C) return;
|
|
837
|
+
const k = Number(g.target.value) / 100 * i;
|
|
838
|
+
e.currentTime = k, o(k);
|
|
839
|
+
}, R = (g) => {
|
|
840
|
+
const k = x.current;
|
|
841
|
+
if (!k || !C) return;
|
|
842
|
+
const y = k.getBoundingClientRect(), V = Math.min(Math.max(g - y.left, 0), y.width);
|
|
843
|
+
E({ time: V / y.width * i, x: V });
|
|
636
844
|
};
|
|
637
|
-
return
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
style: { width: `${d}%` }
|
|
644
|
-
}
|
|
645
|
-
),
|
|
646
|
-
/* @__PURE__ */ t(
|
|
647
|
-
"div",
|
|
648
|
-
{
|
|
649
|
-
className: "gvp-seek-progress",
|
|
650
|
-
style: { width: `${p}%` }
|
|
651
|
-
}
|
|
652
|
-
)
|
|
653
|
-
] }),
|
|
654
|
-
/* @__PURE__ */ t(
|
|
655
|
-
"input",
|
|
845
|
+
return (
|
|
846
|
+
// Pointer handlers live on the wrapper, not `.gvp-seek-track`: the
|
|
847
|
+
// transparent range <input> is layered on top of the track and would
|
|
848
|
+
// otherwise swallow every pointer event before it reached the track.
|
|
849
|
+
/* @__PURE__ */ b(
|
|
850
|
+
"div",
|
|
656
851
|
{
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
852
|
+
className: "gvp-seek",
|
|
853
|
+
onPointerMove: (g) => R(g.clientX),
|
|
854
|
+
onPointerLeave: () => E(null),
|
|
855
|
+
children: [
|
|
856
|
+
/* @__PURE__ */ b("div", { className: "gvp-seek-track", ref: x, children: [
|
|
857
|
+
/* @__PURE__ */ r(
|
|
858
|
+
"div",
|
|
859
|
+
{
|
|
860
|
+
className: "gvp-seek-buffered",
|
|
861
|
+
style: { width: `${P}%` }
|
|
862
|
+
}
|
|
863
|
+
),
|
|
864
|
+
/* @__PURE__ */ r(
|
|
865
|
+
"div",
|
|
866
|
+
{
|
|
867
|
+
className: "gvp-seek-progress",
|
|
868
|
+
style: { width: `${w}%` }
|
|
869
|
+
}
|
|
870
|
+
),
|
|
871
|
+
C && d.map(
|
|
872
|
+
(g) => g.start > 0 && g.start < i && /* @__PURE__ */ r(
|
|
873
|
+
"div",
|
|
874
|
+
{
|
|
875
|
+
className: "gvp-seek-chapter-tick",
|
|
876
|
+
style: { left: `${g.start / i * 100}%` }
|
|
877
|
+
},
|
|
878
|
+
`${g.start}-${g.title}`
|
|
879
|
+
)
|
|
880
|
+
)
|
|
881
|
+
] }),
|
|
882
|
+
u && /* @__PURE__ */ r(
|
|
883
|
+
_t,
|
|
884
|
+
{
|
|
885
|
+
hover: u,
|
|
886
|
+
track: l,
|
|
887
|
+
chapters: d,
|
|
888
|
+
trackWidth: ((f = x.current) == null ? void 0 : f.clientWidth) ?? 0
|
|
889
|
+
}
|
|
890
|
+
),
|
|
891
|
+
/* @__PURE__ */ r(
|
|
892
|
+
"input",
|
|
893
|
+
{
|
|
894
|
+
type: "range",
|
|
895
|
+
className: "gvp-seek-input",
|
|
896
|
+
min: 0,
|
|
897
|
+
max: 100,
|
|
898
|
+
step: 0.1,
|
|
899
|
+
value: w,
|
|
900
|
+
onChange: N,
|
|
901
|
+
disabled: !C,
|
|
902
|
+
"aria-label": "Seek",
|
|
903
|
+
"aria-valuemin": 0,
|
|
904
|
+
"aria-valuemax": Math.floor(i),
|
|
905
|
+
"aria-valuenow": Math.floor(n)
|
|
906
|
+
}
|
|
907
|
+
)
|
|
908
|
+
]
|
|
669
909
|
}
|
|
670
910
|
)
|
|
671
|
-
|
|
672
|
-
},
|
|
673
|
-
const
|
|
674
|
-
return
|
|
911
|
+
);
|
|
912
|
+
}, _t = ({ hover: e, track: s, chapters: t, trackWidth: n }) => {
|
|
913
|
+
const o = (s == null ? void 0 : s.cueAt(e.time)) ?? null, i = o !== null && o.w > 0 && o.h > 0, a = Dt(t, e.time), p = (i ? o.w : 0) / 2, u = n > 0 ? Math.min(Math.max(e.x, p), n - p) : e.x;
|
|
914
|
+
return /* @__PURE__ */ b(
|
|
915
|
+
"div",
|
|
916
|
+
{
|
|
917
|
+
className: D("gvp-seek-preview", i && "has-thumb"),
|
|
918
|
+
style: { left: `${u}px` },
|
|
919
|
+
children: [
|
|
920
|
+
i && /* @__PURE__ */ r(
|
|
921
|
+
"div",
|
|
922
|
+
{
|
|
923
|
+
className: "gvp-seek-preview-thumb",
|
|
924
|
+
style: {
|
|
925
|
+
width: `${o.w}px`,
|
|
926
|
+
height: `${o.h}px`,
|
|
927
|
+
backgroundImage: `url(${JSON.stringify(o.url)})`,
|
|
928
|
+
backgroundPosition: `-${o.x}px -${o.y}px`
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
),
|
|
932
|
+
a && /* @__PURE__ */ r("span", { className: "gvp-seek-preview-chapter", children: a.title }),
|
|
933
|
+
/* @__PURE__ */ r("span", { className: "gvp-seek-preview-time", children: ke(e.time) })
|
|
934
|
+
]
|
|
935
|
+
}
|
|
936
|
+
);
|
|
937
|
+
}, Zt = ({ video: e }) => {
|
|
938
|
+
const [s, t] = v(0), [n, o] = v(0);
|
|
939
|
+
return T(() => {
|
|
675
940
|
if (!e) return;
|
|
676
|
-
const
|
|
677
|
-
return
|
|
678
|
-
e.removeEventListener("timeupdate",
|
|
941
|
+
const i = () => t(e.currentTime), a = () => o(Number.isFinite(e.duration) ? e.duration : 0);
|
|
942
|
+
return i(), a(), e.addEventListener("timeupdate", i), e.addEventListener("durationchange", a), e.addEventListener("loadedmetadata", a), () => {
|
|
943
|
+
e.removeEventListener("timeupdate", i), e.removeEventListener("durationchange", a), e.removeEventListener("loadedmetadata", a);
|
|
679
944
|
};
|
|
680
|
-
}, [e]), /* @__PURE__ */
|
|
681
|
-
|
|
945
|
+
}, [e]), /* @__PURE__ */ b("span", { className: "gvp-time", "aria-live": "off", children: [
|
|
946
|
+
ke(s),
|
|
682
947
|
" / ",
|
|
683
|
-
|
|
948
|
+
ke(n)
|
|
684
949
|
] });
|
|
685
|
-
},
|
|
686
|
-
const [
|
|
687
|
-
|
|
950
|
+
}, qt = ({ video: e }) => {
|
|
951
|
+
const [s, t] = v(1), [n, o] = v(!1);
|
|
952
|
+
T(() => {
|
|
688
953
|
if (!e) return;
|
|
689
|
-
const
|
|
690
|
-
|
|
954
|
+
const u = () => {
|
|
955
|
+
t(e.volume), o(e.muted);
|
|
691
956
|
};
|
|
692
|
-
return
|
|
957
|
+
return u(), e.addEventListener("volumechange", u), () => e.removeEventListener("volumechange", u);
|
|
693
958
|
}, [e]);
|
|
694
|
-
const
|
|
959
|
+
const i = () => {
|
|
695
960
|
e && (e.muted = !e.muted);
|
|
696
|
-
},
|
|
961
|
+
}, a = (u) => {
|
|
697
962
|
if (!e) return;
|
|
698
|
-
const
|
|
699
|
-
e.volume =
|
|
963
|
+
const E = Number(u.target.value) / 100;
|
|
964
|
+
e.volume = E, E > 0 && e.muted && (e.muted = !1);
|
|
700
965
|
};
|
|
701
|
-
let
|
|
702
|
-
|
|
703
|
-
const p =
|
|
704
|
-
return /* @__PURE__ */
|
|
705
|
-
/* @__PURE__ */
|
|
966
|
+
let c = bt;
|
|
967
|
+
n || s === 0 ? c = wt : s < 0.5 && (c = kt);
|
|
968
|
+
const p = n ? 0 : Math.round(s * 100);
|
|
969
|
+
return /* @__PURE__ */ b("div", { className: D("gvp-volume", !Ae && "is-expandable"), children: [
|
|
970
|
+
/* @__PURE__ */ r(
|
|
706
971
|
"button",
|
|
707
972
|
{
|
|
708
973
|
type: "button",
|
|
709
974
|
className: "gvp-ctrl-btn",
|
|
710
|
-
"aria-label":
|
|
711
|
-
"aria-pressed":
|
|
712
|
-
onClick:
|
|
713
|
-
children: /* @__PURE__ */
|
|
975
|
+
"aria-label": n ? "Unmute" : "Mute",
|
|
976
|
+
"aria-pressed": n,
|
|
977
|
+
onClick: i,
|
|
978
|
+
children: /* @__PURE__ */ r(c, {})
|
|
714
979
|
}
|
|
715
980
|
),
|
|
716
|
-
!
|
|
717
|
-
/* @__PURE__ */
|
|
981
|
+
!Ae && /* @__PURE__ */ b("div", { className: "gvp-volume-slider-wrap", children: [
|
|
982
|
+
/* @__PURE__ */ r("div", { className: "gvp-volume-track", children: /* @__PURE__ */ r(
|
|
718
983
|
"div",
|
|
719
984
|
{
|
|
720
985
|
className: "gvp-volume-fill",
|
|
721
986
|
style: { width: `${p}%` }
|
|
722
987
|
}
|
|
723
988
|
) }),
|
|
724
|
-
/* @__PURE__ */
|
|
989
|
+
/* @__PURE__ */ r(
|
|
725
990
|
"input",
|
|
726
991
|
{
|
|
727
992
|
type: "range",
|
|
@@ -730,7 +995,7 @@ const Oe = ({
|
|
|
730
995
|
max: 100,
|
|
731
996
|
step: 1,
|
|
732
997
|
value: p,
|
|
733
|
-
onChange:
|
|
998
|
+
onChange: a,
|
|
734
999
|
"aria-label": "Volume",
|
|
735
1000
|
"aria-valuemin": 0,
|
|
736
1001
|
"aria-valuemax": 100,
|
|
@@ -739,688 +1004,773 @@ const Oe = ({
|
|
|
739
1004
|
)
|
|
740
1005
|
] })
|
|
741
1006
|
] });
|
|
742
|
-
},
|
|
743
|
-
const [
|
|
744
|
-
|
|
1007
|
+
}, Qt = [0.5, 0.75, 1, 1.25, 1.5, 2], zt = ({ video: e }) => {
|
|
1008
|
+
const [s, t] = v(1), [n, o] = v(!1), i = $(null);
|
|
1009
|
+
T(() => {
|
|
745
1010
|
if (!e) return;
|
|
746
|
-
const
|
|
747
|
-
return
|
|
1011
|
+
const u = () => t(e.playbackRate);
|
|
1012
|
+
return u(), e.addEventListener("ratechange", u), () => e.removeEventListener("ratechange", u);
|
|
748
1013
|
}, [e]);
|
|
749
|
-
const
|
|
750
|
-
|
|
751
|
-
const
|
|
752
|
-
e && (e.playbackRate =
|
|
753
|
-
}, p =
|
|
754
|
-
return /* @__PURE__ */
|
|
755
|
-
/* @__PURE__ */
|
|
1014
|
+
const a = H(() => o(!1), []);
|
|
1015
|
+
we(n, i, a);
|
|
1016
|
+
const c = (u) => {
|
|
1017
|
+
e && (e.playbackRate = u), t(u), o(!1);
|
|
1018
|
+
}, p = s === 1 ? "1×" : `${s}×`;
|
|
1019
|
+
return /* @__PURE__ */ b("div", { className: "gvp-speed", ref: i, children: [
|
|
1020
|
+
/* @__PURE__ */ b(
|
|
756
1021
|
"button",
|
|
757
1022
|
{
|
|
758
1023
|
type: "button",
|
|
759
1024
|
className: "gvp-ctrl-btn gvp-speed-btn",
|
|
760
1025
|
"aria-haspopup": "listbox",
|
|
761
|
-
"aria-expanded":
|
|
1026
|
+
"aria-expanded": n,
|
|
762
1027
|
"aria-label": `Playback speed: ${p}`,
|
|
763
|
-
onClick: () =>
|
|
1028
|
+
onClick: () => o((u) => !u),
|
|
764
1029
|
children: [
|
|
765
|
-
/* @__PURE__ */
|
|
766
|
-
/* @__PURE__ */
|
|
1030
|
+
/* @__PURE__ */ r(Nt, {}),
|
|
1031
|
+
/* @__PURE__ */ r("span", { className: "gvp-speed-label", children: p })
|
|
767
1032
|
]
|
|
768
1033
|
}
|
|
769
1034
|
),
|
|
770
|
-
|
|
771
|
-
/* @__PURE__ */
|
|
1035
|
+
n && // NOSONAR: typescript:S6819
|
|
1036
|
+
/* @__PURE__ */ r("ul", { className: "gvp-speed-menu", role: "listbox", "aria-label": "Playback speed", children: Qt.map((u) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
|
|
772
1037
|
"button",
|
|
773
1038
|
{
|
|
774
1039
|
type: "button",
|
|
775
1040
|
role: "option",
|
|
776
|
-
"aria-selected":
|
|
777
|
-
className:
|
|
778
|
-
onClick: () =>
|
|
779
|
-
children:
|
|
1041
|
+
"aria-selected": u === s,
|
|
1042
|
+
className: D("gvp-speed-menu-item", u === s && "is-active"),
|
|
1043
|
+
onClick: () => c(u),
|
|
1044
|
+
children: u === 1 ? "Normal" : `${u}×`
|
|
780
1045
|
}
|
|
781
|
-
) },
|
|
1046
|
+
) }, u)) })
|
|
782
1047
|
] });
|
|
783
|
-
},
|
|
784
|
-
const [
|
|
785
|
-
if (
|
|
786
|
-
const p = (
|
|
787
|
-
|
|
788
|
-
},
|
|
789
|
-
let
|
|
790
|
-
if (
|
|
791
|
-
|
|
1048
|
+
}, Yt = ({ levels: e, currentLevel: s, selectedLevel: t, onSelect: n }) => {
|
|
1049
|
+
const [o, i] = v(!1), a = $(null), c = H(() => i(!1), []);
|
|
1050
|
+
if (we(o, a, c), e.length < 2) return null;
|
|
1051
|
+
const p = (l) => {
|
|
1052
|
+
n == null || n(l), i(!1);
|
|
1053
|
+
}, u = [...e].sort((l, d) => d.height - l.height), E = e.find((l) => l.index === s);
|
|
1054
|
+
let x;
|
|
1055
|
+
if (t < 0)
|
|
1056
|
+
x = E ? `Auto (${E.label})` : "Auto";
|
|
792
1057
|
else {
|
|
793
|
-
const
|
|
794
|
-
|
|
1058
|
+
const l = e.find((d) => d.index === t);
|
|
1059
|
+
x = (l == null ? void 0 : l.label) ?? "Auto";
|
|
795
1060
|
}
|
|
796
|
-
return /* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */
|
|
1061
|
+
return /* @__PURE__ */ b("div", { className: "gvp-quality", ref: a, children: [
|
|
1062
|
+
/* @__PURE__ */ b(
|
|
798
1063
|
"button",
|
|
799
1064
|
{
|
|
800
1065
|
type: "button",
|
|
801
1066
|
className: "gvp-ctrl-btn gvp-quality-btn",
|
|
802
1067
|
"aria-haspopup": "listbox",
|
|
803
|
-
"aria-expanded":
|
|
804
|
-
"aria-label": `Quality: ${
|
|
805
|
-
onClick: () =>
|
|
1068
|
+
"aria-expanded": o,
|
|
1069
|
+
"aria-label": `Quality: ${x}`,
|
|
1070
|
+
onClick: () => i((l) => !l),
|
|
806
1071
|
children: [
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
/* @__PURE__ */
|
|
1072
|
+
/* @__PURE__ */ r(yt, {}),
|
|
1073
|
+
/* @__PURE__ */ r("span", { className: "gvp-quality-label", children: x })
|
|
809
1074
|
]
|
|
810
1075
|
}
|
|
811
1076
|
),
|
|
812
|
-
|
|
813
|
-
/* @__PURE__ */
|
|
814
|
-
/* @__PURE__ */
|
|
1077
|
+
o && // NOSONAR: typescript:S6819
|
|
1078
|
+
/* @__PURE__ */ b("ul", { className: "gvp-quality-menu", role: "listbox", "aria-label": "Quality", children: [
|
|
1079
|
+
/* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
|
|
815
1080
|
"button",
|
|
816
1081
|
{
|
|
817
1082
|
type: "button",
|
|
818
1083
|
role: "option",
|
|
819
|
-
"aria-selected":
|
|
820
|
-
className:
|
|
1084
|
+
"aria-selected": t < 0,
|
|
1085
|
+
className: D(
|
|
821
1086
|
"gvp-quality-menu-item",
|
|
822
|
-
|
|
1087
|
+
t < 0 && "is-active"
|
|
823
1088
|
),
|
|
824
|
-
onClick: () => p(
|
|
825
|
-
children:
|
|
1089
|
+
onClick: () => p(It.index),
|
|
1090
|
+
children: E ? `Auto (${E.label})` : "Auto"
|
|
826
1091
|
}
|
|
827
1092
|
) }),
|
|
828
|
-
|
|
1093
|
+
u.map((l) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
|
|
829
1094
|
"button",
|
|
830
1095
|
{
|
|
831
1096
|
type: "button",
|
|
832
1097
|
role: "option",
|
|
833
|
-
"aria-selected":
|
|
834
|
-
className:
|
|
1098
|
+
"aria-selected": l.index === t,
|
|
1099
|
+
className: D(
|
|
835
1100
|
"gvp-quality-menu-item",
|
|
836
|
-
|
|
1101
|
+
l.index === t && "is-active"
|
|
837
1102
|
),
|
|
838
|
-
onClick: () => p(
|
|
839
|
-
children:
|
|
1103
|
+
onClick: () => p(l.index),
|
|
1104
|
+
children: l.label
|
|
840
1105
|
}
|
|
841
|
-
) },
|
|
1106
|
+
) }, l.index))
|
|
842
1107
|
] })
|
|
843
1108
|
] });
|
|
844
|
-
},
|
|
845
|
-
const [
|
|
846
|
-
const
|
|
847
|
-
for (let
|
|
848
|
-
const
|
|
849
|
-
(
|
|
1109
|
+
}, Kt = ({ video: e }) => {
|
|
1110
|
+
const [s, t] = v([]), [n, o] = v(-1), [i, a] = v(!1), c = $(null), p = H((l) => {
|
|
1111
|
+
const d = [];
|
|
1112
|
+
for (let w = 0; w < l.length; w++) {
|
|
1113
|
+
const P = l[w];
|
|
1114
|
+
(P.kind === "subtitles" || P.kind === "captions") && d.push({ index: w, label: P.label || P.language || `Track ${w + 1}`, language: P.language });
|
|
850
1115
|
}
|
|
851
|
-
|
|
852
|
-
let
|
|
853
|
-
for (let
|
|
854
|
-
if (
|
|
855
|
-
|
|
1116
|
+
t(d);
|
|
1117
|
+
let C = -1;
|
|
1118
|
+
for (let w = 0; w < l.length; w++)
|
|
1119
|
+
if (l[w].mode === "showing") {
|
|
1120
|
+
C = w;
|
|
856
1121
|
break;
|
|
857
1122
|
}
|
|
858
|
-
|
|
1123
|
+
o(C);
|
|
859
1124
|
}, []);
|
|
860
|
-
|
|
1125
|
+
T(() => {
|
|
861
1126
|
if (!e) {
|
|
862
|
-
|
|
1127
|
+
t([]), o(-1);
|
|
863
1128
|
return;
|
|
864
1129
|
}
|
|
865
|
-
const
|
|
866
|
-
p(
|
|
867
|
-
const
|
|
868
|
-
if (typeof
|
|
869
|
-
return
|
|
870
|
-
|
|
1130
|
+
const l = e.textTracks;
|
|
1131
|
+
p(l);
|
|
1132
|
+
const d = () => p(l);
|
|
1133
|
+
if (typeof l.addEventListener == "function")
|
|
1134
|
+
return l.addEventListener("addtrack", d), l.addEventListener("removetrack", d), l.addEventListener("change", d), () => {
|
|
1135
|
+
l.removeEventListener("addtrack", d), l.removeEventListener("removetrack", d), l.removeEventListener("change", d);
|
|
871
1136
|
};
|
|
872
1137
|
}, [e, p]);
|
|
873
|
-
const
|
|
874
|
-
|
|
875
|
-
const
|
|
1138
|
+
const u = H(() => a(!1), []);
|
|
1139
|
+
we(i, c, u);
|
|
1140
|
+
const E = (l) => {
|
|
876
1141
|
if (!e) return;
|
|
877
|
-
const
|
|
878
|
-
for (let
|
|
879
|
-
|
|
880
|
-
l
|
|
881
|
-
},
|
|
1142
|
+
const d = e.textTracks;
|
|
1143
|
+
for (let C = 0; C < d.length; C++)
|
|
1144
|
+
d[C].mode = C === l ? "showing" : "hidden";
|
|
1145
|
+
o(l), a(!1);
|
|
1146
|
+
}, x = () => {
|
|
882
1147
|
if (!e) return;
|
|
883
|
-
const
|
|
884
|
-
for (let
|
|
885
|
-
|
|
1148
|
+
const l = e.textTracks;
|
|
1149
|
+
for (let d = 0; d < l.length; d++) l[d].mode = "hidden";
|
|
1150
|
+
o(-1), a(!1);
|
|
886
1151
|
};
|
|
887
|
-
return
|
|
888
|
-
/* @__PURE__ */
|
|
1152
|
+
return s.length === 0 ? null : /* @__PURE__ */ b("div", { className: "gvp-captions", ref: c, children: [
|
|
1153
|
+
/* @__PURE__ */ r(
|
|
889
1154
|
"button",
|
|
890
1155
|
{
|
|
891
1156
|
type: "button",
|
|
892
|
-
className:
|
|
1157
|
+
className: D("gvp-ctrl-btn", n >= 0 && "is-active"),
|
|
893
1158
|
"aria-haspopup": "listbox",
|
|
894
|
-
"aria-expanded":
|
|
1159
|
+
"aria-expanded": i,
|
|
895
1160
|
"aria-label": "Captions",
|
|
896
|
-
"aria-pressed":
|
|
897
|
-
onClick: () =>
|
|
898
|
-
children: /* @__PURE__ */
|
|
1161
|
+
"aria-pressed": n >= 0,
|
|
1162
|
+
onClick: () => a((l) => !l),
|
|
1163
|
+
children: /* @__PURE__ */ r(xt, {})
|
|
899
1164
|
}
|
|
900
1165
|
),
|
|
901
|
-
|
|
902
|
-
/* @__PURE__ */
|
|
903
|
-
/* @__PURE__ */
|
|
1166
|
+
i && // NOSONAR: typescript:S6819
|
|
1167
|
+
/* @__PURE__ */ b("ul", { className: "gvp-captions-menu", role: "listbox", "aria-label": "Captions", children: [
|
|
1168
|
+
/* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
|
|
904
1169
|
"button",
|
|
905
1170
|
{
|
|
906
1171
|
type: "button",
|
|
907
1172
|
role: "option",
|
|
908
|
-
"aria-selected":
|
|
909
|
-
className:
|
|
910
|
-
onClick:
|
|
1173
|
+
"aria-selected": n === -1,
|
|
1174
|
+
className: D("gvp-captions-menu-item", n === -1 && "is-active"),
|
|
1175
|
+
onClick: x,
|
|
911
1176
|
children: "Off"
|
|
912
1177
|
}
|
|
913
1178
|
) }),
|
|
914
|
-
|
|
1179
|
+
s.map((l) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
|
|
915
1180
|
"button",
|
|
916
1181
|
{
|
|
917
1182
|
type: "button",
|
|
918
1183
|
role: "option",
|
|
919
|
-
"aria-selected":
|
|
920
|
-
className:
|
|
921
|
-
onClick: () =>
|
|
922
|
-
children:
|
|
1184
|
+
"aria-selected": l.index === n,
|
|
1185
|
+
className: D("gvp-captions-menu-item", l.index === n && "is-active"),
|
|
1186
|
+
onClick: () => E(l.index),
|
|
1187
|
+
children: l.label
|
|
923
1188
|
}
|
|
924
|
-
) },
|
|
1189
|
+
) }, l.index))
|
|
925
1190
|
] })
|
|
926
1191
|
] });
|
|
927
|
-
},
|
|
928
|
-
const [
|
|
929
|
-
if (
|
|
930
|
-
|
|
931
|
-
}, []),
|
|
1192
|
+
}, Jt = ({ video: e }) => {
|
|
1193
|
+
const [s, t] = v(!1), [n, o] = v(!1);
|
|
1194
|
+
if (T(() => {
|
|
1195
|
+
o(!0);
|
|
1196
|
+
}, []), T(() => {
|
|
932
1197
|
if (!e) return;
|
|
933
|
-
const
|
|
934
|
-
return e.addEventListener("enterpictureinpicture",
|
|
935
|
-
e.removeEventListener("enterpictureinpicture",
|
|
1198
|
+
const a = () => t(!0), c = () => t(!1);
|
|
1199
|
+
return e.addEventListener("enterpictureinpicture", a), e.addEventListener("leavepictureinpicture", c), () => {
|
|
1200
|
+
e.removeEventListener("enterpictureinpicture", a), e.removeEventListener("leavepictureinpicture", c);
|
|
936
1201
|
};
|
|
937
|
-
}, [e]), !
|
|
938
|
-
const
|
|
1202
|
+
}, [e]), !n || !document.pictureInPictureEnabled) return null;
|
|
1203
|
+
const i = () => {
|
|
939
1204
|
document.pictureInPictureElement ? document.exitPictureInPicture().catch(() => {
|
|
940
1205
|
}) : e == null || e.requestPictureInPicture().catch(() => {
|
|
941
1206
|
});
|
|
942
1207
|
};
|
|
943
|
-
return /* @__PURE__ */
|
|
1208
|
+
return /* @__PURE__ */ r(
|
|
944
1209
|
"button",
|
|
945
1210
|
{
|
|
946
1211
|
type: "button",
|
|
947
|
-
className:
|
|
948
|
-
"aria-label":
|
|
949
|
-
"aria-pressed":
|
|
950
|
-
onClick:
|
|
951
|
-
children: /* @__PURE__ */
|
|
1212
|
+
className: D("gvp-ctrl-btn", s && "is-active"),
|
|
1213
|
+
"aria-label": s ? "Exit picture-in-picture" : "Picture-in-picture",
|
|
1214
|
+
"aria-pressed": s,
|
|
1215
|
+
onClick: i,
|
|
1216
|
+
children: /* @__PURE__ */ r(Et, {})
|
|
952
1217
|
}
|
|
953
1218
|
);
|
|
954
|
-
},
|
|
955
|
-
const [
|
|
956
|
-
return
|
|
957
|
-
if (
|
|
958
|
-
const p = () =>
|
|
959
|
-
return p(),
|
|
960
|
-
}, [e]),
|
|
1219
|
+
}, Xt = ({ container: e, video: s }) => {
|
|
1220
|
+
const [t, n] = v(!1);
|
|
1221
|
+
return T(() => {
|
|
1222
|
+
if (be) return;
|
|
1223
|
+
const p = () => n(K.element() === e);
|
|
1224
|
+
return p(), K.onChange(p);
|
|
1225
|
+
}, [e]), K.isSupported() || be && s !== null && typeof s.webkitEnterFullscreen == "function" ? /* @__PURE__ */ r(
|
|
961
1226
|
"button",
|
|
962
1227
|
{
|
|
963
1228
|
type: "button",
|
|
964
1229
|
className: "gvp-ctrl-btn",
|
|
965
|
-
"aria-label":
|
|
966
|
-
"aria-pressed":
|
|
1230
|
+
"aria-label": t ? "Exit fullscreen" : "Enter fullscreen",
|
|
1231
|
+
"aria-pressed": t,
|
|
967
1232
|
onClick: () => {
|
|
968
1233
|
var p;
|
|
969
|
-
if (
|
|
970
|
-
(p =
|
|
1234
|
+
if (be) {
|
|
1235
|
+
(p = s == null ? void 0 : s.webkitEnterFullscreen) == null || p.call(s);
|
|
971
1236
|
return;
|
|
972
1237
|
}
|
|
973
|
-
|
|
974
|
-
}) : e &&
|
|
1238
|
+
t ? K.exit().catch(() => {
|
|
1239
|
+
}) : e && K.request(e).catch(() => {
|
|
975
1240
|
});
|
|
976
1241
|
},
|
|
977
|
-
children: /* @__PURE__ */ t
|
|
1242
|
+
children: /* @__PURE__ */ r(t ? Lt : Ct, {})
|
|
978
1243
|
}
|
|
979
1244
|
) : null;
|
|
980
1245
|
};
|
|
981
|
-
function
|
|
982
|
-
const
|
|
983
|
-
if (
|
|
984
|
-
if (
|
|
1246
|
+
function $e(e, s, t) {
|
|
1247
|
+
const n = e == null ? void 0 : e.trim();
|
|
1248
|
+
if (n) return n;
|
|
1249
|
+
if (s) {
|
|
985
1250
|
try {
|
|
986
|
-
const
|
|
987
|
-
if (
|
|
1251
|
+
const i = new Intl.DisplayNames(void 0, { type: "language" }).of(s);
|
|
1252
|
+
if (i && i !== s) return i;
|
|
988
1253
|
} catch {
|
|
989
1254
|
}
|
|
990
|
-
return
|
|
1255
|
+
return s;
|
|
991
1256
|
}
|
|
992
|
-
return `Audio ${
|
|
1257
|
+
return `Audio ${t + 1}`;
|
|
993
1258
|
}
|
|
994
|
-
const
|
|
1259
|
+
const De = ct.forwardRef(
|
|
995
1260
|
({
|
|
996
1261
|
src: e,
|
|
997
|
-
hlsConfig:
|
|
998
|
-
isHls:
|
|
999
|
-
autoPlay:
|
|
1000
|
-
children:
|
|
1001
|
-
onAudioTracks:
|
|
1002
|
-
audioTrackIndex:
|
|
1003
|
-
onQualityLevels:
|
|
1262
|
+
hlsConfig: s,
|
|
1263
|
+
isHls: t,
|
|
1264
|
+
autoPlay: n,
|
|
1265
|
+
children: o,
|
|
1266
|
+
onAudioTracks: i,
|
|
1267
|
+
audioTrackIndex: a,
|
|
1268
|
+
onQualityLevels: c,
|
|
1004
1269
|
onCurrentLevel: p,
|
|
1005
|
-
qualityLevelIndex:
|
|
1006
|
-
...
|
|
1007
|
-
},
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1010
|
-
const
|
|
1011
|
-
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1014
|
-
const
|
|
1015
|
-
return
|
|
1016
|
-
var
|
|
1270
|
+
qualityLevelIndex: u,
|
|
1271
|
+
...E
|
|
1272
|
+
}, x) => {
|
|
1273
|
+
const l = $(null), d = $(null), C = $(i);
|
|
1274
|
+
C.current = i;
|
|
1275
|
+
const w = $(c);
|
|
1276
|
+
w.current = c;
|
|
1277
|
+
const P = $(p);
|
|
1278
|
+
P.current = p, ut(x, () => l.current);
|
|
1279
|
+
const N = globalThis.window !== void 0 && Q.isSupported(), R = !!t || N && typeof e == "string" && e.endsWith(".m3u8");
|
|
1280
|
+
return T(() => {
|
|
1281
|
+
var U, ne, re;
|
|
1017
1282
|
if (!e) return;
|
|
1018
|
-
const
|
|
1019
|
-
if (!
|
|
1020
|
-
const
|
|
1021
|
-
var
|
|
1022
|
-
(
|
|
1023
|
-
},
|
|
1024
|
-
var
|
|
1025
|
-
(
|
|
1026
|
-
},
|
|
1027
|
-
var
|
|
1028
|
-
(
|
|
1029
|
-
},
|
|
1030
|
-
|
|
1283
|
+
const f = l.current;
|
|
1284
|
+
if (!f) return;
|
|
1285
|
+
const g = (h) => {
|
|
1286
|
+
var M;
|
|
1287
|
+
(M = C.current) == null || M.call(C, h);
|
|
1288
|
+
}, k = (h) => {
|
|
1289
|
+
var M;
|
|
1290
|
+
(M = w.current) == null || M.call(w, h);
|
|
1291
|
+
}, y = (h) => {
|
|
1292
|
+
var M;
|
|
1293
|
+
(M = P.current) == null || M.call(P, h);
|
|
1294
|
+
}, V = () => {
|
|
1295
|
+
n && f.play().catch(() => {
|
|
1031
1296
|
});
|
|
1032
1297
|
};
|
|
1033
|
-
for (
|
|
1034
|
-
|
|
1035
|
-
let
|
|
1036
|
-
if (
|
|
1037
|
-
const h = new
|
|
1038
|
-
|
|
1039
|
-
const
|
|
1040
|
-
const
|
|
1041
|
-
index:
|
|
1042
|
-
label:
|
|
1043
|
-
lang:
|
|
1298
|
+
for (d.current && (d.current.destroy(), d.current = null), f.pause(), f.removeAttribute("src"); f.firstChild; ) f.firstChild.remove();
|
|
1299
|
+
g([]), k([]), y(-1);
|
|
1300
|
+
let O;
|
|
1301
|
+
if (R) {
|
|
1302
|
+
const h = new Q(s);
|
|
1303
|
+
d.current = h;
|
|
1304
|
+
const M = () => {
|
|
1305
|
+
const I = h.audioTracks.map((L, z) => ({
|
|
1306
|
+
index: z,
|
|
1307
|
+
label: $e(L.name, L.lang, z),
|
|
1308
|
+
lang: L.lang || void 0
|
|
1044
1309
|
}));
|
|
1045
|
-
|
|
1046
|
-
},
|
|
1047
|
-
const
|
|
1048
|
-
index:
|
|
1049
|
-
height:
|
|
1050
|
-
label:
|
|
1310
|
+
g(I);
|
|
1311
|
+
}, W = () => {
|
|
1312
|
+
const I = h.levels.map((L, z) => ({
|
|
1313
|
+
index: z,
|
|
1314
|
+
height: L.height || 0,
|
|
1315
|
+
label: St(L.height || 0, z)
|
|
1051
1316
|
}));
|
|
1052
|
-
|
|
1317
|
+
k(I);
|
|
1053
1318
|
};
|
|
1054
|
-
h.on(
|
|
1055
|
-
|
|
1056
|
-
}), h.on(
|
|
1057
|
-
|
|
1058
|
-
}), h.attachMedia(
|
|
1319
|
+
h.on(Q.Events.MANIFEST_PARSED, V), h.on(Q.Events.MANIFEST_PARSED, W), h.on(Q.Events.LEVELS_UPDATED, W), h.on(Q.Events.LEVEL_SWITCHED, (I, L) => {
|
|
1320
|
+
y(L.level);
|
|
1321
|
+
}), h.on(Q.Events.AUDIO_TRACKS_UPDATED, M), h.on(Q.Events.AUDIO_TRACK_SWITCHED, M), h.on(Q.Events.ERROR, (I, L) => {
|
|
1322
|
+
L.fatal && (h.destroy(), d.current = null);
|
|
1323
|
+
}), h.attachMedia(f), h.loadSource(e);
|
|
1059
1324
|
} else {
|
|
1060
|
-
|
|
1061
|
-
const h =
|
|
1325
|
+
f.src = e, f.load(), f.addEventListener("loadedmetadata", V, { once: !0 });
|
|
1326
|
+
const h = f.audioTracks;
|
|
1062
1327
|
if (h) {
|
|
1063
|
-
const
|
|
1064
|
-
const
|
|
1065
|
-
for (let
|
|
1066
|
-
const
|
|
1067
|
-
|
|
1068
|
-
index:
|
|
1069
|
-
label:
|
|
1070
|
-
lang:
|
|
1328
|
+
const M = () => {
|
|
1329
|
+
const W = [];
|
|
1330
|
+
for (let I = 0; I < h.length; I++) {
|
|
1331
|
+
const L = h[I];
|
|
1332
|
+
W.push({
|
|
1333
|
+
index: I,
|
|
1334
|
+
label: $e(L.label, L.language, I),
|
|
1335
|
+
lang: L.language || void 0
|
|
1071
1336
|
});
|
|
1072
1337
|
}
|
|
1073
|
-
|
|
1338
|
+
g(W);
|
|
1074
1339
|
};
|
|
1075
|
-
(
|
|
1076
|
-
var
|
|
1077
|
-
(
|
|
1340
|
+
(U = h.addEventListener) == null || U.call(h, "addtrack", M), (ne = h.addEventListener) == null || ne.call(h, "removetrack", M), (re = h.addEventListener) == null || re.call(h, "change", M), h.length > 0 && M(), O = () => {
|
|
1341
|
+
var W, I, L;
|
|
1342
|
+
(W = h.removeEventListener) == null || W.call(h, "addtrack", M), (I = h.removeEventListener) == null || I.call(h, "removetrack", M), (L = h.removeEventListener) == null || L.call(h, "change", M);
|
|
1078
1343
|
};
|
|
1079
1344
|
}
|
|
1080
1345
|
}
|
|
1081
1346
|
return () => {
|
|
1082
|
-
for (
|
|
1083
|
-
|
|
1347
|
+
for (f.removeEventListener("loadedmetadata", V), O == null || O(), d.current && (d.current.destroy(), d.current = null), f.pause(), f.removeAttribute("src"); f.firstChild; ) f.firstChild.remove();
|
|
1348
|
+
f.load(), g([]), k([]), y(-1);
|
|
1084
1349
|
};
|
|
1085
|
-
}, [e,
|
|
1086
|
-
if (
|
|
1087
|
-
const
|
|
1088
|
-
|
|
1089
|
-
}, [
|
|
1090
|
-
var
|
|
1091
|
-
if (
|
|
1092
|
-
const
|
|
1093
|
-
if (
|
|
1094
|
-
|
|
1350
|
+
}, [e, R, s, n]), T(() => {
|
|
1351
|
+
if (u == null) return;
|
|
1352
|
+
const f = d.current;
|
|
1353
|
+
f && f.currentLevel !== u && (f.currentLevel = u);
|
|
1354
|
+
}, [u]), T(() => {
|
|
1355
|
+
var k;
|
|
1356
|
+
if (a == null || a < 0) return;
|
|
1357
|
+
const f = d.current;
|
|
1358
|
+
if (f) {
|
|
1359
|
+
f.audioTrack !== a && (f.audioTrack = a);
|
|
1095
1360
|
return;
|
|
1096
1361
|
}
|
|
1097
|
-
const
|
|
1098
|
-
if (
|
|
1099
|
-
for (let
|
|
1100
|
-
|
|
1101
|
-
}, [
|
|
1362
|
+
const g = (k = l.current) == null ? void 0 : k.audioTracks;
|
|
1363
|
+
if (g)
|
|
1364
|
+
for (let y = 0; y < g.length; y++)
|
|
1365
|
+
g[y].enabled = y === a;
|
|
1366
|
+
}, [a]), // Captions are the consumer's responsibility — pass <track> elements as children.
|
|
1102
1367
|
// NOSONAR: typescript:S4084
|
|
1103
|
-
/* @__PURE__ */
|
|
1368
|
+
/* @__PURE__ */ r("video", { ref: l, ...E, children: o });
|
|
1104
1369
|
}
|
|
1105
1370
|
);
|
|
1106
|
-
|
|
1107
|
-
function
|
|
1371
|
+
De.displayName = "HLSPlayer";
|
|
1372
|
+
function Gt(e) {
|
|
1108
1373
|
if (!e) return null;
|
|
1109
1374
|
if (/^[A-Za-z0-9_-]{11}$/.test(e)) return e;
|
|
1110
|
-
let
|
|
1375
|
+
let s;
|
|
1111
1376
|
try {
|
|
1112
|
-
|
|
1377
|
+
s = new URL(e);
|
|
1113
1378
|
} catch {
|
|
1114
1379
|
return null;
|
|
1115
1380
|
}
|
|
1116
|
-
const
|
|
1117
|
-
if (
|
|
1118
|
-
const
|
|
1119
|
-
return /^[A-Za-z0-9_-]{11}$/.test(
|
|
1381
|
+
const t = s.hostname.replace(/^www\./, "");
|
|
1382
|
+
if (t === "youtu.be") {
|
|
1383
|
+
const n = s.pathname.slice(1).split("/")[0];
|
|
1384
|
+
return /^[A-Za-z0-9_-]{11}$/.test(n) ? n : null;
|
|
1120
1385
|
}
|
|
1121
|
-
if (
|
|
1122
|
-
const
|
|
1123
|
-
if (
|
|
1124
|
-
const
|
|
1125
|
-
|
|
1386
|
+
if (t === "youtube.com" || t === "m.youtube.com" || t === "music.youtube.com" || t === "youtube-nocookie.com") {
|
|
1387
|
+
const n = s.searchParams.get("v");
|
|
1388
|
+
if (n && /^[A-Za-z0-9_-]{11}$/.test(n)) return n;
|
|
1389
|
+
const o = /^\/(?:embed|shorts|v|live)\/([A-Za-z0-9_-]{11})/.exec(
|
|
1390
|
+
s.pathname
|
|
1126
1391
|
);
|
|
1127
|
-
if (
|
|
1392
|
+
if (o) return o[1];
|
|
1128
1393
|
}
|
|
1129
1394
|
return null;
|
|
1130
1395
|
}
|
|
1131
|
-
function
|
|
1396
|
+
function en(e) {
|
|
1132
1397
|
try {
|
|
1133
|
-
const
|
|
1134
|
-
if (!
|
|
1135
|
-
if (/^\d+s?$/.test(
|
|
1136
|
-
const
|
|
1137
|
-
if (
|
|
1138
|
-
const
|
|
1139
|
-
return
|
|
1398
|
+
const s = new URL(e), t = s.searchParams.get("t") ?? s.searchParams.get("start");
|
|
1399
|
+
if (!t) return null;
|
|
1400
|
+
if (/^\d+s?$/.test(t)) return Number.parseInt(t, 10);
|
|
1401
|
+
const n = /^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/.exec(t);
|
|
1402
|
+
if (n) {
|
|
1403
|
+
const o = Number.parseInt(n[1] ?? "0", 10), i = Number.parseInt(n[2] ?? "0", 10), a = Number.parseInt(n[3] ?? "0", 10), c = o * 3600 + i * 60 + a;
|
|
1404
|
+
return c > 0 ? c : null;
|
|
1140
1405
|
}
|
|
1141
1406
|
} catch {
|
|
1142
1407
|
}
|
|
1143
1408
|
return null;
|
|
1144
1409
|
}
|
|
1145
|
-
function
|
|
1146
|
-
const { autoPlay:
|
|
1410
|
+
function tn(e, s = {}) {
|
|
1411
|
+
const { autoPlay: t = !1, muted: n = !0, loop: o = !1, controls: i = !0, startSeconds: a } = s, c = new URLSearchParams({
|
|
1147
1412
|
rel: "0",
|
|
1148
1413
|
modestbranding: "1",
|
|
1149
1414
|
playsinline: "1",
|
|
1150
|
-
controls:
|
|
1415
|
+
controls: i ? "1" : "0"
|
|
1151
1416
|
});
|
|
1152
|
-
return
|
|
1417
|
+
return t ? (c.set("autoplay", "1"), c.set("mute", "1")) : n && c.set("mute", "1"), o && (c.set("loop", "1"), c.set("playlist", e)), a && a > 0 && c.set("start", String(a)), `https://www.youtube-nocookie.com/embed/${e}?${c.toString()}`;
|
|
1153
1418
|
}
|
|
1154
|
-
const
|
|
1419
|
+
const nn = ({
|
|
1155
1420
|
tracks: e,
|
|
1156
|
-
activeIndex:
|
|
1157
|
-
onSelect:
|
|
1421
|
+
activeIndex: s,
|
|
1422
|
+
onSelect: t
|
|
1158
1423
|
}) => {
|
|
1159
|
-
const [
|
|
1160
|
-
|
|
1161
|
-
if (!
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
}, p = (
|
|
1165
|
-
|
|
1424
|
+
const [n, o] = v(!1), i = $(null);
|
|
1425
|
+
T(() => {
|
|
1426
|
+
if (!n) return;
|
|
1427
|
+
const c = (u) => {
|
|
1428
|
+
i.current && !i.current.contains(u.target) && o(!1);
|
|
1429
|
+
}, p = (u) => {
|
|
1430
|
+
u.key === "Escape" && o(!1);
|
|
1166
1431
|
};
|
|
1167
|
-
return document.addEventListener("mousedown",
|
|
1168
|
-
document.removeEventListener("mousedown",
|
|
1432
|
+
return document.addEventListener("mousedown", c), document.addEventListener("keydown", p), () => {
|
|
1433
|
+
document.removeEventListener("mousedown", c), document.removeEventListener("keydown", p);
|
|
1169
1434
|
};
|
|
1170
|
-
}, [
|
|
1171
|
-
const
|
|
1172
|
-
return /* @__PURE__ */
|
|
1173
|
-
/* @__PURE__ */
|
|
1435
|
+
}, [n]);
|
|
1436
|
+
const a = e.find((c) => c.index === s) ?? e[0];
|
|
1437
|
+
return /* @__PURE__ */ b("div", { className: "gvp-audio", ref: i, children: [
|
|
1438
|
+
/* @__PURE__ */ b(
|
|
1174
1439
|
"button",
|
|
1175
1440
|
{
|
|
1176
1441
|
type: "button",
|
|
1177
1442
|
className: "gvp-audio-btn",
|
|
1178
1443
|
"aria-haspopup": "listbox",
|
|
1179
|
-
"aria-expanded":
|
|
1444
|
+
"aria-expanded": n,
|
|
1180
1445
|
"aria-label": "Audio track",
|
|
1181
|
-
onClick: () =>
|
|
1446
|
+
onClick: () => o((c) => !c),
|
|
1182
1447
|
children: [
|
|
1183
|
-
/* @__PURE__ */
|
|
1184
|
-
/* @__PURE__ */
|
|
1185
|
-
/* @__PURE__ */
|
|
1448
|
+
/* @__PURE__ */ r(ft, {}),
|
|
1449
|
+
/* @__PURE__ */ r("span", { className: "gvp-audio-label", children: a == null ? void 0 : a.label }),
|
|
1450
|
+
/* @__PURE__ */ r(Mt, {})
|
|
1186
1451
|
]
|
|
1187
1452
|
}
|
|
1188
1453
|
),
|
|
1189
|
-
|
|
1454
|
+
n && // A native <select> can't be styled to sit inside the player overlay
|
|
1190
1455
|
// (it renders the OS dropdown chrome), so this is a custom listbox with
|
|
1191
1456
|
// full keyboard + ARIA support.
|
|
1192
1457
|
// NOSONAR: typescript:S6819
|
|
1193
|
-
/* @__PURE__ */
|
|
1458
|
+
/* @__PURE__ */ r("ul", { className: "gvp-audio-menu", role: "listbox", "aria-label": "Audio tracks", children: e.map((c) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
|
|
1194
1459
|
"button",
|
|
1195
1460
|
{
|
|
1196
1461
|
type: "button",
|
|
1197
1462
|
role: "option",
|
|
1198
|
-
"aria-selected":
|
|
1199
|
-
className:
|
|
1463
|
+
"aria-selected": c.index === s,
|
|
1464
|
+
className: D(
|
|
1200
1465
|
"gvp-audio-menu-item",
|
|
1201
|
-
|
|
1466
|
+
c.index === s && "is-active"
|
|
1202
1467
|
),
|
|
1203
1468
|
onClick: () => {
|
|
1204
|
-
|
|
1469
|
+
t(c.index), o(!1);
|
|
1205
1470
|
},
|
|
1206
|
-
children:
|
|
1471
|
+
children: c.label
|
|
1207
1472
|
}
|
|
1208
|
-
) },
|
|
1473
|
+
) }, c.index)) })
|
|
1209
1474
|
] });
|
|
1210
|
-
},
|
|
1475
|
+
}, an = ({
|
|
1211
1476
|
src: e,
|
|
1212
|
-
poster:
|
|
1213
|
-
showDeviceToggle:
|
|
1214
|
-
defaultDevice:
|
|
1215
|
-
hoverPlay:
|
|
1216
|
-
tooltipText:
|
|
1217
|
-
onClose:
|
|
1218
|
-
className:
|
|
1477
|
+
poster: s,
|
|
1478
|
+
showDeviceToggle: t = !0,
|
|
1479
|
+
defaultDevice: n = "desktop",
|
|
1480
|
+
hoverPlay: o = !1,
|
|
1481
|
+
tooltipText: i,
|
|
1482
|
+
onClose: a,
|
|
1483
|
+
className: c = "",
|
|
1219
1484
|
muted: p = !0,
|
|
1220
|
-
loop:
|
|
1221
|
-
controls:
|
|
1222
|
-
autoPlay:
|
|
1223
|
-
frameMaxWidth:
|
|
1224
|
-
aspectRatio:
|
|
1225
|
-
hlsConfig:
|
|
1226
|
-
|
|
1485
|
+
loop: u = !1,
|
|
1486
|
+
controls: E = !0,
|
|
1487
|
+
autoPlay: x = !1,
|
|
1488
|
+
frameMaxWidth: l,
|
|
1489
|
+
aspectRatio: d,
|
|
1490
|
+
hlsConfig: C,
|
|
1491
|
+
thumbnails: w,
|
|
1492
|
+
chapters: P,
|
|
1493
|
+
playlist: N,
|
|
1494
|
+
defaultIndex: R = 0,
|
|
1495
|
+
autoAdvance: f = !0,
|
|
1496
|
+
onPlaylistChange: g,
|
|
1497
|
+
onPlay: k,
|
|
1498
|
+
onPause: y,
|
|
1499
|
+
onEnded: V,
|
|
1500
|
+
onTimeUpdate: O,
|
|
1501
|
+
onSeeked: U,
|
|
1502
|
+
onVolumeChange: ne,
|
|
1503
|
+
onMilestone: re,
|
|
1504
|
+
onError: h,
|
|
1505
|
+
children: M
|
|
1227
1506
|
}) => {
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1230
|
-
}, []),
|
|
1231
|
-
|
|
1232
|
-
|
|
1507
|
+
const W = $(null), I = $(null), [L, z] = v(n), [ue, J] = v(!1), [We, se] = v(!1), [de, Re] = v([]), [he, Ce] = v(-1), [Fe, Ue] = v([]), [je, Oe] = v(-1), [Le, Ee] = v(-1), [_e, Ze] = v(null), [me, qe] = v(null), Qe = H((m) => {
|
|
1508
|
+
W.current = m, qe(m);
|
|
1509
|
+
}, []), Z = $({
|
|
1510
|
+
onPlay: k,
|
|
1511
|
+
onPause: y,
|
|
1512
|
+
onEnded: V,
|
|
1513
|
+
onTimeUpdate: O,
|
|
1514
|
+
onSeeked: U,
|
|
1515
|
+
onVolumeChange: ne,
|
|
1516
|
+
onMilestone: re,
|
|
1517
|
+
onError: h
|
|
1518
|
+
});
|
|
1519
|
+
Z.current = {
|
|
1520
|
+
onPlay: k,
|
|
1521
|
+
onPause: y,
|
|
1522
|
+
onEnded: V,
|
|
1523
|
+
onTimeUpdate: O,
|
|
1524
|
+
onSeeked: U,
|
|
1525
|
+
onVolumeChange: ne,
|
|
1526
|
+
onMilestone: re,
|
|
1527
|
+
onError: h
|
|
1528
|
+
};
|
|
1529
|
+
const ee = E === !0 || E === "custom", pe = E === "native", Y = Array.isArray(N) && N.length > 0, ze = Y ? Math.min(Math.max(R, 0), N.length - 1) : 0, [q, Ye] = v(ze), F = Y ? N[Math.min(q, N.length - 1)] : null, X = (F == null ? void 0 : F.src) ?? e ?? "", Ke = (F == null ? void 0 : F.poster) ?? s, Je = (F == null ? void 0 : F.thumbnails) ?? w, Xe = (F == null ? void 0 : F.chapters) ?? P, fe = $(!1), oe = H(
|
|
1530
|
+
(m, A = !1) => {
|
|
1531
|
+
if (!Y) return;
|
|
1532
|
+
const G = Math.min(Math.max(m, 0), N.length - 1);
|
|
1533
|
+
G !== q && (fe.current = A, Ye(G), g == null || g(G, N[G]));
|
|
1534
|
+
},
|
|
1535
|
+
[Y, N, q, g]
|
|
1536
|
+
), Ge = Y && q > 0, ge = Y && q < ((N == null ? void 0 : N.length) ?? 0) - 1, ie = ce(() => Gt(X), [X]), j = ie !== null, et = ce(() => L === "mobile" ? (d == null ? void 0 : d.mobile) ?? "9/16" : (d == null ? void 0 : d.desktop) ?? "16/9", [L, d]), tt = ce(() => L === "mobile" ? (l == null ? void 0 : l.mobile) ?? "420px" : (l == null ? void 0 : l.desktop) ?? "960px", [L, l]), nt = ce(
|
|
1537
|
+
() => ie ? tn(ie, {
|
|
1538
|
+
autoPlay: x,
|
|
1233
1539
|
muted: p,
|
|
1234
|
-
loop:
|
|
1540
|
+
loop: u,
|
|
1235
1541
|
// Custom controls can't drive an iframe, so YouTube falls
|
|
1236
1542
|
// back to its own controls in that mode.
|
|
1237
|
-
controls:
|
|
1238
|
-
startSeconds:
|
|
1543
|
+
controls: ee ? !0 : pe,
|
|
1544
|
+
startSeconds: en(X)
|
|
1239
1545
|
}) : null,
|
|
1240
|
-
[
|
|
1241
|
-
),
|
|
1242
|
-
|
|
1243
|
-
}, []),
|
|
1244
|
-
|
|
1245
|
-
}, []),
|
|
1246
|
-
const
|
|
1247
|
-
if (
|
|
1248
|
-
if (
|
|
1546
|
+
[ie, X, x, p, u, ee, pe]
|
|
1547
|
+
), rt = H((m) => {
|
|
1548
|
+
Re(m), Ce(-1);
|
|
1549
|
+
}, []), st = H((m) => {
|
|
1550
|
+
Ue(m), Ee(-1);
|
|
1551
|
+
}, []), ae = H(async () => {
|
|
1552
|
+
const m = W.current;
|
|
1553
|
+
if (m) {
|
|
1554
|
+
if (I.current)
|
|
1249
1555
|
try {
|
|
1250
|
-
await
|
|
1556
|
+
await I.current;
|
|
1251
1557
|
} catch {
|
|
1252
1558
|
}
|
|
1253
|
-
|
|
1559
|
+
m.pause();
|
|
1254
1560
|
}
|
|
1255
|
-
}, []),
|
|
1256
|
-
const
|
|
1257
|
-
if (
|
|
1561
|
+
}, []), te = H(async () => {
|
|
1562
|
+
const m = W.current;
|
|
1563
|
+
if (m)
|
|
1258
1564
|
try {
|
|
1259
|
-
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1565
|
+
m.readyState < 2 && m.load();
|
|
1566
|
+
const A = m.play();
|
|
1567
|
+
I.current = A, await A, J(!0);
|
|
1262
1568
|
} catch {
|
|
1263
|
-
|
|
1569
|
+
J(!1);
|
|
1264
1570
|
} finally {
|
|
1265
|
-
|
|
1571
|
+
I.current = null;
|
|
1266
1572
|
}
|
|
1267
|
-
}, []),
|
|
1268
|
-
!
|
|
1269
|
-
}, [
|
|
1270
|
-
!
|
|
1271
|
-
}, [
|
|
1272
|
-
const
|
|
1273
|
-
|
|
1274
|
-
}, [
|
|
1573
|
+
}, []), ot = H(() => {
|
|
1574
|
+
!o || j || te();
|
|
1575
|
+
}, [o, j, te]), it = H(() => {
|
|
1576
|
+
!o || j || ae().then(() => J(!1));
|
|
1577
|
+
}, [o, j, ae]), ve = H(async () => {
|
|
1578
|
+
const m = W.current;
|
|
1579
|
+
m && (m.paused ? await te() : (await ae(), J(!1)));
|
|
1580
|
+
}, [te, ae]), at = H(() => {
|
|
1581
|
+
var m, A;
|
|
1582
|
+
J(!1), (A = (m = Z.current).onEnded) == null || A.call(m), Y && f && ge && oe(q + 1, !0);
|
|
1583
|
+
}, [Y, f, ge, oe, q]);
|
|
1584
|
+
T(() => {
|
|
1585
|
+
const m = me;
|
|
1586
|
+
if (!m) return;
|
|
1587
|
+
const A = /* @__PURE__ */ new Set(), G = () => {
|
|
1588
|
+
var Me, Te, Pe, Ie;
|
|
1589
|
+
const B = m.duration;
|
|
1590
|
+
if ((Te = (Me = Z.current).onTimeUpdate) == null || Te.call(Me, m.currentTime, Number.isFinite(B) ? B : 0), !Number.isFinite(B) || B <= 0) return;
|
|
1591
|
+
const _ = m.currentTime / B * 100;
|
|
1592
|
+
for (const le of [25, 50, 75, 100])
|
|
1593
|
+
_ >= le && !A.has(le) && (A.add(le), (Ie = (Pe = Z.current).onMilestone) == null || Ie.call(Pe, le));
|
|
1594
|
+
}, xe = () => {
|
|
1595
|
+
var B, _;
|
|
1596
|
+
return (_ = (B = Z.current).onSeeked) == null ? void 0 : _.call(B, m.currentTime);
|
|
1597
|
+
}, Ne = () => {
|
|
1598
|
+
var B, _;
|
|
1599
|
+
return (_ = (B = Z.current).onVolumeChange) == null ? void 0 : _.call(B, m.volume, m.muted);
|
|
1600
|
+
}, ye = () => {
|
|
1601
|
+
var B, _;
|
|
1602
|
+
return (_ = (B = Z.current).onError) == null ? void 0 : _.call(B);
|
|
1603
|
+
};
|
|
1604
|
+
return m.addEventListener("timeupdate", G), m.addEventListener("seeked", xe), m.addEventListener("volumechange", Ne), m.addEventListener("error", ye), () => {
|
|
1605
|
+
m.removeEventListener("timeupdate", G), m.removeEventListener("seeked", xe), m.removeEventListener("volumechange", Ne), m.removeEventListener("error", ye);
|
|
1606
|
+
};
|
|
1607
|
+
}, [me]), T(() => {
|
|
1608
|
+
fe.current && (fe.current = !1, te());
|
|
1609
|
+
}, [X, te]);
|
|
1610
|
+
const lt = !j && de.length > 1;
|
|
1275
1611
|
return (
|
|
1276
1612
|
// The mouse handlers are a progressive enhancement (hoverPlay + tooltip).
|
|
1277
1613
|
// Keyboard/click users reach the same actions via the inner <button> elements,
|
|
1278
1614
|
// so the outer container is intentionally non-interactive at the role level.
|
|
1279
1615
|
// NOSONAR: typescript:S6848
|
|
1280
|
-
/* @__PURE__ */
|
|
1616
|
+
/* @__PURE__ */ b(
|
|
1281
1617
|
"div",
|
|
1282
1618
|
{
|
|
1283
|
-
ref:
|
|
1284
|
-
className:
|
|
1285
|
-
style: { width:
|
|
1619
|
+
ref: Ze,
|
|
1620
|
+
className: D("gvp-root", c),
|
|
1621
|
+
style: { width: tt, aspectRatio: et },
|
|
1286
1622
|
onMouseEnter: () => {
|
|
1287
|
-
|
|
1623
|
+
se(!0), ot();
|
|
1288
1624
|
},
|
|
1289
1625
|
onMouseLeave: () => {
|
|
1290
|
-
|
|
1626
|
+
se(!1), it();
|
|
1291
1627
|
},
|
|
1292
1628
|
children: [
|
|
1293
|
-
|
|
1629
|
+
j ? /* @__PURE__ */ r(
|
|
1294
1630
|
"iframe",
|
|
1295
1631
|
{
|
|
1296
1632
|
className: "gvp-video gvp-youtube",
|
|
1297
|
-
src:
|
|
1633
|
+
src: nt ?? void 0,
|
|
1298
1634
|
title: "YouTube video player",
|
|
1299
1635
|
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
|
|
1300
1636
|
allowFullScreen: !0,
|
|
1301
1637
|
referrerPolicy: "strict-origin-when-cross-origin"
|
|
1302
1638
|
}
|
|
1303
|
-
) : /* @__PURE__ */
|
|
1304
|
-
|
|
1639
|
+
) : /* @__PURE__ */ r(
|
|
1640
|
+
De,
|
|
1305
1641
|
{
|
|
1306
|
-
ref:
|
|
1307
|
-
src:
|
|
1308
|
-
poster:
|
|
1642
|
+
ref: Qe,
|
|
1643
|
+
src: X,
|
|
1644
|
+
poster: Ke,
|
|
1309
1645
|
muted: p,
|
|
1310
|
-
loop:
|
|
1646
|
+
loop: u,
|
|
1311
1647
|
playsInline: !0,
|
|
1312
1648
|
preload: "metadata",
|
|
1313
|
-
controls:
|
|
1314
|
-
autoPlay:
|
|
1315
|
-
hlsConfig:
|
|
1649
|
+
controls: pe,
|
|
1650
|
+
autoPlay: x,
|
|
1651
|
+
hlsConfig: C,
|
|
1316
1652
|
className: "gvp-video",
|
|
1317
|
-
onPlay: () =>
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1653
|
+
onPlay: () => {
|
|
1654
|
+
var m, A;
|
|
1655
|
+
J(!0), (A = (m = Z.current).onPlay) == null || A.call(m);
|
|
1656
|
+
},
|
|
1657
|
+
onPause: () => {
|
|
1658
|
+
var m, A;
|
|
1659
|
+
J(!1), (A = (m = Z.current).onPause) == null || A.call(m);
|
|
1660
|
+
},
|
|
1661
|
+
onEnded: at,
|
|
1662
|
+
onAudioTracks: rt,
|
|
1663
|
+
audioTrackIndex: he,
|
|
1664
|
+
onQualityLevels: st,
|
|
1665
|
+
onCurrentLevel: Oe,
|
|
1666
|
+
qualityLevelIndex: Le,
|
|
1667
|
+
children: M
|
|
1668
|
+
},
|
|
1669
|
+
X
|
|
1326
1670
|
),
|
|
1327
|
-
!
|
|
1328
|
-
|
|
1329
|
-
/* @__PURE__ */
|
|
1671
|
+
!j && /* @__PURE__ */ r("div", { className: "gvp-vignette" }),
|
|
1672
|
+
t && /* @__PURE__ */ r("div", { className: "gvp-toggle", children: /* @__PURE__ */ b("div", { className: "gvp-toggle-pill", children: [
|
|
1673
|
+
/* @__PURE__ */ r(
|
|
1330
1674
|
"button",
|
|
1331
1675
|
{
|
|
1332
1676
|
type: "button",
|
|
1333
|
-
onClick: () =>
|
|
1334
|
-
className:
|
|
1677
|
+
onClick: () => z("desktop"),
|
|
1678
|
+
className: D(
|
|
1335
1679
|
"gvp-toggle-btn",
|
|
1336
|
-
|
|
1680
|
+
L === "desktop" && "is-active"
|
|
1337
1681
|
),
|
|
1338
1682
|
"aria-label": "Desktop view",
|
|
1339
|
-
"aria-pressed":
|
|
1340
|
-
children: /* @__PURE__ */
|
|
1683
|
+
"aria-pressed": L === "desktop",
|
|
1684
|
+
children: /* @__PURE__ */ r(dt, {})
|
|
1341
1685
|
}
|
|
1342
1686
|
),
|
|
1343
|
-
/* @__PURE__ */
|
|
1344
|
-
/* @__PURE__ */
|
|
1687
|
+
/* @__PURE__ */ r("div", { className: "gvp-toggle-divider" }),
|
|
1688
|
+
/* @__PURE__ */ r(
|
|
1345
1689
|
"button",
|
|
1346
1690
|
{
|
|
1347
1691
|
type: "button",
|
|
1348
|
-
onClick: () =>
|
|
1349
|
-
className:
|
|
1692
|
+
onClick: () => z("mobile"),
|
|
1693
|
+
className: D(
|
|
1350
1694
|
"gvp-toggle-btn",
|
|
1351
|
-
|
|
1695
|
+
L === "mobile" && "is-active"
|
|
1352
1696
|
),
|
|
1353
1697
|
"aria-label": "Mobile view",
|
|
1354
|
-
"aria-pressed":
|
|
1355
|
-
children: /* @__PURE__ */
|
|
1698
|
+
"aria-pressed": L === "mobile",
|
|
1699
|
+
children: /* @__PURE__ */ r(ht, {})
|
|
1356
1700
|
}
|
|
1357
1701
|
)
|
|
1358
1702
|
] }) }),
|
|
1359
|
-
|
|
1703
|
+
a && /* @__PURE__ */ r(
|
|
1360
1704
|
"button",
|
|
1361
1705
|
{
|
|
1362
1706
|
type: "button",
|
|
1363
|
-
onClick:
|
|
1707
|
+
onClick: a,
|
|
1364
1708
|
className: "gvp-close",
|
|
1365
1709
|
"aria-label": "Close",
|
|
1366
|
-
children: /* @__PURE__ */
|
|
1710
|
+
children: /* @__PURE__ */ r(mt, {})
|
|
1367
1711
|
}
|
|
1368
1712
|
),
|
|
1369
|
-
|
|
1370
|
-
|
|
1713
|
+
lt && /* @__PURE__ */ r(
|
|
1714
|
+
nn,
|
|
1371
1715
|
{
|
|
1372
|
-
tracks:
|
|
1373
|
-
activeIndex:
|
|
1374
|
-
onSelect:
|
|
1716
|
+
tracks: de,
|
|
1717
|
+
activeIndex: he >= 0 ? he : de[0].index,
|
|
1718
|
+
onSelect: Ce
|
|
1375
1719
|
}
|
|
1376
1720
|
),
|
|
1377
|
-
!
|
|
1721
|
+
!j && ee && /* @__PURE__ */ r(
|
|
1378
1722
|
"button",
|
|
1379
1723
|
{
|
|
1380
1724
|
type: "button",
|
|
1381
1725
|
className: "gvp-click-layer",
|
|
1382
|
-
onClick: () => void
|
|
1383
|
-
"aria-label":
|
|
1726
|
+
onClick: () => void ve(),
|
|
1727
|
+
"aria-label": ue ? "Pause" : "Play"
|
|
1384
1728
|
}
|
|
1385
1729
|
),
|
|
1386
|
-
!
|
|
1730
|
+
!j && !ee && !ue && /* @__PURE__ */ r("div", { className: "gvp-play-wrap", children: /* @__PURE__ */ b(
|
|
1387
1731
|
"button",
|
|
1388
1732
|
{
|
|
1389
1733
|
type: "button",
|
|
1390
|
-
onClick: () => void
|
|
1391
|
-
onMouseEnter: () =>
|
|
1392
|
-
onMouseLeave: () =>
|
|
1734
|
+
onClick: () => void ve(),
|
|
1735
|
+
onMouseEnter: () => se(!0),
|
|
1736
|
+
onMouseLeave: () => se(!1),
|
|
1393
1737
|
className: "gvp-play",
|
|
1394
1738
|
"aria-label": "Play",
|
|
1395
1739
|
children: [
|
|
1396
|
-
/* @__PURE__ */
|
|
1397
|
-
|
|
1740
|
+
/* @__PURE__ */ r(pt, {}),
|
|
1741
|
+
i && We && /* @__PURE__ */ r("span", { className: "gvp-tooltip", role: "tooltip", children: i })
|
|
1398
1742
|
]
|
|
1399
1743
|
}
|
|
1400
1744
|
) }),
|
|
1401
|
-
!
|
|
1402
|
-
|
|
1745
|
+
!j && ee && /* @__PURE__ */ r(
|
|
1746
|
+
Rt,
|
|
1403
1747
|
{
|
|
1404
|
-
video:
|
|
1405
|
-
isPlaying:
|
|
1406
|
-
container:
|
|
1407
|
-
onTogglePlay: () => void
|
|
1408
|
-
qualityLevels:
|
|
1409
|
-
currentLevel:
|
|
1410
|
-
selectedLevel:
|
|
1411
|
-
onSelectLevel:
|
|
1748
|
+
video: me,
|
|
1749
|
+
isPlaying: ue,
|
|
1750
|
+
container: _e,
|
|
1751
|
+
onTogglePlay: () => void ve(),
|
|
1752
|
+
qualityLevels: Fe,
|
|
1753
|
+
currentLevel: je,
|
|
1754
|
+
selectedLevel: Le,
|
|
1755
|
+
onSelectLevel: Ee,
|
|
1756
|
+
thumbnails: Je,
|
|
1757
|
+
chapters: Xe,
|
|
1758
|
+
hasPrev: Ge,
|
|
1759
|
+
hasNext: ge,
|
|
1760
|
+
onPrev: () => oe(q - 1, !0),
|
|
1761
|
+
onNext: () => oe(q + 1, !0)
|
|
1412
1762
|
}
|
|
1413
1763
|
),
|
|
1414
|
-
!
|
|
1764
|
+
!j && !ee && /* @__PURE__ */ r("div", { className: "gvp-bottom-fade" })
|
|
1415
1765
|
]
|
|
1416
1766
|
}
|
|
1417
1767
|
)
|
|
1418
1768
|
);
|
|
1419
1769
|
};
|
|
1420
1770
|
export {
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1771
|
+
an as ReactVideoPlayer,
|
|
1772
|
+
Gt as parseYouTubeId,
|
|
1773
|
+
en as parseYouTubeStart,
|
|
1774
|
+
tn as youTubeEmbedUrl
|
|
1425
1775
|
};
|
|
1426
1776
|
//# sourceMappingURL=index.mjs.map
|