@remotion/renderer 4.0.513 → 4.0.515

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 (44) hide show
  1. package/dist/client.d.ts +78 -0
  2. package/dist/compositor/compositor.d.ts +7 -0
  3. package/dist/compositor/compositor.js +45 -1
  4. package/dist/ensure-browser.d.ts +2 -0
  5. package/dist/esm/client.mjs +978 -839
  6. package/dist/esm/index.mjs +104 -11
  7. package/dist/index.d.ts +13 -1
  8. package/dist/offthread-video-server.js +3 -8
  9. package/dist/options/ask-ai.d.ts +2 -0
  10. package/dist/options/ask-ai.js +7 -0
  11. package/dist/options/beep-on-finish.d.ts +2 -0
  12. package/dist/options/beep-on-finish.js +7 -0
  13. package/dist/options/cross-site-isolation.d.ts +2 -0
  14. package/dist/options/cross-site-isolation.js +7 -0
  15. package/dist/options/enable-cancellation.d.ts +16 -0
  16. package/dist/options/enable-cancellation.js +31 -0
  17. package/dist/options/index.d.ts +50 -0
  18. package/dist/options/index.js +4 -0
  19. package/dist/options/interactivity.d.ts +2 -0
  20. package/dist/options/interactivity.js +7 -0
  21. package/dist/options/keyboard-shortcuts.d.ts +2 -0
  22. package/dist/options/keyboard-shortcuts.js +7 -0
  23. package/dist/options/latency-hint.d.ts +2 -0
  24. package/dist/options/latency-hint.js +4 -0
  25. package/dist/options/log-level.d.ts +2 -0
  26. package/dist/options/log-level.js +7 -0
  27. package/dist/options/number-of-shared-audio-tags.d.ts +2 -0
  28. package/dist/options/number-of-shared-audio-tags.js +7 -0
  29. package/dist/options/option.d.ts +1 -0
  30. package/dist/options/options-map.d.ts +28 -0
  31. package/dist/options/rspack.d.ts +2 -0
  32. package/dist/options/rspack.js +7 -0
  33. package/dist/prestitcher-memory-usage.d.ts +4 -0
  34. package/dist/prestitcher-memory-usage.js +10 -3
  35. package/dist/render-frame-and-retry-target-close.d.ts +1 -1
  36. package/dist/render-frame-with-option-to-reject.d.ts +1 -1
  37. package/dist/render-frame-with-option-to-reject.js +1 -1
  38. package/dist/render-frame.d.ts +1 -1
  39. package/dist/render-frames.d.ts +3 -3
  40. package/dist/render-frames.js +8 -2
  41. package/dist/render-media.js +7 -3
  42. package/dist/write-with-backpressure.d.ts +5 -0
  43. package/dist/write-with-backpressure.js +34 -0
  44. package/package.json +13 -13
package/dist/client.d.ts CHANGED
@@ -250,6 +250,22 @@ export declare const BrowserSafeApis: {
250
250
  separateAudioTo: string | null;
251
251
  }) => void;
