libav-wasm 0.1.10 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.d.ts +9 -9
- package/build/index.js +67 -897
- package/build/libav.wasm +0 -0
- package/build/utils.d.ts +6 -4
- package/build/worker.d.ts +12 -7
- package/build/worker.js +2003 -1142
- package/package.json +5 -4
- package/build/mp4box.d.ts +0 -121
package/build/index.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { SEEK_FLAG, SEEK_WHENCE_FLAG } from './utils';
|
|
2
|
-
export { SEEK_FLAG, SEEK_WHENCE_FLAG };
|
|
3
1
|
export type MakeTransmuxerOptions = {
|
|
4
2
|
/** Path that will be used to locate the .wasm file imported from the worker */
|
|
5
3
|
publicPath: string;
|
|
6
4
|
/** Path that will be used to locate the javascript worker file */
|
|
7
5
|
workerUrl: string;
|
|
8
6
|
workerOptions?: WorkerOptions;
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
randomRead: (offset: number, size: number) => Promise<ArrayBuffer>;
|
|
8
|
+
getStream: (offset: number) => Promise<ReadableStream<Uint8Array>>;
|
|
11
9
|
subtitle: (title: string, language: string, data: string) => Promise<void> | void;
|
|
12
10
|
attachment: (filename: string, mimetype: string, buffer: ArrayBuffer) => Promise<void> | void;
|
|
13
11
|
write: (params: {
|
|
@@ -40,6 +38,8 @@ export type MediaInfo = {
|
|
|
40
38
|
formatName: string;
|
|
41
39
|
mimeType: string;
|
|
42
40
|
duration: number;
|
|
41
|
+
video_mime_type: string;
|
|
42
|
+
audio_mime_type: string;
|
|
43
43
|
};
|
|
44
44
|
export type Chunk = {
|
|
45
45
|
isHeader: boolean;
|
|
@@ -49,11 +49,11 @@ export type Chunk = {
|
|
|
49
49
|
duration: number;
|
|
50
50
|
pos: number;
|
|
51
51
|
};
|
|
52
|
-
export declare const makeTransmuxer: ({ publicPath, workerUrl, workerOptions,
|
|
53
|
-
init: () => Promise<
|
|
54
|
-
destroy: (destroyWorker?: boolean) =>
|
|
55
|
-
|
|
56
|
-
seek: (time: number) =>
|
|
52
|
+
export declare const makeTransmuxer: ({ publicPath, workerUrl, workerOptions, randomRead: _randomRead, getStream: _getStream, write: _write, attachment, subtitle: _subtitle, length, bufferSize }: MakeTransmuxerOptions) => Promise<{
|
|
53
|
+
init: () => Promise<Chunk>;
|
|
54
|
+
destroy: (destroyWorker?: boolean) => void;
|
|
55
|
+
read: () => Promise<Chunk>;
|
|
56
|
+
seek: (time: number) => any;
|
|
57
57
|
getInfo: () => Promise<{
|
|
58
58
|
input: MediaInfo;
|
|
59
59
|
output: MediaInfo;
|