@remotion/renderer 4.0.71 → 4.0.73

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 (50) hide show
  1. package/dist/assets/calculate-asset-positions.d.ts +1 -1
  2. package/dist/assets/convert-assets-to-file-urls.d.ts +1 -1
  3. package/dist/assets/download-and-map-assets-to-file.d.ts +1 -1
  4. package/dist/assets/download-and-map-assets-to-file.js +2 -2
  5. package/dist/assets/download-map.d.ts +1 -1
  6. package/dist/assets/types.d.ts +1 -1
  7. package/dist/browser/BrowserPage.d.ts +0 -15
  8. package/dist/browser/BrowserPage.js +16 -16
  9. package/dist/client.d.ts +37 -37
  10. package/dist/compress-assets.d.ts +1 -1
  11. package/dist/delay-render-embedded-stack.js +3 -3
  12. package/dist/error-handling/handle-javascript-exception.js +2 -2
  13. package/dist/get-bundle-url-from-serve-url.js +3 -3
  14. package/dist/get-compositions.d.ts +1 -1
  15. package/dist/get-compositions.js +6 -4
  16. package/dist/get-extension-from-codec.d.ts +2 -2
  17. package/dist/index.d.ts +28 -27
  18. package/dist/offthread-video-server.js +5 -2
  19. package/dist/open-browser.js +4 -2
  20. package/dist/options/color-space.d.ts +1 -1
  21. package/dist/options/index.d.ts +1 -1
  22. package/dist/prepare-server.js +2 -2
  23. package/dist/print-useful-error-message.js +32 -24
  24. package/dist/provide-screenshot.d.ts +3 -2
  25. package/dist/provide-screenshot.js +2 -1
  26. package/dist/puppeteer-evaluate.d.ts +2 -1
  27. package/dist/puppeteer-evaluate.js +3 -2
  28. package/dist/puppeteer-screenshot.d.ts +1 -1
  29. package/dist/render-frames.d.ts +1 -1
  30. package/dist/render-frames.js +5 -3
  31. package/dist/render-media.d.ts +1 -1
  32. package/dist/render-media.js +4 -3
  33. package/dist/render-still.d.ts +1 -1
  34. package/dist/render-still.js +6 -4
  35. package/dist/screenshot-dom-element.d.ts +3 -2
  36. package/dist/screenshot-dom-element.js +3 -1
  37. package/dist/screenshot-task.d.ts +1 -1
  38. package/dist/seek-to-frame.js +3 -0
  39. package/dist/select-composition.d.ts +1 -1
  40. package/dist/select-composition.js +6 -4
  41. package/dist/set-props-and-env.js +4 -0
  42. package/dist/stitch-frames-to-video.js +2 -2
  43. package/dist/take-frame-and-compose.d.ts +3 -2
  44. package/dist/take-frame-and-compose.js +4 -1
  45. package/dist/test-gpu.d.ts +2 -1
  46. package/dist/test-gpu.js +2 -1
  47. package/dist/validate-output-filename.d.ts +1 -1
  48. package/dist/validate.d.ts +4 -4
  49. package/dist/validate.js +4 -4
  50. package/package.json +9 -9
@@ -132,10 +132,13 @@ const startOffthreadVideoServer = ({ downloadMap, concurrency, logLevel, indent,
132
132
  });
133
133
  })
