@remotion/renderer 4.0.72 → 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.
package/dist/client.d.ts CHANGED
@@ -311,7 +311,7 @@ export declare const BrowserSafeApis: {
311
311
  cliFlag: string;
312
312
  docLink: string;
313
313
  name: string;
314
- type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
314
+ type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
315
315
  ssrName: string;
316
316
  description: () => JSX.Element;
317
317
  };
@@ -4,9 +4,6 @@ export declare const createFfmpegComplexFilter: ({ filters, downloadMap, }: {
4
4
  filters: PreprocessedAudioTrack[];
5
5
  downloadMap: DownloadMap;
6
6
  }) => Promise<{
7
- complexFilterFlag: [
8
- string,
9
- string
10
- ] | null;
7
+ complexFilterFlag: [string, string] | null;
11
8
  cleanup: () => void;
12
9
  }>;
@@ -47,6 +47,7 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
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,
@@ -62,6 +63,7 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
62
63
  frame: null,
63
64
  page,
64
65
  args: [],
66
+ timeoutInMilliseconds,
65
67
  });
66
68
  const res = result;
67
69
  return res.map((r) => {
package/dist/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="react" />
3
+ /// <reference types="node" />
1
4
  import execa from 'execa';
2
5
  import { HeadlessBrowser } from './browser/Browser';
3
6
  import { SymbolicateableError } from './error-handling/symbolicateable-error';
@@ -135,8 +138,8 @@ export declare const RenderInternals: {
135
138
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
136
139
  DEFAULT_BROWSER: "chrome";
137
140
  validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
138
- DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
139
- validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
141
+ DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
142
+ validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
140
143
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
141
144
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
142
145
  validateJpegQuality: (q: number | undefined) => void;
@@ -327,8 +330,8 @@ export declare const RenderInternals: {
327
330
  };
328
331
  validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
329
332
  validVideoImageFormats: readonly ["png", "jpeg", "none"];
330
- DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
331
- DEFAULT_VIDEO_IMAGE_FORMAT: "none" | "png" | "jpeg";
333
+ DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
334
+ DEFAULT_VIDEO_IMAGE_FORMAT: "none" | "jpeg" | "png";
332
335
  DEFAULT_JPEG_QUALITY: number;
333
336
  chalk: {
334
337
  enabled: () => boolean;
@@ -427,7 +430,7 @@ export declare const RenderInternals: {
427
430
  frame: number;
428
431
  serializedInputPropsWithCustomSchema: string;
429
432
  serializedResolvedPropsWithCustomSchema: string;
430
- imageFormat: "png" | "jpeg" | "pdf" | "webp";
433
+ imageFormat: "jpeg" | "png" | "webp" | "pdf";
431
434
  jpegQuality: number;
432
435
  puppeteerInstance: HeadlessBrowser | null;
433
436
  envVariables: Record<string, string>;
@@ -518,11 +521,12 @@ export declare const RenderInternals: {
518
521
  validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
519
522
  copyImageToClipboard: (src: string, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
520
523
  isIpV6Supported: (flattened: import("os").NetworkInterfaceInfo[]) => boolean;
521
- getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, }: {
524
+ getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, timeoutInMilliseconds, }: {
522
525
  browserExecutable: import("./browser-executable").BrowserExecutable;
523
526
  indent: boolean;
524
527
  logLevel: "verbose" | "info" | "warn" | "error";
525
528
  chromiumOptions: import("./open-browser").ChromiumOptions;
529
+ timeoutInMilliseconds: number;
526
530
  }) => Promise<{
527
531
  feature: string;
528
532
  status: string;
@@ -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,
@@ -4,7 +4,7 @@ export declare const glOption: {
4
4
  cliFlag: string;
5
5
  docLink: string;
6
6
  name: string;
7
- type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
7
+ type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
8
8
  ssrName: string;
9
9
  description: () => JSX.Element;
10
10
  };
@@ -116,7 +116,7 @@ export declare const allOptions: {
116
116
  cliFlag: string;
117
117
  docLink: string;
118
118
  name: string;
119
- type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
119
+ type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
120
120
  ssrName: string;
121
121
  description: () => JSX.Element;
122
122
  };
@@ -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,7 +1,8 @@
1
+ /// <reference types="node" />
1
2
  import type { ClipRegion } from 'remotion/no-react';
2
3
  import type { Page } from './browser/BrowserPage';
3
4
  import type { StillImageFormat } from './image-format';
4
- export declare const provideScreenshot: ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, }: {
5
+ export declare const provideScreenshot: ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, timeoutInMilliseconds, }: {
5
6
  page: Page;
6
7
  imageFormat: StillImageFormat;
7
8
  jpegQuality: number | undefined;
@@ -12,4 +13,5 @@ export declare const provideScreenshot: ({ page, imageFormat, options, jpegQuali
12
13
  height: number;
13
14
  width: number;
14
15
  clipRegion: ClipRegion | null;
16
+ timeoutInMilliseconds: number;
15
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,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { ClipRegion } from 'remotion/no-react';
2
3
  import type { Page } from './browser/BrowserPage';
3
4
  import type { StillImageFormat } from './image-format';
@@ -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) {
@@ -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({
@@ -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 };
@@ -1,7 +1,8 @@
1
+ /// <reference types="node" />
1
2
  import type { ClipRegion } from 'remotion/no-react';
2
3
  import type { Page } from './browser/BrowserPage';
3
4
  import type { StillImageFormat } from './image-format';
4
- export declare const screenshotDOMElement: ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, }: {
5
+ export declare const screenshotDOMElement: ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, timeoutInMilliseconds, }: {
5
6
  page: Page;
6
7
  imageFormat: StillImageFormat;
7
8
  jpegQuality: number | undefined;
@@ -11,4 +12,5 @@ export declare const screenshotDOMElement: ({ page, imageFormat, jpegQuality, op
11
12
  height: number;
12
13
  width: number;
13
14
  clipRegion: ClipRegion | null;
15
+ timeoutInMilliseconds: number;
14
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,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { ClipRegion } from 'remotion/no-react';
2
3
  import type { Page } from './browser/BrowserPage';
3
4
  import type { StillImageFormat } from './image-format';
@@ -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');
@@ -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,
@@ -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) {
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
2
3
  import type { RenderAssetInfo } from './assets/download-map';
3
4
  import type { AudioCodec } from './audio-codec';
@@ -1,9 +1,10 @@
1
+ /// <reference types="node" />
1
2
  import type { TRenderAsset } from 'remotion/no-react';
2
3
  import type { DownloadMap } from './assets/download-map';
3
4
  import type { Page } from './browser/BrowserPage';
4
5
  import type { Compositor } from './compositor/compositor';
5
6
  import type { StillImageFormat, VideoImageFormat } from './image-format';
6
- 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, }: {
7
8
  freePage: Page;
8
9
  imageFormat: VideoImageFormat | StillImageFormat;
9
10
  jpegQuality: number | undefined;
@@ -15,6 +16,7 @@ export declare const takeFrameAndCompose: ({ freePage, imageFormat, jpegQuality,
15
16
  downloadMap: DownloadMap;
16
17
  wantsBuffer: boolean;
17
18
  compositor: Compositor;
19
+ timeoutInMilliseconds: number;
18
20
  }) => Promise<{
19
21
  buffer: Buffer | null;
20
22
  collectedAssets: TRenderAsset[];
@@ -10,7 +10,7 @@ const compose_1 = require("./compositor/compose");
10
10
  const provide_screenshot_1 = require("./provide-screenshot");
11
11
  const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
12
12
  const truthy_1 = require("./truthy");
13
- const takeFrameAndCompose = async ({ freePage, imageFormat, jpegQuality, frame, width, height, output, scale, downloadMap, wantsBuffer, compositor, }) => {
13
+ const takeFrameAndCompose = async ({ freePage, imageFormat, jpegQuality, frame, width, height, output, scale, downloadMap, wantsBuffer, compositor, timeoutInMilliseconds, }) => {
14
14
  var _a;
15
15
  const [{ value: clipRegion }, { value: collectedAssets }] = await Promise.all([
16
16
  (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
@@ -23,6 +23,7 @@ const takeFrameAndCompose = async ({ freePage, imageFormat, jpegQuality, frame,
23
23
  args: [],
24
24
  frame,
25
25
  page: freePage,
26
+ timeoutInMilliseconds,
26
27
  }),
27
28
  (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
28
29
  pageFunction: () => {
@@ -31,6 +32,7 @@ const takeFrameAndCompose = async ({ freePage, imageFormat, jpegQuality, frame,
31
32
  args: [],
32
33
  frame,
33
34
  page: freePage,
35
+ timeoutInMilliseconds,
34
36
  }),
35
37
  ]);
36
38
  if (imageFormat === 'none') {
@@ -56,6 +58,7 @@ const takeFrameAndCompose = async ({ freePage, imageFormat, jpegQuality, frame,
56
58
  height,
57
59
  width,
58
60
  clipRegion,
61
+ timeoutInMilliseconds,
59
62
  });
60
63
  if (shouldMakeBuffer) {
61
64
  return { buffer: buf, collectedAssets };
@@ -5,10 +5,11 @@ type Item = {
5
5
  feature: string;
6
6
  status: string;
7
7
  };
8
- export declare const getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, }: {
8
+ export declare const getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, timeoutInMilliseconds, }: {
9
9
  browserExecutable: BrowserExecutable;
10
10
  indent: boolean;
11
11
  logLevel: LogLevel;
12
12
  chromiumOptions: ChromiumOptions;
13
+ timeoutInMilliseconds: number;
13
14
  }) => Promise<Item[]>;
14
15
  export {};
package/dist/test-gpu.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getChromiumGpuInformation = void 0;
4
4
  const get_browser_instance_1 = require("./get-browser-instance");
5
5
  const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
6
- const getChromiumGpuInformation = async ({ browserExecutable, indent, logLevel, chromiumOptions, }) => {
6
+ const getChromiumGpuInformation = async ({ browserExecutable, indent, logLevel, chromiumOptions, timeoutInMilliseconds, }) => {
7
7
  const { page, cleanup } = await (0, get_browser_instance_1.getPageAndCleanupFn)({
8
8
  passedInInstance: undefined,
9
9
  browserExecutable,
@@ -32,6 +32,7 @@ const getChromiumGpuInformation = async ({ browserExecutable, indent, logLevel,
32
32
  frame: null,
33
33
  args: [],
34
34
  page,
35
+ timeoutInMilliseconds,
35
36
  });
36
37
  cleanup();
37
38
  return value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.72",
3
+ "version": "4.0.73",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "extract-zip": "2.0.1",
19
19
  "source-map": "^0.8.0-beta.0",
20
20
  "ws": "8.7.0",
21
- "remotion": "4.0.72"
21
+ "remotion": "4.0.73"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=16.8.0",
@@ -40,13 +40,13 @@
40
40
  "vitest": "0.31.1"
41
41
  },
42
42
  "optionalDependencies": {
43
- "@remotion/compositor-darwin-arm64": "4.0.72",
44
- "@remotion/compositor-linux-arm64-gnu": "4.0.72",
45
- "@remotion/compositor-linux-arm64-musl": "4.0.72",
46
- "@remotion/compositor-darwin-x64": "4.0.72",
47
- "@remotion/compositor-linux-x64-gnu": "4.0.72",
48
- "@remotion/compositor-linux-x64-musl": "4.0.72",
49
- "@remotion/compositor-win32-x64-msvc": "4.0.72"
43
+ "@remotion/compositor-darwin-x64": "4.0.73",
44
+ "@remotion/compositor-darwin-arm64": "4.0.73",
45
+ "@remotion/compositor-linux-arm64-gnu": "4.0.73",
46
+ "@remotion/compositor-linux-x64-gnu": "4.0.73",
47
+ "@remotion/compositor-linux-arm64-musl": "4.0.73",
48
+ "@remotion/compositor-linux-x64-musl": "4.0.73",
49
+ "@remotion/compositor-win32-x64-msvc": "4.0.73"
50
50
  },
51
51
  "keywords": [
52
52
  "remotion",