@remotion/renderer 4.0.89 → 4.0.91

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.
Files changed (39) hide show
  1. package/dist/client.d.ts +76 -77
  2. package/dist/compositor/compose.js +7 -3
  3. package/dist/compositor/compositor.d.ts +1 -1
  4. package/dist/compositor/compositor.js +14 -2
  5. package/dist/copy-to-clipboard.js +1 -1
  6. package/dist/extract-audio.js +1 -1
  7. package/dist/get-extension-from-codec.d.ts +2 -2
  8. package/dist/get-silent-parts.js +1 -1
  9. package/dist/get-video-metadata.js +1 -1
  10. package/dist/index.d.ts +31 -31
  11. package/dist/index.js +2 -0
  12. package/dist/offthread-video-server.js +2 -2
  13. package/dist/options/audio-bitrate.d.ts +1 -2
  14. package/dist/options/beep-on-finish.d.ts +1 -2
  15. package/dist/options/color-space.d.ts +2 -3
  16. package/dist/options/crf.d.ts +1 -2
  17. package/dist/options/delete-after.d.ts +1 -2
  18. package/dist/options/enable-lambda-insights.d.ts +1 -2
  19. package/dist/options/enable-multiprocess-on-linux.d.ts +1 -2
  20. package/dist/options/encoding-buffer-size.d.ts +1 -2
  21. package/dist/options/encoding-max-rate.d.ts +1 -2
  22. package/dist/options/enforce-audio.d.ts +1 -2
  23. package/dist/options/folder-expiry.d.ts +1 -2
  24. package/dist/options/gl.d.ts +1 -2
  25. package/dist/options/index.d.ts +22 -23
  26. package/dist/options/jpeg-quality.d.ts +1 -2
  27. package/dist/options/mute.d.ts +1 -2
  28. package/dist/options/number-of-gif-loops.d.ts +1 -2
  29. package/dist/options/offthreadvideo-cache-size.d.ts +1 -2
  30. package/dist/options/options-map.d.ts +16 -17
  31. package/dist/options/repro.d.ts +1 -2
  32. package/dist/options/scale.d.ts +1 -2
  33. package/dist/options/video-bitrate.d.ts +1 -2
  34. package/dist/options/video-codec.d.ts +1 -2
  35. package/dist/options/webhook-custom-data.d.ts +1 -2
  36. package/dist/pixel-format.d.ts +1 -1
  37. package/dist/pure.d.ts +3 -3
  38. package/dist/validate-output-filename.d.ts +1 -1
  39. package/package.json +11 -11
package/dist/client.d.ts CHANGED
@@ -1,20 +1,19 @@
1
- /// <reference types="react" />
2
1
  export { AvailableOptions } from './options';
3
2
  export declare const BrowserSafeApis: {
4
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
3
+ getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => import("./file-extensions").FileExtension;
5
4
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
6
5
  validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
7
- getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number;
8
- getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
9
- isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | undefined) => boolean;
6
+ getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => number;
7
+ getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => [number, number];
8
+ isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null | undefined) => boolean;
10
9
  proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
11
10
  x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
12
11
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
13
12
  validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
14
- validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
13
+ validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
15
14
  validVideoImageFormats: readonly ["png", "jpeg", "none"];
16
15
  validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
17
- DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
16
+ DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
18
17
  DEFAULT_TIMEOUT: number;