134
134
  .catch((err) => {
135
- response.writeHead(500);
135
+ if (!response.headersSent) {
136
+ response.writeHead(500);
137
+ }
136
138
  response.end();
137
139
  // Any errors occurred due to the render being aborted don't need to be logged.
138
- if (err.message !== REQUEST_CLOSED_TOKEN) {
140
+ if (err.message !== REQUEST_CLOSED_TOKEN &&
141
+ !err.message.includes('EPIPE')) {
139
142
  downloadMap.emitter.dispatchError(err);
140
143
  console.log('Error occurred', err);
141
144
  }
@@ -5,6 +5,7 @@ const node_1 = require("./browser/node");
5
5
  const get_local_browser_executable_1 = require("./get-local-browser-executable");
6
6
  const get_video_threads_flag_1 = require("./get-video-threads-flag");
7
7
  const log_level_1 = require("./log-level");
8
+ const logger_1 = require("./logger");
8
9
  const gl_1 = require("./options/gl");
9
10
  const getOpenGlRenderer = (option) => {
10
11
  const renderer = option !== null && option !== void 0 ? option : gl_1.DEFAULT_OPENGL_RENDERER;
@@ -40,7 +41,7 @@ const killAllBrowsers = async () => {
40
41
  };
41
42
  exports.killAllBrowsers = killAllBrowsers;
42
43
  const internalOpenBrowser = async ({ browser, browserExecutable, chromiumOptions, forceDeviceScaleFactor, indent, viewport, logLevel, }) => {
43
- var _a, _b;
44
+ var _a, _b, _c;
44
45
  // @ts-expect-error Firefox
45
46
  if (browser === 'firefox') {
46
47
  throw new TypeError('Firefox supported is not yet turned on. Stay tuned for the future.');
@@ -52,6 +53,7 @@ const internalOpenBrowser = async ({ browser, browserExecutable, chromiumOptions
52
53
  });
53
54
  const executablePath = (0, get_local_browser_executable_1.getLocalBrowserExecutable)(browserExecutable);
54
55
  const customGlRenderer = getOpenGlRenderer((_a = chromiumOptions.gl) !== null && _a !== void 0 ? _a : null);
56
+ logger_1.Log.verbose({ indent, logLevel, tag: 'openBrowser()' }, `Opening browser: gl = ${chromiumOptions.gl}, executable = ${executablePath}, enableMultiProcessOnLinux = ${(_b = chromiumOptions.enableMultiProcessOnLinux) !== null && _b !== void 0 ? _b : false}`);
55
57
  const browserInstance = await node_1.puppeteer.launch({
56
58
  executablePath,
57
59
  dumpio: (0, log_level_1.isEqualOrBelowLogLevel)(logLevel, 'verbose'),
@@ -89,7 +91,7 @@ const internalOpenBrowser = async ({ browser, browserExecutable, chromiumOptions
89
91
  '--enable-blink-features=IdleDetection',
90
92
  '--export-tagged-pdf',
91
93
  '--intensive-wake-up-throttling-policy=0',
92
- ((_b = chromiumOptions.headless) !== null && _b !== void 0 ? _b : true) ? '--headless' : null,
94
+ ((_c = chromiumOptions.headless) !== null && _c !== void 0 ? _c : true) ? '--headless' : null,
93
95
  '--no-sandbox',
94
96
  '--disable-setuid-sandbox',
95
97
  ...customGlRenderer,
@@ -7,6 +7,6 @@ export declare const colorSpaceOption: {
7
7
  description: () => JSX.Element;
8
8
  docLink: string;
9
9
  ssrName: string;
10
- type: "default" | "bt709";
10
+ type: "bt709" | "default";
11
11
  };
12
12
  export declare const validateColorSpace: (option: unknown) => void;
@@ -86,7 +86,7 @@ export declare const allOptions: {
86
86
  description: () => JSX.Element;
87
87
  docLink: string;
88
88
  ssrName: string;
89
- type: "default" | "bt709";
89
+ type: "bt709" | "default";
90
90
  };
91
91
  deleteAfterOption: {
92
92
  name: string;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.makeOrReuseServer = exports.prepareServer = void 0;
7
7
  const node_fs_1 = require("node:fs");
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
- const remotion_1 = require("remotion");
9
+ const no_react_1 = require("remotion/no-react");
10
10
  const download_and_map_assets_to_file_1 = require("./assets/download-and-map-assets-to-file");
11
11
  const download_map_1 = require("./assets/download-map");
12
12
  const get_bundle_url_from_serve_url_1 = require("./get-bundle-url-from-serve-url");
@@ -57,7 +57,7 @@ const prepareServer = async ({ webpackConfigOrServeUrl, port, remotionRoot, conc
57
57
  throw new Error(`Tried to serve the Webpack bundle on a HTTP server, but the file ${indexFile} does not exist. Is this a valid path to a Webpack bundle?`);
58
58
  }
59
59
  let localSourceMap = null;
60
- (0, symbolicate_stacktrace_1.getSourceMapFromLocalFile)(node_path_1.default.join(webpackConfigOrServeUrl, remotion_1.Internals.bundleName))
60
+ (0, symbolicate_stacktrace_1.getSourceMapFromLocalFile)(node_path_1.default.join(webpackConfigOrServeUrl, no_react_1.NoReactInternals.bundleName))
61
61
  .then((s) => {
62
62
  localSourceMap = s;
63
63
  })
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.printUsefulErrorMessage = void 0;
4
+ const logger_1 = require("./logger");
4
5
  const truthy_1 = require("./truthy");
5
6
  const alreadyPrinted = [];
6
7
  // Don't use Log.info() here, as BrowserSafeApis need tto be
@@ -11,60 +12,67 @@ const printUsefulErrorMessage = (err) => {
11
12
  }
12
13
  alreadyPrinted.push(err);
13
14
  if (err.message.includes('Could not play video with')) {
14
- console.log();
15
- console.log('💡 Get help for this issue at https://remotion.dev/docs/media-playback-error');
15
+ logger_1.Log.info();
16
+ logger_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/media-playback-error');
16
17
  }
17
18
  if (err.message.includes('A delayRender()') &&
18
19
  err.message.includes('was called but not cleared after')) {
19
- console.log();
20
- console.log('💡 Get help for this issue at https://remotion.dev/docs/timeout');
20
+ logger_1.Log.info();
21
+ if (err.message.includes('/proxy')) {
22
+ logger_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/troubleshooting/delay-render-proxy');
23
+ }
24
+ logger_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/timeout');
21
25
  }
22
26
  if (err.message.includes('Target closed')) {
23
- console.log();
24
- console.log('💡 Get help for this issue at https://remotion.dev/docs/target-closed');
27
+ logger_1.Log.info();
28
+ logger_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/target-closed');
29
+ }
30
+ if (err.message.includes('Timed out evaluating')) {
31
+ logger_1.Log.info();
32
+ logger_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/troubleshooting/timed-out-page-function');
25
33
  }
26
34
  if (err.message.includes('ENAMETOOLONG')) {
27
- console.log();
28
- console.log('💡 Get help for this issue at https://remotion.dev/docs/enametoolong');
35
+ logger_1.Log.info();
36
+ logger_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/enametoolong');
29
37
  }
30
38
  if (err.message.includes('Member must have value less than or equal to 3008')) {
31
- console.log();
32
- console.log('💡 This error indicates that you have a AWS account on the free tier or have been limited by your organization. Often times this can be solved by adding a credit card.');
39
+ logger_1.Log.info();
40
+ logger_1.Log.info('💡 This error indicates that you have a AWS account on the free tier or have been limited by your organization. Often times this can be solved by adding a credit card.');
33
41
  }
34
42
  if ((_a = err.stack) === null || _a === void 0 ? void 0 : _a.includes('TooManyRequestsException: Rate Exceeded.')) {
35
- console.log();
36
- console.log('💡 This error indicates that your Lambda concurrency limit is too low. See: https://www.remotion.dev/docs/lambda/troubleshooting/rate-limit');
43
+ logger_1.Log.info();
44
+ logger_1.Log.info('💡 This error indicates that your Lambda concurrency limit is too low. See: https://www.remotion.dev/docs/lambda/troubleshooting/rate-limit');
37
45
  }
38
46
  if (err.message.includes('Error creating WebGL context')) {
39
- console.log();
47
+ logger_1.Log.info();
40
48
  console.warn('💡 You might need to set the OpenGL renderer to "angle-egl", "angle" (or "swangle" if rendering on lambda). Learn why at https://www.remotion.dev/docs/three');
41
49
  console.warn("💡 Check how it's done at https://www.remotion.dev/docs/chromium-flags#--gl");
42
50
  }
43
51
  if (err.message.includes('The bucket does not allow ACLs')) {
44
- console.log();
45
- console.log('💡 Fix for this issue: https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl');
52
+ logger_1.Log.info();
53
+ logger_1.Log.info('💡 Fix for this issue: https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl');
46
54
  }
47
55
  if (err.message.includes('Minified React error #306')) {
48
56
  const componentName = (_b = err.message.match(/<\w+>/)) === null || _b === void 0 ? void 0 : _b[0];
49
- console.log([
57
+ logger_1.Log.info([
50
58
  '💡 This error indicates that the component',
51
59
  componentName ? `(${componentName})` : null,
52
60
  'you are trying to render is not imported correctly.',
53
61
  ]
54
62
  .filter(truthy_1.truthy)
55
63
  .join(' '));
56
- console.log();
57
- console.log(' Check the root file and ensure that the component is not undefined.');
58
- console.log(' Oftentimes, this happens if the component is missing the `export` keyword');
59
- console.log(' or if the component was renamed and the import statement not properly adjusted.');
64
+ logger_1.Log.info();
65
+ logger_1.Log.info(' Check the root file and ensure that the component is not undefined.');
66
+ logger_1.Log.info(' Oftentimes, this happens if the component is missing the `export` keyword');
67
+ logger_1.Log.info(' or if the component was renamed and the import statement not properly adjusted.');
60
68
  }
61
69
  if (err.message.includes('GLIBC_')) {
62
- console.log('💡 Remotion requires at least Libc 2.35.');
63
- console.log('💡 Get help for this issue: https://github.com/remotion-dev/remotion/issues/2439');
70
+ logger_1.Log.info('💡 Remotion requires at least Libc 2.35.');
71
+ logger_1.Log.info('💡 Get help for this issue: https://github.com/remotion-dev/remotion/issues/2439');
64
72
  }
65
73
  if (err.message.includes('EBADF')) {
66
- console.log('💡 This error might be fixed by changing your Node version:');
67
- console.log(' https://github.com/remotion-dev/remotion/issues/2452');
74
+ logger_1.Log.info('💡 This error might be fixed by changing your Node version:');
75
+ logger_1.Log.info(' https://github.com/remotion-dev/remotion/issues/2452');
68
76
  }
69
77
  };
70
78
  exports.printUsefulErrorMessage = printUsefulErrorMessage;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="node" />
2
- import type { ClipRegion } from 'remotion';
2
+ import type { ClipRegion } from 'remotion/no-react';
3
3
  import type { Page } from './browser/BrowserPage';
4
4
  import type { StillImageFormat } from './image-format';
5
- export declare const provideScreenshot: ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, }: {
5
+ export declare const provideScreenshot: ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, timeoutInMilliseconds, }: {
6
6
  page: Page;
7
7
  imageFormat: StillImageFormat;
8
8
  jpegQuality: number | undefined;
@@ -13,4 +13,5 @@ export declare const provideScreenshot: ({ page, imageFormat, options, jpegQuali
13
13
  height: number;
14
14
  width: number;
15
15
  clipRegion: ClipRegion | null;
16
+ timeoutInMilliseconds: number;
16
17
  }) => Promise<Buffer>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.provideScreenshot = void 0;
4
4
  const screenshot_dom_element_1 = require("./screenshot-dom-element");
5
- const provideScreenshot = ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, }) => {
5
+ const provideScreenshot = ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, timeoutInMilliseconds, }) => {
6
6
  return (0, screenshot_dom_element_1.screenshotDOMElement)({
7
7
  page,
8
8
  opts: {
@@ -13,6 +13,7 @@ const provideScreenshot = ({ page, imageFormat, options, jpegQuality, height, wi
13
13
  height,
14
14
  width,
15
15
  clipRegion,
16
+ timeoutInMilliseconds,
16
17
  });
17
18
  };
18
19
  exports.provideScreenshot = provideScreenshot;
@@ -4,8 +4,9 @@ type PuppeteerCatchOptions = {
4
4
  pageFunction: Function;
5
5
  frame: number | null;
6
6
  args: unknown[];
7
+ timeoutInMilliseconds: number;
7
8
  };
8
- export declare function puppeteerEvaluateWithCatchAndTimeout<ReturnType>({ args, frame, page, pageFunction, }: PuppeteerCatchOptions): Promise<{
9
+ export declare function puppeteerEvaluateWithCatchAndTimeout<ReturnType>({ args, frame, page, pageFunction, timeoutInMilliseconds, }: PuppeteerCatchOptions): Promise<{
9
10
  value: ReturnType;
10
11
  size: number;
11
12
  }>;
@@ -25,7 +25,7 @@ function valueFromRemoteObject(remoteObject) {
25
25
  }
26
26
  return remoteObject.value;
27
27
  }
28
- function puppeteerEvaluateWithCatchAndTimeout({ args, frame, page, pageFunction, }) {
28
+ function puppeteerEvaluateWithCatchAndTimeout({ args, frame, page, pageFunction, timeoutInMilliseconds, }) {
29
29
  let timeout = null;
30
30
  return Promise.race([
31
31
  new Promise((_, reject) => {
@@ -34,13 +34,14 @@ function puppeteerEvaluateWithCatchAndTimeout({ args, frame, page, pageFunction,
34
34
  // This means the page is not responding anymore
35
35
  // This error message is retryable - sync it with packages/lambda/src/shared/is-flaky-error.ts
36
36
  `Timed out evaluating page function "${pageFunction.toString()}"`));
37
- }, 5000);
37
+ }, timeoutInMilliseconds);
38
38
  }),
39
39
  puppeteerEvaluateWithCatch({
40
40
  args,
41
41
  frame,
42
42
  page,
43
43
  pageFunction,
44
+ timeoutInMilliseconds,
44
45
  }),
45
46
  ]).then((data) => {
46
47
  if (timeout !== null) {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import type { ClipRegion } from 'remotion';
2
+ import type { ClipRegion } from 'remotion/no-react';
3
3
  import type { Page } from './browser/BrowserPage';
4
4
  import type { StillImageFormat } from './image-format';
5
5
  export declare const screenshot: (options: {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import type { VideoConfig } from 'remotion';
2
+ import type { VideoConfig } from 'remotion/no-react';
3
3
  import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
4
4
  import type { BrowserExecutable } from './browser-executable';
5
5
  import type { BrowserLog } from './browser-log';
@@ -7,7 +7,7 @@ exports.renderFrames = exports.internalRenderFrames = void 0;
7
7
  const node_fs_1 = __importDefault(require("node:fs"));
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
9
  const perf_hooks_1 = require("perf_hooks");
10
- const remotion_1 = require("remotion");
10
+ const no_react_1 = require("remotion/no-react");
11
11
  const download_and_map_assets_to_file_1 = require("./assets/download-and-map-assets-to-file");
12
12
  const browser_1 = require("./browser");
13
13
  const is_target_closed_err_1 = require("./browser/is-target-closed-err");
@@ -109,6 +109,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
109
109
  ],
110
110
  frame: null,
111
111
  page,
112
+ timeoutInMilliseconds,
112
113
  });
113
114
  page.off('console', logCallback);
114
115
  return page;
@@ -196,6 +197,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
196
197
  downloadMap,
197
198
  wantsBuffer: Boolean(onFrameBuffer),
198
199
  compositor,
200
+ timeoutInMilliseconds,
199
201
  });
200
202
  if (onFrameBuffer) {
201
203
  if (!buffer) {
@@ -459,12 +461,12 @@ const renderFrames = (options) => {
459
461
  indent: false,
460
462
  jpegQuality: jpegQuality !== null && jpegQuality !== void 0 ? jpegQuality : jpeg_quality_1.DEFAULT_JPEG_QUALITY,
461
463
  onDownload: onDownload !== null && onDownload !== void 0 ? onDownload : null,
462
- serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
464
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
463
465
  indent: undefined,
464
466
  staticBase: null,
465
467
  data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
466
468
  }).serializedString,
467
- serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
469
+ serializedResolvedPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
468
470
  indent: undefined,
469
471
  staticBase: null,
470
472
  data: composition.props,
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import type { VideoConfig } from 'remotion';
2
+ import type { VideoConfig } from 'remotion/no-react';
3
3
  import { type RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
4
4
  import type { AudioCodec } from './audio-codec';
5
5
  import type { BrowserExecutable } from './browser-executable';
@@ -7,7 +7,7 @@ exports.renderMedia = exports.internalRenderMedia = void 0;
7
7
  const node_fs_1 = __importDefault(require("node:fs"));
8
8
  const node_os_1 = __importDefault(require("node:os"));
9
9
  const node_path_1 = __importDefault(require("node:path"));
10
- const remotion_1 = require("remotion");
10
+ const no_react_1 = require("remotion/no-react");
11
11
  const TimeoutSettings_1 = require("./browser/TimeoutSettings");
12
12
  const can_use_parallel_encoding_1 = require("./can-use-parallel-encoding");
13
13
  const codec_supports_media_1 = require("./codec-supports-media");
@@ -150,6 +150,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
150
150
  wantsImageSequence: false,
151
151
  });
152
152
  const realFrameRange = (0, get_frame_to_render_1.getRealFrameRange)(composition.durationInFrames, frameRange);
153
+ logger_1.Log.verbose({ indent, logLevel, tag: 'renderMedia()' }, `Rendering frames ${realFrameRange.join('-')}`);
153
154
  const callUpdate = () => {
154
155
  const encoded = Math.round(0.8 * encodedFrames + 0.2 * muxedFrames);
155
156
  onProgress === null || onProgress === void 0 ? void 0 : onProgress({
@@ -461,7 +462,7 @@ const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps,
461
462
  ffmpegOverride: ffmpegOverride !== null && ffmpegOverride !== void 0 ? ffmpegOverride : undefined,
462
463
  frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
463
464
  imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat : image_format_1.DEFAULT_VIDEO_IMAGE_FORMAT,
464
- serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
465
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
465
466
  indent: undefined,
466
467
  staticBase: null,
467
468
  data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
@@ -486,7 +487,7 @@ const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps,
486
487
  indent: false,
487
488
  onCtrlCExit: () => undefined,
488
489
  server: undefined,
489
- serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
490
+ serializedResolvedPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
490
491
  indent: undefined,
491
492
  staticBase: null,
492
493
  data: (_b = composition.props) !== null && _b !== void 0 ? _b : {},
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import type { VideoConfig } from 'remotion';
2
+ import type { VideoConfig } from 'remotion/no-react';
3
3
  import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
4
4
  import type { BrowserExecutable } from './browser-executable';
5
5
  import type { BrowserLog } from './browser-log';
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.renderStill = exports.internalRenderStill = void 0;
30
30
  const node_fs_1 = __importStar(require("node:fs"));
31
31
  const node_path_1 = __importDefault(require("node:path"));
32
- const remotion_1 = require("remotion");
32
+ const no_react_1 = require("remotion/no-react");
33
33
  const browser_1 = require("./browser");
34
34
  const TimeoutSettings_1 = require("./browser/TimeoutSettings");
35
35
  const convert_to_positive_frame_index_1 = require("./convert-to-positive-frame-index");
@@ -60,7 +60,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
60
60
  allowFloats: false,
61
61
  });
62
62
  (0, image_format_1.validateStillImageFormat)(imageFormat);
63
- remotion_1.Internals.validateFrame({
63
+ no_react_1.NoReactInternals.validateFrame({
64
64
  frame,
65
65
  durationInFrames: composition.durationInFrames,
66
66
  allowFloats: false,
@@ -174,6 +174,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
174
174
  ],
175
175
  frame: null,
176
176
  page,
177
+ timeoutInMilliseconds,
177
178
  });
178
179
  await (0, seek_to_frame_1.seekToFrame)({
179
180
  frame: stillFrame,
@@ -195,6 +196,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
195
196
  wantsBuffer: !output,
196
197
  compositor,
197
198
  downloadMap,
199
+ timeoutInMilliseconds,
198
200
  });
199
201
  await cleanup();
200
202
  return { buffer: output ? null : buffer };
@@ -270,7 +272,7 @@ const renderStill = (options) => {
270
272
  frame: frame !== null && frame !== void 0 ? frame : 0,
271
273
  imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat : image_format_1.DEFAULT_STILL_IMAGE_FORMAT,
272
274
  indent: false,
273
- serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
275
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
274
276
  staticBase: null,
275
277
  indent: undefined,
276
278
  data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
@@ -287,7 +289,7 @@ const renderStill = (options) => {
287
289
  serveUrl,
288
290
  timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : TimeoutSettings_1.DEFAULT_TIMEOUT,
289
291
  logLevel: verbose || dumpBrowserLogs ? 'verbose' : (0, logger_1.getLogLevel)(),
290
- serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
292
+ serializedResolvedPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
291
293
  indent: undefined,
292
294
  staticBase: null,
293
295
  data: (_b = composition.props) !== null && _b !== void 0 ? _b : {},
@@ -1,8 +1,8 @@
1
1
  /// <reference types="node" />
2
- import type { ClipRegion } from 'remotion';
2
+ import type { ClipRegion } from 'remotion/no-react';
3
3
  import type { Page } from './browser/BrowserPage';
4
4
  import type { StillImageFormat } from './image-format';
5
- export declare const screenshotDOMElement: ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, }: {
5
+ export declare const screenshotDOMElement: ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, timeoutInMilliseconds, }: {
6
6
  page: Page;
7
7
  imageFormat: StillImageFormat;
8
8
  jpegQuality: number | undefined;
@@ -12,4 +12,5 @@ export declare const screenshotDOMElement: ({ page, imageFormat, jpegQuality, op
12
12
  height: number;
13
13
  width: number;
14
14
  clipRegion: ClipRegion | null;
15
+ timeoutInMilliseconds: number;
15
16
  }) => Promise<Buffer>;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.screenshotDOMElement = void 0;
4
4
  const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
5
5
  const puppeteer_screenshot_1 = require("./puppeteer-screenshot");
6
- const screenshotDOMElement = async ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, }) => {
6
+ const screenshotDOMElement = async ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, timeoutInMilliseconds, }) => {
7
7
  const { path } = opts;
8
8
  if (imageFormat === 'png' ||
9
9
  imageFormat === 'pdf' ||
@@ -15,6 +15,7 @@ const screenshotDOMElement = async ({ page, imageFormat, jpegQuality, opts, heig
15
15
  args: [],
16
16
  frame: null,
17
17
  page,
18
+ timeoutInMilliseconds,
18
19
  });
19
20
  }
20
21
  else {
@@ -25,6 +26,7 @@ const screenshotDOMElement = async ({ page, imageFormat, jpegQuality, opts, heig
25
26
  args: [],
26
27
  frame: null,
27
28
  page,
29
+ timeoutInMilliseconds,
28
30
  });
29
31
  }
30
32
  // @ts-expect-error
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import type { ClipRegion } from 'remotion';
2
+ import type { ClipRegion } from 'remotion/no-react';
3
3
  import type { Page } from './browser/BrowserPage';
4
4
  import type { StillImageFormat } from './image-format';
5
5
  export declare const screenshotTask: ({ format, height, omitBackground, page, width, path, jpegQuality, clipRegion, }: {
@@ -16,6 +16,7 @@ const waitForReady = ({ page, timeoutInMilliseconds, frame, indent, logLevel, })
16
16
  args: [],
17
17
  frame: null,
18
18
  page,
19
+ timeoutInMilliseconds,
19
20
  }).then(({ value: val }) => {
20
21
  if (typeof val !== 'string') {
21
22
  reject(val);
@@ -73,6 +74,7 @@ const waitForReady = ({ page, timeoutInMilliseconds, frame, indent, logLevel, })
73
74
  args: [],
74
75
  frame,
75
76
  page,
77
+ timeoutInMilliseconds,
76
78
  })
77
79
  .then((res) => {
78
80
  reject(new Error(`Timeout exceeded rendering the component${frame ? ' at frame ' + frame : ''}. ${res.value ? `Open delayRender() handles: ${res.value}` : ''}`));
@@ -122,6 +124,7 @@ const seekToFrame = async ({ frame, page, composition, timeoutInMilliseconds, lo
122
124
  args: [frame, composition],
123
125
  frame,
124
126
  page,
127
+ timeoutInMilliseconds,
125
128
  });
126
129
  await (0, exports.waitForReady)({ page, timeoutInMilliseconds, frame, indent, logLevel });
127
130
  await page.evaluateHandle('document.fonts.ready');
@@ -1,4 +1,4 @@
1
- import { type VideoConfig } from 'remotion';
1
+ import type { VideoConfig } from 'remotion/no-react';
2
2
  import type { BrowserExecutable } from './browser-executable';
3
3
  import type { BrowserLog } from './browser-log';
4
4
  import type { HeadlessBrowser } from './browser/Browser';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.selectComposition = exports.internalSelectComposition = exports.internalSelectCompositionRaw = void 0;
4
- const remotion_1 = require("remotion");
4
+ const no_react_1 = require("remotion/no-react");
5
5
  const TimeoutSettings_1 = require("./browser/TimeoutSettings");
6
6
  const handle_javascript_exception_1 = require("./error-handling/handle-javascript-exception");
7
7
  const find_closest_package_json_1 = require("./find-closest-package-json");
@@ -47,6 +47,7 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
47
47
  },
48
48
  frame: null,
49
49
  args: [],
50
+ timeoutInMilliseconds,
50
51
  });
51
52
  await (0, seek_to_frame_1.waitForReady)({
52
53
  page,
@@ -68,6 +69,7 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
68
69
  frame: null,
69
70
  page,
70
71
  args: [id],
72
+ timeoutInMilliseconds,
71
73
  });
72
74
  logger_1.Log.verbose({
73
75
  indent,
@@ -83,8 +85,8 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
83
85
  height,
84
86
  fps,
85
87
  durationInFrames,
86
- props: remotion_1.Internals.deserializeJSONWithCustomFields(res.serializedResolvedPropsWithCustomSchema),
87
- defaultProps: remotion_1.Internals.deserializeJSONWithCustomFields(res.serializedDefaultPropsWithCustomSchema),
88
+ props: no_react_1.NoReactInternals.deserializeJSONWithCustomFields(res.serializedResolvedPropsWithCustomSchema),
89
+ defaultProps: no_react_1.NoReactInternals.deserializeJSONWithCustomFields(res.serializedDefaultPropsWithCustomSchema),
88
90
  defaultCodec,
89
91
  },
90
92
  propsSize: size,
@@ -169,7 +171,7 @@ const selectComposition = async (options) => {
169
171
  browserExecutable: browserExecutable !== null && browserExecutable !== void 0 ? browserExecutable : null,
170
172
  chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
171
173
  envVariables: envVariables !== null && envVariables !== void 0 ? envVariables : {},
172
- serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
174
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
173
175
  indent: undefined,
174
176
  staticBase: null,
175
177
  data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
@@ -78,6 +78,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
78
78
  args: [],
79
79
  frame: null,
80
80
  page,
81
+ timeoutInMilliseconds: actualTimeout,
81
82
  });
82
83
  if (typeof isRemotionFn === 'undefined') {
83
84
  const { value: body } = await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
@@ -87,6 +88,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
87
88
  args: [],
88
89
  frame: null,
89
90
  page,
91
+ timeoutInMilliseconds: actualTimeout,
90
92
  });
91
93
  // AWS shakyness
92
94
  if (body.includes('We encountered an internal error.')) {
@@ -108,6 +110,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
108
110
  args: [],
109
111
  frame: null,
110
112
  page,
113
+ timeoutInMilliseconds: actualTimeout,
111
114
  });
112
115
  const { value: remotionVersion } = await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
113
116
  pageFunction: () => {
@@ -116,6 +119,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
116
119
  args: [],
117
120
  frame: null,
118
121
  page,
122
+ timeoutInMilliseconds: actualTimeout,
119
123
  });
120
124
  const requiredVersion = '10';
121
125
  if (siteVersion !== requiredVersion) {
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.stitchFramesToVideo = exports.internalStitchFramesToVideo = void 0;
30
30
  const node_fs_1 = __importStar(require("node:fs"));
31
31
  const node_path_1 = __importDefault(require("node:path"));
32
- const remotion_1 = require("remotion");
32
+ const no_react_1 = require("remotion/no-react");
33
33
  const calculate_asset_positions_1 = require("./assets/calculate-asset-positions");
34
34
  const convert_assets_to_file_urls_1 = require("./assets/convert-assets-to-file-urls");
35
35
  const download_and_map_assets_to_file_1 = require("./assets/download-and-map-assets-to-file");
@@ -202,7 +202,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
202
202
  audioBitrate ? audioBitrate : '320k',
203
203
  force ? '-y' : null,
204
204
  outputLocation !== null && outputLocation !== void 0 ? outputLocation : tempFile,
205
- ].filter(remotion_1.Internals.truthy), indent, logLevel);
205
+ ].filter(no_react_1.NoReactInternals.truthy), indent, logLevel);
206
206
  cancelSignal === null || cancelSignal === void 0 ? void 0 : cancelSignal(() => {
207
207
  ffmpegTask.kill();
208
208
  });
@@ -1,10 +1,10 @@
1
1
  /// <reference types="node" />
2
- import type { TRenderAsset } from 'remotion';
2
+ import type { TRenderAsset } from 'remotion/no-react';
3
3
  import type { DownloadMap } from './assets/download-map';
4
4
  import type { Page } from './browser/BrowserPage';
5
5
  import type { Compositor } from './compositor/compositor';
6
6
  import type { StillImageFormat, VideoImageFormat } from './image-format';
7
- export declare const takeFrameAndCompose: ({ freePage, imageFormat, jpegQuality, frame, width, height, output, scale, downloadMap, wantsBuffer, compositor, }: {
7
+ export declare const takeFrameAndCompose: ({ freePage, imageFormat, jpegQuality, frame, width, height, output, scale, downloadMap, wantsBuffer, compositor, timeoutInMilliseconds, }: {
8
8
  freePage: Page;
9
9
  imageFormat: VideoImageFormat | StillImageFormat;
10
10
  jpegQuality: number | undefined;
@@ -16,6 +16,7 @@ export declare const takeFrameAndCompose: ({ freePage, imageFormat, jpegQuality,
16
16
  downloadMap: DownloadMap;
17
17
  wantsBuffer: boolean;
18
18
  compositor: Compositor;
19
+ timeoutInMilliseconds: number;
19
20
  }) => Promise<{
20
21
  buffer: Buffer | null;
21
22
  collectedAssets: TRenderAsset[];