@remotion/renderer 4.0.71 → 4.0.72

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 (42) 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 +38 -38
  10. package/dist/compress-assets.d.ts +1 -1
  11. package/dist/create-ffmpeg-complex-filter.d.ts +4 -1
  12. package/dist/delay-render-embedded-stack.js +3 -3
  13. package/dist/error-handling/handle-javascript-exception.js +2 -2
  14. package/dist/get-bundle-url-from-serve-url.js +3 -3
  15. package/dist/get-compositions.d.ts +1 -1
  16. package/dist/get-compositions.js +4 -4
  17. package/dist/get-extension-from-codec.d.ts +2 -2
  18. package/dist/index.d.ts +30 -33
  19. package/dist/offthread-video-server.js +5 -2
  20. package/dist/options/color-space.d.ts +1 -1
  21. package/dist/options/gl.d.ts +1 -1
  22. package/dist/options/index.d.ts +2 -2
  23. package/dist/prepare-server.js +2 -2
  24. package/dist/provide-screenshot.d.ts +1 -2
  25. package/dist/puppeteer-screenshot.d.ts +1 -2
  26. package/dist/render-frames.d.ts +1 -1
  27. package/dist/render-frames.js +3 -3
  28. package/dist/render-media.d.ts +1 -1
  29. package/dist/render-media.js +3 -3
  30. package/dist/render-still.d.ts +1 -1
  31. package/dist/render-still.js +4 -4
  32. package/dist/screenshot-dom-element.d.ts +1 -2
  33. package/dist/screenshot-task.d.ts +1 -2
  34. package/dist/select-composition.d.ts +1 -1
  35. package/dist/select-composition.js +4 -4
  36. package/dist/stitch-frames-to-video.d.ts +0 -1
  37. package/dist/stitch-frames-to-video.js +2 -2
  38. package/dist/take-frame-and-compose.d.ts +1 -2
  39. package/dist/validate-output-filename.d.ts +1 -1
  40. package/dist/validate.d.ts +4 -4
  41. package/dist/validate.js +4 -4
  42. package/package.json +9 -9
@@ -1,3 +1,3 @@
1
- import type { TRenderAsset } from 'remotion';
1
+ import type { TRenderAsset } from 'remotion/no-react';
2
2
  import type { Assets } from './types';
3
3
  export declare const calculateAssetPositions: (frames: TRenderAsset[][]) => Assets;
@@ -1,4 +1,4 @@
1
- import type { TRenderAsset } from 'remotion';
1
+ import type { TRenderAsset } from 'remotion/no-react';
2
2
  import type { LogLevel } from '../log-level';
3
3
  import type { RenderMediaOnDownload } from './download-and-map-assets-to-file';
4
4
  import type { DownloadMap } from './download-map';
@@ -1,4 +1,4 @@
1
- import type { TRenderAsset } from 'remotion';
1
+ import type { TRenderAsset } from 'remotion/no-react';
2
2
  import type { LogLevel } from '../log-level';
3
3
  import type { DownloadMap } from './download-map';