19
18
  supportedAudioCodecs: {
20
19
  readonly h264: readonly ["aac", "pcm-16", "mp3"];
@@ -32,11 +31,11 @@ export declare const BrowserSafeApis: {
32
31
  h264: {
33
32
  default: import("./file-extensions").FileExtension;
34
33
  forAudioCodec: {
35
- mp3: {
34
+ aac: {
36
35
  possible: import("./file-extensions").FileExtension[];
37
36
  default: import("./file-extensions").FileExtension;
38
37
  };
39
- aac: {
38
+ mp3: {
40
39
  possible: import("./file-extensions").FileExtension[];
41
40
  default: import("./file-extensions").FileExtension;
42
41
  };
@@ -62,11 +61,11 @@ export declare const BrowserSafeApis: {
62
61
  vp8: {
63
62
  default: import("./file-extensions").FileExtension;
64
63
  forAudioCodec: {
65
- "pcm-16": {
64
+ opus: {
66
65
  possible: import("./file-extensions").FileExtension[];
67
66
  default: import("./file-extensions").FileExtension;
68
67
  };
69
- opus: {
68
+ "pcm-16": {
70
69
  possible: import("./file-extensions").FileExtension[];
71
70
  default: import("./file-extensions").FileExtension;
72
71
  };
@@ -75,20 +74,20 @@ export declare const BrowserSafeApis: {
75
74
  vp9: {
76
75
  default: import("./file-extensions").FileExtension;
77
76
  forAudioCodec: {
78
- "pcm-16": {
77
+ opus: {
79
78
  possible: import("./file-extensions").FileExtension[];
80
79
  default: import("./file-extensions").FileExtension;
81
80
  };
82
- opus: {
81
+ "pcm-16": {
83
82
  possible: import("./file-extensions").FileExtension[];
84
83
  default: import("./file-extensions").FileExtension;
85
84
  };
86
85
  };
87
86
  };
88
- mp3: {
87
+ prores: {
89
88
  default: import("./file-extensions").FileExtension;
90
89
  forAudioCodec: {
91
- mp3: {
90
+ aac: {
92
91
  possible: import("./file-extensions").FileExtension[];
93
92
  default: import("./file-extensions").FileExtension;
94
93
  };
@@ -111,22 +110,22 @@ export declare const BrowserSafeApis: {
111
110
  };
112
111
  };
113
112
  };
114
- wav: {
113
+ mp3: {
115
114
  default: import("./file-extensions").FileExtension;
116
115
  forAudioCodec: {
116
+ mp3: {
117
+ possible: import("./file-extensions").FileExtension[];
118
+ default: import("./file-extensions").FileExtension;
119
+ };
117
120
  "pcm-16": {
118
121
  possible: import("./file-extensions").FileExtension[];
119
122
  default: import("./file-extensions").FileExtension;
120
123
  };
121
124
  };
122
125
  };
123
- prores: {
126
+ wav: {
124
127
  default: import("./file-extensions").FileExtension;
125
128
  forAudioCodec: {
126
- aac: {
127
- possible: import("./file-extensions").FileExtension[];
128
- default: import("./file-extensions").FileExtension;
129
- };
130
129
  "pcm-16": {
131
130
  possible: import("./file-extensions").FileExtension[];
132
131
  default: import("./file-extensions").FileExtension;
@@ -153,37 +152,37 @@ export declare const BrowserSafeApis: {
153
152
  };
154
153
  defaultAudioCodecs: {
155
154
  h264: {
156
- compressed: "mp3" | "aac" | "pcm-16" | null;
157
- lossless: "mp3" | "aac" | "pcm-16" | null;
155
+ compressed: "aac" | "mp3" | "pcm-16" | null;
156
+ lossless: "aac" | "mp3" | "pcm-16" | null;
158
157
  };
159
158
  h265: {
160
159
  compressed: "aac" | "pcm-16" | null;
161
160
  lossless: "aac" | "pcm-16" | null;
162
161
  };
163
162
  vp8: {
164
- compressed: "pcm-16" | "opus" | null;
165
- lossless: "pcm-16" | "opus" | null;
163
+ compressed: "opus" | "pcm-16" | null;
164
+ lossless: "opus" | "pcm-16" | null;
166
165
  };
167
166
  vp9: {
168
- compressed: "pcm-16" | "opus" | null;
169
- lossless: "pcm-16" | "opus" | null;
167
+ compressed: "opus" | "pcm-16" | null;
168
+ lossless: "opus" | "pcm-16" | null;
170
169
  };
171
- mp3: {
172
- compressed: "mp3" | "pcm-16" | null;
173
- lossless: "mp3" | "pcm-16" | null;
170
+ prores: {
171
+ compressed: "aac" | "pcm-16" | null;
172
+ lossless: "aac" | "pcm-16" | null;
174
173
  };
175
174
  aac: {
176
175
  compressed: "aac" | "pcm-16" | null;
177
176
  lossless: "aac" | "pcm-16" | null;
178
177
  };
178
+ mp3: {
179
+ compressed: "mp3" | "pcm-16" | null;
180
+ lossless: "mp3" | "pcm-16" | null;
181
+ };
179
182
  wav: {
180
183
  compressed: "pcm-16" | null;
181
184
  lossless: "pcm-16" | null;
182
185
  };
183
- prores: {
184
- compressed: "aac" | "pcm-16" | null;
185
- lossless: "aac" | "pcm-16" | null;
186
- };
187
186
  "h264-mkv": {
188
187
  compressed: "mp3" | "pcm-16" | null;
189
188
  lossless: "mp3" | "pcm-16" | null;
@@ -193,10 +192,10 @@ export declare const BrowserSafeApis: {
193
192
  lossless: null;
194
193
  };
195
194
  };
196
- defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
197
- validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
195
+ defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
196
+ validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
198
197
  codec: T_1;
199
- audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
198
+ audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
200
199
  extension: string;
201
200
  preferLossless: boolean;
202
201
  }) => void;
@@ -204,7 +203,7 @@ export declare const BrowserSafeApis: {
204
203
  scaleOption: {
205
204
  name: string;
206
205
  cliFlag: "scale";
207
- description: () => JSX.Element;
206
+ description: () => import("react/jsx-runtime").JSX.Element;
208
207
  ssrName: string;
209
208
  docLink: string;
210
209
  type: number;
@@ -212,7 +211,7 @@ export declare const BrowserSafeApis: {
212
211
  crfOption: {
213
212
  name: string;
214
213
  cliFlag: "crf";
215
- description: () => JSX.Element;
214
+ description: () => import("react/jsx-runtime").JSX.Element;
216
215
  ssrName: string;
217
216
  docLink: string;
218
217
  type: number;
@@ -220,7 +219,7 @@ export declare const BrowserSafeApis: {
220
219
  jpegQualityOption: {
221
220
  name: string;
222
221
  cliFlag: "jpeg-quality";
223
- description: () => JSX.Element;
222
+ description: () => import("react/jsx-runtime").JSX.Element;
224
223
  ssrName: string;
225
224
  docLink: string;
226
225
  type: number;
@@ -228,7 +227,7 @@ export declare const BrowserSafeApis: {
228
227
  videoBitrate: {
229
228
  name: string;
230
229
  cliFlag: string;
231
- description: () => JSX.Element;
230
+ description: () => import("react/jsx-runtime").JSX.Element;
232
231
  ssrName: string;
233
232
  docLink: string;
234
233
  type: string | null;
@@ -236,7 +235,7 @@ export declare const BrowserSafeApis: {
236
235
  audioBitrateOption: {
237
236
  name: string;
238
237
  cliFlag: "audio-bitrate";
239
- description: () => JSX.Element;
238
+ description: () => import("react/jsx-runtime").JSX.Element;
240
239
  ssrName: string;
241
240
  docLink: string;
242
241
  type: string;
@@ -244,7 +243,7 @@ export declare const BrowserSafeApis: {
244
243
  enforceAudioOption: {
245
244
  name: string;
246
245
  cliFlag: "enforce-audio-track";
247
- description: () => JSX.Element;
246
+ description: () => import("react/jsx-runtime").JSX.Element;
248
247
  ssrName: string;
249
248
  docLink: string;
250
249
  type: boolean;
@@ -252,7 +251,7 @@ export declare const BrowserSafeApis: {
252
251
  muteOption: {
253
252
  name: string;
254
253
  cliFlag: string;
255
- description: () => JSX.Element;
254
+ description: () => import("react/jsx-runtime").JSX.Element;
256
255
  ssrName: string;
257
256
  docLink: string;
258
257
  type: boolean;
@@ -260,7 +259,7 @@ export declare const BrowserSafeApis: {
260
259
  videoCodecOption: {
261
260
  name: string;
262
261
  cliFlag: "codec";
263
- description: () => JSX.Element;
262
+ description: () => import("react/jsx-runtime").JSX.Element;
264
263
  ssrName: string;
265
264
  docLink: string;
266
265
  type: string;
@@ -268,7 +267,7 @@ export declare const BrowserSafeApis: {
268
267
  offthreadVideoCacheSizeInBytes: {
269
268
  name: string;
270
269
  cliFlag: "offthreadvideo-cache-size-in-bytes";
271
- description: () => JSX.Element;
270
+ description: () => import("react/jsx-runtime").JSX.Element;
272
271
  ssrName: "offthreadVideoCacheSizeInBytes";
273
272
  docLink: string;
274
273
  type: number | null;
@@ -276,7 +275,7 @@ export declare const BrowserSafeApis: {
276
275
  webhookCustomDataOption: {
277
276
  name: string;
278
277
  cliFlag: "webhook-custom-data";
279
- description: (type: "ssr" | "cli") => JSX.Element;
278
+ description: (type: "ssr" | "cli") => import("react/jsx-runtime").JSX.Element;
280
279
  ssrName: "customData";
281
280
  docLink: string;
282
281
  type: Record<string, unknown> | null;
@@ -284,15 +283,15 @@ export declare const BrowserSafeApis: {
284
283
  colorSpaceOption: {
285
284
  name: string;
286
285
  cliFlag: "color-space";
287
- description: () => JSX.Element;
286
+ description: () => import("react/jsx-runtime").JSX.Element;
288
287
  docLink: string;
289
288
  ssrName: string;
290
- type: "default" | "bt709" | "bt2020-ncl";
289
+ type: "bt709" | "bt2020-ncl" | "default";
291
290
  };
292
291
  deleteAfterOption: {
293
292
  name: string;
294
293
  cliFlag: "delete-after";
295
- description: () => JSX.Element;
294
+ description: () => import("react/jsx-runtime").JSX.Element;
296
295
  ssrName: "deleteAfter";
297
296
  docLink: string;
298
297
  type: string | null;
@@ -300,7 +299,7 @@ export declare const BrowserSafeApis: {
300
299
  folderExpiryOption: {
301
300
  name: string;
302
301
  cliFlag: "enable-folder-expiry";
303
- description: () => JSX.Element;
302
+ description: () => import("react/jsx-runtime").JSX.Element;
304
303
  ssrName: "enableFolderExpiry";
305
304
  docLink: string;
306
305
  type: boolean | null;
@@ -308,7 +307,7 @@ export declare const BrowserSafeApis: {
308
307
  enableMultiprocessOnLinuxOption: {
309
308
  name: string;
310
309
  cliFlag: "enable-multiprocess-on-linux";
311
- description: () => JSX.Element;
310
+ description: () => import("react/jsx-runtime").JSX.Element;
312
311
  ssrName: string;
313
312
  docLink: string;
314
313
  type: boolean;
@@ -319,12 +318,12 @@ export declare const BrowserSafeApis: {
319
318
  name: string;
320
319
  type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
321
320
  ssrName: string;
322
- description: () => JSX.Element;
321
+ description: () => import("react/jsx-runtime").JSX.Element;
323
322
  };
324
323
  enableLambdaInsights: {
325
324
  name: string;
326
325
  cliFlag: "enable-lambda-insights";
327
- description: () => JSX.Element;
326
+ description: () => import("react/jsx-runtime").JSX.Element;
328
327
  ssrName: string;
329
328
  docLink: string;
330
329
  type: boolean;
@@ -332,7 +331,7 @@ export declare const BrowserSafeApis: {
332
331
  encodingMaxRateOption: {
333
332
  name: string;
334
333
  cliFlag: "max-rate";
335
- description: () => JSX.Element;
334
+ description: () => import("react/jsx-runtime").JSX.Element;
336
335
  ssrName: "encodingMaxRate";
337
336
  docLink: string;
338
337
  type: string | null;
@@ -340,7 +339,7 @@ export declare const BrowserSafeApis: {
340
339
  encodingBufferSizeOption: {
341
340
  name: string;
342
341
  cliFlag: "buffer-size";
343
- description: () => JSX.Element;
342
+ description: () => import("react/jsx-runtime").JSX.Element;
344
343
  ssrName: "encodingBufferSize";
345
344
  docLink: string;
346
345
  type: string | null;
@@ -348,7 +347,7 @@ export declare const BrowserSafeApis: {
348
347
  beepOnFinishOption: {
349
348
  name: string;
350
349
  cliFlag: "beep-on-finish";
351
- description: () => JSX.Element;
350
+ description: () => import("react/jsx-runtime").JSX.Element;
352
351
  ssrName: null;
353
352
  docLink: string;
354
353
  type: boolean;
@@ -356,7 +355,7 @@ export declare const BrowserSafeApis: {
356
355
  numberOfGifLoopsOption: {
357
356
  name: string;
358
357
  cliFlag: "number-of-gif-loops";
359
- description: () => JSX.Element;
358
+ description: () => import("react/jsx-runtime").JSX.Element;
360
359
  ssrName: "numberOfGifLoops";
361
360
  docLink: string;
362
361
  type: number | null;
@@ -364,7 +363,7 @@ export declare const BrowserSafeApis: {
364
363
  reproOption: {
365
364
  name: string;
366
365
  cliFlag: string;
367
- description: () => JSX.Element;
366
+ description: () => import("react/jsx-runtime").JSX.Element;
368
367
  ssrName: string;
369
368
  docLink: string;
370
369
  type: boolean;
@@ -376,7 +375,7 @@ export declare const BrowserSafeApis: {
376
375
  readonly offthreadVideoCacheSizeInBytes: {
377
376
  name: string;
378
377
  cliFlag: "offthreadvideo-cache-size-in-bytes";
379
- description: () => JSX.Element;
378
+ description: () => import("react/jsx-runtime").JSX.Element;
380
379
  ssrName: "offthreadVideoCacheSizeInBytes";
381
380
  docLink: string;
382
381
  type: number | null;
@@ -384,7 +383,7 @@ export declare const BrowserSafeApis: {
384
383
  readonly videoBitrate: {
385
384
  name: string;
386
385
  cliFlag: string;
387
- description: () => JSX.Element;
386
+ description: () => import("react/jsx-runtime").JSX.Element;
388
387
  ssrName: string;
389
388
  docLink: string;
390
389
  type: string | null;
@@ -392,7 +391,7 @@ export declare const BrowserSafeApis: {
392
391
  readonly numberOfGifLoops: {
393
392
  name: string;
394
393
  cliFlag: "number-of-gif-loops";
395
- description: () => JSX.Element;
394
+ description: () => import("react/jsx-runtime").JSX.Element;
396
395
  ssrName: "numberOfGifLoops";
397
396
  docLink: string;
398
397
  type: number | null;
@@ -400,7 +399,7 @@ export declare const BrowserSafeApis: {
400
399
  readonly repro: {
401
400
  name: string;
402
401
  cliFlag: string;
403
- description: () => JSX.Element;
402
+ description: () => import("react/jsx-runtime").JSX.Element;
404
403
  ssrName: string;
405
404
  docLink: string;
406
405
  type: boolean;
@@ -410,7 +409,7 @@ export declare const BrowserSafeApis: {
410
409
  readonly offthreadVideoCacheSizeInBytes: {
411
410
  name: string;
412
411
  cliFlag: "offthreadvideo-cache-size-in-bytes";
413
- description: () => JSX.Element;
412
+ description: () => import("react/jsx-runtime").JSX.Element;
414
413
  ssrName: "offthreadVideoCacheSizeInBytes";
415
414
  docLink: string;
416
415
  type: number | null;
@@ -420,7 +419,7 @@ export declare const BrowserSafeApis: {
420
419
  readonly offthreadVideoCacheSizeInBytes: {
421
420
  name: string;
422
421
  cliFlag: "offthreadvideo-cache-size-in-bytes";
423
- description: () => JSX.Element;
422
+ description: () => import("react/jsx-runtime").JSX.Element;
424
423
  ssrName: "offthreadVideoCacheSizeInBytes";
425
424
  docLink: string;
426
425
  type: number | null;
@@ -430,7 +429,7 @@ export declare const BrowserSafeApis: {
430
429
  readonly offthreadVideoCacheSizeInBytes: {
431
430
  name: string;
432
431
  cliFlag: "offthreadvideo-cache-size-in-bytes";
433
- description: () => JSX.Element;
432
+ description: () => import("react/jsx-runtime").JSX.Element;
434
433
  ssrName: "offthreadVideoCacheSizeInBytes";
435
434
  docLink: string;
436
435
  type: number | null;
@@ -440,7 +439,7 @@ export declare const BrowserSafeApis: {
440
439
  readonly offthreadVideoCacheSizeInBytes: {
441
440
  name: string;
442
441
  cliFlag: "offthreadvideo-cache-size-in-bytes";
443
- description: () => JSX.Element;
442
+ description: () => import("react/jsx-runtime").JSX.Element;
444
443
  ssrName: "offthreadVideoCacheSizeInBytes";
445
444
  docLink: string;
446
445
  type: number | null;
@@ -450,7 +449,7 @@ export declare const BrowserSafeApis: {
450
449
  readonly offthreadVideoCacheSizeInBytes: {
451
450
  name: string;
452
451
  cliFlag: "offthreadvideo-cache-size-in-bytes";
453
- description: () => JSX.Element;
452
+ description: () => import("react/jsx-runtime").JSX.Element;
454
453
  ssrName: "offthreadVideoCacheSizeInBytes";
455
454
  docLink: string;
456
455
  type: number | null;
@@ -458,7 +457,7 @@ export declare const BrowserSafeApis: {
458
457
  readonly videoBitrate: {
459
458
  name: string;
460
459
  cliFlag: string;
461
- description: () => JSX.Element;
460
+ description: () => import("react/jsx-runtime").JSX.Element;
462
461
  ssrName: string;
463
462
  docLink: string;
464
463
  type: string | null;
@@ -466,7 +465,7 @@ export declare const BrowserSafeApis: {
466
465
  readonly numberOfGifLoops: {
467
466
  name: string;
468
467
  cliFlag: "number-of-gif-loops";
469
- description: () => JSX.Element;
468
+ description: () => import("react/jsx-runtime").JSX.Element;
470
469
  ssrName: "numberOfGifLoops";
471
470
  docLink: string;
472
471
  type: number | null;
@@ -476,7 +475,7 @@ export declare const BrowserSafeApis: {
476
475
  readonly offthreadVideoCacheSizeInBytes: {
477
476
  name: string;
478
477
  cliFlag: "offthreadvideo-cache-size-in-bytes";
479
- description: () => JSX.Element;
478
+ description: () => import("react/jsx-runtime").JSX.Element;
480
479
  ssrName: "offthreadVideoCacheSizeInBytes";
481
480
  docLink: string;
482
481
  type: number | null;
@@ -486,7 +485,7 @@ export declare const BrowserSafeApis: {
486
485
  readonly offthreadVideoCacheSizeInBytes: {
487
486
  name: string;
488
487
  cliFlag: "offthreadvideo-cache-size-in-bytes";
489
- description: () => JSX.Element;
488
+ description: () => import("react/jsx-runtime").JSX.Element;
490
489
  ssrName: "offthreadVideoCacheSizeInBytes";
491
490
  docLink: string;
492
491
  type: number | null;
@@ -496,7 +495,7 @@ export declare const BrowserSafeApis: {
496
495
  readonly offthreadVideoCacheSizeInBytes: {
497
496
  name: string;
498
497
  cliFlag: "offthreadvideo-cache-size-in-bytes";
499
- description: () => JSX.Element;
498
+ description: () => import("react/jsx-runtime").JSX.Element;
500
499
  ssrName: "offthreadVideoCacheSizeInBytes";
501
500
  docLink: string;
502
501
  type: number | null;
@@ -504,7 +503,7 @@ export declare const BrowserSafeApis: {
504
503
  readonly numberOfGifLoops: {
505
504
  name: string;
506
505
  cliFlag: "number-of-gif-loops";
507
- description: () => JSX.Element;
506
+ description: () => import("react/jsx-runtime").JSX.Element;
508
507
  ssrName: "numberOfGifLoops";
509
508
  docLink: string;
510
509
  type: number | null;
@@ -514,14 +513,14 @@ export declare const BrowserSafeApis: {
514
513
  readonly offthreadVideoCacheSizeInBytes: {
515
514
  name: string;
516
515
  cliFlag: "offthreadvideo-cache-size-in-bytes";
517
- description: () => JSX.Element;
516
+ description: () => import("react/jsx-runtime").JSX.Element;
518
517
  ssrName: "offthreadVideoCacheSizeInBytes";
519
518
  docLink: string;
520
519
  type: number | null;
521
520
  };
522
521
  };
523
522
  };
524
- codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
525
- codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
523
+ codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
524
+ codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
526
525
  logLevels: readonly ["verbose", "info", "warn", "error"];
527
526
  };
@@ -81,16 +81,20 @@ const callCompositor = (payload, indent, logLevel) => {
81
81
  return;
82
82
  }
83
83
  try {
84
- child.stdin.write(payload);
84
+ child.stdin.write(payload, (e) => {
85
+ if (e) {
86
+ reject(e);
87
+ return;
88
+ }
89
+ child.stdin.end();
90
+ });
85
91
  }
86
92
  catch (err) {
87
93
  if (err instanceof Error && err.message.includes('EPIPE')) {
88
94
  reject(new Error('Compositor stdin closed unexpectedly,' +
89
95
  Buffer.concat(stderrChunks).toString('utf-8')));
90
- return;
91
96
  }
92
97
  }
93
- child.stdin.end();
94
98
  });
95
99
  };
96
100
  exports.callCompositor = callCompositor;
@@ -2,7 +2,7 @@
2
2
  import type { LogLevel } from '../log-level';
3
3
  import type { CompositorCommand } from './payloads';
4
4
  export type Compositor = {
5
- finishCommands: () => void;
5
+ finishCommands: () => Promise<void>;
6
6
  executeCommand: <T extends keyof CompositorCommand>(type: T, payload: CompositorCommand[T]) => Promise<Buffer>;
7
7
  waitForDone: () => Promise<void>;
8
8
  pid: number | null;
@@ -181,7 +181,15 @@ const startCompositor = (type, payload, logLevel, indent) => {
181
181
  if (runningStatus.type === 'quit-without-error') {
182
182
  throw new Error(`Compositor quit${runningStatus.signal ? ` with signal ${runningStatus.signal}` : ''}`);
183
183
  }
184
- child.stdin.write('EOF\n');
184
+ return new Promise((res, rej) => {
185
+ child.stdin.write('EOF\n', (e) => {
186
+ if (e) {
187
+ rej(e);
188
+ return;
189
+ }
190
+ res();
191
+ });
192
+ });
185
193
  },
186
194
  executeCommand: (command, params) => {
187
195
  if (runningStatus.type === 'quit-without-error') {
@@ -199,7 +207,11 @@ const startCompositor = (type, payload, logLevel, indent) => {
199
207
  params,
200
208
  },
201
209
  };
202
- child.stdin.write(JSON.stringify(composed) + '\n');
210
+ child.stdin.write(JSON.stringify(composed) + '\n', (e) => {
211
+ if (e) {
212
+ _reject(e);
213
+ }
214
+ });
203
215
  waiters.set(nonce, {
204
216
  resolve: _resolve,
205
217
  reject: _reject,
@@ -11,7 +11,7 @@ const copyImageToClipboard = async (src, logLevel) => {
11
11
  await compositor.executeCommand('CopyImageToClipboard', {
12
12
  src,
13
13
  });
14
- compositor.finishCommands();
14
+ await compositor.finishCommands();
15
15
  await compositor.waitForDone();
16
16
  };
17
17
  exports.copyImageToClipboard = copyImageToClipboard;
@@ -13,7 +13,7 @@ const extractAudio = async (options) => {
13
13
  input_path: options.videoSource,
14
14
  output_path: options.audioOutput,
15
15
  });
16
- compositor.finishCommands();
16
+ await compositor.finishCommands();
17
17
  await compositor.waitForDone();
18
18
  };
19
19
  exports.extractAudio = extractAudio;
@@ -1,6 +1,6 @@
1
1
  import type { AudioCodec } from './audio-codec';
2
2
  import type { Codec } from './codec';
3
3
  import type { FileExtension } from './file-extensions';
4
- export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
5
- export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
4
+ export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
5
+ export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif")[]>;
6
6
  export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
@@ -28,7 +28,7 @@ const getSilentParts = async ({ src, noiseThresholdInDecibels: passedNoiseThresh
28
28
  noiseThresholdInDecibels,
29
29
  });
30
30
  const response = JSON.parse(res.toString('utf-8'));
31
- compositor.finishCommands();
31
+ await compositor.finishCommands();
32
32
  await compositor.waitForDone();
33
33
  const { silentParts, durationInSeconds } = response;
34
34
  return {
@@ -12,7 +12,7 @@ const getVideoMetadata = async (videoSource, options) => {
12
12
  const metadataResponse = await compositor.executeCommand('GetVideoMetadata', {
13
13
  src: videoSource,
14
14
  });
15
- compositor.finishCommands();
15
+ await compositor.finishCommands();
16
16
  await compositor.waitForDone();
17
17
  return JSON.parse(metadataResponse.toString('utf-8'));
18
18
  };