252
252
  options: {
253
+ allowHtmlInCanvasOption: {
254
+ name: string;
255
+ cliFlag: "allow-html-in-canvas";
256
+ description: () => import("react/jsx-runtime").JSX.Element;
257
+ ssrName: null;
258
+ docLink: string;
259
+ type: boolean;
260
+ getValue: ({ commandLine }: {
261
+ commandLine: Record<string, unknown>;
262
+ }) => {
263
+ value: boolean;
264
+ source: string;
265
+ };
266
+ setConfig(value: boolean): void;
267
+ id: "allow-html-in-canvas";
268
+ };
253
269
  audioCodecOption: {
254
270
  cliFlag: "audio-codec";
255
271
  setConfig: (audioCodec: "aac" | "mp3" | "opus" | "pcm-16" | null) => void;
@@ -610,6 +626,22 @@ export declare const BrowserSafeApis: {
610
626
  setConfig: (value: boolean | null) => void;
611
627
  id: "enable-folder-expiry";
612
628
  };
629
+ enableCancellationOption: {
630
+ name: string;
631
+ cliFlag: "enable-cancellation";
632
+ description: () => import("react/jsx-runtime").JSX.Element;
633
+ ssrName: null;
634
+ docLink: string;
635
+ type: boolean;
636
+ setConfig: (value: boolean) => void;
637
+ getValue: ({ commandLine }: {
638
+ commandLine: Record<string, unknown>;
639
+ }) => {
640
+ value: boolean;
641
+ source: string;
642
+ };
643
+ id: "enable-cancellation";
644
+ };
613
645
  enableMultiprocessOnLinuxOption: {
614
646
  name: string;
615
647
  cliFlag: "enable-multiprocess-on-linux";
@@ -726,6 +758,8 @@ export declare const BrowserSafeApis: {
726
758
  source: string;
727
759
  };
728
760
  setConfig(value: boolean): void;
761
+ getConfigValue: () => boolean | null;
762
+ reset: () => void;
729
763
  id: "beep-on-finish";
730
764
  };
731
765
  numberOfGifLoopsOption: {
@@ -910,6 +944,8 @@ export declare const BrowserSafeApis: {
910
944
  source: string;
911
945
  };
912
946
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
947
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
948
+ reset: () => void;
913
949
  type: "error" | "info" | "trace" | "verbose" | "warn";
914
950
  id: "log";
915
951
  };
@@ -1196,6 +1232,8 @@ export declare const BrowserSafeApis: {
1196
1232
  source: string;
1197
1233
  };
1198
1234
  setConfig: (profile: AudioContextLatencyCategory | null) => void;
1235
+ getConfigValue: () => AudioContextLatencyCategory | null;
1236
+ reset: () => void;
1199
1237
  id: "audio-latency-hint";
1200
1238
  };
1201
1239
  enableCrossSiteIsolationOption: {
@@ -1212,6 +1250,8 @@ export declare const BrowserSafeApis: {
1212
1250
  source: string;
1213
1251
  };
1214
1252
  setConfig(value: boolean): void;
1253
+ getConfigValue: () => boolean | null;
1254
+ reset: () => void;
1215
1255
  id: "cross-site-isolation";
1216
1256
  };
1217
1257
  ignoreCertificateErrorsOption: {
@@ -1360,6 +1400,8 @@ export declare const BrowserSafeApis: {
1360
1400
  source: string;
1361
1401
  };
1362
1402
  setConfig(value: boolean): void;
1403
+ getConfigValue: () => boolean | null;
1404
+ reset: () => void;
1363
1405
  id: "disable-ask-ai";
1364
1406
  };
1365
1407
  interactivityOption: {
@@ -1376,6 +1418,8 @@ export declare const BrowserSafeApis: {
1376
1418
  source: string;
1377
1419
  };
1378
1420
  setConfig(value: boolean): void;
1421
+ getConfigValue: () => boolean | null;
1422
+ reset: () => void;
1379
1423
  id: "disable-interactivity";
1380
1424
  };
1381
1425
  keyboardShortcutsOption: {
@@ -1392,6 +1436,8 @@ export declare const BrowserSafeApis: {
1392
1436
  source: string;
1393
1437
  };
1394
1438
  setConfig(value: boolean): void;
1439
+ getConfigValue: () => boolean | null;
1440
+ reset: () => void;
1395
1441
  id: "disable-keyboard-shortcuts";
1396
1442
  };
1397
1443
  framesOption: {
@@ -1456,6 +1502,8 @@ export declare const BrowserSafeApis: {
1456
1502
  source: string;
1457
1503
  };
1458
1504
  setConfig(value: number): void;
1505
+ getConfigValue: () => number | null;
1506
+ reset: () => void;
1459
1507
  id: "number-of-shared-audio-tags";
1460
1508
  };
1461
1509
  ipv4Option: {
@@ -1629,6 +1677,8 @@ export declare const BrowserSafeApis: {
1629
1677
  source: string;
1630
1678
  };
1631
1679
  setConfig(value: boolean): void;
1680
+ getConfigValue: () => boolean | null;
1681
+ reset: () => void;
1632
1682
  id: "rspack";
1633
1683
  };
1634
1684
  outDirOption: {
@@ -2193,6 +2243,8 @@ export declare const BrowserSafeApis: {
2193
2243
  source: string;
2194
2244
  };
2195
2245
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
2246
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
2247
+ reset: () => void;
2196
2248
  type: "error" | "info" | "trace" | "verbose" | "warn";
2197
2249
  id: "log";
2198
2250
  };
@@ -2485,6 +2537,8 @@ export declare const BrowserSafeApis: {
2485
2537
  source: string;
2486
2538
  };
2487
2539
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
2540
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
2541
+ reset: () => void;
2488
2542
  type: "error" | "info" | "trace" | "verbose" | "warn";
2489
2543
  id: "log";
2490
2544
  };
