@banou/media-player 0.10.24 → 0.10.26
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 +9 -1
- package/dist/engine/index.js +1 -1
- package/dist/engine/playback.d.ts +1 -0
- package/dist/engine/subtitles.d.ts +8 -0
- package/dist/{engine-BdouHadr.js → engine-AjFLuCdA.js} +190 -185
- package/dist/index.js +311 -290
- package/dist/react/hooks/use-frame-step.d.ts +3 -1
- package/dist/react/source-feature.d.ts +8 -2
- package/dist/react/video-player.d.ts +11 -0
- package/dist/volume-normalizer-worklet.js +9 -5
- package/package.json +2 -1
- package/src/lib/assets/noto-sans-jp.LICENSE.txt +92 -0
- package/src/lib/assets/noto-sans-jp.otf +0 -0
- package/src/lib/audio/volume-normalizer-worklet.js +9 -5
- package/src/lib/engine/playback.ts +3 -1
- package/src/lib/engine/subtitles.ts +34 -1
- package/src/lib/react/hooks/use-frame-step.ts +65 -35
- package/src/lib/react/hooks/use-playback.ts +3 -2
- package/src/lib/react/source-feature.ts +4 -1
- package/src/lib/react/video-player.tsx +12 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e, l as t, n, o as r, r as i, s as a, t as o, u as s } from "./engine-
|
|
1
|
+
import { c as e, l as t, n, o as r, r as i, s as a, t as o, u as s } from "./engine-AjFLuCdA.js";
|
|
2
2
|
import { Children as c, Fragment as l, isValidElement as u, useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h, useSyncExternalStore as g } from "react";
|
|
3
3
|
import { css as _, keyframes as v } from "@emotion/react";
|
|
4
4
|
import { createPlayer as y, useContainerAttach as b, useMediaAttach as x } from "@videojs/react";
|
|
@@ -87,32 +87,32 @@ var U = {
|
|
|
87
87
|
}
|
|
88
88
|
return t.length ? t.join("\n") : void 0;
|
|
89
89
|
}, le = (e, t, n, i) => {
|
|
90
|
-
let o = K(), { read: s, size: c, publicPath: l = "", libavWorkerUrl: u = "", jassubWorkerUrl: p = "", jassubWasmUrl: g = "", jassubLegacyWasmUrl: _, defaultFontUrl: v,
|
|
91
|
-
|
|
92
|
-
let [
|
|
90
|
+
let o = K(), { read: s, size: c, publicPath: l = "", libavWorkerUrl: u = "", jassubWorkerUrl: p = "", jassubWasmUrl: g = "", jassubLegacyWasmUrl: _, defaultFontUrl: v, cjkFontUrl: y, bufferSize: b, autoplay: x = !1, chapters: S, seekPrepareBudgetMs: C = X } = n ?? {}, w = m(S);
|
|
91
|
+
w.current = S;
|
|
92
|
+
let [T, E] = h(void 0), [D, O] = h(0), k = m({
|
|
93
93
|
count: 0,
|
|
94
94
|
at: 0
|
|
95
|
-
}),
|
|
96
|
-
f(() => (
|
|
95
|
+
}), A = m(void 0);
|
|
96
|
+
f(() => (k.current = {
|
|
97
97
|
count: 0,
|
|
98
98
|
at: 0
|
|
99
99
|
}, o.setSourceState({ playbackErrors: [] }), () => {
|
|
100
|
-
|
|
100
|
+
A.current && clearTimeout(A.current);
|
|
101
101
|
}), [c]);
|
|
102
|
-
let
|
|
103
|
-
|
|
104
|
-
let
|
|
105
|
-
|
|
106
|
-
let
|
|
107
|
-
|
|
108
|
-
let
|
|
109
|
-
|
|
110
|
-
let
|
|
102
|
+
let j = m(null), M = m(null), N = m(!1), P = m(s);
|
|
103
|
+
P.current = s;
|
|
104
|
+
let F = m(n?.onSeek);
|
|
105
|
+
F.current = n?.onSeek;
|
|
106
|
+
let I = m(n?.onPlaybackError);
|
|
107
|
+
I.current = n?.onPlaybackError;
|
|
108
|
+
let L = m(i);
|
|
109
|
+
L.current = i;
|
|
110
|
+
let R = d((e) => {
|
|
111
111
|
let t = typeof e == "number" ? e : void 0;
|
|
112
|
-
|
|
113
|
-
}, [o]),
|
|
114
|
-
let t =
|
|
115
|
-
if (!t ||
|
|
112
|
+
N.current = !0, o.setSourceState({ selectedSubtitleTrack: t }), j.current?.selectSubtitleStream(t);
|
|
113
|
+
}, [o]), z = d((e) => {
|
|
114
|
+
let t = j.current;
|
|
115
|
+
if (!t || C <= 0) {
|
|
116
116
|
o.seek(e);
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
@@ -130,24 +130,24 @@ var U = {
|
|
|
130
130
|
c?.addEventListener("seeked", l);
|
|
131
131
|
let d = setTimeout(() => {
|
|
132
132
|
a = "deadline", s();
|
|
133
|
-
},
|
|
133
|
+
}, C);
|
|
134
134
|
t.prepareSeek(e).catch(() => {}).finally(() => {
|
|
135
135
|
clearTimeout(d), s();
|
|
136
136
|
});
|
|
137
|
-
}, [o,
|
|
138
|
-
typeof e == "number" && (o.setSourceState({ selectedAudioTrack: e }),
|
|
139
|
-
}, [o]),
|
|
137
|
+
}, [o, C]), B = d((e) => {
|
|
138
|
+
typeof e == "number" && (o.setSourceState({ selectedAudioTrack: e }), E(e));
|
|
139
|
+
}, [o]), V = K((e) => e.setSourceState);
|
|
140
140
|
f(() => {
|
|
141
|
-
|
|
142
|
-
selectSubtitleTrack:
|
|
143
|
-
selectAudioTrack:
|
|
144
|
-
requestSeek:
|
|
141
|
+
V({
|
|
142
|
+
selectSubtitleTrack: R,
|
|
143
|
+
selectAudioTrack: B,
|
|
144
|
+
requestSeek: z
|
|
145
145
|
});
|
|
146
146
|
}, [
|
|
147
|
+
V,
|
|
148
|
+
R,
|
|
147
149
|
B,
|
|
148
|
-
|
|
149
|
-
z,
|
|
150
|
-
R
|
|
150
|
+
z
|
|
151
151
|
]), f(() => {
|
|
152
152
|
if (!e || !t || !c || !s) return;
|
|
153
153
|
let n = !1;
|
|
@@ -181,25 +181,25 @@ var U = {
|
|
|
181
181
|
let t = r(e);
|
|
182
182
|
if (i(e, t), t) {
|
|
183
183
|
let t = performance.now();
|
|
184
|
-
t -
|
|
184
|
+
t - k.current.at > ae && (k.current = {
|
|
185
185
|
count: 0,
|
|
186
186
|
at: t
|
|
187
187
|
});
|
|
188
|
-
let n = Y[Math.min(
|
|
189
|
-
|
|
190
|
-
count:
|
|
188
|
+
let n = Y[Math.min(k.current.count, Y.length - 1)];
|
|
189
|
+
k.current = {
|
|
190
|
+
count: k.current.count + 1,
|
|
191
191
|
at: t
|
|
192
|
-
}, console.warn(`the media element failed; rebuilding the pipeline${n ? ` in ${n}ms` : ""}`, e),
|
|
192
|
+
}, console.warn(`the media element failed; rebuilding the pipeline${n ? ` in ${n}ms` : ""}`, e), A.current && clearTimeout(A.current), A.current = setTimeout(() => O((e) => e + 1), n);
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
|
-
console.error("playback failed", e), o.setSourceState({ playbackError: e }),
|
|
195
|
+
console.error("playback failed", e), o.setSourceState({ playbackError: e }), I.current?.(e);
|
|
196
196
|
};
|
|
197
197
|
return (async () => {
|
|
198
198
|
try {
|
|
199
199
|
let r = await a({
|
|
200
200
|
videoElement: e,
|
|
201
201
|
subtitleContainer: t,
|
|
202
|
-
read: (e, t) =>
|
|
202
|
+
read: (e, t) => P.current(e, t),
|
|
203
203
|
length: c,
|
|
204
204
|
publicPath: l,
|
|
205
205
|
libavWorkerUrl: u,
|
|
@@ -207,24 +207,25 @@ var U = {
|
|
|
207
207
|
jassubWasmUrl: g,
|
|
208
208
|
jassubLegacyWasmUrl: _,
|
|
209
209
|
defaultFontUrl: v,
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
cjkFontUrl: y,
|
|
211
|
+
bufferSize: b,
|
|
212
|
+
audioStreamIndex: T,
|
|
212
213
|
onReady: () => {
|
|
213
214
|
if (n) return;
|
|
214
215
|
o.setSourceState({ ready: !0 });
|
|
215
|
-
let t =
|
|
216
|
-
|
|
216
|
+
let t = M.current;
|
|
217
|
+
M.current = null, t && t.size === c && t.time > 0 && (e.currentTime = t.time), x && e.play().catch(() => {});
|
|
217
218
|
},
|
|
218
219
|
onError: d,
|
|
219
220
|
onRecovered: () => {
|
|
220
221
|
n || o.setSourceState({ playbackError: null });
|
|
221
222
|
},
|
|
222
|
-
onSeek: (e) =>
|
|
223
|
-
onOutput: (e) =>
|
|
223
|
+
onSeek: (e) => F.current?.(e),
|
|
224
|
+
onOutput: (e) => L.current?.(e),
|
|
224
225
|
onSubtitleStreams: (e) => {
|
|
225
226
|
n || o.setSourceState({
|
|
226
227
|
subtitleTracks: J(e),
|
|
227
|
-
...
|
|
228
|
+
...N.current ? {} : { selectedSubtitleTrack: e[0]?.streamIndex }
|
|
228
229
|
});
|
|
229
230
|
},
|
|
230
231
|
onAudioStreams: (e, t) => {
|
|
@@ -238,9 +239,9 @@ var U = {
|
|
|
238
239
|
r.destroy();
|
|
239
240
|
return;
|
|
240
241
|
}
|
|
241
|
-
|
|
242
|
+
j.current = r, o.setSourceState({
|
|
242
243
|
indexes: r.indexes,
|
|
243
|
-
chapters:
|
|
244
|
+
chapters: w.current ?? r.chapters
|
|
244
245
|
});
|
|
245
246
|
let i = o.selectedSubtitleTrack;
|
|
246
247
|
typeof i == "number" && r.selectSubtitleStream(i);
|
|
@@ -248,10 +249,10 @@ var U = {
|
|
|
248
249
|
d(e);
|
|
249
250
|
}
|
|
250
251
|
})(), () => {
|
|
251
|
-
n = !0,
|
|
252
|
+
n = !0, M.current = {
|
|
252
253
|
time: e.currentTime,
|
|
253
254
|
size: c
|
|
254
|
-
},
|
|
255
|
+
}, j.current?.destroy(), j.current = null, o.setSourceState({ ready: !1 });
|
|
255
256
|
};
|
|
256
257
|
}, [
|
|
257
258
|
o,
|
|
@@ -265,9 +266,10 @@ var U = {
|
|
|
265
266
|
_,
|
|
266
267
|
v,
|
|
267
268
|
y,
|
|
268
|
-
w,
|
|
269
269
|
b,
|
|
270
|
-
|
|
270
|
+
T,
|
|
271
|
+
x,
|
|
272
|
+
D
|
|
271
273
|
]);
|
|
272
274
|
}, ue = 1001 / 24e3, de = (e, t) => new Promise((n) => {
|
|
273
275
|
let r = setTimeout(n, t);
|
|
@@ -275,57 +277,76 @@ var U = {
|
|
|
275
277
|
clearTimeout(r), n();
|
|
276
278
|
});
|
|
277
279
|
}), fe = (e) => {
|
|
278
|
-
let t =
|
|
280
|
+
let t = !1, n, r = async (i) => {
|
|
281
|
+
if (t) {
|
|
282
|
+
n = i;
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
t = !0;
|
|
286
|
+
try {
|
|
287
|
+
await e(i);
|
|
288
|
+
} finally {
|
|
289
|
+
t = !1;
|
|
290
|
+
let e = n;
|
|
291
|
+
n = void 0, e && r(e);
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
return r;
|
|
295
|
+
}, pe = (e, t) => {
|
|
296
|
+
let n = K(), r = K((e) => e.setSourceState), i = m(t);
|
|
297
|
+
i.current = t;
|
|
298
|
+
let a = !!t;
|
|
279
299
|
f(() => {
|
|
280
|
-
let
|
|
281
|
-
if (!
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
300
|
+
let t = e;
|
|
301
|
+
if (!t) return;
|
|
302
|
+
if (typeof t.requestVideoFrameCallback != "function") return a ? (r({ stepFrame: fe(async (e) => {
|
|
303
|
+
try {
|
|
304
|
+
await i.current?.(e);
|
|
305
|
+
} catch (e) {
|
|
306
|
+
console.warn("the host could not step a frame", e);
|
|
307
|
+
}
|
|
308
|
+
}) }), () => r({ stepFrame: void 0 })) : void 0;
|
|
309
|
+
let o, s = !1, c = [], l = () => {
|
|
310
|
+
s = !0, o = void 0;
|
|
311
|
+
}, u = () => {
|
|
312
|
+
o = void 0, c.length = 0;
|
|
286
313
|
};
|
|
287
|
-
|
|
288
|
-
let
|
|
289
|
-
let
|
|
290
|
-
!
|
|
314
|
+
t.addEventListener("seeking", l), t.addEventListener("emptied", u);
|
|
315
|
+
let d = 0, f = (e, n) => {
|
|
316
|
+
let r = s;
|
|
317
|
+
!t.paused && !t.seeking && (s = !1), !r && !t.paused && t.playbackRate <= 1 && o && n.presentedFrames === o.presentedFrames + 1 && n.mediaTime > o.mediaTime && (c.push(n.mediaTime - o.mediaTime), c.length > 60 && c.shift()), o = r ? void 0 : n, d = t.requestVideoFrameCallback(f);
|
|
291
318
|
};
|
|
292
|
-
|
|
293
|
-
let
|
|
294
|
-
if (
|
|
295
|
-
let e = [...
|
|
319
|
+
d = t.requestVideoFrameCallback(f);
|
|
320
|
+
let p = () => {
|
|
321
|
+
if (c.length < 5) return ue;
|
|
322
|
+
let e = [...c].sort((e, t) => e - t), t = e[e.length >> 1], n = e.filter((e) => Math.abs(e - t) <= t / 4);
|
|
296
323
|
return n.reduce((e, t) => e + t, 0) / n.length;
|
|
297
|
-
},
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
l ? l(s) : r.currentTime = s, await c;
|
|
310
|
-
} finally {
|
|
311
|
-
f = !1;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
} }), () => {
|
|
315
|
-
r.removeEventListener("seeking", s), r.removeEventListener("emptied", c), r.cancelVideoFrameCallback(l), n({ stepFrame: void 0 });
|
|
324
|
+
}, m = fe(async (e) => {
|
|
325
|
+
t.paused || (t.pause(), await de(t, 100));
|
|
326
|
+
let r = p(), i = n.state.seekingTo, a = i === void 0 ? o ? o.mediaTime + (e > 0 ? 1.5 : -.5) * r : t.currentTime + e * r : i + e * r, s = Math.max(0, Math.min(a, t.duration || a)), c = new Promise((e) => {
|
|
327
|
+
let n = setTimeout(e, 1e3);
|
|
328
|
+
t.addEventListener("seeked", () => {
|
|
329
|
+
clearTimeout(n), e();
|
|
330
|
+
}, { once: !0 });
|
|
331
|
+
}), { requestSeek: l } = n.state;
|
|
332
|
+
l ? l(s) : t.currentTime = s, await c;
|
|
333
|
+
});
|
|
334
|
+
return r({ stepFrame: m }), () => {
|
|
335
|
+
t.removeEventListener("seeking", l), t.removeEventListener("emptied", u), t.cancelVideoFrameCallback(d), r({ stepFrame: void 0 });
|
|
316
336
|
};
|
|
317
337
|
}, [
|
|
318
338
|
e,
|
|
319
|
-
|
|
320
|
-
n
|
|
339
|
+
a,
|
|
340
|
+
n,
|
|
341
|
+
r
|
|
321
342
|
]);
|
|
322
|
-
},
|
|
343
|
+
}, me = 5e3, he = 6e4, ge = ({ publicPath: e, workerUrl: t, length: n, read: r, downloadedRanges: a }) => {
|
|
323
344
|
let [o, s] = h([]), c = m(null), l = m(r);
|
|
324
345
|
l.current = r;
|
|
325
346
|
let u = p(() => a?.map(({ startByteOffset: e, endByteOffset: t }) => [e, t]), [a?.map(({ startByteOffset: e, endByteOffset: t }) => `${e}-${t}`).join(",")]), g = m(u);
|
|
326
347
|
return g.current = u, f(() => {
|
|
327
348
|
if (!n || !r || !e || !t) return;
|
|
328
|
-
let a = !1, o = null, u, d =
|
|
349
|
+
let a = !1, o = null, u, d = me, f = () => {
|
|
329
350
|
i({
|
|
330
351
|
publicPath: e,
|
|
331
352
|
workerUrl: t,
|
|
@@ -341,7 +362,7 @@ var U = {
|
|
|
341
362
|
}
|
|
342
363
|
o = e, c.current = e, e.update(g.current);
|
|
343
364
|
}, () => {
|
|
344
|
-
a || (u = setTimeout(f, d), d = Math.min(d * 2,
|
|
365
|
+
a || (u = setTimeout(f, d), d = Math.min(d * 2, he));
|
|
345
366
|
});
|
|
346
367
|
};
|
|
347
368
|
return f(), () => {
|
|
@@ -359,7 +380,7 @@ var U = {
|
|
|
359
380
|
c.current?.prioritize(e);
|
|
360
381
|
}, [])
|
|
361
382
|
};
|
|
362
|
-
},
|
|
383
|
+
}, _e = (e, t) => {
|
|
363
384
|
let r = m(null), [i, a] = h(!1), [s] = h(() => n());
|
|
364
385
|
f(() => {
|
|
365
386
|
if (!e || !t || !s) return;
|
|
@@ -387,10 +408,10 @@ var U = {
|
|
|
387
408
|
mode: s,
|
|
388
409
|
burnedIn: i
|
|
389
410
|
};
|
|
390
|
-
},
|
|
391
|
-
let t =
|
|
411
|
+
}, ve = "(hover: hover) and (pointer: fine)", ye = () => typeof matchMedia == "function" ? matchMedia(ve) : void 0, be = (e) => {
|
|
412
|
+
let t = ye();
|
|
392
413
|
return t?.addEventListener("change", e), () => t?.removeEventListener("change", e);
|
|
393
|
-
},
|
|
414
|
+
}, xe = () => !!ye()?.matches, Se = () => !1, Ce = (e, t) => {
|
|
394
415
|
let [n, r] = h(!1), [i, a] = h(), o = m(t);
|
|
395
416
|
t && (o.current = t);
|
|
396
417
|
let s = m(!1), c = d((e) => {
|
|
@@ -413,7 +434,7 @@ var U = {
|
|
|
413
434
|
_,
|
|
414
435
|
u
|
|
415
436
|
]);
|
|
416
|
-
let v = g(
|
|
437
|
+
let v = g(be, xe, Se), [y, b] = h(!1);
|
|
417
438
|
f(() => {
|
|
418
439
|
if (!_) return;
|
|
419
440
|
let e = (e) => {
|
|
@@ -454,16 +475,16 @@ var U = {
|
|
|
454
475
|
u,
|
|
455
476
|
S
|
|
456
477
|
]);
|
|
457
|
-
},
|
|
478
|
+
}, we = async (e, t, n = {}) => (await e.audioWorklet.addModule(t), new AudioWorkletNode(e, "banou-volume-normalizer", {
|
|
458
479
|
channelCountMode: "max",
|
|
459
480
|
processorOptions: n
|
|
460
|
-
})),
|
|
481
|
+
})), Te = /* @__PURE__ */ new WeakMap(), Ee = (e) => new Promise((t, n) => {
|
|
461
482
|
let r = () => {
|
|
462
483
|
(e.state === "running" || e.state === "closed") && (e.removeEventListener("statechange", r), e.state === "running" ? t() : n(new DOMException("The AudioContext closed before it ran", "InvalidStateError")));
|
|
463
484
|
};
|
|
464
485
|
e.addEventListener("statechange", r), r();
|
|
465
|
-
}),
|
|
466
|
-
let r =
|
|
486
|
+
}), De = (e, t, n = {}) => {
|
|
487
|
+
let r = Te.get(e);
|
|
467
488
|
if (r) return r.wake(), r;
|
|
468
489
|
let i = new AudioContext(), a = n.enabled !== !1, o, s = !1, c = () => 20 * Math.log10(Math.max(e.volume, 1e-6)), l = e.ownerDocument, u = () => {
|
|
469
490
|
i.state === "suspended" && i.resume().catch(() => {});
|
|
@@ -479,12 +500,12 @@ var U = {
|
|
|
479
500
|
};
|
|
480
501
|
i.addEventListener("statechange", f), f();
|
|
481
502
|
let p = (async () => {
|
|
482
|
-
let r = await
|
|
503
|
+
let r = await we(i, t, {
|
|
483
504
|
...n,
|
|
484
505
|
enabled: a,
|
|
485
506
|
inputGainDb: c()
|
|
486
507
|
});
|
|
487
|
-
await
|
|
508
|
+
await Ee(i);
|
|
488
509
|
let s = T(i, e);
|
|
489
510
|
return r.port.postMessage({
|
|
490
511
|
enabled: a,
|
|
@@ -501,14 +522,14 @@ var U = {
|
|
|
501
522
|
a = e, o?.port.postMessage({ enabled: a });
|
|
502
523
|
},
|
|
503
524
|
release: () => {
|
|
504
|
-
s = !0, d(!1), e.isConnected ? i.state === "running" && i.suspend().catch(() => {}) : (
|
|
525
|
+
s = !0, d(!1), e.isConnected ? i.state === "running" && i.suspend().catch(() => {}) : (Te.delete(e), i.close().catch(() => {}));
|
|
505
526
|
},
|
|
506
527
|
wake: () => {
|
|
507
528
|
i.state !== "closed" && (s = !1, u(), f());
|
|
508
529
|
}
|
|
509
530
|
};
|
|
510
|
-
return
|
|
511
|
-
},
|
|
531
|
+
return Te.set(e, m), m;
|
|
532
|
+
}, Oe = 20, ke = 5, Ae = 1, je = 50, Me = ({ node: t, element: n, scriptUrl: r, source: i }) => {
|
|
512
533
|
let a = !1, o, s = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), l = () => {
|
|
513
534
|
for (let e of [...c]) e();
|
|
514
535
|
c.clear();
|
|
@@ -555,7 +576,7 @@ var U = {
|
|
|
555
576
|
}), S = () => p.postMessage({
|
|
556
577
|
type: "playhead",
|
|
557
578
|
time: n.currentTime
|
|
558
|
-
}), C = setInterval(x,
|
|
579
|
+
}), C = setInterval(x, je), T = [
|
|
559
580
|
"play",
|
|
560
581
|
"playing",
|
|
561
582
|
"pause",
|
|
@@ -572,7 +593,7 @@ var U = {
|
|
|
572
593
|
return t >= (h.end ?? E) - .05 ? null : t;
|
|
573
594
|
}, P = (e) => M.get(Math.round(e * 10)) === g ? "idle" : e, F = () => {
|
|
574
595
|
let e = n.currentTime, t = N(e), r = k && y !== O;
|
|
575
|
-
if (t !== null && t < e +
|
|
596
|
+
if (t !== null && t < e + Oe) return r && A <= t + 1 && t <= j + ke ? "read" : P(t);
|
|
576
597
|
if (r) return "read";
|
|
577
598
|
let i = t ?? N(0);
|
|
578
599
|
return i === null ? "done" : P(i);
|
|
@@ -636,7 +657,7 @@ var U = {
|
|
|
636
657
|
await H(e), e.finished && await V(!0);
|
|
637
658
|
} else {
|
|
638
659
|
await V(!1), M.set(Math.round(e * 10), g);
|
|
639
|
-
let t = B.seek(Math.max(0, e -
|
|
660
|
+
let t = B.seek(Math.max(0, e - Ae));
|
|
640
661
|
f(!0);
|
|
641
662
|
let n = await L(t);
|
|
642
663
|
if (a) return;
|
|
@@ -706,12 +727,12 @@ var U = {
|
|
|
706
727
|
},
|
|
707
728
|
stop: U
|
|
708
729
|
};
|
|
709
|
-
},
|
|
730
|
+
}, Ne = (e, t, n, r, i) => {
|
|
710
731
|
let a = m(null), [o, s] = h(!1), [c, l] = h(null);
|
|
711
732
|
f(() => {
|
|
712
733
|
if (e && t) {
|
|
713
734
|
if (n && !a.current) {
|
|
714
|
-
let r =
|
|
735
|
+
let r = De(e, t, { enabled: n });
|
|
715
736
|
a.current = r, r.routed.then((e) => {
|
|
716
737
|
a.current === r && l(e);
|
|
717
738
|
}, (e) => {
|
|
@@ -735,7 +756,7 @@ var U = {
|
|
|
735
756
|
return f(() => {
|
|
736
757
|
let r = p.current;
|
|
737
758
|
if (!c || !e || !t || !n || !r) return;
|
|
738
|
-
let i =
|
|
759
|
+
let i = Me({
|
|
739
760
|
node: c,
|
|
740
761
|
element: e,
|
|
741
762
|
scriptUrl: t,
|
|
@@ -757,7 +778,7 @@ var U = {
|
|
|
757
778
|
]), f(() => {
|
|
758
779
|
d.current?.update(i);
|
|
759
780
|
}, [i]), { refused: o };
|
|
760
|
-
},
|
|
781
|
+
}, Pe = () => {
|
|
761
782
|
let e, t, n, r = () => n && e?.audioStreamIndex === n.audioStreamIndex ? n : void 0;
|
|
762
783
|
return {
|
|
763
784
|
push: (n) => {
|
|
@@ -806,7 +827,7 @@ var U = {
|
|
|
806
827
|
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 ",
|
|
807
828
|
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 "
|
|
808
829
|
}
|
|
809
|
-
},
|
|
830
|
+
}, Fe = _`
|
|
810
831
|
display: flex;
|
|
811
832
|
justify-content: center;
|
|
812
833
|
align-items: center;
|
|
@@ -819,7 +840,7 @@ var U = {
|
|
|
819
840
|
margin: auto;
|
|
820
841
|
pointer-events: none;
|
|
821
842
|
}
|
|
822
|
-
`,
|
|
843
|
+
`, Ie = _`
|
|
823
844
|
position: absolute;
|
|
824
845
|
top: 0;
|
|
825
846
|
left: 0;
|
|
@@ -848,9 +869,9 @@ var U = {
|
|
|
848
869
|
|
|
849
870
|
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%);
|
|
850
871
|
transition: opacity 0.1s cubic-bezier(.4,0,1,1);
|
|
851
|
-
`,
|
|
872
|
+
`, Le = v`
|
|
852
873
|
to { transform: rotate(360deg); }
|
|
853
|
-
`,
|
|
874
|
+
`, Re = _`
|
|
854
875
|
position: absolute;
|
|
855
876
|
inset: 0;
|
|
856
877
|
z-index: 2;
|
|
@@ -866,9 +887,9 @@ var U = {
|
|
|
866
887
|
border-radius: 50%;
|
|
867
888
|
border: 3px solid rgba(255, 255, 255, 0.25);
|
|
868
889
|
border-top-color: #fff;
|
|
869
|
-
animation: ${
|
|
890
|
+
animation: ${Le} 0.8s linear infinite;
|
|
870
891
|
}
|
|
871
|
-
`,
|
|
892
|
+
`, ze = _`
|
|
872
893
|
position: absolute;
|
|
873
894
|
inset: auto 0 20%;
|
|
874
895
|
z-index: 3;
|
|
@@ -878,34 +899,34 @@ var U = {
|
|
|
878
899
|
${Z.bLarge.regular}
|
|
879
900
|
text-shadow: 0 0 4px rgba(0, 0, 0, 1);
|
|
880
901
|
pointer-events: none;
|
|
881
|
-
`,
|
|
902
|
+
`, Be = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : "Playback failed", Ve = ({ onSubtitleRef: e }) => {
|
|
882
903
|
let t = K((e) => e.title), n = K((e) => e.hideUI), r = K((e) => e.playbackError), i = K((e) => e.ready), a = K((e) => e.size), o = K((e) => e.waiting), s = K((e) => e.seekingTo);
|
|
883
904
|
return /* @__PURE__ */ O(E, { children: [
|
|
884
905
|
t ? /* @__PURE__ */ D("div", {
|
|
885
906
|
className: "title",
|
|
886
|
-
css:
|
|
907
|
+
css: Ie,
|
|
887
908
|
style: { ...n ? {
|
|
888
909
|
opacity: "0",
|
|
889
910
|
pointerEvents: "none"
|
|
890
911
|
} : {} },
|
|
891
912
|
children: t
|
|
892
913
|
}) : void 0,
|
|
893
|
-
((a ? !i : o) || s !== void 0) && !r ? /* @__PURE__ */ D("div", { css:
|
|
914
|
+
((a ? !i : o) || s !== void 0) && !r ? /* @__PURE__ */ D("div", { css: Re }) : void 0,
|
|
894
915
|
r ? /* @__PURE__ */ D("div", {
|
|
895
|
-
css:
|
|
896
|
-
children:
|
|
916
|
+
css: ze,
|
|
917
|
+
children: Be(r)
|
|
897
918
|
}) : void 0,
|
|
898
919
|
/* @__PURE__ */ D("div", {
|
|
899
920
|
className: "subtitles",
|
|
900
921
|
ref: e,
|
|
901
|
-
css:
|
|
922
|
+
css: Fe
|
|
902
923
|
})
|
|
903
924
|
] });
|
|
904
|
-
},
|
|
925
|
+
}, He = 1e-4, Ue = 1, We = (e) => Math.max(He, Math.min(Ue, e)) ** 2, Ge = (e) => Math.max(He, Math.min(Ue, e)) ** (Ue / 2), Ke = (e) => {
|
|
905
926
|
if (e === void 0) return "0:00";
|
|
906
927
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = Math.floor(e % 60);
|
|
907
928
|
return t > 0 ? `${t}:${n < 10 ? "0" : ""}${n}:${r < 10 ? "0" : ""}${r}` : `${n}:${r < 10 ? "0" : ""}${r}`;
|
|
908
|
-
},
|
|
929
|
+
}, qe = (e, t) => `${Ke(e)} / ${Ke(t)}`, Je = (e) => _`
|
|
909
930
|
display: flex;
|
|
910
931
|
justify-content: flex-start;
|
|
911
932
|
|
|
@@ -953,17 +974,17 @@ var U = {
|
|
|
953
974
|
x: -1,
|
|
954
975
|
y: -1,
|
|
955
976
|
anchors: 0
|
|
956
|
-
},
|
|
977
|
+
}, Ye = (e) => {
|
|
957
978
|
Q.x = e.clientX, Q.y = e.clientY;
|
|
958
|
-
},
|
|
979
|
+
}, Xe = () => (Q.anchors++ === 0 && window.addEventListener("pointermove", Ye, {
|
|
959
980
|
capture: !0,
|
|
960
981
|
passive: !0
|
|
961
982
|
}), () => {
|
|
962
|
-
--Q.anchors === 0 && window.removeEventListener("pointermove",
|
|
983
|
+
--Q.anchors === 0 && window.removeEventListener("pointermove", Ye, { capture: !0 });
|
|
963
984
|
}), $ = ({ id: e, toolTipText: t, text: n, delayShow: r = 0, closeDelay: i = 0, offset: a = 20, tooltipPlace: o = "top", disabled: s = !1, size: c = "md" }) => {
|
|
964
985
|
let l = m(null), u = m(null);
|
|
965
986
|
return f(() => {
|
|
966
|
-
let e =
|
|
987
|
+
let e = Xe(), t = () => {
|
|
967
988
|
let e = l.current;
|
|
968
989
|
if (!e) return;
|
|
969
990
|
let { left: t, right: n, top: r, bottom: i } = e.getBoundingClientRect();
|
|
@@ -985,12 +1006,12 @@ var U = {
|
|
|
985
1006
|
children: n
|
|
986
1007
|
}), !s && /* @__PURE__ */ D(ne, {
|
|
987
1008
|
ref: u,
|
|
988
|
-
css:
|
|
1009
|
+
css: Je(c),
|
|
989
1010
|
id: e,
|
|
990
1011
|
noArrow: !0,
|
|
991
1012
|
children: t
|
|
992
1013
|
})] });
|
|
993
|
-
},
|
|
1014
|
+
}, Ze = ({ ref: e, onChange: t, orientation: n = "horizontal", disabled: r = !1 }) => {
|
|
994
1015
|
let [i, a] = h(!1), o = m(t);
|
|
995
1016
|
o.current = t;
|
|
996
1017
|
let s = m(null), c = d((t, r) => {
|
|
@@ -1029,26 +1050,26 @@ var U = {
|
|
|
1029
1050
|
style: { touchAction: "none" }
|
|
1030
1051
|
}
|
|
1031
1052
|
};
|
|
1032
|
-
},
|
|
1053
|
+
}, Qe = 2, $e = .005, et = "#000", tt = "#0000", nt = (e, t) => {
|
|
1033
1054
|
if (!t) return [];
|
|
1034
1055
|
let n = /* @__PURE__ */ new Set();
|
|
1035
1056
|
for (let { start: r, end: i } of e) for (let e of [r, i]) {
|
|
1036
1057
|
let r = e / t;
|
|
1037
|
-
r <=
|
|
1058
|
+
r <= $e || r >= .995 || n.add(Number((r * 100).toFixed(4)));
|
|
1038
1059
|
}
|
|
1039
1060
|
return n.size ? [
|
|
1040
1061
|
0,
|
|
1041
1062
|
...[...n].sort((e, t) => e - t),
|
|
1042
1063
|
100
|
|
1043
1064
|
] : [];
|
|
1044
|
-
},
|
|
1045
|
-
let n =
|
|
1065
|
+
}, rt = (e, t) => {
|
|
1066
|
+
let n = Qe / 2, r = e.length - 2, i = [];
|
|
1046
1067
|
for (let a = 0; a <= r; a += 1) {
|
|
1047
1068
|
let o = e[a], s = e[a + 1], c = a === 0 ? "0%" : `calc(${o}% + ${n}px)`, l = a === r ? "100%" : `calc(${s}% - ${n}px)`;
|
|
1048
|
-
i.push(`${t(a) ?
|
|
1069
|
+
i.push(`${t(a) ? et : tt} ${c} ${l}`), a !== r && i.push(`${tt} calc(${s}% - ${n}px) calc(${s}% + ${n}px)`);
|
|
1049
1070
|
}
|
|
1050
1071
|
return `linear-gradient(90deg, ${i.join(", ")})`;
|
|
1051
|
-
},
|
|
1072
|
+
}, it = /* @__PURE__ */ new Set([
|
|
1052
1073
|
"op",
|
|
1053
1074
|
"ops",
|
|
1054
1075
|
"opening",
|
|
@@ -1056,7 +1077,7 @@ var U = {
|
|
|
1056
1077
|
"ncop",
|
|
1057
1078
|
"オープニング",
|
|
1058
1079
|
"op主題歌"
|
|
1059
|
-
]),
|
|
1080
|
+
]), at = /* @__PURE__ */ new Set([
|
|
1060
1081
|
"ed",
|
|
1061
1082
|
"eds",
|
|
1062
1083
|
"ending",
|
|
@@ -1069,13 +1090,13 @@ var U = {
|
|
|
1069
1090
|
"エンドカード",
|
|
1070
1091
|
"エンドロール",
|
|
1071
1092
|
"ed主題歌"
|
|
1072
|
-
]),
|
|
1093
|
+
]), ot = /* @__PURE__ */ new Set(["intro", "イントロ"]), st = /* @__PURE__ */ new Set(["outro", "アウトロ"]), ct = {
|
|
1073
1094
|
"credits start": "ending",
|
|
1074
1095
|
"credits end": null,
|
|
1075
1096
|
"preview end": null,
|
|
1076
1097
|
"end credits": "ending",
|
|
1077
1098
|
"closing credits": "ending"
|
|
1078
|
-
},
|
|
1099
|
+
}, lt = /* @__PURE__ */ new Set([
|
|
1079
1100
|
"theme",
|
|
1080
1101
|
"themes",
|
|
1081
1102
|
"song",
|
|
@@ -1094,53 +1115,53 @@ var U = {
|
|
|
1094
1115
|
"the",
|
|
1095
1116
|
"主題歌",
|
|
1096
1117
|
"ノンクレジット"
|
|
1097
|
-
]),
|
|
1118
|
+
]), ut = /* @__PURE__ */ new Set([
|
|
1098
1119
|
"post",
|
|
1099
1120
|
"pre",
|
|
1100
1121
|
"after",
|
|
1101
1122
|
"before",
|
|
1102
1123
|
"non"
|
|
1103
|
-
]),
|
|
1104
|
-
if (
|
|
1105
|
-
if (
|
|
1124
|
+
]), dt = /[-:|~/\\[\]()「」『』【】,.!?"'’]|\s+by\s+/u, ft = (e) => !e.trim() || /^chapter\s*\d+$/i.test(e.trim()) || /^\d{1,2}:\d{2}:\d{2}([.,]\d+)?$/.test(e.trim()), pt = (e) => e.replace(/([a-z-ヿ一-鿿])\s*\d+\s*$/u, "$1").split(/[\s_]+/u).map((e) => e.replace(/^[^\w-ヿ一-鿿]+|[^\w-ヿ一-鿿]+$/gu, "")).filter((e) => e && !/^\d+$/.test(e) && !lt.has(e)), mt = (e, t) => {
|
|
1125
|
+
if (it.has(e)) return "opening";
|
|
1126
|
+
if (at.has(e)) return "ending";
|
|
1106
1127
|
if (t) {
|
|
1107
|
-
if (
|
|
1108
|
-
if (
|
|
1128
|
+
if (ot.has(e)) return "opening";
|
|
1129
|
+
if (st.has(e)) return "ending";
|
|
1109
1130
|
}
|
|
1110
|
-
},
|
|
1111
|
-
if (
|
|
1131
|
+
}, ht = (e, t) => {
|
|
1132
|
+
if (ft(e)) return;
|
|
1112
1133
|
let n = e.trim().toLowerCase().replace(/\s+/gu, " ");
|
|
1113
|
-
if (n in
|
|
1114
|
-
let r = n.split(
|
|
1115
|
-
if (r.some((e) => e.split(/[\s_]+/u).some((e) =>
|
|
1134
|
+
if (n in ct) return ct[n] ?? void 0;
|
|
1135
|
+
let r = n.split(dt).map((e) => e.trim()).filter(Boolean);
|
|
1136
|
+
if (r.some((e) => e.split(/[\s_]+/u).some((e) => ut.has(e)))) return;
|
|
1116
1137
|
let i = r.length > 1 ? [r[0], r.at(-1)] : r;
|
|
1117
1138
|
for (let e of i) {
|
|
1118
|
-
let n =
|
|
1139
|
+
let n = pt(e);
|
|
1119
1140
|
if (n.length !== 1) continue;
|
|
1120
|
-
let r =
|
|
1141
|
+
let r = mt(n[0], t);
|
|
1121
1142
|
if (r) return r;
|
|
1122
1143
|
}
|
|
1123
|
-
},
|
|
1144
|
+
}, gt = 15, _t = 87, vt = 93, yt = (e) => {
|
|
1124
1145
|
let t = e.map(() => void 0), n = e.at(-1)?.end ?? 0;
|
|
1125
1146
|
if (!n) return t;
|
|
1126
1147
|
let r = e.map((e, t) => ({
|
|
1127
1148
|
index: t,
|
|
1128
1149
|
start: e.start,
|
|
1129
1150
|
length: e.end - e.start
|
|
1130
|
-
})).filter(({ length: e }) => e >=
|
|
1151
|
+
})).filter(({ length: e }) => e >= _t && e <= vt), i = n / 2, a = r.filter(({ start: e }) => e < i), o = r.filter(({ start: e }) => e >= i);
|
|
1131
1152
|
return a.length === 1 && (t[a[0].index] = "opening"), o.length === 1 && (t[o[0].index] = "ending"), t;
|
|
1132
|
-
},
|
|
1133
|
-
let t = e.map(({ title: e }) =>
|
|
1153
|
+
}, bt = (e) => {
|
|
1154
|
+
let t = e.map(({ title: e }) => ht(e, !1)), n = e.reduce((e, n, r) => e + (t[r] ? n.end - n.start : 0), 0), r = e.reduce((e, t) => e + (t.end - t.start), 0);
|
|
1134
1155
|
if (r > 0 && n * 2 > r) return e.map(() => void 0);
|
|
1135
1156
|
let i = e.map((e, n) => {
|
|
1136
|
-
if (e.end - e.start <
|
|
1157
|
+
if (e.end - e.start < gt) return;
|
|
1137
1158
|
let r = t[n];
|
|
1138
1159
|
if (r) return r;
|
|
1139
|
-
let i =
|
|
1160
|
+
let i = ht(e.title, !0);
|
|
1140
1161
|
return i && !t.includes(i) ? i : void 0;
|
|
1141
1162
|
});
|
|
1142
|
-
return e.every(({ title: e }) =>
|
|
1143
|
-
},
|
|
1163
|
+
return e.every(({ title: e }) => ft(e)) ? yt(e) : i;
|
|
1164
|
+
}, xt = _`
|
|
1144
1165
|
position: relative;
|
|
1145
1166
|
height: calc(.4 * var(--mp-unit));
|
|
1146
1167
|
|
|
@@ -1359,7 +1380,7 @@ var U = {
|
|
|
1359
1380
|
--thumbnail-width: calc(18 * var(--mp-unit));
|
|
1360
1381
|
--thumbnail-half: calc(9 * var(--mp-unit));
|
|
1361
1382
|
}
|
|
1362
|
-
`,
|
|
1383
|
+
`, St = 4, Ct = () => {
|
|
1363
1384
|
let e = K(), t = K((e) => e.currentTime), n = K((e) => e.requestSeek), r = K((e) => e.duration), i = K((e) => e.size), a = K((e) => e.downloadedRanges), o = K((e) => e.buffered), s = K((e) => e.indexes), c = K((e) => e.thumbnails), l = K((e) => e.thumbnailAt), u = K((e) => e.requestThumbnail), d = K((e) => e.chapters), g = K((e) => e.seekingTo), _ = K((e) => e.setSourceState), v = K((e) => e.hideUI), y = m(null), [b, x] = h(void 0), [S, C] = h(void 0), w = (e) => {
|
|
1364
1385
|
C(e), u(e);
|
|
1365
1386
|
}, T = !!S;
|
|
@@ -1368,13 +1389,13 @@ var U = {
|
|
|
1368
1389
|
}, [_, T]), f(() => {
|
|
1369
1390
|
v && w(void 0);
|
|
1370
1391
|
}, [v]);
|
|
1371
|
-
let E = m(void 0), k = m(0), A = m(void 0), j = m(void 0), M = m(!1), { dragging: N, handlers: P } =
|
|
1392
|
+
let E = m(void 0), k = m(0), A = m(void 0), j = m(void 0), M = m(!1), { dragging: N, handlers: P } = Ze({
|
|
1372
1393
|
ref: y,
|
|
1373
1394
|
onChange: (e) => {
|
|
1374
1395
|
if (k.current += 1, A.current = e, j.current === void 0) j.current = e;
|
|
1375
1396
|
else if (!M.current) {
|
|
1376
1397
|
let t = y.current?.getBoundingClientRect().width ?? 0;
|
|
1377
|
-
Math.abs(e - j.current) * t >
|
|
1398
|
+
Math.abs(e - j.current) * t > St && (M.current = !0);
|
|
1378
1399
|
}
|
|
1379
1400
|
x(e), E.current !== "mouse" && w(e * r);
|
|
1380
1401
|
}
|
|
@@ -1437,7 +1458,7 @@ var U = {
|
|
|
1437
1458
|
N,
|
|
1438
1459
|
b,
|
|
1439
1460
|
g
|
|
1440
|
-
]), U = p(() =>
|
|
1461
|
+
]), U = p(() => nt(d, r), [d, r]), W = U.length > 0, G = p(() => {
|
|
1441
1462
|
if (!W || S === void 0 || !r) return -1;
|
|
1442
1463
|
let e = S / r * 100, t = U.findIndex((t, n) => n < U.length - 1 && e >= t && e < U[n + 1]);
|
|
1443
1464
|
return t >= 0 ? t : U.length - 2;
|
|
@@ -1446,11 +1467,11 @@ var U = {
|
|
|
1446
1467
|
U,
|
|
1447
1468
|
S,
|
|
1448
1469
|
r
|
|
1449
|
-
]), re = p(() => W ?
|
|
1470
|
+
]), re = p(() => W ? rt(U, (e) => e !== G) : void 0, [
|
|
1450
1471
|
W,
|
|
1451
1472
|
U,
|
|
1452
1473
|
G
|
|
1453
|
-
]), ie = p(() => G >= 0 ?
|
|
1474
|
+
]), ie = p(() => G >= 0 ? rt(U, (e) => e === G) : void 0, [U, G]), q = p(() => {
|
|
1454
1475
|
if (S !== void 0) return d.find(({ start: e, end: t }) => e <= S && S < t);
|
|
1455
1476
|
}, [d, S]), J = p(() => {
|
|
1456
1477
|
if (S) {
|
|
@@ -1480,7 +1501,7 @@ var U = {
|
|
|
1480
1501
|
]
|
|
1481
1502
|
});
|
|
1482
1503
|
return /* @__PURE__ */ O("div", {
|
|
1483
|
-
css:
|
|
1504
|
+
css: xt,
|
|
1484
1505
|
ref: y,
|
|
1485
1506
|
className: [
|
|
1486
1507
|
"progress-bar",
|
|
@@ -1501,7 +1522,7 @@ var U = {
|
|
|
1501
1522
|
},
|
|
1502
1523
|
children: [/* @__PURE__ */ D("span", {
|
|
1503
1524
|
className: "cursor-time-value",
|
|
1504
|
-
children:
|
|
1525
|
+
children: Ke(S)
|
|
1505
1526
|
}), q ? /* @__PURE__ */ D("span", {
|
|
1506
1527
|
className: "chapter-title",
|
|
1507
1528
|
children: q.title
|
|
@@ -1525,7 +1546,7 @@ var U = {
|
|
|
1525
1546
|
})
|
|
1526
1547
|
]
|
|
1527
1548
|
});
|
|
1528
|
-
},
|
|
1549
|
+
}, wt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23fff'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%20class='icon%20icon-tabler%20icons-tabler-outline%20icon-tabler-picture-in-picture'%3e%3cpath%20stroke='none'%20d='M0%200h24v24H0z'%20fill='none'%20/%3e%3cpath%20d='M11%2019h-6a2%202%200%200%201%20-2%20-2v-10a2%202%200%200%201%202%20-2h14a2%202%200%200%201%202%202v4'%20/%3e%3cpath%20d='M14%2014m0%201a1%201%200%200%201%201%20-1h5a1%201%200%200%201%201%201v3a1%201%200%200%201%20-1%201h-5a1%201%200%200%201%20-1%20-1z'%20/%3e%3c/svg%3e", Tt = {
|
|
1529
1550
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1530
1551
|
width: 24,
|
|
1531
1552
|
height: 24,
|
|
@@ -1535,8 +1556,8 @@ var U = {
|
|
|
1535
1556
|
strokeWidth: 2,
|
|
1536
1557
|
strokeLinecap: "round",
|
|
1537
1558
|
strokeLinejoin: "round"
|
|
1538
|
-
},
|
|
1539
|
-
...
|
|
1559
|
+
}, Et = (e) => /* @__PURE__ */ O("svg", {
|
|
1560
|
+
...Tt,
|
|
1540
1561
|
...e,
|
|
1541
1562
|
children: [
|
|
1542
1563
|
/* @__PURE__ */ D("path", { d: "M21 11V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h5" }),
|
|
@@ -1550,8 +1571,8 @@ var U = {
|
|
|
1550
1571
|
}),
|
|
1551
1572
|
/* @__PURE__ */ D("path", { d: "M14.5 18.5h2m2 0h1" })
|
|
1552
1573
|
]
|
|
1553
|
-
}),
|
|
1554
|
-
...
|
|
1574
|
+
}), Dt = (e) => /* @__PURE__ */ O("svg", {
|
|
1575
|
+
...Tt,
|
|
1555
1576
|
...e,
|
|
1556
1577
|
children: [
|
|
1557
1578
|
/* @__PURE__ */ D("path", { d: "M21 11V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h5" }),
|
|
@@ -1565,7 +1586,7 @@ var U = {
|
|
|
1565
1586
|
}),
|
|
1566
1587
|
/* @__PURE__ */ D("path", { d: "M6 9h3m2 0h2" })
|
|
1567
1588
|
]
|
|
1568
|
-
}),
|
|
1589
|
+
}), Ot = _`
|
|
1569
1590
|
.popover {
|
|
1570
1591
|
position: absolute;
|
|
1571
1592
|
/* Anchored to the PLAYER's right edge, never to the gear. The gear is not the last control in the
|
|
@@ -1692,7 +1713,7 @@ var U = {
|
|
|
1692
1713
|
${Z.bSmall.regular}
|
|
1693
1714
|
}
|
|
1694
1715
|
}
|
|
1695
|
-
`,
|
|
1716
|
+
`, kt = ({ title: e, tracks: t, selected: n, onSelect: r, onBack: i, offLabel: a, pending: o, failed: s }) => {
|
|
1696
1717
|
let c = o !== void 0, l = (e, i, a) => {
|
|
1697
1718
|
let s = c && o === e, l = c || t.find((t) => t.id === e)?.disabled;
|
|
1698
1719
|
return /* @__PURE__ */ O("div", {
|
|
@@ -1719,7 +1740,7 @@ var U = {
|
|
|
1719
1740
|
t.map(({ id: e, label: t }) => l(e, t, "description"))
|
|
1720
1741
|
]
|
|
1721
1742
|
});
|
|
1722
|
-
},
|
|
1743
|
+
}, At = ({ onReset: e } = {}) => {
|
|
1723
1744
|
let t = m(null), [n, r] = h(!1), [i, a] = h(void 0), [o, s] = h(!1), c = m(e);
|
|
1724
1745
|
c.current = e;
|
|
1725
1746
|
let l = () => {
|
|
@@ -1760,7 +1781,7 @@ var U = {
|
|
|
1760
1781
|
});
|
|
1761
1782
|
}
|
|
1762
1783
|
};
|
|
1763
|
-
},
|
|
1784
|
+
}, jt = _`
|
|
1764
1785
|
/* Not a containing block, for the reason given on popoverStyle: the menu anchors to the control bar,
|
|
1765
1786
|
which is the width of the player box, so it can be clamped to it. */
|
|
1766
1787
|
position: static;
|
|
@@ -1776,7 +1797,7 @@ position: static;
|
|
|
1776
1797
|
}
|
|
1777
1798
|
}
|
|
1778
1799
|
|
|
1779
|
-
${
|
|
1800
|
+
${Ot}
|
|
1780
1801
|
|
|
1781
1802
|
.popover.error-list {
|
|
1782
1803
|
/* Wider than a track menu and taller, because these rows are sentences rather than labels, and a
|
|
@@ -1848,23 +1869,23 @@ ${Dt}
|
|
|
1848
1869
|
}
|
|
1849
1870
|
}
|
|
1850
1871
|
}
|
|
1851
|
-
`,
|
|
1852
|
-
let n =
|
|
1872
|
+
`, Mt = (e) => new Date(e).toLocaleTimeString(), Nt = (e) => e === void 0 || !Number.isFinite(e) ? void 0 : Ke(Math.max(0, e)), Pt = (e) => e.reduce((e, t) => e + t.count, 0), Ft = (e) => e.map((e, t) => {
|
|
1873
|
+
let n = Nt(e.atMediaTime), r = e.count > 1 ? `${new Date(e.at).toISOString()} to ${new Date(e.lastAt).toISOString()} ×${e.count}` : new Date(e.at).toISOString();
|
|
1853
1874
|
return [
|
|
1854
1875
|
`${t + 1}. ${r}${n ? ` (at ${n})` : ""}${e.recovered ? " [recovered]" : ""}`,
|
|
1855
1876
|
e.message,
|
|
1856
1877
|
e.detail
|
|
1857
1878
|
].filter(Boolean).join("\n");
|
|
1858
|
-
}).join("\n\n"),
|
|
1859
|
-
let e = K((e) => e.playbackErrors), { open: t, toggle: n, containerRef: r } =
|
|
1879
|
+
}).join("\n\n"), It = () => {
|
|
1880
|
+
let e = K((e) => e.playbackErrors), { open: t, toggle: n, containerRef: r } = At(), [i, a] = h(!1);
|
|
1860
1881
|
if (e.length === 0) return null;
|
|
1861
1882
|
let o = () => {
|
|
1862
|
-
navigator.clipboard?.writeText(
|
|
1883
|
+
navigator.clipboard?.writeText(Ft(e)).then(() => {
|
|
1863
1884
|
a(!0), setTimeout(() => a(!1), 2e3);
|
|
1864
1885
|
}, (e) => console.warn("[media-player] could not copy the errors:", e));
|
|
1865
|
-
}, s = `Playback errors (${
|
|
1886
|
+
}, s = `Playback errors (${Pt(e)})`;
|
|
1866
1887
|
return /* @__PURE__ */ O("div", {
|
|
1867
|
-
css:
|
|
1888
|
+
css: jt,
|
|
1868
1889
|
ref: r,
|
|
1869
1890
|
children: [/* @__PURE__ */ D($, {
|
|
1870
1891
|
id: "errors",
|
|
@@ -1895,9 +1916,9 @@ ${Dt}
|
|
|
1895
1916
|
/* @__PURE__ */ O("span", {
|
|
1896
1917
|
className: "when",
|
|
1897
1918
|
children: [
|
|
1898
|
-
|
|
1899
|
-
e.count > 1 ? ` to ${
|
|
1900
|
-
|
|
1919
|
+
Mt(e.at),
|
|
1920
|
+
e.count > 1 ? ` to ${Mt(e.lastAt)}` : "",
|
|
1921
|
+
Nt(e.atMediaTime) ? ` at ${Nt(e.atMediaTime)}` : "",
|
|
1901
1922
|
e.recovered ? " recovered" : "",
|
|
1902
1923
|
e.count > 1 ? /* @__PURE__ */ D("span", {
|
|
1903
1924
|
className: "count",
|
|
@@ -1917,7 +1938,7 @@ ${Dt}
|
|
|
1917
1938
|
}, `${e.at}-${t}`))]
|
|
1918
1939
|
})]
|
|
1919
1940
|
});
|
|
1920
|
-
},
|
|
1941
|
+
}, Lt = _`
|
|
1921
1942
|
display: flex;
|
|
1922
1943
|
align-items: center;
|
|
1923
1944
|
justify-content: center;
|
|
@@ -1970,8 +1991,8 @@ width: 100%;
|
|
|
1970
1991
|
}
|
|
1971
1992
|
}
|
|
1972
1993
|
}
|
|
1973
|
-
`,
|
|
1974
|
-
let e = K(), t = K((e) => e.playbackRate), n = m(null), r = m(null), i = .25, a = 2.75, o = (e, t = .05) => Math.round(e / t) * t, s = o(t || 1), c = (e) => (e - i) / a * 100, l = (e) => o(i + e * a), { handlers: u } =
|
|
1994
|
+
`, Rt = () => {
|
|
1995
|
+
let e = K(), t = K((e) => e.playbackRate), n = m(null), r = m(null), i = .25, a = 2.75, o = (e, t = .05) => Math.round(e / t) * t, s = o(t || 1), c = (e) => (e - i) / a * 100, l = (e) => o(i + e * a), { handlers: u } = Ze({
|
|
1975
1996
|
ref: r,
|
|
1976
1997
|
onChange: (t) => e.setPlaybackRate(l(t))
|
|
1977
1998
|
}), d = (t) => {
|
|
@@ -1987,7 +2008,7 @@ width: 100%;
|
|
|
1987
2008
|
}, [t]);
|
|
1988
2009
|
let p = c(s);
|
|
1989
2010
|
return /* @__PURE__ */ O("div", {
|
|
1990
|
-
css:
|
|
2011
|
+
css: Lt,
|
|
1991
2012
|
children: [/* @__PURE__ */ O("div", { children: [s.toFixed(2), "x"] }), /* @__PURE__ */ D("div", {
|
|
1992
2013
|
className: "playback-slider",
|
|
1993
2014
|
ref: n,
|
|
@@ -2005,7 +2026,7 @@ width: 100%;
|
|
|
2005
2026
|
})
|
|
2006
2027
|
})]
|
|
2007
2028
|
});
|
|
2008
|
-
},
|
|
2029
|
+
}, zt = _`
|
|
2009
2030
|
/* Deliberately NOT a containing block. The menu anchors to the control bar instead, which is exactly
|
|
2010
2031
|
as wide as the player box and can therefore be clamped to it. The outside-click check uses
|
|
2011
2032
|
\`contains\` on the ref, which is DOM containment and needs no position, and the bar's other
|
|
@@ -2023,7 +2044,7 @@ position: static;
|
|
|
2023
2044
|
}
|
|
2024
2045
|
}
|
|
2025
2046
|
|
|
2026
|
-
${
|
|
2047
|
+
${Ot}
|
|
2027
2048
|
|
|
2028
2049
|
.switch {
|
|
2029
2050
|
position: relative;
|
|
@@ -2099,8 +2120,8 @@ ${Dt}
|
|
|
2099
2120
|
}
|
|
2100
2121
|
}
|
|
2101
2122
|
|
|
2102
|
-
`,
|
|
2103
|
-
let e = K(), t = K((e) => e.playbackRate), n = K((e) => e.audioTracks), r = K((e) => e.selectedAudioTrack), i = K((e) => e.selectAudioTrack), a = K((e) => e.quality), o = K((e) => e.volumeNormalizer), [s, c] = h(0), { open: l, toggle: u, containerRef: d, pending: f, failed: p, runSelect: m } =
|
|
2123
|
+
`, Bt = () => {
|
|
2124
|
+
let e = K(), t = K((e) => e.playbackRate), n = K((e) => e.audioTracks), r = K((e) => e.selectedAudioTrack), i = K((e) => e.selectAudioTrack), a = K((e) => e.quality), o = K((e) => e.volumeNormalizer), [s, c] = h(0), { open: l, toggle: u, containerRef: d, pending: f, failed: p, runSelect: m } = At({ onReset: () => c(0) }), g = (t) => {
|
|
2104
2125
|
e.setPlaybackRate(t), c(0);
|
|
2105
2126
|
}, _ = (e) => {
|
|
2106
2127
|
e !== void 0 && m(e, () => i(e));
|
|
@@ -2110,7 +2131,7 @@ ${Dt}
|
|
|
2110
2131
|
c(e);
|
|
2111
2132
|
};
|
|
2112
2133
|
return /* @__PURE__ */ O("div", {
|
|
2113
|
-
css:
|
|
2134
|
+
css: zt,
|
|
2114
2135
|
ref: d,
|
|
2115
2136
|
children: [
|
|
2116
2137
|
/* @__PURE__ */ D($, {
|
|
@@ -2172,7 +2193,7 @@ ${Dt}
|
|
|
2172
2193
|
}),
|
|
2173
2194
|
/* @__PURE__ */ D("div", {
|
|
2174
2195
|
className: "slider no-hover",
|
|
2175
|
-
children: /* @__PURE__ */ D(
|
|
2196
|
+
children: /* @__PURE__ */ D(Rt, {})
|
|
2176
2197
|
}),
|
|
2177
2198
|
/* @__PURE__ */ O("div", {
|
|
2178
2199
|
className: "options no-hover",
|
|
@@ -2197,7 +2218,7 @@ ${Dt}
|
|
|
2197
2218
|
})
|
|
2198
2219
|
]
|
|
2199
2220
|
}),
|
|
2200
|
-
l && s === 2 && /* @__PURE__ */ D(
|
|
2221
|
+
l && s === 2 && /* @__PURE__ */ D(kt, {
|
|
2201
2222
|
title: "Audio",
|
|
2202
2223
|
tracks: n,
|
|
2203
2224
|
selected: r,
|
|
@@ -2206,7 +2227,7 @@ ${Dt}
|
|
|
2206
2227
|
pending: f,
|
|
2207
2228
|
failed: p
|
|
2208
2229
|
}),
|
|
2209
|
-
l && s === 3 && a && /* @__PURE__ */ D(
|
|
2230
|
+
l && s === 3 && a && /* @__PURE__ */ D(kt, {
|
|
2210
2231
|
title: "Quality",
|
|
2211
2232
|
tracks: a.options,
|
|
2212
2233
|
selected: a.selectedId ?? void 0,
|
|
@@ -2218,7 +2239,7 @@ ${Dt}
|
|
|
2218
2239
|
})
|
|
2219
2240
|
]
|
|
2220
2241
|
});
|
|
2221
|
-
},
|
|
2242
|
+
}, Vt = _`
|
|
2222
2243
|
/* Not a containing block, for the reason given on popoverStyle: the menu anchors to the control bar,
|
|
2223
2244
|
which is the width of the player box, so it can be clamped to it. */
|
|
2224
2245
|
position: static;
|
|
@@ -2234,13 +2255,13 @@ position: static;
|
|
|
2234
2255
|
}
|
|
2235
2256
|
}
|
|
2236
2257
|
|
|
2237
|
-
${
|
|
2238
|
-
`,
|
|
2239
|
-
let e = K((e) => e.subtitleTracks), t = K((e) => e.selectedSubtitleTrack), n = K((e) => e.selectSubtitleTrack), r = K((e) => e.subtitleOffLabel), { open: i, toggle: a, containerRef: o, pending: s, failed: c, runSelect: l } =
|
|
2258
|
+
${Ot}
|
|
2259
|
+
`, Ht = () => {
|
|
2260
|
+
let e = K((e) => e.subtitleTracks), t = K((e) => e.selectedSubtitleTrack), n = K((e) => e.selectSubtitleTrack), r = K((e) => e.subtitleOffLabel), { open: i, toggle: a, containerRef: o, pending: s, failed: c, runSelect: l } = At();
|
|
2240
2261
|
if (e.length === 0) return null;
|
|
2241
2262
|
let u = t !== void 0;
|
|
2242
2263
|
return /* @__PURE__ */ O("div", {
|
|
2243
|
-
css:
|
|
2264
|
+
css: Vt,
|
|
2244
2265
|
ref: o,
|
|
2245
2266
|
children: [/* @__PURE__ */ D($, {
|
|
2246
2267
|
id: "subtitles",
|
|
@@ -2255,7 +2276,7 @@ ${Dt}
|
|
|
2255
2276
|
children: u ? /* @__PURE__ */ D(k, { className: "captions" }) : /* @__PURE__ */ D(A, { className: "captions-off" })
|
|
2256
2277
|
}),
|
|
2257
2278
|
toolTipText: /* @__PURE__ */ D("span", { children: "Subtitles" })
|
|
2258
|
-
}), i && /* @__PURE__ */ D(
|
|
2279
|
+
}), i && /* @__PURE__ */ D(kt, {
|
|
2259
2280
|
title: "Subtitles",
|
|
2260
2281
|
tracks: e,
|
|
2261
2282
|
selected: t,
|
|
@@ -2265,13 +2286,13 @@ ${Dt}
|
|
|
2265
2286
|
failed: c
|
|
2266
2287
|
})]
|
|
2267
2288
|
});
|
|
2268
|
-
},
|
|
2289
|
+
}, Ut = {
|
|
2269
2290
|
primary: "#EAEBEE",
|
|
2270
2291
|
secondary: "#D0D0D9",
|
|
2271
2292
|
hover: "rgba(255, 255, 255, 0.13)",
|
|
2272
2293
|
borderPrimary: "#384F70",
|
|
2273
2294
|
backgroundTooltip: "#222222"
|
|
2274
|
-
},
|
|
2295
|
+
}, Wt = _`
|
|
2275
2296
|
display: flex;
|
|
2276
2297
|
align-items: center;
|
|
2277
2298
|
|
|
@@ -2314,8 +2335,8 @@ ${Dt}
|
|
|
2314
2335
|
width: 10px;
|
|
2315
2336
|
height: 10px;
|
|
2316
2337
|
}
|
|
2317
|
-
`,
|
|
2318
|
-
let n = K((e) => e.volume), r = K((e) => e.muted), i = m(null), a = m(null), { handlers: o } =
|
|
2338
|
+
`, Gt = ({ value: e, onChange: t }) => {
|
|
2339
|
+
let n = K((e) => e.volume), r = K((e) => e.muted), i = m(null), a = m(null), { handlers: o } = Ze({
|
|
2319
2340
|
ref: a,
|
|
2320
2341
|
onChange: t
|
|
2321
2342
|
}), s = (n) => {
|
|
@@ -2329,12 +2350,12 @@ ${Dt}
|
|
|
2329
2350
|
e && e.removeEventListener("wheel", s);
|
|
2330
2351
|
};
|
|
2331
2352
|
}, [e]);
|
|
2332
|
-
let c = e * 100, l = p(() => Math.round(r ? 0 :
|
|
2353
|
+
let c = e * 100, l = p(() => Math.round(r ? 0 : Ge(n) * 100), [n, r]);
|
|
2333
2354
|
return /* @__PURE__ */ D($, {
|
|
2334
2355
|
id: "volume-slider",
|
|
2335
2356
|
text: /* @__PURE__ */ D("div", {
|
|
2336
2357
|
ref: i,
|
|
2337
|
-
css:
|
|
2358
|
+
css: Wt,
|
|
2338
2359
|
...o,
|
|
2339
2360
|
children: /* @__PURE__ */ D("div", {
|
|
2340
2361
|
ref: a,
|
|
@@ -2353,7 +2374,7 @@ ${Dt}
|
|
|
2353
2374
|
children: [l, "%"]
|
|
2354
2375
|
})
|
|
2355
2376
|
});
|
|
2356
|
-
},
|
|
2377
|
+
}, Kt = _`
|
|
2357
2378
|
position: relative;
|
|
2358
2379
|
display: flex;
|
|
2359
2380
|
align-items: center;
|
|
@@ -2416,10 +2437,10 @@ ${Dt}
|
|
|
2416
2437
|
}
|
|
2417
2438
|
}
|
|
2418
2439
|
|
|
2419
|
-
`,
|
|
2420
|
-
let t = K(), n = K((e) => e.volume), r = K((e) => e.muted), i = p(() =>
|
|
2440
|
+
`, qt = ({ ref: e }) => {
|
|
2441
|
+
let t = K(), n = K((e) => e.volume), r = K((e) => e.muted), i = p(() => Ge(n), [n]);
|
|
2421
2442
|
return /* @__PURE__ */ O("div", {
|
|
2422
|
-
css:
|
|
2443
|
+
css: Kt,
|
|
2423
2444
|
children: [/* @__PURE__ */ D($, {
|
|
2424
2445
|
id: "sound",
|
|
2425
2446
|
text: /* @__PURE__ */ D("button", {
|
|
@@ -2439,16 +2460,16 @@ ${Dt}
|
|
|
2439
2460
|
className: "volume-slider-container",
|
|
2440
2461
|
children: /* @__PURE__ */ D("div", {
|
|
2441
2462
|
className: "volume-slider-background",
|
|
2442
|
-
children: /* @__PURE__ */ D(
|
|
2463
|
+
children: /* @__PURE__ */ D(Gt, {
|
|
2443
2464
|
value: r ? 0 : i,
|
|
2444
2465
|
onChange: (e) => {
|
|
2445
|
-
t.setVolume(
|
|
2466
|
+
t.setVolume(We(e));
|
|
2446
2467
|
}
|
|
2447
2468
|
})
|
|
2448
2469
|
})
|
|
2449
2470
|
})]
|
|
2450
2471
|
});
|
|
2451
|
-
},
|
|
2472
|
+
}, Jt = .05, Yt = 5, Xt = 50, Zt = 1e3, Qt = _`
|
|
2452
2473
|
position: absolute;
|
|
2453
2474
|
bottom: 0;
|
|
2454
2475
|
width: 100%;
|
|
@@ -2540,7 +2561,7 @@ ${Dt}
|
|
|
2540
2561
|
/* .armed is the hover of a control letting its click through, which takes no pointer events
|
|
2541
2562
|
of its own and so is never :hover */
|
|
2542
2563
|
:hover, &.armed {
|
|
2543
|
-
background-color: ${
|
|
2564
|
+
background-color: ${Ut.hover};
|
|
2544
2565
|
}
|
|
2545
2566
|
|
|
2546
2567
|
/* the hit area grows, the icon does not, keyed on the pointer because a narrow desktop
|
|
@@ -2578,10 +2599,10 @@ ${Dt}
|
|
|
2578
2599
|
}
|
|
2579
2600
|
}
|
|
2580
2601
|
}
|
|
2581
|
-
`,
|
|
2602
|
+
`, $t = ({ shortcuts: e = "window", root: t }) => {
|
|
2582
2603
|
let n = K(), r = K((e) => e.paused), i = K((e) => e.currentTime), a = K((e) => e.duration), o = K((e) => e.seekingTo), s = K((e) => e.fullscreen), c = K((e) => e.hideUI), l = K((e) => e.togglePictureInPicture), u = K((e) => e.pictureInPictureMode), p = K((e) => e.burnedInSubtitles), g = K((e) => e.passThroughPictureInPicture), _ = K((e) => e.subtitleTracks), v = K((e) => e.requestSeek), y = K((e) => e.stepFrame), [b, x] = h(null), S = m(null), C = m(void 0), w = u === "burn-in", T = _.length > 0, E = a > 0 && i === a, k = d(({ direction: e, stepSize: t }) => {
|
|
2583
|
-
let r =
|
|
2584
|
-
n.setVolume(
|
|
2604
|
+
let r = Ge(n.volume), i = e === "up" ? t : -t, a = Math.max(0, Math.min(1, r + i)), o = n.muted;
|
|
2605
|
+
n.setVolume(We(a)), o && !n.muted && n.toggleMuted();
|
|
2585
2606
|
}, [n]), A = m(!1);
|
|
2586
2607
|
f(() => {
|
|
2587
2608
|
let r = (e) => v ? v(e) : n.seek(e), i = (e) => e.composedPath()[0], a = (e) => {
|
|
@@ -2598,16 +2619,16 @@ ${Dt}
|
|
|
2598
2619
|
else if (a.key === "m") n.toggleMuted();
|
|
2599
2620
|
else if (a.key === "ArrowUp") k({
|
|
2600
2621
|
direction: "up",
|
|
2601
|
-
stepSize:
|
|
2622
|
+
stepSize: Jt
|
|
2602
2623
|
});
|
|
2603
2624
|
else if (a.key === "ArrowDown") k({
|
|
2604
2625
|
direction: "down",
|
|
2605
|
-
stepSize:
|
|
2626
|
+
stepSize: Jt
|
|
2606
2627
|
});
|
|
2607
2628
|
else if (a.key === "ArrowRight") {
|
|
2608
2629
|
if (!n.duration) return;
|
|
2609
|
-
r(Math.min(n.currentTime +
|
|
2610
|
-
} else a.key === "ArrowLeft" ? r(Math.max(n.currentTime -
|
|
2630
|
+
r(Math.min(n.currentTime + Yt, n.duration));
|
|
2631
|
+
} else a.key === "ArrowLeft" ? r(Math.max(n.currentTime - Yt, 0)) : (a.key === "<" || a.key === ">") && y ? y(a.key === ">" ? 1 : -1) : c = !1;
|
|
2611
2632
|
c && a.preventDefault();
|
|
2612
2633
|
};
|
|
2613
2634
|
return window.addEventListener("keydown", o), window.addEventListener("pointerdown", a, !0), window.addEventListener("focusin", a, !0), () => {
|
|
@@ -2624,10 +2645,10 @@ ${Dt}
|
|
|
2624
2645
|
let j = d((e) => {
|
|
2625
2646
|
e.preventDefault(), e.deltaY < 0 ? k({
|
|
2626
2647
|
direction: "up",
|
|
2627
|
-
stepSize:
|
|
2648
|
+
stepSize: Jt
|
|
2628
2649
|
}) : k({
|
|
2629
2650
|
direction: "down",
|
|
2630
|
-
stepSize:
|
|
2651
|
+
stepSize: Jt
|
|
2631
2652
|
});
|
|
2632
2653
|
}, [k]);
|
|
2633
2654
|
f(() => {
|
|
@@ -2653,18 +2674,18 @@ ${Dt}
|
|
|
2653
2674
|
}
|
|
2654
2675
|
let n = S.current, r = document.activeElement;
|
|
2655
2676
|
n && r?.tagName === "IFRAME" && r.closest(".video")?.parentElement?.contains(n) && n.focus({ preventScroll: !0 });
|
|
2656
|
-
},
|
|
2677
|
+
}, Xt);
|
|
2657
2678
|
return C.current = t, () => {
|
|
2658
|
-
e = Date.now() +
|
|
2679
|
+
e = Date.now() + Zt;
|
|
2659
2680
|
};
|
|
2660
2681
|
}, [N]), f(() => () => clearInterval(C.current), []), /* @__PURE__ */ O("div", {
|
|
2661
2682
|
className: "control-bar",
|
|
2662
|
-
css:
|
|
2683
|
+
css: Qt,
|
|
2663
2684
|
style: { ...c ? {
|
|
2664
2685
|
opacity: "0",
|
|
2665
2686
|
pointerEvents: "none"
|
|
2666
2687
|
} : N ? { pointerEvents: "none" } : {} },
|
|
2667
|
-
children: [/* @__PURE__ */ D(
|
|
2688
|
+
children: [/* @__PURE__ */ D(Ct, {}), /* @__PURE__ */ O("div", {
|
|
2668
2689
|
className: "actions",
|
|
2669
2690
|
children: [/* @__PURE__ */ O("div", {
|
|
2670
2691
|
className: "left",
|
|
@@ -2681,18 +2702,18 @@ ${Dt}
|
|
|
2681
2702
|
}),
|
|
2682
2703
|
toolTipText: /* @__PURE__ */ D("span", { children: E ? "Replay (k)" : r ? "Play (k)" : "Pause (k)" })
|
|
2683
2704
|
}),
|
|
2684
|
-
/* @__PURE__ */ D(
|
|
2705
|
+
/* @__PURE__ */ D(qt, { ref: x }),
|
|
2685
2706
|
/* @__PURE__ */ D("div", {
|
|
2686
2707
|
className: "time",
|
|
2687
|
-
children:
|
|
2708
|
+
children: qe(o ?? i, a)
|
|
2688
2709
|
})
|
|
2689
2710
|
]
|
|
2690
2711
|
}), /* @__PURE__ */ O("div", {
|
|
2691
2712
|
className: "right",
|
|
2692
2713
|
children: [
|
|
2693
|
-
/* @__PURE__ */ D(
|
|
2694
|
-
/* @__PURE__ */ D(
|
|
2695
|
-
/* @__PURE__ */ D(
|
|
2714
|
+
/* @__PURE__ */ D(It, {}),
|
|
2715
|
+
/* @__PURE__ */ D(Ht, {}),
|
|
2716
|
+
/* @__PURE__ */ D(Bt, {}),
|
|
2696
2717
|
g ? /* @__PURE__ */ D($, {
|
|
2697
2718
|
id: "picture-in-picture",
|
|
2698
2719
|
tooltipPlace: "top-end",
|
|
@@ -2706,7 +2727,7 @@ ${Dt}
|
|
|
2706
2727
|
"aria-label": "Picture in picture",
|
|
2707
2728
|
"aria-pressed": g.active,
|
|
2708
2729
|
children: /* @__PURE__ */ D("img", {
|
|
2709
|
-
src:
|
|
2730
|
+
src: wt,
|
|
2710
2731
|
alt: ""
|
|
2711
2732
|
})
|
|
2712
2733
|
}),
|
|
@@ -2721,8 +2742,8 @@ ${Dt}
|
|
|
2721
2742
|
disabled: w && !T,
|
|
2722
2743
|
"aria-label": w ? "Put the subtitles in the video" : "Picture in picture",
|
|
2723
2744
|
"aria-pressed": w ? p : void 0,
|
|
2724
|
-
children: w ? D(p ?
|
|
2725
|
-
src:
|
|
2745
|
+
children: w ? D(p ? Et : Dt, {}) : /* @__PURE__ */ D("img", {
|
|
2746
|
+
src: wt,
|
|
2726
2747
|
alt: ""
|
|
2727
2748
|
})
|
|
2728
2749
|
}),
|
|
@@ -2745,7 +2766,7 @@ ${Dt}
|
|
|
2745
2766
|
})]
|
|
2746
2767
|
})]
|
|
2747
2768
|
});
|
|
2748
|
-
},
|
|
2769
|
+
}, en = 9e3, tn = _`
|
|
2749
2770
|
position: absolute;
|
|
2750
2771
|
inset: 0;
|
|
2751
2772
|
z-index: 2;
|
|
@@ -2788,7 +2809,7 @@ ${Dt}
|
|
|
2788
2809
|
line-height: 1;
|
|
2789
2810
|
color: #fff;
|
|
2790
2811
|
}
|
|
2791
|
-
`,
|
|
2812
|
+
`, nn = () => {
|
|
2792
2813
|
let e = K((e) => e.burnedInSubtitles), t = K((e) => e.pictureInPictureMode), [n, r] = h(!1);
|
|
2793
2814
|
return f(() => {
|
|
2794
2815
|
if (t !== "burn-in" || !e) {
|
|
@@ -2796,10 +2817,10 @@ ${Dt}
|
|
|
2796
2817
|
return;
|
|
2797
2818
|
}
|
|
2798
2819
|
r(!0);
|
|
2799
|
-
let n = setTimeout(() => r(!1),
|
|
2820
|
+
let n = setTimeout(() => r(!1), en);
|
|
2800
2821
|
return () => clearTimeout(n);
|
|
2801
2822
|
}, [t, e]), t !== "burn-in" || !e ? null : /* @__PURE__ */ D("div", {
|
|
2802
|
-
css:
|
|
2823
|
+
css: tn,
|
|
2803
2824
|
className: n ? "show" : "",
|
|
2804
2825
|
role: "status",
|
|
2805
2826
|
children: /* @__PURE__ */ O("div", {
|
|
@@ -2814,10 +2835,10 @@ ${Dt}
|
|
|
2814
2835
|
})]
|
|
2815
2836
|
})
|
|
2816
2837
|
});
|
|
2817
|
-
},
|
|
2838
|
+
}, rn = 1, an = 6e3, on = 1, sn = {
|
|
2818
2839
|
opening: "Skip Opening",
|
|
2819
2840
|
ending: "Skip Ending"
|
|
2820
|
-
},
|
|
2841
|
+
}, cn = _`
|
|
2821
2842
|
position: absolute;
|
|
2822
2843
|
inset: 0;
|
|
2823
2844
|
z-index: 2;
|
|
@@ -2868,10 +2889,10 @@ ${Dt}
|
|
|
2868
2889
|
bottom: calc(9 * var(--mp-unit));
|
|
2869
2890
|
}
|
|
2870
2891
|
}
|
|
2871
|
-
`,
|
|
2872
|
-
let e = K((e) => e.chapters), t = K((e) => e.currentTime), n = K((e) => e.requestSeek), r = K((e) => e.seekPreview), i = K(), a = p(() =>
|
|
2892
|
+
`, ln = () => {
|
|
2893
|
+
let e = K((e) => e.chapters), t = K((e) => e.currentTime), n = K((e) => e.requestSeek), r = K((e) => e.seekPreview), i = K(), a = p(() => bt(e), [e]), o = p(() => {
|
|
2873
2894
|
if (typeof t != "number") return;
|
|
2874
|
-
let n = e.findIndex((e, n) => a[n] !== void 0 && e.start -
|
|
2895
|
+
let n = e.findIndex((e, n) => a[n] !== void 0 && e.start - rn <= t && t < e.end), r = n >= 0 ? a[n] : void 0;
|
|
2875
2896
|
return r ? {
|
|
2876
2897
|
kind: r,
|
|
2877
2898
|
end: e[n].end
|
|
@@ -2883,7 +2904,7 @@ ${Dt}
|
|
|
2883
2904
|
]), s = m(0), [c, l] = h(0);
|
|
2884
2905
|
f(() => {
|
|
2885
2906
|
let e = typeof t == "number" ? t : 0, n = s.current;
|
|
2886
|
-
s.current = e, e < n -
|
|
2907
|
+
s.current = e, e < n - on && l((e) => e + 1);
|
|
2887
2908
|
}, [t]);
|
|
2888
2909
|
let [u, d] = h(!1), g = o ? `${o.kind}@${o.end}` : "";
|
|
2889
2910
|
return f(() => {
|
|
@@ -2892,12 +2913,12 @@ ${Dt}
|
|
|
2892
2913
|
return;
|
|
2893
2914
|
}
|
|
2894
2915
|
d(!0);
|
|
2895
|
-
let e = setTimeout(() => d(!1),
|
|
2916
|
+
let e = setTimeout(() => d(!1), an);
|
|
2896
2917
|
return () => clearTimeout(e);
|
|
2897
2918
|
}, [g, c]), f(() => {
|
|
2898
2919
|
o || d(!1);
|
|
2899
2920
|
}, [o]), o ? /* @__PURE__ */ D("div", {
|
|
2900
|
-
css:
|
|
2921
|
+
css: cn,
|
|
2901
2922
|
className: u && !r ? "show" : "",
|
|
2902
2923
|
children: /* @__PURE__ */ D("button", {
|
|
2903
2924
|
type: "button",
|
|
@@ -2905,10 +2926,10 @@ ${Dt}
|
|
|
2905
2926
|
onClick: () => {
|
|
2906
2927
|
d(!1), n ? n(o.end) : i.seek(o.end);
|
|
2907
2928
|
},
|
|
2908
|
-
children:
|
|
2929
|
+
children: sn[o.kind]
|
|
2909
2930
|
})
|
|
2910
2931
|
}) : null;
|
|
2911
|
-
},
|
|
2932
|
+
}, un = 3e3, dn = _`
|
|
2912
2933
|
position: absolute;
|
|
2913
2934
|
inset: 0;
|
|
2914
2935
|
z-index: 2;
|
|
@@ -2919,10 +2940,10 @@ ${Dt}
|
|
|
2919
2940
|
hoverable while faded out, popping a tooltip over nothing. It cascades where pointer-events does
|
|
2920
2941
|
not, and transitioning it holds the item on screen for the length of the fade. */
|
|
2921
2942
|
transition: opacity 0.1s cubic-bezier(.4,0,1,1), visibility 0.1s;
|
|
2922
|
-
`,
|
|
2943
|
+
`, fn = (e, t) => {
|
|
2923
2944
|
let n = e.left - t.left, r = e.top - t.top;
|
|
2924
2945
|
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')`;
|
|
2925
|
-
},
|
|
2946
|
+
}, pn = _`
|
|
2926
2947
|
position: relative;
|
|
2927
2948
|
background-color: black;
|
|
2928
2949
|
display: flex;
|
|
@@ -2979,13 +3000,13 @@ ${Dt}
|
|
|
2979
3000
|
&.hide {
|
|
2980
3001
|
cursor: none;
|
|
2981
3002
|
}
|
|
2982
|
-
`,
|
|
3003
|
+
`, mn = (e, t = "") => c.toArray(e).flatMap((e, n) => {
|
|
2983
3004
|
let r = `${t}${u(e) && e.key != null ? e.key : n}`;
|
|
2984
|
-
return u(e) && e.type === l ?
|
|
3005
|
+
return u(e) && e.type === l ? mn(e.props.children, `${r}/`) : [{
|
|
2985
3006
|
key: r,
|
|
2986
3007
|
item: e
|
|
2987
3008
|
}];
|
|
2988
|
-
}),
|
|
3009
|
+
}), hn = ({ ref: e, onVideoRef: t, onSubtitleRef: n, overlay: r, controls: i, shortcuts: a, children: o }) => {
|
|
2989
3010
|
let s = K(), c = K((e) => e.hideUI), l = K((e) => e.setHideUI), u = K((e) => e.hasMedia), d = K((e) => e.passThroughPictureInPicture), p = m(void 0), h = m("mouse"), g = m({
|
|
2990
3011
|
x: -1,
|
|
2991
3012
|
y: -1
|
|
@@ -3006,12 +3027,12 @@ ${Dt}
|
|
|
3006
3027
|
return !n || !v.current.contains(n) || n.closest(".video") ? !1 : !n.closest(".control-bar") || _.current || !!v.current.querySelector(".control-bar [aria-expanded=\"true\"]");
|
|
3007
3028
|
}, S = () => {
|
|
3008
3029
|
if (x()) {
|
|
3009
|
-
p.current = setTimeout(S,
|
|
3030
|
+
p.current = setTimeout(S, un);
|
|
3010
3031
|
return;
|
|
3011
3032
|
}
|
|
3012
3033
|
y();
|
|
3013
3034
|
}, C = () => {
|
|
3014
|
-
l(!1), clearTimeout(p.current), p.current = setTimeout(S,
|
|
3035
|
+
l(!1), clearTimeout(p.current), p.current = setTimeout(S, un);
|
|
3015
3036
|
}, w = (e) => {
|
|
3016
3037
|
h.current = e.pointerType, e.pointerType === "mouse" && (g.current = {
|
|
3017
3038
|
x: e.clientX,
|
|
@@ -3023,7 +3044,7 @@ ${Dt}
|
|
|
3023
3044
|
_.current = !1;
|
|
3024
3045
|
}, k = m(!0);
|
|
3025
3046
|
return /* @__PURE__ */ O("div", {
|
|
3026
|
-
css:
|
|
3047
|
+
css: pn,
|
|
3027
3048
|
ref: b,
|
|
3028
3049
|
onPointerMove: w,
|
|
3029
3050
|
onPointerDown: T,
|
|
@@ -3038,9 +3059,9 @@ ${Dt}
|
|
|
3038
3059
|
className: c ? "hide" : "",
|
|
3039
3060
|
tabIndex: a === "player" ? -1 : void 0,
|
|
3040
3061
|
children: [
|
|
3041
|
-
/* @__PURE__ */ D(
|
|
3042
|
-
|
|
3043
|
-
css:
|
|
3062
|
+
/* @__PURE__ */ D(Ve, { onSubtitleRef: n }),
|
|
3063
|
+
mn(r).map(({ key: e, item: t }) => /* @__PURE__ */ D("div", {
|
|
3064
|
+
css: dn,
|
|
3044
3065
|
style: { ...c ? {
|
|
3045
3066
|
opacity: "0",
|
|
3046
3067
|
visibility: "hidden",
|
|
@@ -3048,15 +3069,15 @@ ${Dt}
|
|
|
3048
3069
|
} : {} },
|
|
3049
3070
|
children: t
|
|
3050
3071
|
}, e)),
|
|
3051
|
-
i === !1 ? null : /* @__PURE__ */ D(
|
|
3072
|
+
i === !1 ? null : /* @__PURE__ */ D($t, {
|
|
3052
3073
|
shortcuts: a,
|
|
3053
3074
|
root: v
|
|
3054
3075
|
}),
|
|
3055
|
-
/* @__PURE__ */ D(
|
|
3056
|
-
/* @__PURE__ */ D(
|
|
3076
|
+
/* @__PURE__ */ D(nn, {}),
|
|
3077
|
+
/* @__PURE__ */ D(ln, {}),
|
|
3057
3078
|
d?.armed && v.current ? /* @__PURE__ */ D("div", {
|
|
3058
3079
|
className: "pass-through",
|
|
3059
|
-
style: { clipPath:
|
|
3080
|
+
style: { clipPath: fn(d.armed, v.current.getBoundingClientRect()) },
|
|
3060
3081
|
onPointerOver: d.disarm
|
|
3061
3082
|
}) : null,
|
|
3062
3083
|
/* @__PURE__ */ O("div", {
|
|
@@ -3079,9 +3100,9 @@ ${Dt}
|
|
|
3079
3100
|
})
|
|
3080
3101
|
]
|
|
3081
3102
|
});
|
|
3082
|
-
},
|
|
3103
|
+
}, gn = ({ options: e, children: t }) => {
|
|
3083
3104
|
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: u, thumbnailRead: d, thumbnailsEnabled: g, readsDownload: _ } = r ?? {}, v = x(), y = b(), [S, C] = h(null), [w, T] = h(null), E = n?.media ?? S;
|
|
3084
|
-
f(() => (v?.(E), () => v?.(null)), [E, v]),
|
|
3105
|
+
f(() => (v?.(E), () => v?.(null)), [E, v]), pe(E, n?.stepFrame);
|
|
3085
3106
|
let { expose: O } = e, k = O === !0 ? {} : O || void 0, A = m(k);
|
|
3086
3107
|
A.current = k;
|
|
3087
3108
|
let j = k ? k.id : void 0, M = k ? k.origin : void 0, N = k ? k.channel : void 0;
|
|
@@ -3100,7 +3121,7 @@ ${Dt}
|
|
|
3100
3121
|
M,
|
|
3101
3122
|
N
|
|
3102
3123
|
]);
|
|
3103
|
-
let P = p(() =>
|
|
3124
|
+
let P = p(() => Pe(), [o]);
|
|
3104
3125
|
le(S, w, r, _ ? P.push : void 0);
|
|
3105
3126
|
let F = r?.normalizeVolume ?? !0, [I, L] = h(F);
|
|
3106
3127
|
f(() => {
|
|
@@ -3110,7 +3131,7 @@ ${Dt}
|
|
|
3110
3131
|
R.current = r?.onNormalizeVolumeChange;
|
|
3111
3132
|
let z = r?.normalizerWorkletUrl, B = m(d ?? u);
|
|
3112
3133
|
B.current = d ?? u;
|
|
3113
|
-
let V = K((e) => e.selectedAudioTrack), H = !!u, { refused: ee } =
|
|
3134
|
+
let V = K((e) => e.selectedAudioTrack), H = !!u, { refused: ee } = Ne(S, z, I, p(() => H && o && c && l && typeof V == "number" && V >= 0 ? _ ? {
|
|
3114
3135
|
tap: P,
|
|
3115
3136
|
audioStreamIndex: V
|
|
3116
3137
|
} : {
|
|
@@ -3137,13 +3158,13 @@ ${Dt}
|
|
|
3137
3158
|
z,
|
|
3138
3159
|
I,
|
|
3139
3160
|
ee
|
|
3140
|
-
]), { thumbnails: ne, requestThumbnail: U } =
|
|
3161
|
+
]), { thumbnails: ne, requestThumbnail: U } = ge({
|
|
3141
3162
|
publicPath: c,
|
|
3142
3163
|
workerUrl: l,
|
|
3143
3164
|
length: g === !1 ? void 0 : o,
|
|
3144
3165
|
read: d ?? u,
|
|
3145
3166
|
downloadedRanges: s
|
|
3146
|
-
}), W = n?.thumbnails?.all ?? ne, { toggle: G, mode: re, burnedIn: ie } =
|
|
3167
|
+
}), W = n?.thumbnails?.all ?? ne, { toggle: G, mode: re, burnedIn: ie } = _e(S, w), q = Ce(n?.media ?? null, n?.pictureInPicture), J = K((e) => e.setSourceState), Y = n ? !!n.media : o !== void 0;
|
|
3147
3168
|
f(() => {
|
|
3148
3169
|
J({
|
|
3149
3170
|
title: i,
|
|
@@ -3209,7 +3230,7 @@ ${Dt}
|
|
|
3209
3230
|
J({ quality: se });
|
|
3210
3231
|
}, [J, se]), f(() => {
|
|
3211
3232
|
a && J({ chapters: a });
|
|
3212
|
-
}, [J, a]), /* @__PURE__ */ D(
|
|
3233
|
+
}, [J, a]), /* @__PURE__ */ D(hn, {
|
|
3213
3234
|
ref: y,
|
|
3214
3235
|
onVideoRef: n ? void 0 : C,
|
|
3215
3236
|
onSubtitleRef: T,
|
|
@@ -3218,7 +3239,7 @@ ${Dt}
|
|
|
3218
3239
|
shortcuts: e.shortcuts,
|
|
3219
3240
|
children: t
|
|
3220
3241
|
});
|
|
3221
|
-
},
|
|
3242
|
+
}, _n = _`
|
|
3222
3243
|
/**
|
|
3223
3244
|
* The chrome's whole scale, in one place.
|
|
3224
3245
|
*
|
|
@@ -3288,17 +3309,17 @@ ${Dt}
|
|
|
3288
3309
|
height: 100%;
|
|
3289
3310
|
width: 100%;
|
|
3290
3311
|
overflow: hidden;
|
|
3291
|
-
`,
|
|
3292
|
-
css:
|
|
3293
|
-
children: /* @__PURE__ */ D(G.Provider, { children: /* @__PURE__ */ D(
|
|
3312
|
+
`, vn = (e) => /* @__PURE__ */ D("div", {
|
|
3313
|
+
css: _n,
|
|
3314
|
+
children: /* @__PURE__ */ D(G.Provider, { children: /* @__PURE__ */ D(gn, {
|
|
3294
3315
|
options: e,
|
|
3295
3316
|
children: e.children
|
|
3296
3317
|
}) })
|
|
3297
|
-
}),
|
|
3318
|
+
}), yn = (e) => !!e && typeof e == "object" && "at" in e, bn = (e) => !!e && typeof e == "object" && "selection" in e, xn = ({ blob: e, name: t }) => ({
|
|
3298
3319
|
length: e.size,
|
|
3299
3320
|
name: t ?? (e instanceof File ? e.name : void 0),
|
|
3300
3321
|
read: (t, n) => e.slice(t, t + n).arrayBuffer()
|
|
3301
|
-
}),
|
|
3322
|
+
}), Sn = async (e, t) => {
|
|
3302
3323
|
let n = await fetch(e, {
|
|
3303
3324
|
headers: { Range: "bytes=0-1" },
|
|
3304
3325
|
credentials: t
|
|
@@ -3308,8 +3329,8 @@ ${Dt}
|
|
|
3308
3329
|
if (!Number.isFinite(i) || i <= 0) throw Error("The source did not report its length");
|
|
3309
3330
|
if (!r && n.status !== 206) throw Error("The source does not support range requests");
|
|
3310
3331
|
return i;
|
|
3311
|
-
},
|
|
3312
|
-
let i = t ?? await
|
|
3332
|
+
}, Cn = async ({ url: e, length: t, name: n, credentials: r }) => {
|
|
3333
|
+
let i = t ?? await Sn(e, r);
|
|
3313
3334
|
return {
|
|
3314
3335
|
length: i,
|
|
3315
3336
|
name: n,
|
|
@@ -3325,9 +3346,9 @@ ${Dt}
|
|
|
3325
3346
|
},
|
|
3326
3347
|
readsDownload: !0
|
|
3327
3348
|
};
|
|
3328
|
-
},
|
|
3329
|
-
if ("blob" in e) return
|
|
3330
|
-
if ("url" in e) return
|
|
3349
|
+
}, wn = async (e) => {
|
|
3350
|
+
if ("blob" in e) return xn(e);
|
|
3351
|
+
if ("url" in e) return Cn(e);
|
|
3331
3352
|
if ("read" in e) return {
|
|
3332
3353
|
length: e.length,
|
|
3333
3354
|
name: e.name,
|
|
@@ -3336,4 +3357,4 @@ ${Dt}
|
|
|
3336
3357
|
throw Error(`Unknown source type: ${e}`);
|
|
3337
3358
|
};
|
|
3338
3359
|
//#endregion
|
|
3339
|
-
export {
|
|
3360
|
+
export { vn as MediaPlayer, vn as default, G as Player, t as SUBTITLES_OFF, o as createPictureInPicture, s as createSubtitleRenderer, i as createThumbnailGenerator, wn as inputToRemuxerInput, bn as isDelegatedTracks, yn as isExternalThumbnails, W as sourceFeature, a as startPlayback, _e as usePictureInPicture, K as usePlayer, ge as useSeekThumbnails };
|