4
4
  export type RenderMediaOnDownload = (src: string) => ((progress: {
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.attachDownloadListenerToEmitter = exports.downloadAndMapAssetsToFileUrl = exports.getSanitizedFilenameForAssetUrl = exports.markAllAssetsAsDownloaded = exports.downloadAsset = void 0;
30
30
  const node_fs_1 = __importDefault(require("node:fs"));
31
31
  const node_path_1 = __importStar(require("node:path"));
32
- const remotion_1 = require("remotion");
32
+ const no_react_1 = require("remotion/no-react");
33
33
  const compress_assets_1 = require("../compress-assets");
34
34
  const ensure_output_directory_1 = require("../ensure-output-directory");
35
35
  const mime_types_1 = require("../mime-types");
@@ -238,7 +238,7 @@ const getSanitizedFilenameForAssetUrl = ({ src, downloadDir, contentDisposition,
238
238
  const fileExtension = split.length > 1 && split[split.length - 1]
239
239
  ? `.${split[split.length - 1]}`
240
240
  : '';
241
- const hashedFileName = String((0, remotion_1.random)(`${pathname}${search}`)).replace('0.', '');
241
+ const hashedFileName = String((0, no_react_1.random)(`${pathname}${search}`)).replace('0.', '');
242
242
  const filename = hashedFileName + fileExtension;
243
243
  return node_path_1.default.join(downloadDir, (0, sanitize_filepath_1.sanitizeFilePath)(filename));
244
244
  };
@@ -1,4 +1,4 @@
1
- import type { TRenderAsset } from 'remotion';
1
+ import type { TRenderAsset } from 'remotion/no-react';
2
2
  import { OffthreadVideoServerEmitter } from '../offthread-video-server';
3
3
  import type { RenderMediaOnDownload } from './download-and-map-assets-to-file';
4
4
  export type AudioChannelsAndDurationResultCache = {
@@ -1,4 +1,4 @@
1
- import type { TRenderAsset } from 'remotion';
1
+ import type { TRenderAsset } from 'remotion/no-react';
2
2
  export type UnsafeAsset = Omit<TRenderAsset, 'frame' | 'id' | 'volume' | 'mediaFrame'> & {
3
3
  startInVideo: number;
4
4
  duration: number | null;
@@ -1,18 +1,3 @@
1
- /**
2
- * Copyright 2017 Google Inc. All rights reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
1
  import type { LogLevel } from '../log-level';
17
2
  import type { HeadlessBrowser } from './Browser';
18
3
  import type { CDPSession } from './Connection';
@@ -1,4 +1,18 @@
1
1
  "use strict";
2
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
4
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
5
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
6
+ };
7
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8
+ if (kind === "m") throw new TypeError("Private method is not writable");
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
11
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12
+ };
13
+ var _Page_instances, _Page_client, _Page_target, _Page_timeoutSettings, _Page_frameManager, _Page_pageBindings, _Page_initialize, _Page_onTargetCrashed, _Page_onLogEntryAdded, _Page_onConsoleAPI, _Page_onBindingCalled, _Page_addConsoleMessage;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.Page = void 0;
2
16
  /**
3
17
  * Copyright 2017 Google Inc. All rights reserved.
4
18
  *
@@ -14,21 +28,7 @@
14
28
  * See the License for the specific language governing permissions and
15
29
  * limitations under the License.
16
30
  */
17
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
18
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
19
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
20
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
21
- };
22
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
23
- if (kind === "m") throw new TypeError("Private method is not writable");
24
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
25
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
26
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
27
- };
28
- var _Page_instances, _Page_client, _Page_target, _Page_timeoutSettings, _Page_frameManager, _Page_pageBindings, _Page_initialize, _Page_onTargetCrashed, _Page_onLogEntryAdded, _Page_onConsoleAPI, _Page_onBindingCalled, _Page_addConsoleMessage;
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.Page = void 0;
31
- const remotion_1 = require("remotion");
31
+ const no_react_1 = require("remotion/no-react");
32
32
  const format_logs_1 = require("../format-logs");
33
33
  const logger_1 = require("../logger");
34
34
  const truthy_1 = require("../truthy");
@@ -117,7 +117,7 @@ class Page extends EventEmitter_1.EventEmitter {
117
117
  if (shouldHideWarning(log)) {
118
118
  return;
119
119
  }
120
- if ((url === null || url === void 0 ? void 0 : url.endsWith(remotion_1.Internals.bundleName)) &&
120
+ if ((url === null || url === void 0 ? void 0 : url.endsWith(no_react_1.NoReactInternals.bundleName)) &&
121
121
  lineNumber &&
122
122
  this.sourceMapGetter()) {
123
123
  const origPosition = (_a = this.sourceMapGetter()) === null || _a === void 0 ? void 0 : _a.originalPositionFor({
package/dist/client.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  export declare const BrowserSafeApis: {
3
- 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;
4
4
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
5
5
  validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
6
- getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number;
7
- getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
8
- 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;
9
9
  proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
10
10
  x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
11
11
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
@@ -26,11 +26,11 @@ export declare const BrowserSafeApis: {
26
26
  h264: {
27
27
  default: import("./file-extensions").FileExtension;
28
28
  forAudioCodec: {
29
- mp3: {
29
+ aac: {
30
30
  possible: import("./file-extensions").FileExtension[];
31
31
  default: import("./file-extensions").FileExtension;
32
32
  };
33
- aac: {
33
+ mp3: {
34
34
  possible: import("./file-extensions").FileExtension[];
35
35
  default: import("./file-extensions").FileExtension;
36
36
  };
@@ -56,11 +56,11 @@ export declare const BrowserSafeApis: {
56
56
  vp8: {
57
57
  default: import("./file-extensions").FileExtension;
58
58
  forAudioCodec: {
59
- "pcm-16": {
59
+ opus: {
60
60
  possible: import("./file-extensions").FileExtension[];
61
61
  default: import("./file-extensions").FileExtension;
62
62
  };
63
- opus: {
63
+ "pcm-16": {
64
64
  possible: import("./file-extensions").FileExtension[];
65
65
  default: import("./file-extensions").FileExtension;
66
66
  };
@@ -69,20 +69,20 @@ export declare const BrowserSafeApis: {
69
69
  vp9: {
70
70
  default: import("./file-extensions").FileExtension;
71
71
  forAudioCodec: {
72
- "pcm-16": {
72
+ opus: {
73
73
  possible: import("./file-extensions").FileExtension[];
74
74
  default: import("./file-extensions").FileExtension;
75
75
  };
76
- opus: {
76
+ "pcm-16": {
77
77
  possible: import("./file-extensions").FileExtension[];
78
78
  default: import("./file-extensions").FileExtension;
79
79
  };
80
80
  };
81
81
  };
82
- mp3: {
82
+ prores: {
83
83
  default: import("./file-extensions").FileExtension;
84
84
  forAudioCodec: {
85
- mp3: {
85
+ aac: {
86
86
  possible: import("./file-extensions").FileExtension[];
87
87
  default: import("./file-extensions").FileExtension;
88
88
  };
@@ -105,22 +105,22 @@ export declare const BrowserSafeApis: {
105
105
  };
106
106
  };
107
107
  };
108
- wav: {
108
+ mp3: {
109
109
  default: import("./file-extensions").FileExtension;
110
110
  forAudioCodec: {
111
+ mp3: {
112
+ possible: import("./file-extensions").FileExtension[];
113
+ default: import("./file-extensions").FileExtension;
114
+ };
111
115
  "pcm-16": {
112
116
  possible: import("./file-extensions").FileExtension[];
113
117
  default: import("./file-extensions").FileExtension;
114
118
  };
115
119
  };
116
120
  };
117
- prores: {
121
+ wav: {
118
122
  default: import("./file-extensions").FileExtension;
119
123
  forAudioCodec: {
120
- aac: {
121
- possible: import("./file-extensions").FileExtension[];
122
- default: import("./file-extensions").FileExtension;
123
- };
124
124
  "pcm-16": {
125
125
  possible: import("./file-extensions").FileExtension[];
126
126
  default: import("./file-extensions").FileExtension;
@@ -147,37 +147,37 @@ export declare const BrowserSafeApis: {
147
147
  };
148
148
  defaultAudioCodecs: {
149
149
  h264: {
150
- compressed: "mp3" | "aac" | "pcm-16" | null;
151
- lossless: "mp3" | "aac" | "pcm-16" | null;
150
+ compressed: "aac" | "mp3" | "pcm-16" | null;
151
+ lossless: "aac" | "mp3" | "pcm-16" | null;
152
152
  };
153
153
  h265: {
154
154
  compressed: "aac" | "pcm-16" | null;
155
155
  lossless: "aac" | "pcm-16" | null;
156
156
  };
157
157
  vp8: {
158
- compressed: "pcm-16" | "opus" | null;
159
- lossless: "pcm-16" | "opus" | null;
158
+ compressed: "opus" | "pcm-16" | null;
159
+ lossless: "opus" | "pcm-16" | null;
160
160
  };
161
161
  vp9: {
162
- compressed: "pcm-16" | "opus" | null;
163
- lossless: "pcm-16" | "opus" | null;
162
+ compressed: "opus" | "pcm-16" | null;
163
+ lossless: "opus" | "pcm-16" | null;
164
164
  };
165
- mp3: {
166
- compressed: "mp3" | "pcm-16" | null;
167
- lossless: "mp3" | "pcm-16" | null;
165
+ prores: {
166
+ compressed: "aac" | "pcm-16" | null;
167
+ lossless: "aac" | "pcm-16" | null;
168
168
  };
169
169
  aac: {
170
170
  compressed: "aac" | "pcm-16" | null;
171
171
  lossless: "aac" | "pcm-16" | null;
172
172
  };
173
+ mp3: {
174
+ compressed: "mp3" | "pcm-16" | null;
175
+ lossless: "mp3" | "pcm-16" | null;
176
+ };
173
177
  wav: {
174
178
  compressed: "pcm-16" | null;
175
179
  lossless: "pcm-16" | null;
176
180
  };
177
- prores: {
178
- compressed: "aac" | "pcm-16" | null;
179
- lossless: "aac" | "pcm-16" | null;
180
- };
181
181
  "h264-mkv": {
182
182
  compressed: "mp3" | "pcm-16" | null;
183
183
  lossless: "mp3" | "pcm-16" | null;
@@ -187,10 +187,10 @@ export declare const BrowserSafeApis: {
187
187
  lossless: null;
188
188
  };
189
189
  };
190
- defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
191
- validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
190
+ defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
191
+ validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
192
192
  codec: T_1;
193
- audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
193
+ audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
194
194
  extension: string;
195
195
  preferLossless: boolean;
196
196
  }) => void;
@@ -281,7 +281,7 @@ export declare const BrowserSafeApis: {
281
281
  description: () => JSX.Element;
282
282
  docLink: string;
283
283
  ssrName: string;
284
- type: "default" | "bt709";
284
+ type: "bt709" | "default";
285
285
  };
286
286
  deleteAfterOption: {
287
287
  name: string;
@@ -311,7 +311,7 @@ export declare const BrowserSafeApis: {
311
311
  cliFlag: string;
312
312
  docLink: string;
313
313
  name: string;
314
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
314
+ type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
315
315
  ssrName: string;
316
316
  description: () => JSX.Element;
317
317
  };
@@ -407,6 +407,6 @@ export declare const BrowserSafeApis: {
407
407
  type: number | null;
408
408
  }];
409
409
  };
410
- codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
411
- codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
410
+ codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
411
+ codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
412
412
  };
@@ -2,6 +2,6 @@
2
2
  * Since audio or video can be base64-encoded, those can be really long strings.
3
3
  * Since we track the `src` property for every frame, Node.JS can run out of memory easily. Instead of duplicating the src for every frame, we save memory by replacing the full base 64 encoded data with a string `same-as-[asset-id]-[frame]` referencing a previous asset with the same src.
4
4
  */
5
- import type { TRenderAsset } from 'remotion';
5
+ import type { TRenderAsset } from 'remotion/no-react';
6
6
  export declare const compressAsset: (previousRenderAssets: TRenderAsset[], newRenderAsset: TRenderAsset) => TRenderAsset;
7
7
  export declare const isAssetCompressed: (src: string) => boolean;
@@ -4,6 +4,9 @@ export declare const createFfmpegComplexFilter: ({ filters, downloadMap, }: {
4
4
  filters: PreprocessedAudioTrack[];
5
5
  downloadMap: DownloadMap;
6
6
  }) => Promise<{
7
- complexFilterFlag: [string, string] | null;
7
+ complexFilterFlag: [
8
+ string,
9
+ string
10
+ ] | null;
8
11
  cleanup: () => void;
9
12
  }>;
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parseDelayRenderEmbeddedStack = void 0;
4
- const remotion_1 = require("remotion");
4
+ const no_react_1 = require("remotion/no-react");
5
5
  const parse_browser_error_stack_1 = require("./parse-browser-error-stack");
6
6
  const parseDelayRenderEmbeddedStack = (message) => {
7
- const index = message.indexOf(remotion_1.Internals.DELAY_RENDER_CALLSTACK_TOKEN);
7
+ const index = message.indexOf(no_react_1.NoReactInternals.DELAY_RENDER_CALLSTACK_TOKEN);
8
8
  if (index === -1) {
9
9
  return null;
10
10
  }
11
11
  const msg = message
12
- .substring(index + remotion_1.Internals.DELAY_RENDER_CALLSTACK_TOKEN.length)
12
+ .substring(index + no_react_1.NoReactInternals.DELAY_RENDER_CALLSTACK_TOKEN.length)
13
13
  .trim();
14
14
  const parsed = (0, parse_browser_error_stack_1.parseStack)(msg.split('\n'));
15
15
  return parsed;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.handleJavascriptException = exports.ErrorWithStackFrame = void 0;
4
- const remotion_1 = require("remotion");
4
+ const no_react_1 = require("remotion/no-react");
5
5
  const symbolicateable_error_1 = require("./symbolicateable-error");
6
6
  class ErrorWithStackFrame extends Error {
7
7
  constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, stack, }) {
@@ -31,7 +31,7 @@ const cleanUpErrorMessage = (exception) => {
31
31
  return split.slice(0, Math.max(1, split.length - frames)).join('\n');
32
32
  };
33
33
  const removeDelayRenderStack = (message) => {
34
- const index = message.indexOf(remotion_1.Internals.DELAY_RENDER_CALLSTACK_TOKEN);
34
+ const index = message.indexOf(no_react_1.NoReactInternals.DELAY_RENDER_CALLSTACK_TOKEN);
35
35
  if (index === -1) {
36
36
  return message;
37
37
  }
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getBundleMapUrlFromServeUrl = exports.getBundleUrlFromServeUrl = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
- const remotion_1 = require("remotion");
8
+ const no_react_1 = require("remotion/no-react");
9
9
  const is_serve_url_1 = require("./is-serve-url");
10
10
  const map = (webpackBundleOrServeUrl, suffix) => {
11
11
  if ((0, is_serve_url_1.isServeUrl)(webpackBundleOrServeUrl)) {
@@ -21,10 +21,10 @@ const map = (webpackBundleOrServeUrl, suffix) => {
21
21
  return url;
22
22
  };
23
23
  const getBundleUrlFromServeUrl = (serveUrl) => {
24
- return map(serveUrl, remotion_1.Internals.bundleName);
24
+ return map(serveUrl, no_react_1.NoReactInternals.bundleName);
25
25
  };
26
26
  exports.getBundleUrlFromServeUrl = getBundleUrlFromServeUrl;
27
27
  const getBundleMapUrlFromServeUrl = (serveUrl) => {
28
- return map(serveUrl, remotion_1.Internals.bundleMapName);
28
+ return map(serveUrl, no_react_1.NoReactInternals.bundleMapName);
29
29
  };
30
30
  exports.getBundleMapUrlFromServeUrl = getBundleMapUrlFromServeUrl;
@@ -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.getCompositions = exports.internalGetCompositions = 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");
@@ -72,8 +72,8 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
72
72
  height,
73
73
  fps,
74
74
  durationInFrames,
75
- props: remotion_1.Internals.deserializeJSONWithCustomFields(r.serializedResolvedPropsWithCustomSchema),
76
- defaultProps: remotion_1.Internals.deserializeJSONWithCustomFields(r.serializedDefaultPropsWithCustomSchema),
75
+ props: no_react_1.NoReactInternals.deserializeJSONWithCustomFields(r.serializedResolvedPropsWithCustomSchema),
76
+ defaultProps: no_react_1.NoReactInternals.deserializeJSONWithCustomFields(r.serializedDefaultPropsWithCustomSchema),
77
77
  defaultCodec,
78
78
  };
79
79
  });
@@ -147,7 +147,7 @@ const getCompositions = (serveUrlOrWebpackUrl, config) => {
147
147
  browserExecutable: browserExecutable !== null && browserExecutable !== void 0 ? browserExecutable : null,
148
148
  chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
149
149
  envVariables: envVariables !== null && envVariables !== void 0 ? envVariables : {},
150
- serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
150
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
151
151
  data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
152
152
  indent: undefined,
153
153
  staticBase: null,
@@ -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>;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="react" />
3
- /// <reference types="node" />
4
1
  import execa from 'execa';
5
2
  import { HeadlessBrowser } from './browser/Browser';
6
3
  import { SymbolicateableError } from './error-handling/symbolicateable-error';
@@ -67,10 +64,10 @@ export declare const RenderInternals: {
67
64
  width: number;
68
65
  height: number;
69
66
  scale: number;
70
- codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
67
+ codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
71
68
  wantsImageSequence: boolean;
72
69
  }) => void;
73
- 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;
70
+ 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;
74
71
  tmpDir: (str: string) => string;
75
72
  deleteDirectory: (directory: string) => void;
76
73
  isServeUrl: (potentialUrl: string) => boolean;
@@ -127,7 +124,7 @@ export declare const RenderInternals: {
127
124
  };
128
125
  registerErrorSymbolicationLock: () => number;
129
126
  unlockErrorSymbolicationLock: (id: number) => void;
130
- canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
127
+ canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
131
128
  mimeContentType: typeof mimeContentType;
132
129
  mimeLookup: typeof mimeLookup;
133
130
  validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
@@ -138,14 +135,14 @@ export declare const RenderInternals: {
138
135
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
139
136
  DEFAULT_BROWSER: "chrome";
140
137
  validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
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;
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;
143
140
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
144
141
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
145
142
  validateJpegQuality: (q: number | undefined) => void;
146
143
  DEFAULT_TIMEOUT: number;
147
- DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
148
- isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | undefined) => boolean;
144
+ DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
145
+ isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null | undefined) => boolean;
149
146
  logLevels: readonly ["verbose", "info", "warn", "error"];
150
147
  isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
151
148
  isValidLogLevel: (level: string) => boolean;
@@ -162,10 +159,10 @@ export declare const RenderInternals: {
162
159
  output: string;
163
160
  onProgress: (p: number) => void;
164
161
  numberOfFrames: number;
165
- codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
162
+ codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
166
163
  fps: number;
167
164
  numberOfGifLoops: number | null;
168
- audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
165
+ audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
169
166
  audioBitrate: string | null;
170
167
  indent: boolean;
171
168
  logLevel: "verbose" | "info" | "warn" | "error";
@@ -173,19 +170,19 @@ export declare const RenderInternals: {
173
170
  getMinConcurrency: () => number;
174
171
  getMaxConcurrency: () => number;
175
172
  getDefaultAudioCodec: ({ codec, preferLossless, }: {
176
- codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
173
+ codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
177
174
  preferLossless: boolean;
178
- }) => "mp3" | "aac" | "pcm-16" | "opus" | null;
175
+ }) => "opus" | "aac" | "mp3" | "pcm-16" | null;
179
176
  validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
180
177
  defaultFileExtensionMap: {
181
178
  h264: {
182
179
  default: import("./file-extensions").FileExtension;
183
180
  forAudioCodec: {
184
- mp3: {
181
+ aac: {
185
182
  possible: import("./file-extensions").FileExtension[];
186
183
  default: import("./file-extensions").FileExtension;
187
184
  };
188
- aac: {
185
+ mp3: {
189
186
  possible: import("./file-extensions").FileExtension[];
190
187
  default: import("./file-extensions").FileExtension;
191
188
  };
@@ -211,11 +208,11 @@ export declare const RenderInternals: {
211
208
  vp8: {
212
209
  default: import("./file-extensions").FileExtension;
213
210
  forAudioCodec: {
214
- "pcm-16": {
211
+ opus: {
215
212
  possible: import("./file-extensions").FileExtension[];
216
213
  default: import("./file-extensions").FileExtension;
217
214
  };
218
- opus: {
215
+ "pcm-16": {
219
216
  possible: import("./file-extensions").FileExtension[];
220
217
  default: import("./file-extensions").FileExtension;
221
218
  };
@@ -224,20 +221,20 @@ export declare const RenderInternals: {
224
221
  vp9: {
225
222
  default: import("./file-extensions").FileExtension;
226
223
  forAudioCodec: {
227
- "pcm-16": {
224
+ opus: {
228
225
  possible: import("./file-extensions").FileExtension[];
229
226
  default: import("./file-extensions").FileExtension;
230
227
  };
231
- opus: {
228
+ "pcm-16": {
232
229
  possible: import("./file-extensions").FileExtension[];
233
230
  default: import("./file-extensions").FileExtension;
234
231
  };
235
232
  };
236
233
  };
237
- mp3: {
234
+ prores: {
238
235
  default: import("./file-extensions").FileExtension;
239
236
  forAudioCodec: {
240
- mp3: {
237
+ aac: {
241
238
  possible: import("./file-extensions").FileExtension[];
242
239
  default: import("./file-extensions").FileExtension;
243
240
  };
@@ -260,22 +257,22 @@ export declare const RenderInternals: {
260
257
  };
261
258
  };
262
259
  };
263
- wav: {
260
+ mp3: {
264
261
  default: import("./file-extensions").FileExtension;
265
262
  forAudioCodec: {
263
+ mp3: {
264
+ possible: import("./file-extensions").FileExtension[];
265
+ default: import("./file-extensions").FileExtension;
266
+ };
266
267
  "pcm-16": {
267
268
  possible: import("./file-extensions").FileExtension[];
268
269
  default: import("./file-extensions").FileExtension;
269
270
  };
270
271
  };
271
272
  };
272
- prores: {
273
+ wav: {
273
274
  default: import("./file-extensions").FileExtension;
274
275
  forAudioCodec: {
275
- aac: {
276
- possible: import("./file-extensions").FileExtension[];
277
- default: import("./file-extensions").FileExtension;
278
- };
279
276
  "pcm-16": {
280
277
  possible: import("./file-extensions").FileExtension[];
281
278
  default: import("./file-extensions").FileExtension;
@@ -312,8 +309,8 @@ export declare const RenderInternals: {
312
309
  readonly vp9: readonly ["opus", "pcm-16"];
313
310
  readonly wav: readonly ["pcm-16"];
314
311
  };
315
- makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
316
- defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
312
+ makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif")[]>;
313
+ defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
317
314
  getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd", indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => string;
318
315
  callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], indent: boolean, logLevel: "verbose" | "info" | "warn" | "error", options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
319
316
  dynamicLibraryPathOptions: (indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => {
@@ -330,8 +327,8 @@ export declare const RenderInternals: {
330
327
  };
331
328
  validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
332
329
  validVideoImageFormats: readonly ["png", "jpeg", "none"];
333
- DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
334
- DEFAULT_VIDEO_IMAGE_FORMAT: "jpeg" | "png" | "none";
330
+ DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
331
+ DEFAULT_VIDEO_IMAGE_FORMAT: "none" | "png" | "jpeg";
335
332
  DEFAULT_JPEG_QUALITY: number;
336
333
  chalk: {
337
334
  enabled: () => boolean;
@@ -430,7 +427,7 @@ export declare const RenderInternals: {
430
427
  frame: number;
431
428
  serializedInputPropsWithCustomSchema: string;
432
429
  serializedResolvedPropsWithCustomSchema: string;
433
- imageFormat: "jpeg" | "png" | "webp" | "pdf";
430
+ imageFormat: "png" | "jpeg" | "pdf" | "webp";
434
431
  jpegQuality: number;
435
432
  puppeteerInstance: HeadlessBrowser | null;
436
433
  envVariables: Record<string, string>;
@@ -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
  }
@@ -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;
@@ -4,7 +4,7 @@ export declare const glOption: {
4
4
  cliFlag: string;
5
5
  docLink: string;
6
6
  name: string;
7
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
7
+ type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
8
8
  ssrName: string;
9
9
  description: () => JSX.Element;
10
10
  };
@@ -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;
@@ -116,7 +116,7 @@ export declare const allOptions: {
116
116
  cliFlag: string;
117
117
  docLink: string;
118
118
  name: string;
119
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
119
+ type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
120
120
  ssrName: string;
121
121
  description: () => JSX.Element;
122
122
  };
@@ -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,5 +1,4 @@
1
- /// <reference types="node" />
2
- import type { ClipRegion } from 'remotion';
1
+ import type { ClipRegion } from 'remotion/no-react';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
5
4
  export declare const provideScreenshot: ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, }: {
@@ -1,5 +1,4 @@
1
- /// <reference types="node" />
2
- import type { ClipRegion } from 'remotion';
1
+ import type { ClipRegion } from 'remotion/no-react';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
5
4
  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");
@@ -459,12 +459,12 @@ const renderFrames = (options) => {
459
459
  indent: false,
460
460
  jpegQuality: jpegQuality !== null && jpegQuality !== void 0 ? jpegQuality : jpeg_quality_1.DEFAULT_JPEG_QUALITY,
461
461
  onDownload: onDownload !== null && onDownload !== void 0 ? onDownload : null,
462
- serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
462
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
463
463
  indent: undefined,
464
464
  staticBase: null,
465
465
  data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
466
466
  }).serializedString,
467
- serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
467
+ serializedResolvedPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
468
468
  indent: undefined,
469
469
  staticBase: null,
470
470
  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");
@@ -461,7 +461,7 @@ const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps,
461
461
  ffmpegOverride: ffmpegOverride !== null && ffmpegOverride !== void 0 ? ffmpegOverride : undefined,
462
462
  frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
463
463
  imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat : image_format_1.DEFAULT_VIDEO_IMAGE_FORMAT,
464
- serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
464
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
465
465
  indent: undefined,
466
466
  staticBase: null,
467
467
  data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
@@ -486,7 +486,7 @@ const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps,
486
486
  indent: false,
487
487
  onCtrlCExit: () => undefined,
488
488
  server: undefined,
489
- serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
489
+ serializedResolvedPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
490
490
  indent: undefined,
491
491
  staticBase: null,
492
492
  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,
@@ -270,7 +270,7 @@ const renderStill = (options) => {
270
270
  frame: frame !== null && frame !== void 0 ? frame : 0,
271
271
  imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat : image_format_1.DEFAULT_STILL_IMAGE_FORMAT,
272
272
  indent: false,
273
- serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
273
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
274
274
  staticBase: null,
275
275
  indent: undefined,
276
276
  data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
@@ -287,7 +287,7 @@ const renderStill = (options) => {
287
287
  serveUrl,
288
288
  timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : TimeoutSettings_1.DEFAULT_TIMEOUT,
289
289
  logLevel: verbose || dumpBrowserLogs ? 'verbose' : (0, logger_1.getLogLevel)(),
290
- serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
290
+ serializedResolvedPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
291
291
  indent: undefined,
292
292
  staticBase: null,
293
293
  data: (_b = composition.props) !== null && _b !== void 0 ? _b : {},
@@ -1,5 +1,4 @@
1
- /// <reference types="node" />
2
- import type { ClipRegion } from 'remotion';
1
+ import type { ClipRegion } from 'remotion/no-react';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
5
4
  export declare const screenshotDOMElement: ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, }: {
@@ -1,5 +1,4 @@
1
- /// <reference types="node" />
2
- import type { ClipRegion } from 'remotion';
1
+ import type { ClipRegion } from 'remotion/no-react';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
5
4
  export declare const screenshotTask: ({ format, height, omitBackground, page, width, path, jpegQuality, clipRegion, }: {
@@ -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");
@@ -83,8 +83,8 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
83
83
  height,
84
84
  fps,
85
85
  durationInFrames,
86
- props: remotion_1.Internals.deserializeJSONWithCustomFields(res.serializedResolvedPropsWithCustomSchema),
87
- defaultProps: remotion_1.Internals.deserializeJSONWithCustomFields(res.serializedDefaultPropsWithCustomSchema),
86
+ props: no_react_1.NoReactInternals.deserializeJSONWithCustomFields(res.serializedResolvedPropsWithCustomSchema),
87
+ defaultProps: no_react_1.NoReactInternals.deserializeJSONWithCustomFields(res.serializedDefaultPropsWithCustomSchema),
88
88
  defaultCodec,
89
89
  },
90
90
  propsSize: size,
@@ -169,7 +169,7 @@ const selectComposition = async (options) => {
169
169
  browserExecutable: browserExecutable !== null && browserExecutable !== void 0 ? browserExecutable : null,
170
170
  chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
171
171
  envVariables: envVariables !== null && envVariables !== void 0 ? envVariables : {},
172
- serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
172
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
173
173
  indent: undefined,
174
174
  staticBase: null,
175
175
  data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
3
2
  import type { RenderAssetInfo } from './assets/download-map';
4
3
  import type { AudioCodec } from './audio-codec';
@@ -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,5 +1,4 @@
1
- /// <reference types="node" />
2
- import type { TRenderAsset } from 'remotion';
1
+ import type { TRenderAsset } from 'remotion/no-react';
3
2
  import type { DownloadMap } from './assets/download-map';
4
3
  import type { Page } from './browser/BrowserPage';
5
4
  import type { Compositor } from './compositor/compositor';
@@ -1,5 +1,5 @@
1
1
  import type { AudioCodec } from './audio-codec';
2
- export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
2
+ export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
3
3
  codec: T;
4
4
  audioCodec: AudioCodec | null;
5
5
  extension: string;
@@ -1,4 +1,4 @@
1
- import { Internals } from 'remotion';
2
- export declare const validateFps: typeof Internals.validateFps;
3
- export declare const validateDimension: typeof Internals.validateDimension;
4
- export declare const validateDurationInFrames: typeof Internals.validateDurationInFrames;
1
+ import { NoReactInternals } from 'remotion/no-react';
2
+ export declare const validateFps: typeof NoReactInternals.validateFps;
3
+ export declare const validateDimension: typeof NoReactInternals.validateDimension;
4
+ export declare const validateDurationInFrames: typeof NoReactInternals.validateDurationInFrames;
package/dist/validate.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateDurationInFrames = exports.validateDimension = exports.validateFps = void 0;
4
4
  /* eslint-disable prefer-destructuring */
5
- const remotion_1 = require("remotion");
6
- exports.validateFps = remotion_1.Internals.validateFps;
7
- exports.validateDimension = remotion_1.Internals.validateDimension;
8
- exports.validateDurationInFrames = remotion_1.Internals.validateDurationInFrames;
5
+ const no_react_1 = require("remotion/no-react");
6
+ exports.validateFps = no_react_1.NoReactInternals.validateFps;
7
+ exports.validateDimension = no_react_1.NoReactInternals.validateDimension;
8
+ exports.validateDurationInFrames = no_react_1.NoReactInternals.validateDurationInFrames;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.71",
3
+ "version": "4.0.72",
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.71"
21
+ "remotion": "4.0.72"
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.71",
44
- "@remotion/compositor-darwin-x64": "4.0.71",
45
- "@remotion/compositor-linux-arm64-gnu": "4.0.71",
46
- "@remotion/compositor-linux-arm64-musl": "4.0.71",
47
- "@remotion/compositor-linux-x64-musl": "4.0.71",
48
- "@remotion/compositor-win32-x64-msvc": "4.0.71",
49
- "@remotion/compositor-linux-x64-gnu": "4.0.71"
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"
50
50
  },
51
51
  "keywords": [
52
52
  "remotion",