@@ -2651,6 +2705,8 @@ export declare const BrowserSafeApis: {
2651
2705
  source: string;
2652
2706
  };
2653
2707
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
2708
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
2709
+ reset: () => void;
2654
2710
  type: "error" | "info" | "trace" | "verbose" | "warn";
2655
2711
  id: "log";
2656
2712
  };
@@ -2785,6 +2841,8 @@ export declare const BrowserSafeApis: {
2785
2841
  source: string;
2786
2842
  };
2787
2843
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
2844
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
2845
+ reset: () => void;
2788
2846
  type: "error" | "info" | "trace" | "verbose" | "warn";
2789
2847
  id: "log";
2790
2848
  };
@@ -2954,6 +3012,8 @@ export declare const BrowserSafeApis: {
2954
3012
  source: string;
2955
3013
  };
2956
3014
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
3015
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
3016
+ reset: () => void;
2957
3017
  type: "error" | "info" | "trace" | "verbose" | "warn";
2958
3018
  id: "log";
2959
3019
  };
@@ -3319,6 +3379,8 @@ export declare const BrowserSafeApis: {
3319
3379
  source: string;
3320
3380
  };
3321
3381
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
3382
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
3383
+ reset: () => void;
3322
3384
  type: "error" | "info" | "trace" | "verbose" | "warn";
3323
3385
  id: "log";
3324
3386
  };
@@ -3474,6 +3536,8 @@ export declare const BrowserSafeApis: {
3474
3536
  source: string;
3475
3537
  };
3476
3538
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
3539
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
3540
+ reset: () => void;
3477
3541
  type: "error" | "info" | "trace" | "verbose" | "warn";
3478
3542
  id: "log";
3479
3543
  };
@@ -3613,6 +3677,8 @@ export declare const BrowserSafeApis: {
3613
3677
  source: string;
3614
3678
  };
3615
3679
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
3680
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
3681
+ reset: () => void;
3616
3682
  type: "error" | "info" | "trace" | "verbose" | "warn";
3617
3683
  id: "log";
3618
3684
  };
@@ -3883,6 +3949,8 @@ export declare const BrowserSafeApis: {
3883
3949
  source: string;
3884
3950
  };
3885
3951
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
3952
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
3953
+ reset: () => void;
3886
3954
  type: "error" | "info" | "trace" | "verbose" | "warn";
3887
3955
  id: "log";
3888
3956
  };
@@ -4057,6 +4125,8 @@ export declare const BrowserSafeApis: {
4057
4125
  source: string;
4058
4126
  };
4059
4127
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
4128
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
4129
+ reset: () => void;
4060
4130
  type: "error" | "info" | "trace" | "verbose" | "warn";
4061
4131
  id: "log";
4062
4132
  };
@@ -4123,6 +4193,8 @@ export declare const BrowserSafeApis: {
4123
4193
  source: string;
4124
4194
  };
4125
4195
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
4196
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
4197
+ reset: () => void;
4126
4198
  type: "error" | "info" | "trace" | "verbose" | "warn";
4127
4199
  id: "log";
4128
4200
  };
@@ -4168,6 +4240,8 @@ export declare const BrowserSafeApis: {
4168
4240
  source: string;
4169
4241
  };
4170
4242
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
4243
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
4244
+ reset: () => void;
4171
4245
  type: "error" | "info" | "trace" | "verbose" | "warn";
4172
4246
  id: "log";
4173
4247
  };
@@ -4213,6 +4287,8 @@ export declare const BrowserSafeApis: {
4213
4287
  source: string;
4214
4288
  };
4215
4289
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
4290
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
4291
+ reset: () => void;
4216
4292
  type: "error" | "info" | "trace" | "verbose" | "warn";
4217
4293
  id: "log";
4218
4294
  };
