libav-wasm 0.6.2 → 0.8.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.
Binary file
package/build/libav.wasm CHANGED
Binary file
package/build/worker.d.ts CHANGED
@@ -55,10 +55,16 @@ export type Attachment = {
55
55
  mimetype: string;
56
56
  data: ArrayBuffer;
57
57
  };
58
+ export type AudioStream = {
59
+ streamIndex: number;
60
+ language: string;
61
+ title: string;
62
+ };
58
63
  export type RemuxerInstanceOptions = {
59
64
  resolvedPromise: Promise<void>;
60
65
  length: number;
61
66
  bufferSize: number;
67
+ audioStreamIndex?: number;
62
68
  };
63
69
  type ReadFunction = (offset: number, size: number) => Promise<{
64
70
  resolved: ArrayBuffer;
@@ -74,6 +80,7 @@ export interface RemuxerInstance {
74
80
  data: Uint8Array;
75
81
  attachments: WASMVector<RemuxerInstanceAttachment>;
76
82
  subtitles: WASMVector<RemuxerInstanceSubtitleFragment>;
83
+ audioStreams: WASMVector<AudioStream>;
77
84
  indexes: WASMVector<Index>;
78
85
  chapters: WASMVector<Chapter>;
79
86
  info: {
@@ -121,6 +128,7 @@ export type Remuxer = {
121
128
  data: ArrayBuffer;
122
129
  attachments: Attachment[];
123
130
  subtitles: SubtitleFragment[];
131
+ audioStreams: AudioStream[];
124
132
  info: {
125
133
  input: {
126
134
  audioMimeType: string;
@@ -173,10 +181,11 @@ type WASMVector<T> = {
173
181
  get: (index: number) => T;
174
182
  };
175
183
  declare const resolvers: {
176
- makeRemuxer: ({ publicPath, length, bufferSize, log }: {
184
+ makeRemuxer: ({ publicPath, length, bufferSize, audioStreamIndex, log }: {
177
185
  publicPath: string;
178
186
  length: number;
179
187
  bufferSize: number;
188
+ audioStreamIndex?: number;
180
189
  log: (isError: boolean, text: string) => Promise<void>;
181
190
  }) => Promise<{
182
191
  destroy: () => Promise<void>;
@@ -184,6 +193,7 @@ declare const resolvers: {
184
193
  data: ArrayBuffer;
185
194
  attachments: Attachment[];
186
195
  subtitles: SubtitleFragment[];
196
+ audioStreams: AudioStream[];
187
197
  info: {
188
198
  input: {
189
199
  audioMimeType: string;