@banou/media-player 0.8.13 → 0.8.16
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 +3 -0
- package/dist/engine/index.js +1 -1
- package/dist/engine/playback.d.ts +2 -0
- package/dist/{engine-BUcS6UrE.js → engine-DPnChmYc.js} +160 -178
- package/dist/index.js +152 -130
- package/package.json +1 -1
- package/src/lib/engine/playback.ts +75 -5
- package/src/lib/engine/subtitles.ts +46 -38
- package/src/lib/react/components/progress-bar.tsx +64 -7
- package/src/lib/react/hooks/use-drag-value.ts +5 -2
- package/src/lib/react/hooks/use-playback.ts +35 -21
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
1
3
|
# @banou/media-player
|
|
2
4
|
|
|
3
5
|
A React video player for files the browser cannot open on its own. It takes a `read(offset, size)` and
|
|
@@ -21,6 +23,7 @@ import MediaPlayer from '@banou/media-player'
|
|
|
21
23
|
libavWorkerUrl="/libav-worker.js"
|
|
22
24
|
jassubWorkerUrl={jassubWorkerUrl}
|
|
23
25
|
jassubWasmUrl="/jassub-worker-modern.wasm"
|
|
26
|
+
jassubLegacyWasmUrl="/jassub-worker.wasm"
|
|
24
27
|
defaultFontUrl="/default.woff2"
|
|
25
28
|
title="episode.mkv"
|
|
26
29
|
autoplay
|
package/dist/engine/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../engine-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../engine-DPnChmYc.js";
|
|
2
2
|
export { i as DEFAULT_BUFFER_SIZE, e as MediaElementError, a as SUBTITLES_OFF, u as createPictureInPicture, d as createSubtitleRenderer, c as createThumbnailGenerator, n as getTimeRanges, s as isMediaElementError, o as pictureInPictureMode, l as startPlayback, t as terminateRemuxer, r as updateSourceBuffer };
|
|
@@ -37,6 +37,8 @@ export type PlaybackController = {
|
|
|
37
37
|
* because this can take as long as a read, which over a torrent has no ceiling.
|
|
38
38
|
*/
|
|
39
39
|
prepareSeek: (time: number) => Promise<void>;
|
|
40
|
+
/** The element this pipeline drives, so a caller can read what actually got buffered. */
|
|
41
|
+
videoElement: HTMLVideoElement;
|
|
40
42
|
selectSubtitleStream: (streamIndex: number | undefined) => void;
|
|
41
43
|
/** Keyframe index of the input, which is what maps a downloaded byte range onto the timeline. */
|
|
42
44
|
indexes: MediaIndex[];
|