@@ -4247,6 +4323,8 @@ export declare const BrowserSafeApis: {
4247
4323
  source: string;
4248
4324
  };
4249
4325
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
4326
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
4327
+ reset: () => void;
4250
4328
  type: "error" | "info" | "trace" | "verbose" | "warn";
4251
4329
  id: "log";
4252
4330
  };
@@ -13,6 +13,13 @@ export declare const startLongRunningCompositor: ({ maximumFrameCacheItemsInByte
13
13
  binariesDirectory: string | null;
14
14
  extraThreads: number;
15
15
  }) => Compositor;
16
+ export declare const makeLazyCompositor: ({ maximumFrameCacheItemsInBytes, logLevel, indent, binariesDirectory, extraThreads, }: {
17
+ maximumFrameCacheItemsInBytes: number | null;
18
+ logLevel: "error" | "info" | "trace" | "verbose" | "warn";
19
+ indent: boolean;
20
+ binariesDirectory: string | null;
21
+ extraThreads: number;
22
+ }) => Compositor;
16
23
  export declare const startCompositor: <T extends keyof CompositorCommand>({ type, payload, logLevel, indent, binariesDirectory, }: {
17
24
  type: T;
18
25
  payload: CompositorCommand[T];
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.startCompositor = exports.startLongRunningCompositor = void 0;
6
+ exports.startCompositor = exports.makeLazyCompositor = exports.startLongRunningCompositor = void 0;
7
7
  const node_child_process_1 = require("node:child_process");
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
9
  const streaming_1 = require("@remotion/streaming");
@@ -28,6 +28,50 @@ const startLongRunningCompositor = ({ maximumFrameCacheItemsInBytes, logLevel, i
28
28
  });
29
29
  };
30
30
  exports.startLongRunningCompositor = startLongRunningCompositor;
31
+ const makeLazyCompositor = ({ maximumFrameCacheItemsInBytes, logLevel, indent, binariesDirectory, extraThreads, }) => {
32
+ let compositor = null;
33
+ let shutDown = false;
34
+ const getCompositor = () => {
35
+ if (shutDown) {
36
+ throw new Error('Compositor has already been shut down');
37
+ }
38
+ if (!compositor) {
39
+ compositor = (0, exports.startLongRunningCompositor)({
40
+ maximumFrameCacheItemsInBytes,
41
+ logLevel,
42
+ indent,
43
+ binariesDirectory,
44
+ extraThreads,
45
+ });
46
+ }
47
+ return compositor;
48
+ };
49
+ return {
50
+ executeCommand: (type, payload) => {
51
+ return Promise.resolve().then(() => {
52
+ return getCompositor().executeCommand(type, payload);
53
+ });
54
+ },
55
+ finishCommands: () => {
56
+ var _a;
57
+ return (_a = compositor === null || compositor === void 0 ? void 0 : compositor.finishCommands()) !== null && _a !== void 0 ? _a : Promise.resolve();
58
+ },
59
+ waitForDone: () => {
60
+ var _a;
61
+ return (_a = compositor === null || compositor === void 0 ? void 0 : compositor.waitForDone()) !== null && _a !== void 0 ? _a : Promise.resolve();
62
+ },
63
+ shutDownOrKill: () => {
64
+ var _a;
65
+ shutDown = true;
66
+ return (_a = compositor === null || compositor === void 0 ? void 0 : compositor.shutDownOrKill()) !== null && _a !== void 0 ? _a : Promise.resolve();
67
+ },
68
+ get pid() {
69
+ var _a;
70
+ return (_a = compositor === null || compositor === void 0 ? void 0 : compositor.pid) !== null && _a !== void 0 ? _a : null;
71
+ },
72
+ };
73
+ };
74
+ exports.makeLazyCompositor = makeLazyCompositor;
31
75
  const startCompositor = ({ type, payload, logLevel, indent, binariesDirectory = null, }) => {
32
76
  var _a;
33
77
  const bin = (0, get_executable_path_1.getExecutablePath)({
@@ -39,6 +39,8 @@ export declare const ensureBrowser: (options?: Partial<{
39
39
  source: string;
40
40
  };
41
41
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
42
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
43
+ reset: () => void;
42
44
  type: "error" | "info" | "trace" | "verbose" | "warn";
43
45
  id: "log";
44
46
  };