@banou/media-player 0.10.35 → 0.10.36
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 +18 -7
- package/dist/index.js +603 -599
- package/dist/language/index.d.ts +39 -5
- package/dist/language/index.js +53 -18
- package/dist/react/video-player.d.ts +18 -2
- package/package.json +1 -1
- package/src/lib/language/index.ts +94 -13
- package/src/lib/react/hooks/use-playback.ts +20 -19
- package/src/lib/react/video-player.tsx +26 -7
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { c as e, l as t, m as n, n as r, o as i, p as a, r as o, s, t as c, u as l } from "./engine-BZDbaSfM.js";
|
|
2
|
-
import { languageOf as u,
|
|
3
|
-
import { n as
|
|
4
|
-
import { Children as
|
|
5
|
-
import { css as
|
|
6
|
-
import { createPlayer as
|
|
7
|
-
import { definePlayerFeature as
|
|
8
|
-
import { makeRemuxer as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { createMediaElementSource as
|
|
11
|
-
import { Captions as
|
|
12
|
-
import { Tooltip as
|
|
2
|
+
import { languageOf as u, playsIn as d, startingTracks as f } from "./language/index.js";
|
|
3
|
+
import { n as p, r as m, t as h } from "./chapters-EBYXcEml.js";
|
|
4
|
+
import { Children as g, Fragment as _, createContext as v, isValidElement as y, useCallback as b, useContext as x, useEffect as S, useMemo as C, useRef as w, useState as T, useSyncExternalStore as E } from "react";
|
|
5
|
+
import { css as D, keyframes as O } from "@emotion/react";
|
|
6
|
+
import { createPlayer as k, useContainerAttach as A, useMediaAttach as j } from "@videojs/react";
|
|
7
|
+
import { definePlayerFeature as M, videoFeatures as N } from "@videojs/core/dom";
|
|
8
|
+
import { makeRemuxer as P } from "libav-wasm";
|
|
9
|
+
import { Fragment as F, jsx as I, jsxs as L } from "@emotion/react/jsx-runtime";
|
|
10
|
+
import { createMediaElementSource as R } from "@banou/ponyfill/web-audio";
|
|
11
|
+
import { Captions as z, CaptionsOff as B, Check as V, ChevronLeft as ee, ChevronRight as te, Copy as H, Maximize as ne, Minimize as U, Pause as re, Play as W, RotateCcw as G, Settings as K, TriangleAlert as q, Volume1 as ie, Volume2 as J, VolumeX as ae } from "lucide-react";
|
|
12
|
+
import { Tooltip as oe } from "react-tooltip";
|
|
13
13
|
//#region src/lib/react/source-feature.ts
|
|
14
|
-
var
|
|
14
|
+
var se = {
|
|
15
15
|
indexes: [],
|
|
16
16
|
chapters: [],
|
|
17
17
|
thumbnails: [],
|
|
@@ -36,19 +36,19 @@ var oe = {
|
|
|
36
36
|
playbackErrors: [],
|
|
37
37
|
ready: !1,
|
|
38
38
|
setSourceState: () => {}
|
|
39
|
-
},
|
|
39
|
+
}, ce = M({
|
|
40
40
|
name: "source",
|
|
41
|
-
state: () => ({ ...
|
|
41
|
+
state: () => ({ ...se }),
|
|
42
42
|
attach({ set: e }) {
|
|
43
43
|
e({
|
|
44
44
|
setSourceState: (t) => e(t),
|
|
45
45
|
setHideUI: (t) => e({ hideUI: t })
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
49
|
-
features: [...
|
|
48
|
+
}), le = k({
|
|
49
|
+
features: [...N, ce],
|
|
50
50
|
displayName: "MediaPlayer"
|
|
51
|
-
}), Y =
|
|
51
|
+
}), Y = le.usePlayer, ue = {
|
|
52
52
|
ar: () => import("./ar-CS4Yzfxw.js"),
|
|
53
53
|
cs: () => import("./cs-CxBZ1aTx.js"),
|
|
54
54
|
de: () => import("./de-DphEdq0O.js"),
|
|
@@ -75,7 +75,7 @@ var oe = {
|
|
|
75
75
|
vi: () => import("./vi-oOaDECwu.js"),
|
|
76
76
|
"zh-Hans": () => import("./zh-Hans-IhL1Pl78.js"),
|
|
77
77
|
"zh-Hant": () => import("./zh-Hant-C5YyFjEc.js")
|
|
78
|
-
},
|
|
78
|
+
}, de = Object.keys(ue), fe = (e) => {
|
|
79
79
|
try {
|
|
80
80
|
let t = new Intl.Locale(e), { language: n, script: r } = t.maximize();
|
|
81
81
|
return {
|
|
@@ -87,31 +87,31 @@ var oe = {
|
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
}, X = (e) => {
|
|
90
|
-
let t =
|
|
90
|
+
let t = fe(e);
|
|
91
91
|
if (!t) return;
|
|
92
|
-
let n =
|
|
93
|
-
...
|
|
92
|
+
let n = de.map((e) => ({
|
|
93
|
+
...fe(e),
|
|
94
94
|
catalogue: e
|
|
95
95
|
}));
|
|
96
96
|
return (n.find(({ tag: e }) => e === t.tag) ?? n.find(({ language: e, script: n }) => e === t.language && n === t.script) ?? n.find(({ language: e }) => e === t.language))?.catalogue;
|
|
97
|
-
},
|
|
98
|
-
let n =
|
|
99
|
-
return n || (n = Promise.all([import("@formatjs/intl"),
|
|
97
|
+
}, pe = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ new Map(), Z = (e, t) => {
|
|
98
|
+
let n = me.get(e);
|
|
99
|
+
return n || (n = Promise.all([import("@formatjs/intl"), ue[t]()]).then(([{ createIntl: t }, { default: n }]) => {
|
|
100
100
|
let r = t({
|
|
101
101
|
locale: e,
|
|
102
102
|
defaultLocale: "en",
|
|
103
103
|
messages: n
|
|
104
104
|
});
|
|
105
|
-
return
|
|
106
|
-
}), n.catch(() =>
|
|
107
|
-
},
|
|
105
|
+
return pe.set(e, r), r;
|
|
106
|
+
}), n.catch(() => me.delete(e)), me.set(e, n)), n;
|
|
107
|
+
}, he = (e) => {
|
|
108
108
|
try {
|
|
109
109
|
return Intl.getCanonicalLocales(e)[0];
|
|
110
110
|
} catch {
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
|
-
},
|
|
114
|
-
let r = t ?
|
|
113
|
+
}, ge = (e, t) => {
|
|
114
|
+
let r = t ? he(t) ?? "en" : void 0;
|
|
115
115
|
return {
|
|
116
116
|
format: (t, ...[r]) => e ? e.formatMessage({
|
|
117
117
|
id: t,
|
|
@@ -120,10 +120,10 @@ var oe = {
|
|
|
120
120
|
number: (e, t) => new Intl.NumberFormat(r ?? "en", t).format(e),
|
|
121
121
|
locale: r
|
|
122
122
|
};
|
|
123
|
-
},
|
|
124
|
-
let n = e ? X(e) : void 0, [, r] =
|
|
125
|
-
|
|
126
|
-
if (!e || !n ||
|
|
123
|
+
}, _e = ge(void 0, void 0), ve = v(_e), Q = () => x(ve), ye = ({ language: e, children: t }) => {
|
|
124
|
+
let n = e ? X(e) : void 0, [, r] = T();
|
|
125
|
+
S(() => {
|
|
126
|
+
if (!e || !n || pe.has(e)) return;
|
|
127
127
|
let t = !1;
|
|
128
128
|
return Z(e, n).then((e) => {
|
|
129
129
|
t || r(e);
|
|
@@ -131,12 +131,12 @@ var oe = {
|
|
|
131
131
|
t = !0;
|
|
132
132
|
};
|
|
133
133
|
}, [e, n]);
|
|
134
|
-
let i = e && n ?
|
|
135
|
-
return /* @__PURE__ */
|
|
134
|
+
let i = e && n ? pe.get(e) : void 0, a = C(() => e ? ge(i, e) : _e, [i, e]);
|
|
135
|
+
return /* @__PURE__ */ I(ve.Provider, {
|
|
136
136
|
value: a,
|
|
137
137
|
children: t
|
|
138
138
|
});
|
|
139
|
-
},
|
|
139
|
+
}, be = (e, t) => {
|
|
140
140
|
if (e && e !== "und") try {
|
|
141
141
|
return new Intl.DisplayNames([t ?? (navigator.language || "en")], {
|
|
142
142
|
type: "language",
|
|
@@ -145,32 +145,28 @@ var oe = {
|
|
|
145
145
|
} catch {
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
|
-
},
|
|
149
|
-
let r = (e) => t ? t.format(a.track, { number: e }) : n(a.track, { number: e }), i = e.map((e) =>
|
|
148
|
+
}, xe = (e) => e?.replace(/_/g, " ").trim() || void 0, Se = (e, t) => {
|
|
149
|
+
let r = (e) => t ? t.format(a.track, { number: e }) : n(a.track, { number: e }), i = e.map((e) => be(e.language, t?.locale) ?? xe(e.title) ?? r(e.streamIndex)), o = i.reduce((e, t) => ({
|
|
150
150
|
...e,
|
|
151
151
|
[t]: (e[t] ?? 0) + 1
|
|
152
152
|
}), {});
|
|
153
153
|
return e.map((e, t) => {
|
|
154
|
-
let n = i[t], r =
|
|
154
|
+
let n = i[t], r = xe(e.title);
|
|
155
155
|
return {
|
|
156
156
|
track: e,
|
|
157
157
|
label: (o[n] ?? 0) > 1 && r && r !== n ? `${n} (${r})` : n
|
|
158
158
|
};
|
|
159
159
|
});
|
|
160
|
-
},
|
|
160
|
+
}, Ce = (e, t) => Se(e, t).map(({ track: e, label: t }) => ({
|
|
161
161
|
id: e.streamIndex,
|
|
162
162
|
label: t
|
|
163
|
-
})),
|
|
163
|
+
})), we = [
|
|
164
164
|
0,
|
|
165
165
|
250,
|
|
166
166
|
1e3,
|
|
167
167
|
3e3,
|
|
168
168
|
1e4
|
|
169
|
-
],
|
|
170
|
-
if (e === null) return;
|
|
171
|
-
let n = e === void 0 ? 0 : d(e, t);
|
|
172
|
-
return t[Math.max(n, 0)]?.streamIndex;
|
|
173
|
-
}, Oe = (e) => e instanceof Error ? e.message : String(e), ke = (e) => {
|
|
169
|
+
], Te = 6e4, Ee = 500, De = 15e3, Oe = (e) => e instanceof Error ? e.message : String(e), ke = (e) => {
|
|
174
170
|
let t = [], n = e?.cause;
|
|
175
171
|
for (let e = 0; n != null && e < 8; e++) {
|
|
176
172
|
if (typeof MediaError < "u" && n instanceof MediaError) {
|
|
@@ -181,52 +177,57 @@ var oe = {
|
|
|
181
177
|
}
|
|
182
178
|
return t.length ? t.join("\n") : void 0;
|
|
183
179
|
}, Ae = (e, t, n, r) => {
|
|
184
|
-
let a = Y(), { read: o, size: c, publicPath: l = "", libavWorkerUrl:
|
|
185
|
-
|
|
186
|
-
let [
|
|
180
|
+
let a = Y(), { read: o, size: c, publicPath: l = "", libavWorkerUrl: p = "", jassubWorkerUrl: m = "", jassubWasmUrl: h = "", jassubLegacyWasmUrl: g, defaultFontUrl: _, cjkFontUrl: v, bufferSize: y, autoplay: x = !1, chapters: C, seekPrepareBudgetMs: E = Ee } = n ?? {}, D = w(C);
|
|
181
|
+
D.current = C;
|
|
182
|
+
let [O, k] = T(), A = O && O.size === c ? O.streamIndex : void 0, [j, M] = T(0), N = w({
|
|
187
183
|
count: 0,
|
|
188
184
|
at: 0
|
|
189
|
-
}),
|
|
190
|
-
|
|
185
|
+
}), P = w(void 0);
|
|
186
|
+
S(() => (N.current = {
|
|
191
187
|
count: 0,
|
|
192
188
|
at: 0
|
|
193
189
|
}, a.setSourceState({ playbackErrors: [] }), () => {
|
|
194
|
-
|
|
190
|
+
P.current && clearTimeout(P.current);
|
|
195
191
|
}), [c]);
|
|
196
|
-
let
|
|
197
|
-
|
|
198
|
-
let
|
|
192
|
+
let F = w(null), I = w(null), L = w(void 0), R = w(c);
|
|
193
|
+
R.current = c;
|
|
194
|
+
let z = w({
|
|
199
195
|
audio: [],
|
|
200
196
|
subtitles: []
|
|
201
|
-
}),
|
|
202
|
-
|
|
203
|
-
let
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
U
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
let
|
|
197
|
+
}), B = b(() => z.current.audio.find((e) => e.streamIndex === a.selectedAudioTrack), [a]), V = w(o);
|
|
198
|
+
V.current = o;
|
|
199
|
+
let ee = {
|
|
200
|
+
audio: n?.preferredAudioLanguage,
|
|
201
|
+
original: n?.originalLanguage,
|
|
202
|
+
subtitles: n?.preferredSubtitleLanguage,
|
|
203
|
+
alwaysSubtitles: n?.alwaysShowSubtitles
|
|
204
|
+
}, te = w(ee);
|
|
205
|
+
te.current = ee;
|
|
206
|
+
let H = w(n?.onPreferredAudioLanguageChange);
|
|
207
|
+
H.current = n?.onPreferredAudioLanguageChange;
|
|
208
|
+
let ne = w(n?.onPreferredSubtitleLanguageChange);
|
|
209
|
+
ne.current = n?.onPreferredSubtitleLanguageChange;
|
|
210
|
+
let U = w(n?.onAlwaysShowSubtitlesChange);
|
|
211
|
+
U.current = n?.onAlwaysShowSubtitlesChange;
|
|
212
|
+
let re = w(n?.onSeek);
|
|
213
|
+
re.current = n?.onSeek;
|
|
214
|
+
let W = w(n?.onPlaybackError);
|
|
215
|
+
W.current = n?.onPlaybackError;
|
|
216
|
+
let G = w(r);
|
|
217
|
+
G.current = r;
|
|
218
|
+
let K = Q(), q = w(K);
|
|
219
|
+
q.current = K, S(() => {
|
|
220
|
+
let { audio: e, subtitles: t } = z.current;
|
|
221
|
+
t.length && a.setSourceState({ subtitleTracks: Ce(t, K) }), e.length && a.setSourceState({ audioTracks: Ce(e, K) });
|
|
222
|
+
}, [a, K]);
|
|
223
|
+
let ie = b((e) => {
|
|
223
224
|
let t = typeof e == "number" ? e : void 0, n = a.selectedSubtitleTrack === void 0;
|
|
224
|
-
|
|
225
|
-
let r =
|
|
226
|
-
i !== void 0 &&
|
|
227
|
-
}, [a]), J =
|
|
228
|
-
let t =
|
|
229
|
-
if (!t ||
|
|
225
|
+
L.current = R.current, a.setSourceState({ selectedSubtitleTrack: t }), F.current?.selectSubtitleStream(t);
|
|
226
|
+
let r = z.current.subtitles.find((e) => e.streamIndex === t), i = t === void 0 ? null : u(r) ?? (n ? r?.title?.trim() || "und" : void 0);
|
|
227
|
+
i !== void 0 && ne.current?.(i), i && d(B(), i) && U.current?.(!0);
|
|
228
|
+
}, [a, B]), J = b((e) => {
|
|
229
|
+
let t = F.current;
|
|
230
|
+
if (!t || E <= 0) {
|
|
230
231
|
a.seek(e);
|
|
231
232
|
return;
|
|
232
233
|
}
|
|
@@ -240,35 +241,35 @@ var oe = {
|
|
|
240
241
|
a.setSourceState({ seekingTo: e });
|
|
241
242
|
let c = t.videoElement, l = () => {
|
|
242
243
|
c?.removeEventListener("seeked", l), clearTimeout(u), a.setSourceState({ seekingTo: void 0 });
|
|
243
|
-
}, u = setTimeout(l,
|
|
244
|
+
}, u = setTimeout(l, De);
|
|
244
245
|
c?.addEventListener("seeked", l);
|
|
245
246
|
let d = setTimeout(() => {
|
|
246
247
|
o = "deadline", s();
|
|
247
|
-
},
|
|
248
|
+
}, E);
|
|
248
249
|
t.prepareSeek(e).catch(() => {}).finally(() => {
|
|
249
250
|
clearTimeout(d), s();
|
|
250
251
|
});
|
|
251
|
-
}, [a,
|
|
252
|
-
if (typeof e != "number" ||
|
|
253
|
-
a.setSourceState({ selectedAudioTrack: e }),
|
|
254
|
-
size:
|
|
252
|
+
}, [a, E]), ae = b((e) => {
|
|
253
|
+
if (typeof e != "number" || R.current === void 0) return;
|
|
254
|
+
a.setSourceState({ selectedAudioTrack: e }), k({
|
|
255
|
+
size: R.current,
|
|
255
256
|
streamIndex: e
|
|
256
257
|
});
|
|
257
|
-
let t = u(
|
|
258
|
-
t !== void 0 &&
|
|
259
|
-
}, [a]),
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
selectSubtitleTrack:
|
|
263
|
-
selectAudioTrack:
|
|
258
|
+
let t = u(z.current.audio.find((t) => t.streamIndex === e));
|
|
259
|
+
t !== void 0 && H.current?.(t);
|
|
260
|
+
}, [a]), oe = Y((e) => e.setSourceState);
|
|
261
|
+
S(() => {
|
|
262
|
+
oe({
|
|
263
|
+
selectSubtitleTrack: ie,
|
|
264
|
+
selectAudioTrack: ae,
|
|
264
265
|
requestSeek: J
|
|
265
266
|
});
|
|
266
267
|
}, [
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
oe,
|
|
269
|
+
ie,
|
|
270
|
+
ae,
|
|
270
271
|
J
|
|
271
|
-
]),
|
|
272
|
+
]), S(() => {
|
|
272
273
|
if (!e || !t || !c || !o) return;
|
|
273
274
|
let n = !1;
|
|
274
275
|
a.setSourceState({
|
|
@@ -301,60 +302,60 @@ var oe = {
|
|
|
301
302
|
let t = i(e);
|
|
302
303
|
if (r(e, t), t) {
|
|
303
304
|
let t = performance.now();
|
|
304
|
-
t -
|
|
305
|
+
t - N.current.at > Te && (N.current = {
|
|
305
306
|
count: 0,
|
|
306
307
|
at: t
|
|
307
308
|
});
|
|
308
|
-
let n =
|
|
309
|
-
|
|
310
|
-
count:
|
|
309
|
+
let n = we[Math.min(N.current.count, we.length - 1)];
|
|
310
|
+
N.current = {
|
|
311
|
+
count: N.current.count + 1,
|
|
311
312
|
at: t
|
|
312
|
-
}, console.warn(`the media element failed; rebuilding the pipeline${n ? ` in ${n}ms` : ""}`, e),
|
|
313
|
+
}, console.warn(`the media element failed; rebuilding the pipeline${n ? ` in ${n}ms` : ""}`, e), P.current && clearTimeout(P.current), P.current = setTimeout(() => M((e) => e + 1), n);
|
|
313
314
|
return;
|
|
314
315
|
}
|
|
315
|
-
console.error("playback failed", e), a.setSourceState({ playbackError: e }),
|
|
316
|
+
console.error("playback failed", e), a.setSourceState({ playbackError: e }), W.current?.(e);
|
|
316
317
|
};
|
|
317
318
|
return (async () => {
|
|
318
319
|
try {
|
|
319
320
|
let r = await s({
|
|
320
321
|
videoElement: e,
|
|
321
322
|
subtitleContainer: t,
|
|
322
|
-
read: (e, t) =>
|
|
323
|
+
read: (e, t) => V.current(e, t),
|
|
323
324
|
length: c,
|
|
324
325
|
publicPath: l,
|
|
325
|
-
libavWorkerUrl:
|
|
326
|
-
jassubWorkerUrl:
|
|
327
|
-
jassubWasmUrl:
|
|
328
|
-
jassubLegacyWasmUrl:
|
|
329
|
-
defaultFontUrl:
|
|
330
|
-
cjkFontUrl:
|
|
331
|
-
bufferSize:
|
|
332
|
-
audioStreamIndex:
|
|
333
|
-
chooseAudioStream: (e) =>
|
|
334
|
-
let t = z.current;
|
|
335
|
-
return t === void 0 ? void 0 : e[d(t, e)]?.streamIndex;
|
|
336
|
-
},
|
|
326
|
+
libavWorkerUrl: p,
|
|
327
|
+
jassubWorkerUrl: m,
|
|
328
|
+
jassubWasmUrl: h,
|
|
329
|
+
jassubLegacyWasmUrl: g,
|
|
330
|
+
defaultFontUrl: _,
|
|
331
|
+
cjkFontUrl: v,
|
|
332
|
+
bufferSize: y,
|
|
333
|
+
audioStreamIndex: A,
|
|
334
|
+
chooseAudioStream: (e) => e[f(e, [], te.current).audio]?.streamIndex,
|
|
337
335
|
onReady: () => {
|
|
338
336
|
if (n) return;
|
|
339
337
|
a.setSourceState({ ready: !0 });
|
|
340
|
-
let t =
|
|
341
|
-
|
|
338
|
+
let t = I.current;
|
|
339
|
+
I.current = null, t && t.size === c && t.time > 0 && (e.currentTime = t.time), x && e.play().catch(() => {});
|
|
342
340
|
},
|
|
343
341
|
onError: u,
|
|
344
342
|
onRecovered: () => {
|
|
345
343
|
n || a.setSourceState({ playbackError: null });
|
|
346
344
|
},
|
|
347
|
-
onSeek: (e) =>
|
|
348
|
-
onOutput: (e) =>
|
|
345
|
+
onSeek: (e) => re.current?.(e),
|
|
346
|
+
onOutput: (e) => G.current?.(e),
|
|
349
347
|
onSubtitleStreams: (e) => {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
348
|
+
if (n) return;
|
|
349
|
+
z.current.subtitles = e;
|
|
350
|
+
let t = B(), r = f(t ? [t] : [], e, te.current).subtitles;
|
|
351
|
+
a.setSourceState({
|
|
352
|
+
subtitleTracks: Ce(e, q.current),
|
|
353
|
+
...L.current === c ? {} : { selectedSubtitleTrack: r === null ? void 0 : e[Math.max(r, 0)]?.streamIndex }
|
|
354
|
+
});
|
|
354
355
|
},
|
|
355
356
|
onAudioStreams: (e, t) => {
|
|
356
|
-
n || (
|
|
357
|
-
audioTracks:
|
|
357
|
+
n || (z.current.audio = e, a.setSourceState({
|
|
358
|
+
audioTracks: Ce(e, q.current),
|
|
358
359
|
selectedAudioTrack: t
|
|
359
360
|
}));
|
|
360
361
|
}
|
|
@@ -363,9 +364,9 @@ var oe = {
|
|
|
363
364
|
r.destroy();
|
|
364
365
|
return;
|
|
365
366
|
}
|
|
366
|
-
|
|
367
|
+
F.current = r, a.setSourceState({
|
|
367
368
|
indexes: r.indexes,
|
|
368
|
-
chapters:
|
|
369
|
+
chapters: D.current ?? r.chapters
|
|
369
370
|
});
|
|
370
371
|
let i = a.selectedSubtitleTrack;
|
|
371
372
|
r.selectSubtitleStream(typeof i == "number" ? i : void 0);
|
|
@@ -373,27 +374,28 @@ var oe = {
|
|
|
373
374
|
u(e);
|
|
374
375
|
}
|
|
375
376
|
})(), () => {
|
|
376
|
-
n = !0,
|
|
377
|
+
n = !0, I.current = {
|
|
377
378
|
time: e.currentTime,
|
|
378
379
|
size: c
|
|
379
|
-
},
|
|
380
|
+
}, F.current?.destroy(), F.current = null, a.setSourceState({ ready: !1 });
|
|
380
381
|
};
|
|
381
382
|
}, [
|
|
382
383
|
a,
|
|
384
|
+
B,
|
|
383
385
|
e,
|
|
384
386
|
t,
|
|
385
387
|
c,
|
|
386
388
|
l,
|
|
387
|
-
f,
|
|
388
389
|
p,
|
|
389
390
|
m,
|
|
390
391
|
h,
|
|
391
392
|
g,
|
|
392
393
|
_,
|
|
393
394
|
v,
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
395
|
+
y,
|
|
396
|
+
A,
|
|
397
|
+
x,
|
|
398
|
+
j
|
|
397
399
|
]);
|
|
398
400
|
}, je = 1001 / 24e3, Me = (e, t) => new Promise((n) => {
|
|
399
401
|
let r = setTimeout(n, t);
|
|
@@ -417,10 +419,10 @@ var oe = {
|
|
|
417
419
|
};
|
|
418
420
|
return r;
|
|
419
421
|
}, Pe = (e, t) => {
|
|
420
|
-
let n = Y(), r = Y((e) => e.setSourceState), i =
|
|
422
|
+
let n = Y(), r = Y((e) => e.setSourceState), i = w(t);
|
|
421
423
|
i.current = t;
|
|
422
424
|
let a = !!t;
|
|
423
|
-
|
|
425
|
+
S(() => {
|
|
424
426
|
let t = e;
|
|
425
427
|
if (!t) return;
|
|
426
428
|
if (typeof t.requestVideoFrameCallback != "function") return a ? (r({ stepFrame: Ne(async (e) => {
|
|
@@ -465,10 +467,10 @@ var oe = {
|
|
|
465
467
|
r
|
|
466
468
|
]);
|
|
467
469
|
}, Fe = 5e3, Ie = 6e4, Le = ({ publicPath: e, workerUrl: t, length: n, read: r, downloadedRanges: i }) => {
|
|
468
|
-
let [a, s] =
|
|
470
|
+
let [a, s] = T([]), c = w(null), l = w(r);
|
|
469
471
|
l.current = r;
|
|
470
|
-
let u =
|
|
471
|
-
return d.current = u,
|
|
472
|
+
let u = C(() => i?.map(({ startByteOffset: e, endByteOffset: t }) => [e, t]), [i?.map(({ startByteOffset: e, endByteOffset: t }) => `${e}-${t}`).join(",")]), d = w(u);
|
|
473
|
+
return d.current = u, S(() => {
|
|
472
474
|
if (!n || !r || !e || !t) return;
|
|
473
475
|
let i = !1, a = null, u, f = Fe, p = () => {
|
|
474
476
|
o({
|
|
@@ -496,17 +498,17 @@ var oe = {
|
|
|
496
498
|
n,
|
|
497
499
|
e,
|
|
498
500
|
t
|
|
499
|
-
]),
|
|
501
|
+
]), S(() => {
|
|
500
502
|
c.current?.update(u);
|
|
501
503
|
}, [u]), {
|
|
502
504
|
thumbnails: a,
|
|
503
|
-
requestThumbnail:
|
|
505
|
+
requestThumbnail: b((e) => {
|
|
504
506
|
c.current?.prioritize(e);
|
|
505
507
|
}, [])
|
|
506
508
|
};
|
|
507
509
|
}, Re = (e, t) => {
|
|
508
|
-
let n =
|
|
509
|
-
|
|
510
|
+
let n = w(null), [i, a] = T(!1), [o] = T(() => r());
|
|
511
|
+
S(() => {
|
|
510
512
|
if (!e || !t || !o) return;
|
|
511
513
|
let r = c({
|
|
512
514
|
video: e,
|
|
@@ -522,7 +524,7 @@ var oe = {
|
|
|
522
524
|
t,
|
|
523
525
|
o
|
|
524
526
|
]);
|
|
525
|
-
let s =
|
|
527
|
+
let s = b(() => {
|
|
526
528
|
n.current?.toggle().catch((e) => {
|
|
527
529
|
console.warn("picture in picture was refused", e);
|
|
528
530
|
});
|
|
@@ -536,16 +538,16 @@ var oe = {
|
|
|
536
538
|
let t = Be();
|
|
537
539
|
return t?.addEventListener("change", e), () => t?.removeEventListener("change", e);
|
|
538
540
|
}, He = () => !!Be()?.matches, Ue = () => !1, We = (e, t) => {
|
|
539
|
-
let [n, r] =
|
|
541
|
+
let [n, r] = T(!1), [i, a] = T(), o = w(t);
|
|
540
542
|
t && (o.current = t);
|
|
541
|
-
let s =
|
|
543
|
+
let s = w(!1), c = b((e) => {
|
|
542
544
|
s.current !== e && (s.current = e, o.current?.onArmedChange(e));
|
|
543
|
-
}, []), l =
|
|
545
|
+
}, []), l = b((t) => {
|
|
544
546
|
!e || e.readyState < 1 || e.error || (a(t), c(!0));
|
|
545
|
-
}, [e, c]), u =
|
|
547
|
+
}, [e, c]), u = b(() => {
|
|
546
548
|
a(void 0), c(!1);
|
|
547
549
|
}, [c]), d = !!t && !!e;
|
|
548
|
-
|
|
550
|
+
S(() => {
|
|
549
551
|
if (!d || !e) return;
|
|
550
552
|
let t = () => {
|
|
551
553
|
r(!0), u();
|
|
@@ -558,8 +560,8 @@ var oe = {
|
|
|
558
560
|
d,
|
|
559
561
|
u
|
|
560
562
|
]);
|
|
561
|
-
let f =
|
|
562
|
-
|
|
563
|
+
let f = E(Ve, He, Ue), [p, m] = T(!1);
|
|
564
|
+
S(() => {
|
|
563
565
|
if (!d) return;
|
|
564
566
|
let e = (e) => {
|
|
565
567
|
e.pointerType === "touch" && m(!0);
|
|
@@ -577,15 +579,15 @@ var oe = {
|
|
|
577
579
|
};
|
|
578
580
|
}, [d]);
|
|
579
581
|
let h = d && f && !p;
|
|
580
|
-
|
|
582
|
+
S(() => {
|
|
581
583
|
h || u();
|
|
582
584
|
}, [h, u]);
|
|
583
|
-
let g =
|
|
585
|
+
let g = b(() => {
|
|
584
586
|
Promise.resolve(e?.exitPictureInPicture?.()).catch((e) => {
|
|
585
587
|
console.warn("leaving picture in picture was refused", e);
|
|
586
588
|
});
|
|
587
589
|
}, [e]);
|
|
588
|
-
return
|
|
590
|
+
return C(() => h ? {
|
|
589
591
|
active: n,
|
|
590
592
|
armed: i,
|
|
591
593
|
arm: l,
|
|
@@ -630,7 +632,7 @@ var oe = {
|
|
|
630
632
|
inputGainDb: c()
|
|
631
633
|
});
|
|
632
634
|
await qe(i);
|
|
633
|
-
let s =
|
|
635
|
+
let s = R(i, e);
|
|
634
636
|
return r.port.postMessage({
|
|
635
637
|
enabled: a,
|
|
636
638
|
inputGainDb: c()
|
|
@@ -684,7 +686,7 @@ var oe = {
|
|
|
684
686
|
}, g = 0, _ = /* @__PURE__ */ new Map(), v = (e, t) => new Promise((n) => _.set(`${e}:${t}`, n)), y = -1;
|
|
685
687
|
p.onmessage = ({ data: e }) => {
|
|
686
688
|
if (e.type === "unsupported") {
|
|
687
|
-
|
|
689
|
+
U();
|
|
688
690
|
return;
|
|
689
691
|
}
|
|
690
692
|
e.spans && ((JSON.stringify(e.spans) !== JSON.stringify(h.spans) || e.end !== h.end) && g++, h = {
|
|
@@ -711,25 +713,25 @@ var oe = {
|
|
|
711
713
|
"ended"
|
|
712
714
|
];
|
|
713
715
|
for (let e of w) n.addEventListener(e, x);
|
|
714
|
-
let T = Infinity, E = !1, D = 0, O = !1, k = 0,
|
|
716
|
+
let T = Infinity, E = !1, D = 0, O = !1, k = 0, A = 0, j = /* @__PURE__ */ new Map(), M = (e) => {
|
|
715
717
|
let t = e;
|
|
716
718
|
for (let [e, n] of h.spans) e <= t && t < n && (t = n);
|
|
717
719
|
return t >= (h.end ?? T) - .05 ? null : t;
|
|
718
|
-
}, N = (e) =>
|
|
719
|
-
let e = n.currentTime, t =
|
|
720
|
-
if (t !== null && t < e + Ye) return r && k <= t + 1 && t <=
|
|
720
|
+
}, N = (e) => j.get(Math.round(e * 10)) === g ? "idle" : e, F = () => {
|
|
721
|
+
let e = n.currentTime, t = M(e), r = O && y !== D;
|
|
722
|
+
if (t !== null && t < e + Ye) return r && k <= t + 1 && t <= A + Xe ? "read" : N(t);
|
|
721
723
|
if (r) return "read";
|
|
722
|
-
let i = t ??
|
|
724
|
+
let i = t ?? M(0);
|
|
723
725
|
return i === null ? "done" : N(i);
|
|
724
|
-
},
|
|
725
|
-
|
|
726
|
-
})])),
|
|
727
|
-
S(), E && s.size && typeof
|
|
728
|
-
},
|
|
726
|
+
}, I = () => {}, L = (e) => (e.catch(() => {}), Promise.race([e, new Promise((e) => {
|
|
727
|
+
I = () => e(void 0);
|
|
728
|
+
})])), R = () => {
|
|
729
|
+
S(), E && s.size && typeof F() == "number" && I(), l();
|
|
730
|
+
}, z = () => {
|
|
729
731
|
S(), l();
|
|
730
732
|
};
|
|
731
|
-
n.addEventListener("seeking",
|
|
732
|
-
let
|
|
733
|
+
n.addEventListener("seeking", R), n.addEventListener("seeked", z), n.addEventListener("timeupdate", z);
|
|
734
|
+
let B, V = async (e) => {
|
|
733
735
|
if (!O) return;
|
|
734
736
|
O = !1;
|
|
735
737
|
let t = v("ended", D);
|
|
@@ -738,8 +740,8 @@ var oe = {
|
|
|
738
740
|
run: D,
|
|
739
741
|
finished: e
|
|
740
742
|
}), await t;
|
|
741
|
-
},
|
|
742
|
-
if (
|
|
743
|
+
}, ee = async (e) => {
|
|
744
|
+
if (A = e.pts + e.duration, !e.data.byteLength) return;
|
|
743
745
|
let t = v("ack", D);
|
|
744
746
|
p.postMessage({
|
|
745
747
|
type: "fragment",
|
|
@@ -747,15 +749,15 @@ var oe = {
|
|
|
747
749
|
data: e.data
|
|
748
750
|
}, [e.data]), await t;
|
|
749
751
|
}, te = async (t) => {
|
|
750
|
-
if (
|
|
752
|
+
if (B = await P({
|
|
751
753
|
publicPath: t.publicPath,
|
|
752
754
|
workerUrl: t.libavWorkerUrl,
|
|
753
755
|
workerOptions: { type: "module" },
|
|
754
756
|
length: t.length,
|
|
755
757
|
read: (e, n) => d(t, e, n),
|
|
756
758
|
audioStreamIndex: t.audioStreamIndex
|
|
757
|
-
}), a) return e(
|
|
758
|
-
let n = await
|
|
759
|
+
}), a) return e(B);
|
|
760
|
+
let n = await B.init();
|
|
759
761
|
if (!a) {
|
|
760
762
|
for (T = n.info.input.duration || Infinity, p.postMessage({
|
|
761
763
|
type: "init",
|
|
@@ -768,7 +770,7 @@ var oe = {
|
|
|
768
770
|
from: 0,
|
|
769
771
|
start: !0
|
|
770
772
|
}); !a;) {
|
|
771
|
-
let e =
|
|
773
|
+
let e = F();
|
|
772
774
|
if (e === "done") break;
|
|
773
775
|
if (e === "idle") {
|
|
774
776
|
await u();
|
|
@@ -776,15 +778,15 @@ var oe = {
|
|
|
776
778
|
}
|
|
777
779
|
try {
|
|
778
780
|
if (e === "read") {
|
|
779
|
-
let e = await
|
|
781
|
+
let e = await L(B.read());
|
|
780
782
|
if (a) return;
|
|
781
783
|
if (!e) continue;
|
|
782
|
-
await
|
|
784
|
+
await ee(e), e.finished && await V(!0);
|
|
783
785
|
} else {
|
|
784
|
-
await
|
|
785
|
-
let t =
|
|
786
|
+
await V(!1), j.set(Math.round(e * 10), g);
|
|
787
|
+
let t = B.seek(Math.max(0, e - Ze));
|
|
786
788
|
f(!0);
|
|
787
|
-
let r = await
|
|
789
|
+
let r = await L(t);
|
|
788
790
|
if (a) return;
|
|
789
791
|
if (!r) continue;
|
|
790
792
|
D++, O = !0, k = r.pts, p.postMessage({
|
|
@@ -793,16 +795,16 @@ var oe = {
|
|
|
793
795
|
pts: n.timestampOffset,
|
|
794
796
|
from: r.pts,
|
|
795
797
|
start: r.pts <= 0
|
|
796
|
-
}), await
|
|
798
|
+
}), await ee(r), r.finished && await V(!0);
|
|
797
799
|
}
|
|
798
800
|
} catch {
|
|
799
801
|
if (a) return;
|
|
800
|
-
await
|
|
802
|
+
await V(!1), typeof F() != "number" && await u();
|
|
801
803
|
}
|
|
802
804
|
}
|
|
803
|
-
e(
|
|
805
|
+
e(B), B = void 0;
|
|
804
806
|
}
|
|
805
|
-
}, H = () => {},
|
|
807
|
+
}, H = () => {}, ne = (e, t) => {
|
|
806
808
|
let n = !1, r = (e) => {
|
|
807
809
|
n && p.postMessage({
|
|
808
810
|
type: "end",
|
|
@@ -837,26 +839,26 @@ var oe = {
|
|
|
837
839
|
}, [t]);
|
|
838
840
|
}
|
|
839
841
|
});
|
|
840
|
-
},
|
|
842
|
+
}, U = () => {
|
|
841
843
|
if (!a) {
|
|
842
844
|
a = !0, f(!0), l(), clearInterval(C);
|
|
843
845
|
for (let e of w) n.removeEventListener(e, x);
|
|
844
|
-
n.removeEventListener("seeking",
|
|
846
|
+
n.removeEventListener("seeking", R), n.removeEventListener("seeked", z), n.removeEventListener("timeupdate", z), H(), B && e(B), p.terminate(), t.port.postMessage({ analysis: null });
|
|
845
847
|
for (let e of _.values()) e(h);
|
|
846
848
|
_.clear();
|
|
847
849
|
}
|
|
848
850
|
};
|
|
849
|
-
return "tap" in i ?
|
|
850
|
-
a || (console.warn("[media-player] the volume normalizer cannot analyse ahead:", e),
|
|
851
|
+
return "tap" in i ? ne(i.tap, i.audioStreamIndex) : te(i).catch((e) => {
|
|
852
|
+
a || (console.warn("[media-player] the volume normalizer cannot analyse ahead:", e), U());
|
|
851
853
|
}), S(), {
|
|
852
854
|
update: (e) => {
|
|
853
855
|
o = e, f(!1);
|
|
854
856
|
},
|
|
855
|
-
stop:
|
|
857
|
+
stop: U
|
|
856
858
|
};
|
|
857
859
|
}, et = (e, t, n, r, i) => {
|
|
858
|
-
let a =
|
|
859
|
-
|
|
860
|
+
let a = w(null), [o, s] = T(!1), [c, l] = T(null);
|
|
861
|
+
S(() => {
|
|
860
862
|
if (e && t) {
|
|
861
863
|
if (n && !a.current) {
|
|
862
864
|
let r = Je(e, t, { enabled: n });
|
|
@@ -872,15 +874,15 @@ var oe = {
|
|
|
872
874
|
e,
|
|
873
875
|
t,
|
|
874
876
|
n
|
|
875
|
-
]),
|
|
877
|
+
]), S(() => () => {
|
|
876
878
|
a.current?.release(), a.current = null, l(null);
|
|
877
879
|
}, [e]);
|
|
878
|
-
let u =
|
|
880
|
+
let u = w(i);
|
|
879
881
|
u.current = i;
|
|
880
|
-
let d =
|
|
882
|
+
let d = w(null), f = w(r);
|
|
881
883
|
f.current = r;
|
|
882
884
|
let { length: p, publicPath: m, libavWorkerUrl: h } = r && "read" in r ? r : {}, g = r && "tap" in r ? r.tap : void 0, _ = r?.audioStreamIndex;
|
|
883
|
-
return
|
|
885
|
+
return S(() => {
|
|
884
886
|
let r = f.current;
|
|
885
887
|
if (!c || !e || !t || !n || !r) return;
|
|
886
888
|
let i = $e({
|
|
@@ -902,7 +904,7 @@ var oe = {
|
|
|
902
904
|
h,
|
|
903
905
|
_,
|
|
904
906
|
g
|
|
905
|
-
]),
|
|
907
|
+
]), S(() => {
|
|
906
908
|
d.current?.update(i);
|
|
907
909
|
}, [i]), { refused: o };
|
|
908
910
|
}, tt = () => {
|
|
@@ -951,7 +953,7 @@ var oe = {
|
|
|
951
953
|
medium: "\n font-weight: 500;\n font-size: calc(0.8 * var(--mp-unit));\n line-height: calc(1.1 * var(--mp-unit));\n @media (min-width: 960px) {\n font-size: calc(1 * var(--mp-unit));\n line-height: calc(1.4 * var(--mp-unit));\n }\n ",
|
|
952
954
|
regular: "\n font-weight: 400;\n font-size: calc(0.8 * var(--mp-unit));\n line-height: calc(1.1 * var(--mp-unit));\n @media (min-width: 960px) {\n font-size: calc(1 * var(--mp-unit));\n line-height: calc(1.4 * var(--mp-unit));\n }\n "
|
|
953
955
|
}
|
|
954
|
-
}, nt =
|
|
956
|
+
}, nt = D`
|
|
955
957
|
display: flex;
|
|
956
958
|
justify-content: center;
|
|
957
959
|
align-items: center;
|
|
@@ -964,7 +966,7 @@ var oe = {
|
|
|
964
966
|
margin: auto;
|
|
965
967
|
pointer-events: none;
|
|
966
968
|
}
|
|
967
|
-
`, rt =
|
|
969
|
+
`, rt = D`
|
|
968
970
|
position: absolute;
|
|
969
971
|
top: 0;
|
|
970
972
|
left: 0;
|
|
@@ -993,9 +995,9 @@ var oe = {
|
|
|
993
995
|
|
|
994
996
|
background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.3) 30%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.1) 80%, transparent 100%);
|
|
995
997
|
transition: opacity 0.1s cubic-bezier(.4,0,1,1);
|
|
996
|
-
`, it =
|
|
998
|
+
`, it = O`
|
|
997
999
|
to { transform: rotate(360deg); }
|
|
998
|
-
`, at =
|
|
1000
|
+
`, at = D`
|
|
999
1001
|
position: absolute;
|
|
1000
1002
|
inset: 0;
|
|
1001
1003
|
z-index: 2;
|
|
@@ -1013,7 +1015,7 @@ var oe = {
|
|
|
1013
1015
|
border-top-color: #fff;
|
|
1014
1016
|
animation: ${it} 0.8s linear infinite;
|
|
1015
1017
|
}
|
|
1016
|
-
`, ot =
|
|
1018
|
+
`, ot = D`
|
|
1017
1019
|
position: absolute;
|
|
1018
1020
|
inset: auto 0 20%;
|
|
1019
1021
|
z-index: 3;
|
|
@@ -1025,8 +1027,8 @@ var oe = {
|
|
|
1025
1027
|
pointer-events: none;
|
|
1026
1028
|
`, st = new Set(Object.values(a)), ct = (e) => e instanceof Error && st.has(e.label ?? ""), lt = (e, { format: t }) => ct(e) ? t(e.label, e.values) : e instanceof Error ? e.message : typeof e == "string" ? e : t(a.failed), ut = ({ onSubtitleRef: e }) => {
|
|
1027
1029
|
let t = Q(), n = Y((e) => e.title), r = Y((e) => e.hideUI), i = Y((e) => e.playbackError), a = Y((e) => e.ready), o = Y((e) => e.size), s = Y((e) => e.waiting), c = Y((e) => e.seekingTo);
|
|
1028
|
-
return /* @__PURE__ */ F
|
|
1029
|
-
n ? /* @__PURE__ */
|
|
1030
|
+
return /* @__PURE__ */ L(F, { children: [
|
|
1031
|
+
n ? /* @__PURE__ */ I("div", {
|
|
1030
1032
|
className: "title",
|
|
1031
1033
|
dir: "auto",
|
|
1032
1034
|
css: rt,
|
|
@@ -1036,13 +1038,13 @@ var oe = {
|
|
|
1036
1038
|
} : {} },
|
|
1037
1039
|
children: n
|
|
1038
1040
|
}) : void 0,
|
|
1039
|
-
((o ? !a : s) || c !== void 0) && !i ? /* @__PURE__ */
|
|
1040
|
-
i ? /* @__PURE__ */
|
|
1041
|
+
((o ? !a : s) || c !== void 0) && !i ? /* @__PURE__ */ I("div", { css: at }) : void 0,
|
|
1042
|
+
i ? /* @__PURE__ */ I("div", {
|
|
1041
1043
|
css: ot,
|
|
1042
1044
|
dir: "auto",
|
|
1043
1045
|
children: lt(i, t)
|
|
1044
1046
|
}) : void 0,
|
|
1045
|
-
/* @__PURE__ */
|
|
1047
|
+
/* @__PURE__ */ I("div", {
|
|
1046
1048
|
className: "subtitles",
|
|
1047
1049
|
ref: e,
|
|
1048
1050
|
css: nt
|
|
@@ -1052,7 +1054,7 @@ var oe = {
|
|
|
1052
1054
|
if (e === void 0) return "0:00";
|
|
1053
1055
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = Math.floor(e % 60);
|
|
1054
1056
|
return t > 0 ? `${t}:${n < 10 ? "0" : ""}${n}:${r < 10 ? "0" : ""}${r}` : `${n}:${r < 10 ? "0" : ""}${r}`;
|
|
1055
|
-
}, gt = (e, t) => `${ht(e)} / ${ht(t)}`, _t = (e) =>
|
|
1057
|
+
}, gt = (e, t) => `${ht(e)} / ${ht(t)}`, _t = (e) => D`
|
|
1056
1058
|
display: flex;
|
|
1057
1059
|
justify-content: flex-start;
|
|
1058
1060
|
|
|
@@ -1089,13 +1091,13 @@ var oe = {
|
|
|
1089
1091
|
unicode-bidi: plaintext;
|
|
1090
1092
|
}
|
|
1091
1093
|
|
|
1092
|
-
${e === "sm" &&
|
|
1094
|
+
${e === "sm" && D`
|
|
1093
1095
|
padding: calc(0.4 * var(--mp-unit))!important;
|
|
1094
1096
|
`}
|
|
1095
|
-
${e === "md" &&
|
|
1097
|
+
${e === "md" && D`
|
|
1096
1098
|
padding: calc(0.6 * var(--mp-unit))!important;
|
|
1097
1099
|
`}
|
|
1098
|
-
${e === "lg" &&
|
|
1100
|
+
${e === "lg" && D`
|
|
1099
1101
|
padding: calc(1.2 * var(--mp-unit))!important;
|
|
1100
1102
|
`}
|
|
1101
1103
|
`, vt = {
|
|
@@ -1109,9 +1111,9 @@ var oe = {
|
|
|
1109
1111
|
passive: !0
|
|
1110
1112
|
}), () => {
|
|
1111
1113
|
--vt.anchors === 0 && window.removeEventListener("pointermove", yt, { capture: !0 });
|
|
1112
|
-
}), xt =
|
|
1113
|
-
let l =
|
|
1114
|
-
return
|
|
1114
|
+
}), xt = v(!1), St = ({ id: e, toolTipText: t, text: n, delayShow: r = 0, closeDelay: i = 0, offset: a = 20, tooltipPlace: o = "top", disabled: s = !1, size: c = "md" }) => {
|
|
1115
|
+
let l = w(null), u = w(null), d = x(xt);
|
|
1116
|
+
return S(() => {
|
|
1115
1117
|
let e = bt(), t = () => {
|
|
1116
1118
|
let e = l.current;
|
|
1117
1119
|
if (!e) return;
|
|
@@ -1124,7 +1126,7 @@ var oe = {
|
|
|
1124
1126
|
for (let e of n) document.removeEventListener(e, t);
|
|
1125
1127
|
window.removeEventListener("resize", t);
|
|
1126
1128
|
};
|
|
1127
|
-
}, [d]), /* @__PURE__ */ F
|
|
1129
|
+
}, [d]), /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("div", {
|
|
1128
1130
|
ref: l,
|
|
1129
1131
|
"data-tooltip-id": e,
|
|
1130
1132
|
"data-open": !0,
|
|
@@ -1133,7 +1135,7 @@ var oe = {
|
|
|
1133
1135
|
"data-tooltip-delay-hide": i,
|
|
1134
1136
|
"data-tooltip-place": o,
|
|
1135
1137
|
children: n
|
|
1136
|
-
}), !s && /* @__PURE__ */
|
|
1138
|
+
}), !s && /* @__PURE__ */ I(oe, {
|
|
1137
1139
|
ref: u,
|
|
1138
1140
|
css: _t(c),
|
|
1139
1141
|
id: e,
|
|
@@ -1141,14 +1143,14 @@ var oe = {
|
|
|
1141
1143
|
children: t
|
|
1142
1144
|
})] });
|
|
1143
1145
|
}, Ct = ({ ref: e, onChange: t, orientation: n = "horizontal", disabled: r = !1 }) => {
|
|
1144
|
-
let [i, a] =
|
|
1146
|
+
let [i, a] = T(!1), o = w(t);
|
|
1145
1147
|
o.current = t;
|
|
1146
|
-
let s =
|
|
1148
|
+
let s = w(null), c = b((t, r) => {
|
|
1147
1149
|
let i = e.current;
|
|
1148
1150
|
if (!i) return 0;
|
|
1149
1151
|
let { left: a, right: o, top: s, bottom: c } = i.getBoundingClientRect(), l = n === "horizontal" ? (t - a) / (o - a) : (c - r) / (c - s);
|
|
1150
1152
|
return Math.min(Math.max(l, 0), 1);
|
|
1151
|
-
}, [e, n]), l =
|
|
1153
|
+
}, [e, n]), l = b((e) => {
|
|
1152
1154
|
if (!(r || e.button > 0)) {
|
|
1153
1155
|
s.current = e.pointerId;
|
|
1154
1156
|
try {
|
|
@@ -1156,9 +1158,9 @@ var oe = {
|
|
|
1156
1158
|
} catch {}
|
|
1157
1159
|
a(!0), o.current(c(e.clientX, e.clientY));
|
|
1158
1160
|
}
|
|
1159
|
-
}, [r, c]), u =
|
|
1161
|
+
}, [r, c]), u = b((e) => {
|
|
1160
1162
|
s.current === e.pointerId && o.current(c(e.clientX, e.clientY));
|
|
1161
|
-
}, [c]), d =
|
|
1163
|
+
}, [c]), d = b((e) => {
|
|
1162
1164
|
if (s.current === e.pointerId) {
|
|
1163
1165
|
s.current = null;
|
|
1164
1166
|
try {
|
|
@@ -1167,7 +1169,7 @@ var oe = {
|
|
|
1167
1169
|
a(!1);
|
|
1168
1170
|
}
|
|
1169
1171
|
}, []);
|
|
1170
|
-
return
|
|
1172
|
+
return S(() => {
|
|
1171
1173
|
r && (s.current = null, a(!1));
|
|
1172
1174
|
}, [r]), {
|
|
1173
1175
|
dragging: i,
|
|
@@ -1179,7 +1181,7 @@ var oe = {
|
|
|
1179
1181
|
style: { touchAction: "none" }
|
|
1180
1182
|
}
|
|
1181
1183
|
};
|
|
1182
|
-
}, wt =
|
|
1184
|
+
}, wt = D`
|
|
1183
1185
|
position: relative;
|
|
1184
1186
|
height: calc(.4 * var(--mp-unit));
|
|
1185
1187
|
|
|
@@ -1399,57 +1401,57 @@ var oe = {
|
|
|
1399
1401
|
--thumbnail-half: calc(9 * var(--mp-unit));
|
|
1400
1402
|
}
|
|
1401
1403
|
`, Tt = 4, Et = () => {
|
|
1402
|
-
let e = Y(), t = Y((e) => e.currentTime), n = Y((e) => e.requestSeek), r = Y((e) => e.duration), i = Y((e) => e.size), a = Y((e) => e.downloadedRanges), o = Y((e) => e.buffered), s = Y((e) => e.indexes), c = Y((e) => e.thumbnails), l = Y((e) => e.thumbnailAt), u = Y((e) => e.requestThumbnail), d = Y((e) => e.chapters),
|
|
1403
|
-
|
|
1404
|
+
let e = Y(), t = Y((e) => e.currentTime), n = Y((e) => e.requestSeek), r = Y((e) => e.duration), i = Y((e) => e.size), a = Y((e) => e.downloadedRanges), o = Y((e) => e.buffered), s = Y((e) => e.indexes), c = Y((e) => e.thumbnails), l = Y((e) => e.thumbnailAt), u = Y((e) => e.requestThumbnail), d = Y((e) => e.chapters), f = Y((e) => e.seekingTo), h = Y((e) => e.setSourceState), g = Y((e) => e.hideUI), _ = w(null), [v, y] = T(void 0), [b, x] = T(void 0), E = (e) => {
|
|
1405
|
+
x(e), u(e);
|
|
1404
1406
|
}, D = !!b;
|
|
1405
|
-
|
|
1407
|
+
S(() => {
|
|
1406
1408
|
if (D) return h({ seekPreview: !0 }), () => h({ seekPreview: !1 });
|
|
1407
|
-
}, [h, D]),
|
|
1409
|
+
}, [h, D]), S(() => {
|
|
1408
1410
|
g && E(void 0);
|
|
1409
1411
|
}, [g]);
|
|
1410
|
-
let O =
|
|
1412
|
+
let O = w(void 0), k = w(0), A = w(void 0), j = w(void 0), M = w(!1), { dragging: N, handlers: P } = Ct({
|
|
1411
1413
|
ref: _,
|
|
1412
1414
|
onChange: (e) => {
|
|
1413
|
-
if (k.current += 1,
|
|
1414
|
-
else if (!
|
|
1415
|
+
if (k.current += 1, A.current = e, j.current === void 0) j.current = e;
|
|
1416
|
+
else if (!M.current) {
|
|
1415
1417
|
let t = _.current?.getBoundingClientRect().width ?? 0;
|
|
1416
|
-
Math.abs(e -
|
|
1418
|
+
Math.abs(e - j.current) * t > Tt && (M.current = !0);
|
|
1417
1419
|
}
|
|
1418
1420
|
y(e), O.current !== "mouse" && E(e * r);
|
|
1419
1421
|
}
|
|
1420
|
-
}),
|
|
1421
|
-
O.current = e.pointerType, k.current = 0,
|
|
1422
|
-
},
|
|
1423
|
-
|
|
1424
|
-
let i = k.current > 0 ?
|
|
1422
|
+
}), F = (e) => {
|
|
1423
|
+
O.current = e.pointerType, k.current = 0, j.current = void 0, M.current = !1, P.onPointerDown(e);
|
|
1424
|
+
}, R = (t) => {
|
|
1425
|
+
P.onPointerUp(t);
|
|
1426
|
+
let i = k.current > 0 ? A.current : void 0;
|
|
1425
1427
|
if (i !== void 0 && r) {
|
|
1426
1428
|
let t = i * r;
|
|
1427
1429
|
n ? n(t) : e.seek(t);
|
|
1428
1430
|
}
|
|
1429
|
-
k.current = 0,
|
|
1430
|
-
},
|
|
1431
|
+
k.current = 0, M.current = !1, j.current = void 0, t.pointerType !== "mouse" && E(void 0);
|
|
1432
|
+
}, z = (e) => {
|
|
1431
1433
|
if (!_.current) return;
|
|
1432
1434
|
let { left: t, right: n } = _.current.getBoundingClientRect();
|
|
1433
1435
|
return Math.min(Math.max((e - t) / (n - t), 0), 1) * r;
|
|
1434
|
-
},
|
|
1435
|
-
|
|
1436
|
-
},
|
|
1437
|
-
|
|
1436
|
+
}, B = w("mouse"), V = (e) => {
|
|
1437
|
+
B.current = e.pointerType;
|
|
1438
|
+
}, ee = (e) => {
|
|
1439
|
+
B.current !== "touch" && E(z(e.clientX));
|
|
1438
1440
|
}, te = () => {
|
|
1439
1441
|
_.current && E(void 0);
|
|
1440
|
-
}, H = (e) => r ? e / r * 100 : 0,
|
|
1442
|
+
}, H = (e) => r ? e / r * 100 : 0, ne = (e, t, n) => {
|
|
1441
1443
|
let r = Number((n - t).toFixed(4)), i = t * 100;
|
|
1442
|
-
return /* @__PURE__ */
|
|
1444
|
+
return /* @__PURE__ */ I("div", {
|
|
1443
1445
|
className: "loaded-part",
|
|
1444
1446
|
style: {
|
|
1445
1447
|
transform: `scaleX(${r})`,
|
|
1446
1448
|
marginLeft: `${i}%`
|
|
1447
1449
|
}
|
|
1448
1450
|
}, e);
|
|
1449
|
-
},
|
|
1451
|
+
}, U = C(() => i === void 0 ? r ? o.map(([e, t], n) => ne(n, e / r, t / r)) : [] : a?.map((e, t) => {
|
|
1450
1452
|
if (!i || !r) return null;
|
|
1451
1453
|
let n = s.filter((t) => e.startByteOffset <= t.pos && t.pos <= e.endByteOffset), a = n.at(0), o = n.at(-1);
|
|
1452
|
-
return !a || !o ? null :
|
|
1454
|
+
return !a || !o ? null : ne(t, a.timestamp / r, o.timestamp / r);
|
|
1453
1455
|
}) ?? [], [
|
|
1454
1456
|
r,
|
|
1455
1457
|
i,
|
|
@@ -1457,41 +1459,41 @@ var oe = {
|
|
|
1457
1459
|
s.length,
|
|
1458
1460
|
a?.map(({ startByteOffset: e, endByteOffset: t }) => `${e}/${t}`).join(",")
|
|
1459
1461
|
]);
|
|
1460
|
-
|
|
1461
|
-
v !== void 0 && r &&
|
|
1462
|
+
S(() => {
|
|
1463
|
+
v !== void 0 && r && N && M.current && e.seek(v * r);
|
|
1462
1464
|
}, [
|
|
1463
1465
|
e,
|
|
1464
|
-
|
|
1466
|
+
N,
|
|
1465
1467
|
v,
|
|
1466
1468
|
r
|
|
1467
1469
|
]);
|
|
1468
|
-
let
|
|
1470
|
+
let re = C(() => {
|
|
1469
1471
|
if (!r) return 0;
|
|
1470
|
-
if (
|
|
1471
|
-
let e =
|
|
1472
|
+
if (N && v !== void 0) return v;
|
|
1473
|
+
let e = f ?? t;
|
|
1472
1474
|
return typeof e == "number" ? e / r : 0;
|
|
1473
1475
|
}, [
|
|
1474
1476
|
r,
|
|
1475
1477
|
t,
|
|
1476
|
-
|
|
1478
|
+
N,
|
|
1477
1479
|
v,
|
|
1478
|
-
|
|
1479
|
-
]),
|
|
1480
|
-
if (!
|
|
1481
|
-
let e = b / r * 100, t =
|
|
1482
|
-
return t >= 0 ? t :
|
|
1480
|
+
f
|
|
1481
|
+
]), W = C(() => p(d, r), [d, r]), G = W.length > 0, K = C(() => {
|
|
1482
|
+
if (!G || b === void 0 || !r) return -1;
|
|
1483
|
+
let e = b / r * 100, t = W.findIndex((t, n) => n < W.length - 1 && e >= t && e < W[n + 1]);
|
|
1484
|
+
return t >= 0 ? t : W.length - 2;
|
|
1483
1485
|
}, [
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
+
G,
|
|
1487
|
+
W,
|
|
1486
1488
|
b,
|
|
1487
1489
|
r
|
|
1488
|
-
]),
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
]),
|
|
1490
|
+
]), q = C(() => G ? m(W, (e) => e !== K) : void 0, [
|
|
1491
|
+
G,
|
|
1492
|
+
W,
|
|
1493
|
+
K
|
|
1494
|
+
]), ie = C(() => K >= 0 ? m(W, (e) => e === K) : void 0, [W, K]), J = C(() => {
|
|
1493
1495
|
if (b !== void 0) return d.find(({ start: e, end: t }) => e <= b && b < t);
|
|
1494
|
-
}, [d, b]), ae =
|
|
1496
|
+
}, [d, b]), ae = C(() => {
|
|
1495
1497
|
if (b) {
|
|
1496
1498
|
if (l) return l(b);
|
|
1497
1499
|
if (c.length) return c.find(({ startTime: e, endTime: t }) => e <= b && b < t);
|
|
@@ -1500,67 +1502,67 @@ var oe = {
|
|
|
1500
1502
|
c,
|
|
1501
1503
|
l,
|
|
1502
1504
|
b
|
|
1503
|
-
]), oe = (e, t) => /* @__PURE__ */
|
|
1505
|
+
]), oe = (e, t) => /* @__PURE__ */ L("div", {
|
|
1504
1506
|
className: e ? `track ${e}` : "track",
|
|
1505
1507
|
style: t ? { maskImage: t } : void 0,
|
|
1506
1508
|
children: [
|
|
1507
|
-
/* @__PURE__ */
|
|
1508
|
-
/* @__PURE__ */
|
|
1509
|
+
/* @__PURE__ */ I("div", { className: "background-bar" }),
|
|
1510
|
+
/* @__PURE__ */ I("div", {
|
|
1509
1511
|
className: "loaded",
|
|
1510
|
-
children:
|
|
1512
|
+
children: U
|
|
1511
1513
|
}),
|
|
1512
|
-
/* @__PURE__ */
|
|
1514
|
+
/* @__PURE__ */ I("div", {
|
|
1513
1515
|
className: "play-container",
|
|
1514
|
-
children: /* @__PURE__ */
|
|
1516
|
+
children: /* @__PURE__ */ I("div", {
|
|
1515
1517
|
className: "play",
|
|
1516
|
-
style: { transform: `scaleX(${
|
|
1518
|
+
style: { transform: `scaleX(${re})` }
|
|
1517
1519
|
})
|
|
1518
1520
|
})
|
|
1519
1521
|
]
|
|
1520
1522
|
});
|
|
1521
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ L("div", {
|
|
1522
1524
|
css: wt,
|
|
1523
1525
|
ref: _,
|
|
1524
1526
|
className: [
|
|
1525
1527
|
"progress-bar",
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
+
N ? "dragging" : "",
|
|
1529
|
+
G ? "segmented" : ""
|
|
1528
1530
|
].filter(Boolean).join(" "),
|
|
1529
|
-
onPointerDown:
|
|
1530
|
-
onPointerMove:
|
|
1531
|
-
onMouseMove:
|
|
1531
|
+
onPointerDown: V,
|
|
1532
|
+
onPointerMove: V,
|
|
1533
|
+
onMouseMove: ee,
|
|
1532
1534
|
onMouseOut: te,
|
|
1533
1535
|
children: [
|
|
1534
|
-
oe(void 0,
|
|
1535
|
-
b ? /* @__PURE__ */
|
|
1536
|
+
oe(void 0, q),
|
|
1537
|
+
b ? /* @__PURE__ */ L("div", {
|
|
1536
1538
|
className: "cursor-time",
|
|
1537
1539
|
style: {
|
|
1538
|
-
left:
|
|
1539
|
-
maxWidth:
|
|
1540
|
+
left: J ? `clamp(var(--thumbnail-half), ${H(b)}%, calc(100% - var(--thumbnail-half)))` : `clamp(calc(3 * var(--mp-unit)), ${H(b)}%, calc(100% - calc(3 * var(--mp-unit))))`,
|
|
1541
|
+
maxWidth: J ? "var(--thumbnail-width)" : void 0
|
|
1540
1542
|
},
|
|
1541
|
-
children: [/* @__PURE__ */
|
|
1543
|
+
children: [/* @__PURE__ */ I("span", {
|
|
1542
1544
|
className: "cursor-time-value",
|
|
1543
1545
|
children: ht(b)
|
|
1544
|
-
}),
|
|
1546
|
+
}), J ? /* @__PURE__ */ I("span", {
|
|
1545
1547
|
className: "chapter-title",
|
|
1546
|
-
children:
|
|
1548
|
+
children: J.title
|
|
1547
1549
|
}) : void 0]
|
|
1548
1550
|
}) : void 0,
|
|
1549
|
-
/* @__PURE__ */
|
|
1550
|
-
/* @__PURE__ */
|
|
1551
|
-
|
|
1552
|
-
/* @__PURE__ */
|
|
1553
|
-
/* @__PURE__ */
|
|
1551
|
+
/* @__PURE__ */ I("div", { className: "progress" }),
|
|
1552
|
+
/* @__PURE__ */ I("div", { className: "hover" }),
|
|
1553
|
+
ie ? oe("focus", ie) : void 0,
|
|
1554
|
+
/* @__PURE__ */ I("div", { className: "scrubber" }),
|
|
1555
|
+
/* @__PURE__ */ I("div", {
|
|
1554
1556
|
className: "padding",
|
|
1555
|
-
...
|
|
1556
|
-
onPointerDown:
|
|
1557
|
-
onPointerUp:
|
|
1558
|
-
onPointerCancel:
|
|
1557
|
+
...P,
|
|
1558
|
+
onPointerDown: F,
|
|
1559
|
+
onPointerUp: R,
|
|
1560
|
+
onPointerCancel: R
|
|
1559
1561
|
}),
|
|
1560
|
-
/* @__PURE__ */
|
|
1562
|
+
/* @__PURE__ */ I("div", {
|
|
1561
1563
|
className: "thumbnail",
|
|
1562
1564
|
style: { left: `clamp(var(--thumbnail-half), ${H(b ?? 1)}%, calc(100% - var(--thumbnail-half)))` },
|
|
1563
|
-
children: ae?.url ? /* @__PURE__ */
|
|
1565
|
+
children: ae?.url ? /* @__PURE__ */ I("img", { src: ae.url }) : void 0
|
|
1564
1566
|
})
|
|
1565
1567
|
]
|
|
1566
1568
|
});
|
|
@@ -1574,12 +1576,12 @@ var oe = {
|
|
|
1574
1576
|
strokeWidth: 2,
|
|
1575
1577
|
strokeLinecap: "round",
|
|
1576
1578
|
strokeLinejoin: "round"
|
|
1577
|
-
}, kt = (e) => /* @__PURE__ */
|
|
1579
|
+
}, kt = (e) => /* @__PURE__ */ L("svg", {
|
|
1578
1580
|
...Ot,
|
|
1579
1581
|
...e,
|
|
1580
1582
|
children: [
|
|
1581
|
-
/* @__PURE__ */
|
|
1582
|
-
/* @__PURE__ */
|
|
1583
|
+
/* @__PURE__ */ I("path", { d: "M21 11V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h5" }),
|
|
1584
|
+
/* @__PURE__ */ I("rect", {
|
|
1583
1585
|
x: "12",
|
|
1584
1586
|
y: "13",
|
|
1585
1587
|
width: "10",
|
|
@@ -1587,14 +1589,14 @@ var oe = {
|
|
|
1587
1589
|
rx: "1",
|
|
1588
1590
|
ry: "1"
|
|
1589
1591
|
}),
|
|
1590
|
-
/* @__PURE__ */
|
|
1592
|
+
/* @__PURE__ */ I("path", { d: "M14.5 18.5h2m2 0h1" })
|
|
1591
1593
|
]
|
|
1592
|
-
}), At = (e) => /* @__PURE__ */
|
|
1594
|
+
}), At = (e) => /* @__PURE__ */ L("svg", {
|
|
1593
1595
|
...Ot,
|
|
1594
1596
|
...e,
|
|
1595
1597
|
children: [
|
|
1596
|
-
/* @__PURE__ */
|
|
1597
|
-
/* @__PURE__ */
|
|
1598
|
+
/* @__PURE__ */ I("path", { d: "M21 11V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h5" }),
|
|
1599
|
+
/* @__PURE__ */ I("rect", {
|
|
1598
1600
|
x: "12",
|
|
1599
1601
|
y: "13",
|
|
1600
1602
|
width: "10",
|
|
@@ -1602,9 +1604,9 @@ var oe = {
|
|
|
1602
1604
|
rx: "1",
|
|
1603
1605
|
ry: "1"
|
|
1604
1606
|
}),
|
|
1605
|
-
/* @__PURE__ */
|
|
1607
|
+
/* @__PURE__ */ I("path", { d: "M6 9h3m2 0h2" })
|
|
1606
1608
|
]
|
|
1607
|
-
}), jt =
|
|
1609
|
+
}), jt = D`
|
|
1608
1610
|
.popover {
|
|
1609
1611
|
position: absolute;
|
|
1610
1612
|
/* Anchored to the PLAYER's right edge, never to the gear. The gear is not the last control in the
|
|
@@ -1735,23 +1737,23 @@ var oe = {
|
|
|
1735
1737
|
`, Mt = ({ title: e, tracks: t, selected: n, onSelect: r, onBack: i, offLabel: o, pending: s, failed: c }) => {
|
|
1736
1738
|
let { format: l } = Q(), u = s !== void 0, d = (e, i, a) => {
|
|
1737
1739
|
let o = u && s === e, c = u || t.find((t) => t.id === e)?.disabled;
|
|
1738
|
-
return /* @__PURE__ */
|
|
1740
|
+
return /* @__PURE__ */ L("div", {
|
|
1739
1741
|
onClick: () => {
|
|
1740
1742
|
c || r(e ?? void 0);
|
|
1741
1743
|
},
|
|
1742
1744
|
className: [a, c ? "unavailable" : null].filter(Boolean).join(" ") || void 0,
|
|
1743
|
-
children: [/* @__PURE__ */
|
|
1745
|
+
children: [/* @__PURE__ */ I("span", { children: i }), /* @__PURE__ */ I("span", { children: o ? "…" : (n ?? null) === e ? "✓" : "" })]
|
|
1744
1746
|
}, e ?? "__off__");
|
|
1745
1747
|
};
|
|
1746
|
-
return /* @__PURE__ */
|
|
1748
|
+
return /* @__PURE__ */ L("div", {
|
|
1747
1749
|
className: "popover track-list",
|
|
1748
1750
|
children: [
|
|
1749
|
-
/* @__PURE__ */
|
|
1751
|
+
/* @__PURE__ */ L("div", {
|
|
1750
1752
|
className: i ? "back" : "back no-hover",
|
|
1751
1753
|
onClick: i,
|
|
1752
|
-
children: [i ? /* @__PURE__ */
|
|
1754
|
+
children: [i ? /* @__PURE__ */ I(ee, {}) : null, /* @__PURE__ */ I("span", { children: e })]
|
|
1753
1755
|
}),
|
|
1754
|
-
c ? /* @__PURE__ */
|
|
1756
|
+
c ? /* @__PURE__ */ I("div", {
|
|
1755
1757
|
className: "no-hover failed",
|
|
1756
1758
|
dir: "auto",
|
|
1757
1759
|
children: l(a.switchFailed)
|
|
@@ -1761,12 +1763,12 @@ var oe = {
|
|
|
1761
1763
|
]
|
|
1762
1764
|
});
|
|
1763
1765
|
}, Nt = ({ onReset: e } = {}) => {
|
|
1764
|
-
let t =
|
|
1766
|
+
let t = w(null), [n, r] = T(!1), [i, a] = T(void 0), [o, s] = T(!1), c = w(e);
|
|
1765
1767
|
c.current = e;
|
|
1766
1768
|
let l = () => {
|
|
1767
1769
|
r(!1), c.current?.();
|
|
1768
1770
|
};
|
|
1769
|
-
return
|
|
1771
|
+
return S(() => {
|
|
1770
1772
|
let e = (e) => {
|
|
1771
1773
|
n && t.current && !t.current.contains(e.target) && l();
|
|
1772
1774
|
};
|
|
@@ -1801,7 +1803,7 @@ var oe = {
|
|
|
1801
1803
|
});
|
|
1802
1804
|
}
|
|
1803
1805
|
};
|
|
1804
|
-
}, Pt =
|
|
1806
|
+
}, Pt = D`
|
|
1805
1807
|
/* Not a containing block, for the reason given on popoverStyle: the menu anchors to the control bar,
|
|
1806
1808
|
which is the width of the player box, so it can be clamped to it. */
|
|
1807
1809
|
position: static;
|
|
@@ -1897,43 +1899,43 @@ ${jt}
|
|
|
1897
1899
|
e.detail
|
|
1898
1900
|
].filter(Boolean).join("\n");
|
|
1899
1901
|
}).join("\n\n"), zt = () => {
|
|
1900
|
-
let e = Y((e) => e.playbackErrors), { format: t, locale: n } = Q(), { open: r, toggle: i, containerRef: o } = Nt(), [s, c] =
|
|
1902
|
+
let e = Y((e) => e.playbackErrors), { format: t, locale: n } = Q(), { open: r, toggle: i, containerRef: o } = Nt(), [s, c] = T(!1);
|
|
1901
1903
|
if (e.length === 0) return null;
|
|
1902
1904
|
let l = () => {
|
|
1903
1905
|
navigator.clipboard?.writeText(Rt(e)).then(() => {
|
|
1904
1906
|
c(!0), setTimeout(() => c(!1), 2e3);
|
|
1905
1907
|
}, (e) => console.warn("[media-player] could not copy the errors:", e));
|
|
1906
1908
|
}, u = t(a.errors, { count: Lt(e) });
|
|
1907
|
-
return /* @__PURE__ */
|
|
1909
|
+
return /* @__PURE__ */ L("div", {
|
|
1908
1910
|
css: Pt,
|
|
1909
1911
|
ref: o,
|
|
1910
|
-
children: [/* @__PURE__ */
|
|
1912
|
+
children: [/* @__PURE__ */ I(St, {
|
|
1911
1913
|
id: "errors",
|
|
1912
1914
|
disabled: r,
|
|
1913
|
-
text: /* @__PURE__ */
|
|
1915
|
+
text: /* @__PURE__ */ I("button", {
|
|
1914
1916
|
className: "errors",
|
|
1915
1917
|
type: "button",
|
|
1916
1918
|
onClick: i,
|
|
1917
1919
|
"aria-label": u,
|
|
1918
1920
|
"aria-expanded": r,
|
|
1919
|
-
children: /* @__PURE__ */
|
|
1921
|
+
children: /* @__PURE__ */ I(q, { className: "alert-triangle" })
|
|
1920
1922
|
}),
|
|
1921
|
-
toolTipText: /* @__PURE__ */
|
|
1922
|
-
}), r && /* @__PURE__ */
|
|
1923
|
+
toolTipText: /* @__PURE__ */ I("span", { children: u })
|
|
1924
|
+
}), r && /* @__PURE__ */ L("div", {
|
|
1923
1925
|
className: "popover error-list",
|
|
1924
|
-
children: [/* @__PURE__ */
|
|
1926
|
+
children: [/* @__PURE__ */ L("div", {
|
|
1925
1927
|
className: "back no-hover",
|
|
1926
|
-
children: [/* @__PURE__ */
|
|
1928
|
+
children: [/* @__PURE__ */ I("span", { children: u }), /* @__PURE__ */ L("button", {
|
|
1927
1929
|
className: "copy",
|
|
1928
1930
|
type: "button",
|
|
1929
1931
|
onClick: l,
|
|
1930
1932
|
"aria-label": t(a.copyErrors),
|
|
1931
|
-
children: [
|
|
1933
|
+
children: [I(s ? V : H, {}), /* @__PURE__ */ I("span", { children: t(s ? a.copied : a.copy) })]
|
|
1932
1934
|
})]
|
|
1933
|
-
}), e.map((e, r) => /* @__PURE__ */
|
|
1935
|
+
}), e.map((e, r) => /* @__PURE__ */ L("div", {
|
|
1934
1936
|
className: "entry no-hover",
|
|
1935
1937
|
children: [
|
|
1936
|
-
/* @__PURE__ */
|
|
1938
|
+
/* @__PURE__ */ L("span", {
|
|
1937
1939
|
className: "when",
|
|
1938
1940
|
children: [
|
|
1939
1941
|
e.count > 1 ? t(a.errorSpan, {
|
|
@@ -1942,17 +1944,17 @@ ${jt}
|
|
|
1942
1944
|
}) : Ft(e.at, n),
|
|
1943
1945
|
It(e.atMediaTime) ? ` ${t(a.errorAt, { time: It(e.atMediaTime) })}` : "",
|
|
1944
1946
|
e.recovered ? ` ${t(a.recovered)}` : "",
|
|
1945
|
-
e.count > 1 ? /* @__PURE__ */
|
|
1947
|
+
e.count > 1 ? /* @__PURE__ */ I("span", {
|
|
1946
1948
|
className: "count",
|
|
1947
1949
|
children: `×${e.count}`
|
|
1948
1950
|
}) : null
|
|
1949
1951
|
]
|
|
1950
1952
|
}),
|
|
1951
|
-
/* @__PURE__ */
|
|
1953
|
+
/* @__PURE__ */ I("span", {
|
|
1952
1954
|
className: "what",
|
|
1953
1955
|
children: e.message
|
|
1954
1956
|
}),
|
|
1955
|
-
e.detail ? /* @__PURE__ */
|
|
1957
|
+
e.detail ? /* @__PURE__ */ I("span", {
|
|
1956
1958
|
className: "cause",
|
|
1957
1959
|
children: e.detail
|
|
1958
1960
|
}) : null
|
|
@@ -1960,7 +1962,7 @@ ${jt}
|
|
|
1960
1962
|
}, `${e.at}-${r}`))]
|
|
1961
1963
|
})]
|
|
1962
1964
|
});
|
|
1963
|
-
}, Bt =
|
|
1965
|
+
}, Bt = D`
|
|
1964
1966
|
display: flex;
|
|
1965
1967
|
align-items: center;
|
|
1966
1968
|
justify-content: center;
|
|
@@ -2014,7 +2016,7 @@ width: 100%;
|
|
|
2014
2016
|
}
|
|
2015
2017
|
}
|
|
2016
2018
|
`, Vt = () => {
|
|
2017
|
-
let e = Y(), { format: t, number: n } = Q(), r = Y((e) => e.playbackRate), i =
|
|
2019
|
+
let e = Y(), { format: t, number: n } = Q(), r = Y((e) => e.playbackRate), i = w(null), o = w(null), s = .25, c = 2.75, l = (e, t = .05) => Math.round(e / t) * t, u = l(r || 1), d = (e) => (e - s) / c * 100, f = (e) => l(s + e * c), { handlers: p } = Ct({
|
|
2018
2020
|
ref: o,
|
|
2019
2021
|
onChange: (t) => e.setPlaybackRate(f(t))
|
|
2020
2022
|
}), m = (t) => {
|
|
@@ -2022,36 +2024,36 @@ width: 100%;
|
|
|
2022
2024
|
let n = .05, r = u;
|
|
2023
2025
|
r = t.deltaY < 0 ? Math.min(3, r + n) : Math.max(s, r - n), e.setPlaybackRate(r);
|
|
2024
2026
|
};
|
|
2025
|
-
|
|
2027
|
+
S(() => {
|
|
2026
2028
|
let e = i.current;
|
|
2027
2029
|
return e && e.addEventListener("wheel", m, { passive: !1 }), () => {
|
|
2028
2030
|
e && e.removeEventListener("wheel", m);
|
|
2029
2031
|
};
|
|
2030
2032
|
}, [r]);
|
|
2031
2033
|
let h = d(u);
|
|
2032
|
-
return /* @__PURE__ */
|
|
2034
|
+
return /* @__PURE__ */ L("div", {
|
|
2033
2035
|
css: Bt,
|
|
2034
|
-
children: [/* @__PURE__ */
|
|
2036
|
+
children: [/* @__PURE__ */ I("div", { children: t(a.speed, { rate: n(u, {
|
|
2035
2037
|
minimumFractionDigits: 2,
|
|
2036
2038
|
maximumFractionDigits: 2
|
|
2037
|
-
}) }) }), /* @__PURE__ */
|
|
2039
|
+
}) }) }), /* @__PURE__ */ I("div", {
|
|
2038
2040
|
className: "playback-slider",
|
|
2039
2041
|
ref: i,
|
|
2040
2042
|
...p,
|
|
2041
|
-
children: /* @__PURE__ */
|
|
2043
|
+
children: /* @__PURE__ */ I("div", {
|
|
2042
2044
|
ref: o,
|
|
2043
2045
|
style: { background: `linear-gradient(to right,
|
|
2044
2046
|
#fff 0% ${h}%,
|
|
2045
2047
|
#3A3A3A ${h}% 100%
|
|
2046
2048
|
)` },
|
|
2047
|
-
children: /* @__PURE__ */
|
|
2049
|
+
children: /* @__PURE__ */ I("div", {
|
|
2048
2050
|
className: "playback-handle",
|
|
2049
2051
|
style: { left: `${h}%` }
|
|
2050
2052
|
})
|
|
2051
2053
|
})
|
|
2052
2054
|
})]
|
|
2053
2055
|
});
|
|
2054
|
-
}, Ht =
|
|
2056
|
+
}, Ht = D`
|
|
2055
2057
|
/* Deliberately NOT a containing block. The menu anchors to the control bar instead, which is exactly
|
|
2056
2058
|
as wide as the player box and can therefore be clamped to it. The outside-click check uses
|
|
2057
2059
|
\`contains\` on the ref, which is DOM containment and needs no position, and the bar's other
|
|
@@ -2151,7 +2153,7 @@ ${jt}
|
|
|
2151
2153
|
1.5,
|
|
2152
2154
|
2
|
|
2153
2155
|
], Wt = () => {
|
|
2154
|
-
let e = Y(), { format: t, number: n } = Q(), r = Y((e) => e.playbackRate), i = Y((e) => e.audioTracks), o = Y((e) => e.selectedAudioTrack), s = Y((e) => e.selectAudioTrack), c = Y((e) => e.quality), l = Y((e) => e.volumeNormalizer), [u, d] =
|
|
2156
|
+
let e = Y(), { format: t, number: n } = Q(), r = Y((e) => e.playbackRate), i = Y((e) => e.audioTracks), o = Y((e) => e.selectedAudioTrack), s = Y((e) => e.selectAudioTrack), c = Y((e) => e.quality), l = Y((e) => e.volumeNormalizer), [u, d] = T(0), { open: f, toggle: p, containerRef: m, pending: h, failed: g, runSelect: _ } = Nt({ onReset: () => d(0) }), v = (t) => {
|
|
2155
2157
|
e.setPlaybackRate(t), d(0);
|
|
2156
2158
|
}, y = (e) => {
|
|
2157
2159
|
e !== void 0 && _(e, () => s(e));
|
|
@@ -2160,48 +2162,48 @@ ${jt}
|
|
|
2160
2162
|
}, x = c ? c.options.length + +!!c.offLabel : 0, S = c?.selectedId == null ? c?.offLabel : c.options.find(({ id: e }) => e === c.selectedId)?.label, C = (e) => () => {
|
|
2161
2163
|
d(e);
|
|
2162
2164
|
};
|
|
2163
|
-
return /* @__PURE__ */
|
|
2165
|
+
return /* @__PURE__ */ L("div", {
|
|
2164
2166
|
css: Ht,
|
|
2165
2167
|
ref: m,
|
|
2166
2168
|
children: [
|
|
2167
|
-
/* @__PURE__ */
|
|
2169
|
+
/* @__PURE__ */ I(St, {
|
|
2168
2170
|
id: "settings",
|
|
2169
2171
|
disabled: f,
|
|
2170
|
-
text: /* @__PURE__ */
|
|
2172
|
+
text: /* @__PURE__ */ I("button", {
|
|
2171
2173
|
className: "settings",
|
|
2172
2174
|
type: "button",
|
|
2173
2175
|
onClick: p,
|
|
2174
2176
|
"aria-label": t(a.settings),
|
|
2175
2177
|
"aria-expanded": f,
|
|
2176
|
-
children: /* @__PURE__ */
|
|
2178
|
+
children: /* @__PURE__ */ I(K, {})
|
|
2177
2179
|
}),
|
|
2178
|
-
toolTipText: /* @__PURE__ */
|
|
2180
|
+
toolTipText: /* @__PURE__ */ I("span", { children: t(a.settings) })
|
|
2179
2181
|
}),
|
|
2180
|
-
f && u === 0 && /* @__PURE__ */
|
|
2182
|
+
f && u === 0 && /* @__PURE__ */ L("div", {
|
|
2181
2183
|
className: "popover menu",
|
|
2182
2184
|
children: [
|
|
2183
|
-
i.length > 1 ? /* @__PURE__ */
|
|
2185
|
+
i.length > 1 ? /* @__PURE__ */ L("div", {
|
|
2184
2186
|
onClick: C(2),
|
|
2185
|
-
children: [/* @__PURE__ */
|
|
2187
|
+
children: [/* @__PURE__ */ I("div", { children: t(a.audio) }), /* @__PURE__ */ I("div", { children: /* @__PURE__ */ I(te, {}) })]
|
|
2186
2188
|
}) : null,
|
|
2187
|
-
x > 1 ? /* @__PURE__ */
|
|
2189
|
+
x > 1 ? /* @__PURE__ */ L("div", {
|
|
2188
2190
|
onClick: C(3),
|
|
2189
|
-
children: [/* @__PURE__ */
|
|
2191
|
+
children: [/* @__PURE__ */ I("div", { children: t(a.quality) }), /* @__PURE__ */ L("div", { children: [S ? /* @__PURE__ */ I("span", {
|
|
2190
2192
|
className: "secondary",
|
|
2191
2193
|
children: S
|
|
2192
|
-
}) : null, /* @__PURE__ */
|
|
2194
|
+
}) : null, /* @__PURE__ */ I(te, {})] })]
|
|
2193
2195
|
}) : null,
|
|
2194
|
-
/* @__PURE__ */
|
|
2196
|
+
/* @__PURE__ */ L("div", {
|
|
2195
2197
|
onClick: C(1),
|
|
2196
|
-
children: [/* @__PURE__ */
|
|
2198
|
+
children: [/* @__PURE__ */ I("div", { children: t(a.playbackSpeed) }), /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("span", {
|
|
2197
2199
|
className: "secondary",
|
|
2198
2200
|
children: r === 1 ? t(a.defaultSpeed) : n(r, {
|
|
2199
2201
|
minimumFractionDigits: 2,
|
|
2200
2202
|
maximumFractionDigits: 2
|
|
2201
2203
|
})
|
|
2202
|
-
}), /* @__PURE__ */
|
|
2204
|
+
}), /* @__PURE__ */ I(te, {})] })]
|
|
2203
2205
|
}),
|
|
2204
|
-
l ? /* @__PURE__ */
|
|
2206
|
+
l ? /* @__PURE__ */ L("div", {
|
|
2205
2207
|
role: "switch",
|
|
2206
2208
|
"aria-checked": l.available && l.enabled,
|
|
2207
2209
|
"aria-disabled": !l.available,
|
|
@@ -2209,35 +2211,35 @@ ${jt}
|
|
|
2209
2211
|
onClick: () => {
|
|
2210
2212
|
l.available && l.setEnabled(!l.enabled);
|
|
2211
2213
|
},
|
|
2212
|
-
children: [/* @__PURE__ */
|
|
2214
|
+
children: [/* @__PURE__ */ I("div", { children: t(a.normalizeVolume) }), /* @__PURE__ */ I("div", { children: l.available ? /* @__PURE__ */ I("span", { className: l.enabled ? "switch on" : "switch" }) : /* @__PURE__ */ I("span", {
|
|
2213
2215
|
className: "secondary",
|
|
2214
2216
|
children: t(a.unavailable)
|
|
2215
2217
|
}) })]
|
|
2216
2218
|
}) : null
|
|
2217
2219
|
]
|
|
2218
2220
|
}),
|
|
2219
|
-
f && u === 1 && /* @__PURE__ */
|
|
2221
|
+
f && u === 1 && /* @__PURE__ */ L("div", {
|
|
2220
2222
|
className: "popover playback-rate",
|
|
2221
2223
|
children: [
|
|
2222
|
-
/* @__PURE__ */
|
|
2224
|
+
/* @__PURE__ */ L("div", {
|
|
2223
2225
|
className: "back",
|
|
2224
2226
|
onClick: C(0),
|
|
2225
|
-
children: [/* @__PURE__ */
|
|
2227
|
+
children: [/* @__PURE__ */ I(ee, {}), /* @__PURE__ */ I("span", { children: t(a.playbackSpeed) })]
|
|
2226
2228
|
}),
|
|
2227
|
-
/* @__PURE__ */
|
|
2229
|
+
/* @__PURE__ */ I("div", {
|
|
2228
2230
|
className: "slider no-hover",
|
|
2229
|
-
children: /* @__PURE__ */
|
|
2231
|
+
children: /* @__PURE__ */ I(Vt, {})
|
|
2230
2232
|
}),
|
|
2231
|
-
/* @__PURE__ */
|
|
2233
|
+
/* @__PURE__ */ I("div", {
|
|
2232
2234
|
className: "options no-hover",
|
|
2233
|
-
children: Ut.map((e) => /* @__PURE__ */
|
|
2235
|
+
children: Ut.map((e) => /* @__PURE__ */ I("div", {
|
|
2234
2236
|
onClick: () => v(e),
|
|
2235
2237
|
children: t(a.speed, { rate: n(e) })
|
|
2236
2238
|
}, e))
|
|
2237
2239
|
})
|
|
2238
2240
|
]
|
|
2239
2241
|
}),
|
|
2240
|
-
f && u === 2 && /* @__PURE__ */
|
|
2242
|
+
f && u === 2 && /* @__PURE__ */ I(Mt, {
|
|
2241
2243
|
title: t(a.audio),
|
|
2242
2244
|
tracks: i,
|
|
2243
2245
|
selected: o,
|
|
@@ -2246,7 +2248,7 @@ ${jt}
|
|
|
2246
2248
|
pending: h,
|
|
2247
2249
|
failed: g
|
|
2248
2250
|
}),
|
|
2249
|
-
f && u === 3 && c && /* @__PURE__ */
|
|
2251
|
+
f && u === 3 && c && /* @__PURE__ */ I(Mt, {
|
|
2250
2252
|
title: t(a.quality),
|
|
2251
2253
|
tracks: c.options,
|
|
2252
2254
|
selected: c.selectedId ?? void 0,
|
|
@@ -2258,7 +2260,7 @@ ${jt}
|
|
|
2258
2260
|
})
|
|
2259
2261
|
]
|
|
2260
2262
|
});
|
|
2261
|
-
}, Gt =
|
|
2263
|
+
}, Gt = D`
|
|
2262
2264
|
/* Not a containing block, for the reason given on popoverStyle: the menu anchors to the control bar,
|
|
2263
2265
|
which is the width of the player box, so it can be clamped to it. */
|
|
2264
2266
|
position: static;
|
|
@@ -2279,23 +2281,23 @@ ${jt}
|
|
|
2279
2281
|
let { format: e } = Q(), t = Y((e) => e.subtitleTracks), n = Y((e) => e.selectedSubtitleTrack), r = Y((e) => e.selectSubtitleTrack), i = Y((e) => e.subtitleOffLabel), { open: o, toggle: s, containerRef: c, pending: l, failed: u, runSelect: d } = Nt();
|
|
2280
2282
|
if (t.length === 0) return null;
|
|
2281
2283
|
let f = n !== void 0;
|
|
2282
|
-
return /* @__PURE__ */
|
|
2284
|
+
return /* @__PURE__ */ L("div", {
|
|
2283
2285
|
css: Gt,
|
|
2284
2286
|
ref: c,
|
|
2285
|
-
children: [/* @__PURE__ */
|
|
2287
|
+
children: [/* @__PURE__ */ I(St, {
|
|
2286
2288
|
id: "subtitles",
|
|
2287
2289
|
disabled: o,
|
|
2288
|
-
text: /* @__PURE__ */
|
|
2290
|
+
text: /* @__PURE__ */ I("button", {
|
|
2289
2291
|
className: "subtitles",
|
|
2290
2292
|
type: "button",
|
|
2291
2293
|
onClick: s,
|
|
2292
2294
|
"aria-label": e(a.subtitles),
|
|
2293
2295
|
"aria-expanded": o,
|
|
2294
2296
|
"aria-pressed": f,
|
|
2295
|
-
children: f ? /* @__PURE__ */
|
|
2297
|
+
children: f ? /* @__PURE__ */ I(z, { className: "captions" }) : /* @__PURE__ */ I(B, { className: "captions-off" })
|
|
2296
2298
|
}),
|
|
2297
|
-
toolTipText: /* @__PURE__ */
|
|
2298
|
-
}), o && /* @__PURE__ */
|
|
2299
|
+
toolTipText: /* @__PURE__ */ I("span", { children: e(a.subtitles) })
|
|
2300
|
+
}), o && /* @__PURE__ */ I(Mt, {
|
|
2299
2301
|
title: e(a.subtitles),
|
|
2300
2302
|
tracks: t,
|
|
2301
2303
|
selected: n,
|
|
@@ -2311,7 +2313,7 @@ ${jt}
|
|
|
2311
2313
|
hover: "rgba(255, 255, 255, 0.13)",
|
|
2312
2314
|
borderPrimary: "#384F70",
|
|
2313
2315
|
backgroundTooltip: "#222222"
|
|
2314
|
-
}, Jt =
|
|
2316
|
+
}, Jt = D`
|
|
2315
2317
|
display: flex;
|
|
2316
2318
|
align-items: center;
|
|
2317
2319
|
|
|
@@ -2355,7 +2357,7 @@ ${jt}
|
|
|
2355
2357
|
height: 10px;
|
|
2356
2358
|
}
|
|
2357
2359
|
`, Yt = ({ value: e, onChange: t }) => {
|
|
2358
|
-
let { number: n } = Q(), r = Y((e) => e.volume), i = Y((e) => e.muted), a =
|
|
2360
|
+
let { number: n } = Q(), r = Y((e) => e.volume), i = Y((e) => e.muted), a = w(null), o = w(null), { handlers: s } = Ct({
|
|
2359
2361
|
ref: o,
|
|
2360
2362
|
onChange: t
|
|
2361
2363
|
}), c = (n) => {
|
|
@@ -2363,37 +2365,37 @@ ${jt}
|
|
|
2363
2365
|
let r = .05, i = e;
|
|
2364
2366
|
i = n.deltaY < 0 ? Math.min(1, i + r) : Math.max(0, i - r), t(i);
|
|
2365
2367
|
};
|
|
2366
|
-
|
|
2368
|
+
S(() => {
|
|
2367
2369
|
let e = a.current;
|
|
2368
2370
|
return e && e.addEventListener("wheel", c, { passive: !1 }), () => {
|
|
2369
2371
|
e && e.removeEventListener("wheel", c);
|
|
2370
2372
|
};
|
|
2371
2373
|
}, [e]);
|
|
2372
|
-
let l = e * 100, u =
|
|
2373
|
-
return /* @__PURE__ */
|
|
2374
|
+
let l = e * 100, u = C(() => Math.round(i ? 0 : mt(r) * 100), [r, i]);
|
|
2375
|
+
return /* @__PURE__ */ I(St, {
|
|
2374
2376
|
id: "volume-slider",
|
|
2375
|
-
text: /* @__PURE__ */
|
|
2377
|
+
text: /* @__PURE__ */ I("div", {
|
|
2376
2378
|
ref: a,
|
|
2377
2379
|
css: Jt,
|
|
2378
2380
|
...s,
|
|
2379
|
-
children: /* @__PURE__ */
|
|
2381
|
+
children: /* @__PURE__ */ I("div", {
|
|
2380
2382
|
ref: o,
|
|
2381
2383
|
style: { background: `linear-gradient(to right,
|
|
2382
2384
|
#fff 0% ${l}%,
|
|
2383
2385
|
#3A3A3A ${l}% 100%
|
|
2384
2386
|
)` },
|
|
2385
|
-
children: /* @__PURE__ */
|
|
2387
|
+
children: /* @__PURE__ */ I("div", {
|
|
2386
2388
|
className: "volume-handle",
|
|
2387
2389
|
style: { left: `${e * 100}%` }
|
|
2388
2390
|
})
|
|
2389
2391
|
})
|
|
2390
2392
|
}),
|
|
2391
|
-
toolTipText: /* @__PURE__ */
|
|
2393
|
+
toolTipText: /* @__PURE__ */ I("div", {
|
|
2392
2394
|
className: "volume-value",
|
|
2393
2395
|
children: n(u / 100, { style: "percent" })
|
|
2394
2396
|
})
|
|
2395
2397
|
});
|
|
2396
|
-
}, Xt =
|
|
2398
|
+
}, Xt = D`
|
|
2397
2399
|
position: relative;
|
|
2398
2400
|
display: flex;
|
|
2399
2401
|
align-items: center;
|
|
@@ -2457,29 +2459,29 @@ ${jt}
|
|
|
2457
2459
|
}
|
|
2458
2460
|
|
|
2459
2461
|
`, Zt = ({ ref: e }) => {
|
|
2460
|
-
let t = Y(), { format: n } = Q(), r = Y((e) => e.volume), i = Y((e) => e.muted), o =
|
|
2461
|
-
return /* @__PURE__ */
|
|
2462
|
+
let t = Y(), { format: n } = Q(), r = Y((e) => e.volume), i = Y((e) => e.muted), o = C(() => mt(r), [r]);
|
|
2463
|
+
return /* @__PURE__ */ L("div", {
|
|
2462
2464
|
css: Xt,
|
|
2463
|
-
children: [/* @__PURE__ */
|
|
2465
|
+
children: [/* @__PURE__ */ I(St, {
|
|
2464
2466
|
id: "sound",
|
|
2465
|
-
text: /* @__PURE__ */
|
|
2467
|
+
text: /* @__PURE__ */ I("button", {
|
|
2466
2468
|
className: "sound",
|
|
2467
2469
|
type: "button",
|
|
2468
2470
|
onClick: () => t.toggleMuted(),
|
|
2469
2471
|
ref: e,
|
|
2470
2472
|
"aria-label": n(a.mute),
|
|
2471
2473
|
"aria-pressed": i || r === 0,
|
|
2472
|
-
children:
|
|
2474
|
+
children: I(i || r === 0 ? ae : r <= .5 ? ie : J, {
|
|
2473
2475
|
size: 18,
|
|
2474
2476
|
color: "#fff"
|
|
2475
2477
|
})
|
|
2476
2478
|
}),
|
|
2477
|
-
toolTipText: /* @__PURE__ */
|
|
2478
|
-
}), /* @__PURE__ */
|
|
2479
|
+
toolTipText: /* @__PURE__ */ I("span", { children: n(i ? a.unmuteKey : a.muteKey) })
|
|
2480
|
+
}), /* @__PURE__ */ I("div", {
|
|
2479
2481
|
className: "volume-slider-container",
|
|
2480
|
-
children: /* @__PURE__ */
|
|
2482
|
+
children: /* @__PURE__ */ I("div", {
|
|
2481
2483
|
className: "volume-slider-background",
|
|
2482
|
-
children: /* @__PURE__ */
|
|
2484
|
+
children: /* @__PURE__ */ I(Yt, {
|
|
2483
2485
|
value: i ? 0 : o,
|
|
2484
2486
|
onChange: (e) => {
|
|
2485
2487
|
t.setVolume(pt(e));
|
|
@@ -2488,7 +2490,7 @@ ${jt}
|
|
|
2488
2490
|
})
|
|
2489
2491
|
})]
|
|
2490
2492
|
});
|
|
2491
|
-
}, Qt = .05, $t = 5, en = 50, tn = 1e3, nn =
|
|
2493
|
+
}, Qt = .05, $t = 5, en = 50, tn = 1e3, nn = D`
|
|
2492
2494
|
position: absolute;
|
|
2493
2495
|
bottom: 0;
|
|
2494
2496
|
width: 100%;
|
|
@@ -2619,39 +2621,39 @@ ${jt}
|
|
|
2619
2621
|
}
|
|
2620
2622
|
}
|
|
2621
2623
|
`, rn = ({ shortcuts: e = "window", root: t, fullscreen: n }) => {
|
|
2622
|
-
let r = Y(), { format: i } = Q(), o = Y((e) => e.paused), s = Y((e) => e.currentTime), c = Y((e) => e.duration), l = Y((e) => e.seekingTo), u = Y((e) => e.fullscreen), d = n ? n.active : u, f =
|
|
2624
|
+
let r = Y(), { format: i } = Q(), o = Y((e) => e.paused), s = Y((e) => e.currentTime), c = Y((e) => e.duration), l = Y((e) => e.seekingTo), u = Y((e) => e.fullscreen), d = n ? n.active : u, f = w(n);
|
|
2623
2625
|
f.current = n;
|
|
2624
|
-
let p = Y((e) => e.hideUI), m = Y((e) => e.togglePictureInPicture), h = Y((e) => e.pictureInPictureMode), g = Y((e) => e.burnedInSubtitles), _ = Y((e) => e.passThroughPictureInPicture), v = Y((e) => e.subtitleTracks),
|
|
2626
|
+
let p = Y((e) => e.hideUI), m = Y((e) => e.togglePictureInPicture), h = Y((e) => e.pictureInPictureMode), g = Y((e) => e.burnedInSubtitles), _ = Y((e) => e.passThroughPictureInPicture), v = Y((e) => e.subtitleTracks), y = Y((e) => e.requestSeek), x = Y((e) => e.stepFrame), [C, E] = T(null), D = w(null), O = w(void 0), k = h === "burn-in", A = v.length > 0, j = c > 0 && s === c, M = b(({ direction: e, stepSize: t }) => {
|
|
2625
2627
|
let n = mt(r.volume), i = e === "up" ? t : -t, a = Math.max(0, Math.min(1, n + i)), o = r.muted;
|
|
2626
2628
|
r.setVolume(pt(a)), o && !r.muted && r.toggleMuted();
|
|
2627
|
-
}, [r]),
|
|
2629
|
+
}, [r]), N = w(!1), P = b(() => {
|
|
2628
2630
|
f.current ? f.current.request() : r.toggleFullscreen();
|
|
2629
2631
|
}, [r]);
|
|
2630
|
-
|
|
2631
|
-
let n = (e) =>
|
|
2632
|
-
|
|
2632
|
+
S(() => {
|
|
2633
|
+
let n = (e) => y ? y(e) : r.seek(e), i = (e) => e.composedPath()[0], a = (e) => {
|
|
2634
|
+
N.current = !!t.current?.contains(i(e) ?? null);
|
|
2633
2635
|
}, o = (a) => {
|
|
2634
2636
|
let o = i(a);
|
|
2635
2637
|
if (o?.isContentEditable || /^(input|textarea|select)$/i.test(o?.tagName ?? "") || (a.ctrlKey || a.metaKey || a.altKey) && !a.getModifierState("AltGraph")) return;
|
|
2636
|
-
let s = t.current?.contains(o ?? null) || o === document.body &&
|
|
2638
|
+
let s = t.current?.contains(o ?? null) || o === document.body && N.current, c = f.current ? f.current.active : r.fullscreen;
|
|
2637
2639
|
if (e === "player" && !c && !s) return;
|
|
2638
2640
|
let l = !0;
|
|
2639
|
-
if (a.key === "f")
|
|
2641
|
+
if (a.key === "f") P();
|
|
2640
2642
|
else if (a.key === "k") r.togglePaused();
|
|
2641
2643
|
else if (a.key === " ") r.togglePaused();
|
|
2642
2644
|
else if (a.key === "m") r.toggleMuted();
|
|
2643
|
-
else if (a.key === "ArrowUp")
|
|
2645
|
+
else if (a.key === "ArrowUp") M({
|
|
2644
2646
|
direction: "up",
|
|
2645
2647
|
stepSize: Qt
|
|
2646
2648
|
});
|
|
2647
|
-
else if (a.key === "ArrowDown")
|
|
2649
|
+
else if (a.key === "ArrowDown") M({
|
|
2648
2650
|
direction: "down",
|
|
2649
2651
|
stepSize: Qt
|
|
2650
2652
|
});
|
|
2651
2653
|
else if (a.key === "ArrowRight") {
|
|
2652
2654
|
if (!r.duration) return;
|
|
2653
2655
|
n(Math.min(r.currentTime + $t, r.duration));
|
|
2654
|
-
} else a.key === "ArrowLeft" ? n(Math.max(r.currentTime - $t, 0)) : (a.key === "<" || a.key === ">") &&
|
|
2656
|
+
} else a.key === "ArrowLeft" ? n(Math.max(r.currentTime - $t, 0)) : (a.key === "<" || a.key === ">") && x ? x(a.key === ">" ? 1 : -1) : l = !1;
|
|
2655
2657
|
l && a.preventDefault();
|
|
2656
2658
|
};
|
|
2657
2659
|
return window.addEventListener("keydown", o), window.addEventListener("pointerdown", a, !0), window.addEventListener("focusin", a, !0), () => {
|
|
@@ -2659,26 +2661,26 @@ ${jt}
|
|
|
2659
2661
|
};
|
|
2660
2662
|
}, [
|
|
2661
2663
|
r,
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2664
|
+
M,
|
|
2665
|
+
y,
|
|
2666
|
+
x,
|
|
2665
2667
|
e,
|
|
2666
2668
|
t,
|
|
2667
|
-
|
|
2669
|
+
P
|
|
2668
2670
|
]);
|
|
2669
|
-
let
|
|
2670
|
-
e.preventDefault(), e.deltaY < 0 ?
|
|
2671
|
+
let F = b((e) => {
|
|
2672
|
+
e.preventDefault(), e.deltaY < 0 ? M({
|
|
2671
2673
|
direction: "up",
|
|
2672
2674
|
stepSize: Qt
|
|
2673
|
-
}) :
|
|
2675
|
+
}) : M({
|
|
2674
2676
|
direction: "down",
|
|
2675
2677
|
stepSize: Qt
|
|
2676
2678
|
});
|
|
2677
|
-
}, [
|
|
2678
|
-
|
|
2679
|
-
if (
|
|
2680
|
-
}, [
|
|
2681
|
-
let
|
|
2679
|
+
}, [M]);
|
|
2680
|
+
S(() => {
|
|
2681
|
+
if (C) return C.addEventListener("wheel", F, { passive: !1 }), () => C.removeEventListener("wheel", F);
|
|
2682
|
+
}, [C, F]);
|
|
2683
|
+
let R = (e) => {
|
|
2682
2684
|
if (!_ || _.active || _.armed || e.pointerType === "touch") return;
|
|
2683
2685
|
let { left: t, top: n, width: r, height: i } = e.currentTarget.getBoundingClientRect();
|
|
2684
2686
|
_.arm({
|
|
@@ -2687,9 +2689,9 @@ ${jt}
|
|
|
2687
2689
|
width: r,
|
|
2688
2690
|
height: i
|
|
2689
2691
|
});
|
|
2690
|
-
},
|
|
2691
|
-
return
|
|
2692
|
-
if (!
|
|
2692
|
+
}, z = !!_?.armed;
|
|
2693
|
+
return S(() => {
|
|
2694
|
+
if (!z) return;
|
|
2693
2695
|
clearInterval(O.current);
|
|
2694
2696
|
let e = Infinity, t = setInterval(() => {
|
|
2695
2697
|
if (Date.now() > e) {
|
|
@@ -2702,95 +2704,95 @@ ${jt}
|
|
|
2702
2704
|
return O.current = t, () => {
|
|
2703
2705
|
e = Date.now() + tn;
|
|
2704
2706
|
};
|
|
2705
|
-
}, [
|
|
2707
|
+
}, [z]), S(() => () => clearInterval(O.current), []), /* @__PURE__ */ L("div", {
|
|
2706
2708
|
className: "control-bar",
|
|
2707
2709
|
css: nn,
|
|
2708
2710
|
style: { ...p ? {
|
|
2709
2711
|
opacity: "0",
|
|
2710
2712
|
pointerEvents: "none"
|
|
2711
|
-
} :
|
|
2712
|
-
children: [/* @__PURE__ */
|
|
2713
|
+
} : z ? { pointerEvents: "none" } : {} },
|
|
2714
|
+
children: [/* @__PURE__ */ I(Et, {}), /* @__PURE__ */ L("div", {
|
|
2713
2715
|
className: "actions",
|
|
2714
|
-
children: [/* @__PURE__ */
|
|
2716
|
+
children: [/* @__PURE__ */ L("div", {
|
|
2715
2717
|
className: "left",
|
|
2716
2718
|
children: [
|
|
2717
|
-
/* @__PURE__ */
|
|
2719
|
+
/* @__PURE__ */ I(St, {
|
|
2718
2720
|
id: "play",
|
|
2719
2721
|
tooltipPlace: "top-start",
|
|
2720
|
-
text: /* @__PURE__ */
|
|
2722
|
+
text: /* @__PURE__ */ I("button", {
|
|
2721
2723
|
className: "play",
|
|
2722
2724
|
type: "button",
|
|
2723
2725
|
onClick: () => r.togglePaused(),
|
|
2724
|
-
"aria-label": i(
|
|
2725
|
-
children:
|
|
2726
|
+
"aria-label": i(j ? a.replay : o ? a.play : a.pause),
|
|
2727
|
+
children: I(j ? G : o ? W : re, {})
|
|
2726
2728
|
}),
|
|
2727
|
-
toolTipText: /* @__PURE__ */
|
|
2729
|
+
toolTipText: /* @__PURE__ */ I("span", { children: i(j ? a.replayKey : o ? a.playKey : a.pauseKey) })
|
|
2728
2730
|
}),
|
|
2729
|
-
/* @__PURE__ */
|
|
2730
|
-
/* @__PURE__ */
|
|
2731
|
+
/* @__PURE__ */ I(Zt, { ref: E }),
|
|
2732
|
+
/* @__PURE__ */ I("div", {
|
|
2731
2733
|
className: "time",
|
|
2732
2734
|
children: gt(l ?? s, c)
|
|
2733
2735
|
})
|
|
2734
2736
|
]
|
|
2735
|
-
}), /* @__PURE__ */
|
|
2737
|
+
}), /* @__PURE__ */ L("div", {
|
|
2736
2738
|
className: "right",
|
|
2737
2739
|
children: [
|
|
2738
|
-
/* @__PURE__ */
|
|
2739
|
-
/* @__PURE__ */
|
|
2740
|
-
/* @__PURE__ */
|
|
2741
|
-
_ ? /* @__PURE__ */
|
|
2740
|
+
/* @__PURE__ */ I(zt, {}),
|
|
2741
|
+
/* @__PURE__ */ I(Kt, {}),
|
|
2742
|
+
/* @__PURE__ */ I(Wt, {}),
|
|
2743
|
+
_ ? /* @__PURE__ */ I(St, {
|
|
2742
2744
|
id: "picture-in-picture",
|
|
2743
2745
|
tooltipPlace: "top-end",
|
|
2744
|
-
text: /* @__PURE__ */
|
|
2746
|
+
text: /* @__PURE__ */ I("button", {
|
|
2745
2747
|
ref: D,
|
|
2746
2748
|
className: _.armed ? "picture-in-picture armed" : "picture-in-picture",
|
|
2747
2749
|
type: "button",
|
|
2748
|
-
onPointerEnter:
|
|
2749
|
-
onPointerMove:
|
|
2750
|
+
onPointerEnter: R,
|
|
2751
|
+
onPointerMove: R,
|
|
2750
2752
|
onClick: _.active ? _.exit : void 0,
|
|
2751
2753
|
"aria-label": i(a.pictureInPicture),
|
|
2752
2754
|
"aria-pressed": _.active,
|
|
2753
|
-
children: /* @__PURE__ */
|
|
2755
|
+
children: /* @__PURE__ */ I("img", {
|
|
2754
2756
|
src: Dt,
|
|
2755
2757
|
alt: ""
|
|
2756
2758
|
})
|
|
2757
2759
|
}),
|
|
2758
|
-
toolTipText: /* @__PURE__ */
|
|
2759
|
-
}) : m ? /* @__PURE__ */
|
|
2760
|
+
toolTipText: /* @__PURE__ */ I("span", { children: i(_.active ? a.exitPictureInPicture : a.pictureInPicture) })
|
|
2761
|
+
}) : m ? /* @__PURE__ */ I(St, {
|
|
2760
2762
|
id: "picture-in-picture",
|
|
2761
2763
|
tooltipPlace: "top-end",
|
|
2762
|
-
text: /* @__PURE__ */
|
|
2764
|
+
text: /* @__PURE__ */ I("button", {
|
|
2763
2765
|
className: "picture-in-picture",
|
|
2764
2766
|
type: "button",
|
|
2765
2767
|
onClick: m,
|
|
2766
|
-
disabled: k && !
|
|
2768
|
+
disabled: k && !A,
|
|
2767
2769
|
"aria-label": i(k ? a.burnIn : a.pictureInPicture),
|
|
2768
2770
|
"aria-pressed": k ? g : void 0,
|
|
2769
|
-
children: k ?
|
|
2771
|
+
children: k ? I(g ? kt : At, {}) : /* @__PURE__ */ I("img", {
|
|
2770
2772
|
src: Dt,
|
|
2771
2773
|
alt: ""
|
|
2772
2774
|
})
|
|
2773
2775
|
}),
|
|
2774
|
-
toolTipText: /* @__PURE__ */
|
|
2776
|
+
toolTipText: /* @__PURE__ */ I("span", { children: i(k ? A ? g ? a.burnedIn : a.burnInOffer : a.noSubtitles : a.pictureInPicture) })
|
|
2775
2777
|
}) : null,
|
|
2776
|
-
/* @__PURE__ */
|
|
2778
|
+
/* @__PURE__ */ I(St, {
|
|
2777
2779
|
id: "full-screen",
|
|
2778
2780
|
tooltipPlace: "top-end",
|
|
2779
|
-
text: /* @__PURE__ */
|
|
2781
|
+
text: /* @__PURE__ */ I("button", {
|
|
2780
2782
|
className: "full-screen",
|
|
2781
2783
|
type: "button",
|
|
2782
|
-
onClick:
|
|
2784
|
+
onClick: P,
|
|
2783
2785
|
"aria-label": i(a.fullScreen),
|
|
2784
2786
|
"aria-pressed": d,
|
|
2785
|
-
children:
|
|
2787
|
+
children: I(d ? U : ne, {})
|
|
2786
2788
|
}),
|
|
2787
|
-
toolTipText: /* @__PURE__ */
|
|
2789
|
+
toolTipText: /* @__PURE__ */ I("span", { children: i(d ? a.exitFullScreenKey : a.fullScreenKey) })
|
|
2788
2790
|
})
|
|
2789
2791
|
]
|
|
2790
2792
|
})]
|
|
2791
2793
|
})]
|
|
2792
2794
|
});
|
|
2793
|
-
}, an = 9e3, on =
|
|
2795
|
+
}, an = 9e3, on = D`
|
|
2794
2796
|
position: absolute;
|
|
2795
2797
|
inset: 0;
|
|
2796
2798
|
z-index: 2;
|
|
@@ -2834,8 +2836,8 @@ ${jt}
|
|
|
2834
2836
|
color: #fff;
|
|
2835
2837
|
}
|
|
2836
2838
|
`, sn = () => {
|
|
2837
|
-
let { format: e } = Q(), t = Y((e) => e.burnedInSubtitles), n = Y((e) => e.pictureInPictureMode), [r, i] =
|
|
2838
|
-
return
|
|
2839
|
+
let { format: e } = Q(), t = Y((e) => e.burnedInSubtitles), n = Y((e) => e.pictureInPictureMode), [r, i] = T(!1);
|
|
2840
|
+
return S(() => {
|
|
2839
2841
|
if (n !== "burn-in" || !t) {
|
|
2840
2842
|
i(!1);
|
|
2841
2843
|
return;
|
|
@@ -2843,16 +2845,16 @@ ${jt}
|
|
|
2843
2845
|
i(!0);
|
|
2844
2846
|
let e = setTimeout(() => i(!1), an);
|
|
2845
2847
|
return () => clearTimeout(e);
|
|
2846
|
-
}, [n, t]), n !== "burn-in" || !t ? null : /* @__PURE__ */
|
|
2848
|
+
}, [n, t]), n !== "burn-in" || !t ? null : /* @__PURE__ */ I("div", {
|
|
2847
2849
|
css: on,
|
|
2848
2850
|
className: r ? "show" : "",
|
|
2849
2851
|
role: "status",
|
|
2850
|
-
children: /* @__PURE__ */
|
|
2852
|
+
children: /* @__PURE__ */ L("div", {
|
|
2851
2853
|
className: "card",
|
|
2852
|
-
children: [/* @__PURE__ */
|
|
2854
|
+
children: [/* @__PURE__ */ I("div", {
|
|
2853
2855
|
className: "text",
|
|
2854
2856
|
children: e(a.burnInHint)
|
|
2855
|
-
}), /* @__PURE__ */
|
|
2857
|
+
}), /* @__PURE__ */ I("div", {
|
|
2856
2858
|
className: "arrow",
|
|
2857
2859
|
"aria-hidden": "true",
|
|
2858
2860
|
children: "→"
|
|
@@ -2862,7 +2864,7 @@ ${jt}
|
|
|
2862
2864
|
}, cn = 1, ln = 6e3, un = 1, dn = {
|
|
2863
2865
|
opening: a.skipOpening,
|
|
2864
2866
|
ending: a.skipEnding
|
|
2865
|
-
}, fn =
|
|
2867
|
+
}, fn = D`
|
|
2866
2868
|
position: absolute;
|
|
2867
2869
|
inset: 0;
|
|
2868
2870
|
z-index: 2;
|
|
@@ -2914,10 +2916,10 @@ ${jt}
|
|
|
2914
2916
|
}
|
|
2915
2917
|
}
|
|
2916
2918
|
`, pn = ({ endingOffered: e }) => {
|
|
2917
|
-
let t = Y((e) => e.chapters), n = Y((e) => e.currentTime), r = Y((e) => e.requestSeek), i = Y((e) => e.seekPreview), a = Y(), { format: o } = Q(), s =
|
|
2918
|
-
let n =
|
|
2919
|
+
let t = Y((e) => e.chapters), n = Y((e) => e.currentTime), r = Y((e) => e.requestSeek), i = Y((e) => e.seekPreview), a = Y(), { format: o } = Q(), s = C(() => {
|
|
2920
|
+
let n = h(t), r = e ? -1 : n.lastIndexOf("ending");
|
|
2919
2921
|
return n.map((e, t) => t === r ? void 0 : e);
|
|
2920
|
-
}, [t, e]), c =
|
|
2922
|
+
}, [t, e]), c = C(() => {
|
|
2921
2923
|
if (typeof n != "number") return;
|
|
2922
2924
|
let e = t.findIndex((e, t) => s[t] !== void 0 && e.start - cn <= n && n < e.end), r = e >= 0 ? s[e] : void 0;
|
|
2923
2925
|
return r ? {
|
|
@@ -2928,26 +2930,26 @@ ${jt}
|
|
|
2928
2930
|
t,
|
|
2929
2931
|
s,
|
|
2930
2932
|
n
|
|
2931
|
-
]), l =
|
|
2932
|
-
|
|
2933
|
+
]), l = w(0), [u, d] = T(0);
|
|
2934
|
+
S(() => {
|
|
2933
2935
|
let e = typeof n == "number" ? n : 0, t = l.current;
|
|
2934
2936
|
l.current = e, e < t - un && d((e) => e + 1);
|
|
2935
2937
|
}, [n]);
|
|
2936
|
-
let [f, p] =
|
|
2937
|
-
return
|
|
2938
|
-
if (!
|
|
2938
|
+
let [f, p] = T(!1), m = c ? `${c.kind}@${c.end}` : "";
|
|
2939
|
+
return S(() => {
|
|
2940
|
+
if (!m) {
|
|
2939
2941
|
p(!1);
|
|
2940
2942
|
return;
|
|
2941
2943
|
}
|
|
2942
2944
|
p(!0);
|
|
2943
2945
|
let e = setTimeout(() => p(!1), ln);
|
|
2944
2946
|
return () => clearTimeout(e);
|
|
2945
|
-
}, [
|
|
2947
|
+
}, [m, u]), S(() => {
|
|
2946
2948
|
c || p(!1);
|
|
2947
|
-
}, [c]), c ? /* @__PURE__ */
|
|
2949
|
+
}, [c]), c ? /* @__PURE__ */ I("div", {
|
|
2948
2950
|
css: fn,
|
|
2949
2951
|
className: f && !i ? "show" : "",
|
|
2950
|
-
children: /* @__PURE__ */
|
|
2952
|
+
children: /* @__PURE__ */ I("button", {
|
|
2951
2953
|
type: "button",
|
|
2952
2954
|
className: "skip-chapter",
|
|
2953
2955
|
onClick: () => {
|
|
@@ -2956,7 +2958,7 @@ ${jt}
|
|
|
2956
2958
|
children: o(dn[c.kind])
|
|
2957
2959
|
})
|
|
2958
2960
|
}) : null;
|
|
2959
|
-
}, mn = 3e3, hn =
|
|
2961
|
+
}, mn = 3e3, hn = D`
|
|
2960
2962
|
position: absolute;
|
|
2961
2963
|
inset: 0;
|
|
2962
2964
|
z-index: 2;
|
|
@@ -2970,7 +2972,7 @@ ${jt}
|
|
|
2970
2972
|
`, gn = (e, t) => {
|
|
2971
2973
|
let n = e.left - t.left, r = e.top - t.top;
|
|
2972
2974
|
return `path(evenodd, 'M0 0H${t.width}V${t.height}H0Z M${n} ${r}H${n + e.width}V${r + e.height}H${n}Z')`;
|
|
2973
|
-
}, _n =
|
|
2975
|
+
}, _n = D`
|
|
2974
2976
|
position: relative;
|
|
2975
2977
|
background-color: black;
|
|
2976
2978
|
display: flex;
|
|
@@ -3027,44 +3029,44 @@ ${jt}
|
|
|
3027
3029
|
&.hide {
|
|
3028
3030
|
cursor: none;
|
|
3029
3031
|
}
|
|
3030
|
-
`, vn = (e, t = "") =>
|
|
3031
|
-
let r = `${t}${
|
|
3032
|
-
return
|
|
3032
|
+
`, vn = (e, t = "") => g.toArray(e).flatMap((e, n) => {
|
|
3033
|
+
let r = `${t}${y(e) && e.key != null ? e.key : n}`;
|
|
3034
|
+
return y(e) && e.type === _ ? vn(e.props.children, `${r}/`) : [{
|
|
3033
3035
|
key: r,
|
|
3034
3036
|
item: e
|
|
3035
3037
|
}];
|
|
3036
3038
|
}), yn = ({ ref: e, onVideoRef: t, onSubtitleRef: n, overlay: r, controls: i, shortcuts: a, fullscreen: o, endingOffered: s, children: c }) => {
|
|
3037
|
-
let l = Y(), u = Y((e) => e.hideUI), d = Y((e) => e.setHideUI), f = Y((e) => e.hasMedia), p = Y((e) => e.passThroughPictureInPicture), m =
|
|
3039
|
+
let l = Y(), u = Y((e) => e.hideUI), d = Y((e) => e.setHideUI), f = Y((e) => e.hasMedia), p = Y((e) => e.passThroughPictureInPicture), m = w(void 0), h = w("mouse"), g = w({
|
|
3038
3040
|
x: -1,
|
|
3039
3041
|
y: -1
|
|
3040
|
-
}), _ =
|
|
3041
|
-
|
|
3042
|
+
}), _ = w(!1), v = w(null);
|
|
3043
|
+
S(() => () => clearTimeout(m.current), []), S(() => {
|
|
3042
3044
|
let e = v.current;
|
|
3043
3045
|
if (!e) return;
|
|
3044
3046
|
let t = new ResizeObserver(([t]) => e.style.setProperty("--mp-height", `${t.contentRect.height}px`));
|
|
3045
3047
|
return t.observe(e), () => t.disconnect();
|
|
3046
|
-
}, []),
|
|
3048
|
+
}, []), S(() => {
|
|
3047
3049
|
f || (clearTimeout(m.current), d(!1));
|
|
3048
3050
|
}, [f, d]);
|
|
3049
3051
|
let y = () => {
|
|
3050
3052
|
f && d(!0);
|
|
3051
3053
|
}, b = (t) => {
|
|
3052
3054
|
v.current = t, typeof e == "function" ? e(t) : e && (e.current = t);
|
|
3053
|
-
},
|
|
3055
|
+
}, x = () => {
|
|
3054
3056
|
if (l.passThroughPictureInPicture?.armed) return !0;
|
|
3055
3057
|
if (h.current !== "mouse") return !1;
|
|
3056
3058
|
let { x: e, y: t } = g.current;
|
|
3057
3059
|
if (!v.current || e < 0) return !1;
|
|
3058
3060
|
let n = document.elementFromPoint(e, t);
|
|
3059
3061
|
return !n || !v.current.contains(n) || n.closest(".video") ? !1 : !n.closest(".control-bar") || _.current || !!v.current.querySelector(".control-bar [aria-expanded=\"true\"]");
|
|
3060
|
-
},
|
|
3061
|
-
if (
|
|
3062
|
-
m.current = setTimeout(
|
|
3062
|
+
}, C = () => {
|
|
3063
|
+
if (x()) {
|
|
3064
|
+
m.current = setTimeout(C, mn);
|
|
3063
3065
|
return;
|
|
3064
3066
|
}
|
|
3065
3067
|
y();
|
|
3066
3068
|
}, T = () => {
|
|
3067
|
-
d(!1), clearTimeout(m.current), m.current = setTimeout(
|
|
3069
|
+
d(!1), clearTimeout(m.current), m.current = setTimeout(C, mn);
|
|
3068
3070
|
}, E = (e) => {
|
|
3069
3071
|
h.current = e.pointerType, e.pointerType === "mouse" && (g.current = {
|
|
3070
3072
|
x: e.clientX,
|
|
@@ -3074,8 +3076,8 @@ ${jt}
|
|
|
3074
3076
|
h.current = e.pointerType, _.current = !0;
|
|
3075
3077
|
}, O = () => {
|
|
3076
3078
|
_.current = !1;
|
|
3077
|
-
}, k =
|
|
3078
|
-
return /* @__PURE__ */
|
|
3079
|
+
}, k = w(!0);
|
|
3080
|
+
return /* @__PURE__ */ L("div", {
|
|
3079
3081
|
css: _n,
|
|
3080
3082
|
ref: b,
|
|
3081
3083
|
onPointerMove: E,
|
|
@@ -3091,8 +3093,8 @@ ${jt}
|
|
|
3091
3093
|
className: u ? "hide" : "",
|
|
3092
3094
|
tabIndex: a === "player" ? -1 : void 0,
|
|
3093
3095
|
children: [
|
|
3094
|
-
/* @__PURE__ */
|
|
3095
|
-
vn(r).map(({ key: e, item: t }) => /* @__PURE__ */
|
|
3096
|
+
/* @__PURE__ */ I(ut, { onSubtitleRef: n }),
|
|
3097
|
+
vn(r).map(({ key: e, item: t }) => /* @__PURE__ */ I("div", {
|
|
3096
3098
|
css: hn,
|
|
3097
3099
|
style: { ...u ? {
|
|
3098
3100
|
opacity: "0",
|
|
@@ -3101,22 +3103,22 @@ ${jt}
|
|
|
3101
3103
|
} : {} },
|
|
3102
3104
|
children: t
|
|
3103
3105
|
}, e)),
|
|
3104
|
-
i === !1 ? null : /* @__PURE__ */
|
|
3106
|
+
i === !1 ? null : /* @__PURE__ */ I(xt, {
|
|
3105
3107
|
value: !!o,
|
|
3106
|
-
children: /* @__PURE__ */
|
|
3108
|
+
children: /* @__PURE__ */ I(rn, {
|
|
3107
3109
|
shortcuts: a,
|
|
3108
3110
|
root: v,
|
|
3109
3111
|
fullscreen: o
|
|
3110
3112
|
})
|
|
3111
3113
|
}),
|
|
3112
|
-
/* @__PURE__ */
|
|
3113
|
-
/* @__PURE__ */
|
|
3114
|
-
p?.armed && v.current ? /* @__PURE__ */
|
|
3114
|
+
/* @__PURE__ */ I(sn, {}),
|
|
3115
|
+
/* @__PURE__ */ I(pn, { endingOffered: s }),
|
|
3116
|
+
p?.armed && v.current ? /* @__PURE__ */ I("div", {
|
|
3115
3117
|
className: "pass-through",
|
|
3116
3118
|
style: { clipPath: gn(p.armed, v.current.getBoundingClientRect()) },
|
|
3117
3119
|
onPointerOver: p.disarm
|
|
3118
3120
|
}) : null,
|
|
3119
|
-
/* @__PURE__ */
|
|
3121
|
+
/* @__PURE__ */ L("div", {
|
|
3120
3122
|
className: "video",
|
|
3121
3123
|
onClick: (e) => {
|
|
3122
3124
|
if (h.current === "mouse") {
|
|
@@ -3129,7 +3131,7 @@ ${jt}
|
|
|
3129
3131
|
onDoubleClick: () => {
|
|
3130
3132
|
h.current === "mouse" && (k.current ? l.pause() : l.play().catch(() => {}), o ? o.request() : l.toggleFullscreen());
|
|
3131
3133
|
},
|
|
3132
|
-
children: [t ? /* @__PURE__ */
|
|
3134
|
+
children: [t ? /* @__PURE__ */ I("video", {
|
|
3133
3135
|
ref: t,
|
|
3134
3136
|
playsInline: !0
|
|
3135
3137
|
}) : null, c]
|
|
@@ -3137,130 +3139,130 @@ ${jt}
|
|
|
3137
3139
|
]
|
|
3138
3140
|
});
|
|
3139
3141
|
}, bn = (e, t) => ({ title: e.options.find((e) => e.id === t)?.label }), xn = (e, t) => e instanceof Promise ? e.then(t) : t(), Sn = ({ options: e, children: t }) => {
|
|
3140
|
-
let n = "media" in e ? e : null, r = n ? null : e, { title: i, chapters: a } = e, { size: o, downloadedRanges: s, publicPath: c, libavWorkerUrl: l, read:
|
|
3141
|
-
|
|
3142
|
-
let { expose:
|
|
3142
|
+
let n = "media" in e ? e : null, r = n ? null : e, { title: i, chapters: a } = e, { size: o, downloadedRanges: s, publicPath: c, libavWorkerUrl: l, read: f, thumbnailRead: p, thumbnailsEnabled: m, readsDownload: h } = r ?? {}, g = j(), _ = A(), [v, y] = T(null), [b, x] = T(null), E = n?.media ?? v;
|
|
3143
|
+
S(() => (g?.(E), () => g?.(null)), [E, g]), Pe(E, n?.stepFrame);
|
|
3144
|
+
let { expose: D } = e, [O, k] = T(null), [M, N] = T(!0), [P] = T(() => Object.assign(new EventTarget(), {
|
|
3143
3145
|
chapters: [],
|
|
3144
3146
|
endingOffered: !0,
|
|
3145
|
-
onHostFullscreen:
|
|
3146
|
-
onEndingOffered:
|
|
3147
|
-
})),
|
|
3148
|
-
|
|
3149
|
-
let
|
|
3150
|
-
|
|
3151
|
-
if (!
|
|
3147
|
+
onHostFullscreen: k,
|
|
3148
|
+
onEndingOffered: N
|
|
3149
|
+
})), F = D === !0 ? {} : D || void 0, L = w(F);
|
|
3150
|
+
L.current = F;
|
|
3151
|
+
let R = F ? F.id : void 0, z = F ? F.origin : void 0, B = F ? F.channel : void 0;
|
|
3152
|
+
S(() => {
|
|
3153
|
+
if (!D || !E) return;
|
|
3152
3154
|
let e, t = !1;
|
|
3153
3155
|
return import("./remote/index.js").then(({ exposePlayer: n }) => {
|
|
3154
|
-
t || (e = n(
|
|
3155
|
-
...
|
|
3156
|
-
player:
|
|
3156
|
+
t || (e = n(E, {
|
|
3157
|
+
...L.current,
|
|
3158
|
+
player: P
|
|
3157
3159
|
}));
|
|
3158
3160
|
}).catch(() => {}), () => {
|
|
3159
3161
|
t = !0, e?.();
|
|
3160
3162
|
};
|
|
3161
3163
|
}, [
|
|
3162
|
-
|
|
3163
|
-
!!
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3164
|
+
E,
|
|
3165
|
+
!!D,
|
|
3166
|
+
R,
|
|
3167
|
+
z,
|
|
3168
|
+
B
|
|
3167
3169
|
]);
|
|
3168
|
-
let
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
}, [
|
|
3172
|
-
let
|
|
3173
|
-
active:
|
|
3174
|
-
request: () =>
|
|
3175
|
-
}),
|
|
3176
|
-
Ae(
|
|
3177
|
-
let
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
}, [
|
|
3181
|
-
let
|
|
3182
|
-
|
|
3183
|
-
let
|
|
3184
|
-
|
|
3185
|
-
let
|
|
3186
|
-
tap:
|
|
3187
|
-
audioStreamIndex:
|
|
3170
|
+
let V = Y((e) => e.chapters), ee = JSON.stringify(V);
|
|
3171
|
+
S(() => {
|
|
3172
|
+
P.chapters = V, P.endingOffered = M, P.dispatchEvent(new Event("chapterschange"));
|
|
3173
|
+
}, [ee, M]);
|
|
3174
|
+
let te = e.fullscreen ?? (O === null ? void 0 : {
|
|
3175
|
+
active: O,
|
|
3176
|
+
request: () => P.dispatchEvent(new Event("fullscreenrequest"))
|
|
3177
|
+
}), H = C(() => tt(), [o]);
|
|
3178
|
+
Ae(v, b, r, h ? H.push : void 0);
|
|
3179
|
+
let ne = r?.normalizeVolume ?? !0, [U, re] = T(ne);
|
|
3180
|
+
S(() => {
|
|
3181
|
+
re(ne);
|
|
3182
|
+
}, [ne]);
|
|
3183
|
+
let W = w(r?.onNormalizeVolumeChange);
|
|
3184
|
+
W.current = r?.onNormalizeVolumeChange;
|
|
3185
|
+
let G = r?.normalizerWorkletUrl, K = w(p ?? f);
|
|
3186
|
+
K.current = p ?? f;
|
|
3187
|
+
let q = Y((e) => e.selectedAudioTrack), ie = !!f, { refused: J } = et(v, G, U, C(() => ie && o && c && l && typeof q == "number" && q >= 0 ? h ? {
|
|
3188
|
+
tap: H,
|
|
3189
|
+
audioStreamIndex: q
|
|
3188
3190
|
} : {
|
|
3189
|
-
read: (e, t) =>
|
|
3191
|
+
read: (e, t) => K.current(e, t),
|
|
3190
3192
|
length: o,
|
|
3191
3193
|
publicPath: c,
|
|
3192
3194
|
libavWorkerUrl: l,
|
|
3193
|
-
audioStreamIndex:
|
|
3195
|
+
audioStreamIndex: q
|
|
3194
3196
|
} : void 0, [
|
|
3195
|
-
|
|
3197
|
+
ie,
|
|
3196
3198
|
o,
|
|
3197
3199
|
c,
|
|
3198
3200
|
l,
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
]),
|
|
3201
|
+
q,
|
|
3202
|
+
h,
|
|
3203
|
+
H
|
|
3204
|
+
]), C(() => s?.map(({ startByteOffset: e, endByteOffset: t }) => [e, t]), [s?.map(({ startByteOffset: e, endByteOffset: t }) => `${e}-${t}`).join(",")])), ae = C(() => G && typeof AudioWorkletNode == "function" ? {
|
|
3203
3205
|
enabled: U,
|
|
3204
|
-
available: !
|
|
3206
|
+
available: !J,
|
|
3205
3207
|
setEnabled: (e) => {
|
|
3206
|
-
|
|
3208
|
+
re(e), W.current?.(e);
|
|
3207
3209
|
}
|
|
3208
3210
|
} : null, [
|
|
3209
|
-
|
|
3211
|
+
G,
|
|
3210
3212
|
U,
|
|
3211
|
-
|
|
3212
|
-
]), { thumbnails:
|
|
3213
|
+
J
|
|
3214
|
+
]), { thumbnails: oe, requestThumbnail: se } = Le({
|
|
3213
3215
|
publicPath: c,
|
|
3214
3216
|
workerUrl: l,
|
|
3215
|
-
length:
|
|
3216
|
-
read:
|
|
3217
|
+
length: m === !1 ? void 0 : o,
|
|
3218
|
+
read: p ?? f,
|
|
3217
3219
|
downloadedRanges: s
|
|
3218
|
-
}),
|
|
3219
|
-
|
|
3220
|
+
}), ce = n?.thumbnails?.all ?? oe, { toggle: le, mode: ue, burnedIn: de } = Re(v, b), fe = We(n?.media ?? null, n?.pictureInPicture), X = Y((e) => e.setSourceState), pe = n ? !!n.media : o !== void 0;
|
|
3221
|
+
S(() => {
|
|
3220
3222
|
X({
|
|
3221
3223
|
title: i,
|
|
3222
3224
|
size: o,
|
|
3223
3225
|
downloadedRanges: s,
|
|
3224
|
-
hasMedia:
|
|
3226
|
+
hasMedia: pe
|
|
3225
3227
|
});
|
|
3226
3228
|
}, [
|
|
3227
3229
|
X,
|
|
3228
3230
|
i,
|
|
3229
3231
|
o,
|
|
3230
3232
|
s,
|
|
3231
|
-
|
|
3233
|
+
pe
|
|
3232
3234
|
]);
|
|
3233
|
-
let
|
|
3234
|
-
|
|
3235
|
+
let me = n?.thumbnails?.at;
|
|
3236
|
+
S(() => {
|
|
3235
3237
|
X({
|
|
3236
|
-
thumbnails:
|
|
3237
|
-
thumbnailAt:
|
|
3238
|
-
requestThumbnail:
|
|
3239
|
-
togglePictureInPicture:
|
|
3240
|
-
pictureInPictureMode:
|
|
3241
|
-
burnedInSubtitles:
|
|
3238
|
+
thumbnails: ce,
|
|
3239
|
+
thumbnailAt: me,
|
|
3240
|
+
requestThumbnail: se,
|
|
3241
|
+
togglePictureInPicture: le,
|
|
3242
|
+
pictureInPictureMode: ue,
|
|
3243
|
+
burnedInSubtitles: de
|
|
3242
3244
|
});
|
|
3243
3245
|
}, [
|
|
3244
3246
|
X,
|
|
3245
|
-
se,
|
|
3246
|
-
pe,
|
|
3247
|
-
oe,
|
|
3248
3247
|
ce,
|
|
3248
|
+
me,
|
|
3249
|
+
se,
|
|
3249
3250
|
le,
|
|
3250
|
-
ue
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3251
|
+
ue,
|
|
3252
|
+
de
|
|
3253
|
+
]), S(() => {
|
|
3254
|
+
X({ volumeNormalizer: ae });
|
|
3255
|
+
}, [X, ae]), S(() => {
|
|
3256
|
+
X({ passThroughPictureInPicture: fe });
|
|
3257
|
+
}, [X, fe]);
|
|
3258
|
+
let Z = n?.subtitles?.selection, he = n?.audioTracks?.selection, ge = w({
|
|
3259
|
+
options: e,
|
|
3260
|
+
audio: he
|
|
3259
3261
|
});
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
},
|
|
3262
|
+
ge.current = {
|
|
3263
|
+
options: e,
|
|
3264
|
+
audio: he
|
|
3265
|
+
}, S(() => {
|
|
3264
3266
|
Z && X({
|
|
3265
3267
|
subtitleTracks: Z.options.map(({ id: e, label: t, disabled: n }) => ({
|
|
3266
3268
|
id: e,
|
|
@@ -3271,43 +3273,45 @@ ${jt}
|
|
|
3271
3273
|
selectSubtitleTrack: (e) => {
|
|
3272
3274
|
let t = e == null ? null : String(e), n = t === null ? void 0 : bn(Z, t), r = Z.selectedId === null;
|
|
3273
3275
|
return xn(Z.select(t), () => {
|
|
3274
|
-
let e = t === null ? null : u(n) ?? (r ? n?.title : void 0);
|
|
3275
|
-
e !== void 0 &&
|
|
3276
|
+
let e = t === null ? null : u(n) ?? (r ? n?.title : void 0), i = ge.current;
|
|
3277
|
+
e !== void 0 && i.options.onPreferredSubtitleLanguageChange?.(e);
|
|
3278
|
+
let a = i.audio && bn(i.audio, i.audio.selectedId ?? "");
|
|
3279
|
+
e && d(a, e) && i.options.onAlwaysShowSubtitlesChange?.(!0);
|
|
3276
3280
|
});
|
|
3277
3281
|
},
|
|
3278
3282
|
subtitleOffLabel: Z.offLabel
|
|
3279
3283
|
});
|
|
3280
|
-
}, [X, Z]),
|
|
3281
|
-
|
|
3282
|
-
audioTracks:
|
|
3284
|
+
}, [X, Z]), S(() => {
|
|
3285
|
+
he && X({
|
|
3286
|
+
audioTracks: he.options.map(({ id: e, label: t, disabled: n }) => ({
|
|
3283
3287
|
id: e,
|
|
3284
3288
|
label: t,
|
|
3285
3289
|
disabled: n
|
|
3286
3290
|
})),
|
|
3287
|
-
selectedAudioTrack:
|
|
3288
|
-
selectAudioTrack: (e) => xn(
|
|
3289
|
-
let t = u(bn(
|
|
3290
|
-
t !== void 0 &&
|
|
3291
|
+
selectedAudioTrack: he.selectedId ?? void 0,
|
|
3292
|
+
selectAudioTrack: (e) => xn(he.select(String(e)), () => {
|
|
3293
|
+
let t = u(bn(he, String(e)));
|
|
3294
|
+
t !== void 0 && ge.current.options.onPreferredAudioLanguageChange?.(t);
|
|
3291
3295
|
})
|
|
3292
3296
|
});
|
|
3293
|
-
}, [X,
|
|
3294
|
-
let
|
|
3295
|
-
return
|
|
3296
|
-
X({ quality:
|
|
3297
|
-
}, [X,
|
|
3297
|
+
}, [X, he]);
|
|
3298
|
+
let _e = n?.quality?.selection ?? null;
|
|
3299
|
+
return S(() => {
|
|
3300
|
+
X({ quality: _e });
|
|
3301
|
+
}, [X, _e]), S(() => {
|
|
3298
3302
|
a && X({ chapters: a });
|
|
3299
|
-
}, [X, a]), /* @__PURE__ */
|
|
3300
|
-
ref:
|
|
3301
|
-
onVideoRef: n ? void 0 :
|
|
3302
|
-
onSubtitleRef:
|
|
3303
|
+
}, [X, a]), /* @__PURE__ */ I(yn, {
|
|
3304
|
+
ref: _,
|
|
3305
|
+
onVideoRef: n ? void 0 : y,
|
|
3306
|
+
onSubtitleRef: x,
|
|
3303
3307
|
overlay: e.overlay,
|
|
3304
3308
|
controls: e.controls,
|
|
3305
3309
|
shortcuts: e.shortcuts,
|
|
3306
|
-
fullscreen:
|
|
3307
|
-
endingOffered:
|
|
3310
|
+
fullscreen: te,
|
|
3311
|
+
endingOffered: M,
|
|
3308
3312
|
children: t
|
|
3309
3313
|
});
|
|
3310
|
-
}, Cn =
|
|
3314
|
+
}, Cn = D`
|
|
3311
3315
|
/**
|
|
3312
3316
|
* The chrome's whole scale, in one place.
|
|
3313
3317
|
*
|
|
@@ -3377,11 +3381,11 @@ ${jt}
|
|
|
3377
3381
|
height: 100%;
|
|
3378
3382
|
width: 100%;
|
|
3379
3383
|
overflow: hidden;
|
|
3380
|
-
`, wn = (e) => /* @__PURE__ */
|
|
3384
|
+
`, wn = (e) => /* @__PURE__ */ I("div", {
|
|
3381
3385
|
css: Cn,
|
|
3382
|
-
children: /* @__PURE__ */
|
|
3386
|
+
children: /* @__PURE__ */ I(le.Provider, { children: /* @__PURE__ */ I(ye, {
|
|
3383
3387
|
language: e.language,
|
|
3384
|
-
children: /* @__PURE__ */
|
|
3388
|
+
children: /* @__PURE__ */ I(Sn, {
|
|
3385
3389
|
options: e,
|
|
3386
3390
|
children: e.children
|
|
3387
3391
|
})
|
|
@@ -3428,4 +3432,4 @@ ${jt}
|
|
|
3428
3432
|
throw Error(`Unknown source type: ${e}`);
|
|
3429
3433
|
};
|
|
3430
3434
|
//#endregion
|
|
3431
|
-
export { wn as MediaPlayer, wn as default,
|
|
3435
|
+
export { wn as MediaPlayer, wn as default, le as Player, t as SUBTITLES_OFF, c as createPictureInPicture, l as createSubtitleRenderer, o as createThumbnailGenerator, An as inputToRemuxerInput, En as isDelegatedTracks, Tn as isExternalThumbnails, ce as sourceFeature, s as startPlayback, Re as usePictureInPicture, Y as usePlayer, Le as useSeekThumbnails };
|