@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.
- package/dist/assets/calculate-asset-positions.d.ts +1 -1
- package/dist/assets/convert-assets-to-file-urls.d.ts +1 -1
- package/dist/assets/download-and-map-assets-to-file.d.ts +1 -1
- package/dist/assets/download-and-map-assets-to-file.js +2 -2
- package/dist/assets/download-map.d.ts +1 -1
- package/dist/assets/types.d.ts +1 -1
- package/dist/browser/BrowserPage.d.ts +0 -15
- package/dist/browser/BrowserPage.js +16 -16
- package/dist/client.d.ts +37 -37
- package/dist/compress-assets.d.ts +1 -1
- package/dist/delay-render-embedded-stack.js +3 -3
- package/dist/error-handling/handle-javascript-exception.js +2 -2
- package/dist/get-bundle-url-from-serve-url.js +3 -3
- package/dist/get-compositions.d.ts +1 -1
- package/dist/get-compositions.js +6 -4
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/index.d.ts +28 -27
- package/dist/offthread-video-server.js +5 -2
- package/dist/open-browser.js +4 -2
- package/dist/options/color-space.d.ts +1 -1
- package/dist/options/index.d.ts +1 -1
- package/dist/prepare-server.js +2 -2
- package/dist/print-useful-error-message.js +32 -24
- package/dist/provide-screenshot.d.ts +3 -2
- package/dist/provide-screenshot.js +2 -1
- package/dist/puppeteer-evaluate.d.ts +2 -1
- package/dist/puppeteer-evaluate.js +3 -2
- package/dist/puppeteer-screenshot.d.ts +1 -1
- package/dist/render-frames.d.ts +1 -1
- package/dist/render-frames.js +5 -3
- package/dist/render-media.d.ts +1 -1
- package/dist/render-media.js +4 -3
- package/dist/render-still.d.ts +1 -1
- package/dist/render-still.js +6 -4
- package/dist/screenshot-dom-element.d.ts +3 -2
- package/dist/screenshot-dom-element.js +3 -1
- package/dist/screenshot-task.d.ts +1 -1
- package/dist/seek-to-frame.js +3 -0
- package/dist/select-composition.d.ts +1 -1
- package/dist/select-composition.js +6 -4
- package/dist/set-props-and-env.js +4 -0
- package/dist/stitch-frames-to-video.js +2 -2
- package/dist/take-frame-and-compose.d.ts +3 -2
- package/dist/take-frame-and-compose.js +4 -1
- package/dist/test-gpu.d.ts +2 -1
- package/dist/test-gpu.js +2 -1
- package/dist/validate-output-filename.d.ts +1 -1
- package/dist/validate.d.ts +4 -4
- package/dist/validate.js +4 -4
- package/package.json +9 -9
|
@@ -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
|
|
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,
|
|
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 = {
|
package/dist/assets/types.d.ts
CHANGED
|
@@ -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
|
-
|
|
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(
|
|
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" | "
|
|
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" | "
|
|
7
|
-
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
8
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
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
|
-
|
|
29
|
+
aac: {
|
|
30
30
|
possible: import("./file-extensions").FileExtension[];
|
|
31
31
|
default: import("./file-extensions").FileExtension;
|
|
32
32
|
};
|
|
33
|
-
|
|
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
|
-
|
|
59
|
+
opus: {
|
|
60
60
|
possible: import("./file-extensions").FileExtension[];
|
|
61
61
|
default: import("./file-extensions").FileExtension;
|
|
62
62
|
};
|
|
63
|
-
|
|
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
|
-
|
|
72
|
+
opus: {
|
|
73
73
|
possible: import("./file-extensions").FileExtension[];
|
|
74
74
|
default: import("./file-extensions").FileExtension;
|
|
75
75
|
};
|
|
76
|
-
|
|
76
|
+
"pcm-16": {
|
|
77
77
|
possible: import("./file-extensions").FileExtension[];
|
|
78
78
|
default: import("./file-extensions").FileExtension;
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
prores: {
|
|
83
83
|
default: import("./file-extensions").FileExtension;
|
|
84
84
|
forAudioCodec: {
|
|
85
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: "
|
|
151
|
-
lossless: "
|
|
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: "
|
|
159
|
-
lossless: "
|
|
158
|
+
compressed: "opus" | "pcm-16" | null;
|
|
159
|
+
lossless: "opus" | "pcm-16" | null;
|
|
160
160
|
};
|
|
161
161
|
vp9: {
|
|
162
|
-
compressed: "
|
|
163
|
-
lossless: "
|
|
162
|
+
compressed: "opus" | "pcm-16" | null;
|
|
163
|
+
lossless: "opus" | "pcm-16" | null;
|
|
164
164
|
};
|
|
165
|
-
|
|
166
|
-
compressed: "
|
|
167
|
-
lossless: "
|
|
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" | "
|
|
191
|
-
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
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: "
|
|
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: "
|
|
284
|
+
type: "bt709" | "default";
|
|
285
285
|
};
|
|
286
286
|
deleteAfterOption: {
|
|
287
287
|
name: string;
|
|
@@ -407,6 +407,6 @@ export declare const BrowserSafeApis: {
|
|
|
407
407
|
type: number | null;
|
|
408
408
|
}];
|
|
409
409
|
};
|
|
410
|
-
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
411
|
-
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
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;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parseDelayRenderEmbeddedStack = void 0;
|
|
4
|
-
const
|
|
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(
|
|
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 +
|
|
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
|
|
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(
|
|
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
|
|
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,
|
|
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,
|
|
28
|
+
return map(serveUrl, no_react_1.NoReactInternals.bundleMapName);
|
|
29
29
|
};
|
|
30
30
|
exports.getBundleMapUrlFromServeUrl = getBundleMapUrlFromServeUrl;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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';
|
package/dist/get-compositions.js
CHANGED
|
@@ -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
|
|
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 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) => {
|
|
@@ -72,8 +74,8 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
|
|
|
72
74
|
height,
|
|
73
75
|
fps,
|
|
74
76
|
durationInFrames,
|
|
75
|
-
props:
|
|
76
|
-
defaultProps:
|
|
77
|
+
props: no_react_1.NoReactInternals.deserializeJSONWithCustomFields(r.serializedResolvedPropsWithCustomSchema),
|
|
78
|
+
defaultProps: no_react_1.NoReactInternals.deserializeJSONWithCustomFields(r.serializedDefaultPropsWithCustomSchema),
|
|
77
79
|
defaultCodec,
|
|
78
80
|
};
|
|
79
81
|
});
|
|
@@ -147,7 +149,7 @@ const getCompositions = (serveUrlOrWebpackUrl, config) => {
|
|
|
147
149
|
browserExecutable: browserExecutable !== null && browserExecutable !== void 0 ? browserExecutable : null,
|
|
148
150
|
chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
|
|
149
151
|
envVariables: envVariables !== null && envVariables !== void 0 ? envVariables : {},
|
|
150
|
-
serializedInputPropsWithCustomSchema:
|
|
152
|
+
serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
|
|
151
153
|
data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
|
|
152
154
|
indent: undefined,
|
|
153
155
|
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" | "
|
|
5
|
-
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
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
|
@@ -67,10 +67,10 @@ export declare const RenderInternals: {
|
|
|
67
67
|
width: number;
|
|
68
68
|
height: number;
|
|
69
69
|
scale: number;
|
|
70
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
70
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
71
71
|
wantsImageSequence: boolean;
|
|
72
72
|
}) => void;
|
|
73
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
73
|
+
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
74
|
tmpDir: (str: string) => string;
|
|
75
75
|
deleteDirectory: (directory: string) => void;
|
|
76
76
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -127,7 +127,7 @@ export declare const RenderInternals: {
|
|
|
127
127
|
};
|
|
128
128
|
registerErrorSymbolicationLock: () => number;
|
|
129
129
|
unlockErrorSymbolicationLock: (id: number) => void;
|
|
130
|
-
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
130
|
+
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
|
|
131
131
|
mimeContentType: typeof mimeContentType;
|
|
132
132
|
mimeLookup: typeof mimeLookup;
|
|
133
133
|
validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
|
|
@@ -144,8 +144,8 @@ export declare const RenderInternals: {
|
|
|
144
144
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
145
145
|
validateJpegQuality: (q: number | undefined) => void;
|
|
146
146
|
DEFAULT_TIMEOUT: number;
|
|
147
|
-
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "
|
|
148
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
147
|
+
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
148
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null | undefined) => boolean;
|
|
149
149
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
150
150
|
isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
|
|
151
151
|
isValidLogLevel: (level: string) => boolean;
|
|
@@ -162,10 +162,10 @@ export declare const RenderInternals: {
|
|
|
162
162
|
output: string;
|
|
163
163
|
onProgress: (p: number) => void;
|
|
164
164
|
numberOfFrames: number;
|
|
165
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
165
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
166
166
|
fps: number;
|
|
167
167
|
numberOfGifLoops: number | null;
|
|
168
|
-
audioCodec: "
|
|
168
|
+
audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
169
169
|
audioBitrate: string | null;
|
|
170
170
|
indent: boolean;
|
|
171
171
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
@@ -173,19 +173,19 @@ export declare const RenderInternals: {
|
|
|
173
173
|
getMinConcurrency: () => number;
|
|
174
174
|
getMaxConcurrency: () => number;
|
|
175
175
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
176
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
176
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
177
177
|
preferLossless: boolean;
|
|
178
|
-
}) => "
|
|
178
|
+
}) => "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
179
179
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
180
180
|
defaultFileExtensionMap: {
|
|
181
181
|
h264: {
|
|
182
182
|
default: import("./file-extensions").FileExtension;
|
|
183
183
|
forAudioCodec: {
|
|
184
|
-
|
|
184
|
+
aac: {
|
|
185
185
|
possible: import("./file-extensions").FileExtension[];
|
|
186
186
|
default: import("./file-extensions").FileExtension;
|
|
187
187
|
};
|
|
188
|
-
|
|
188
|
+
mp3: {
|
|
189
189
|
possible: import("./file-extensions").FileExtension[];
|
|
190
190
|
default: import("./file-extensions").FileExtension;
|
|
191
191
|
};
|
|
@@ -211,11 +211,11 @@ export declare const RenderInternals: {
|
|
|
211
211
|
vp8: {
|
|
212
212
|
default: import("./file-extensions").FileExtension;
|
|
213
213
|
forAudioCodec: {
|
|
214
|
-
|
|
214
|
+
opus: {
|
|
215
215
|
possible: import("./file-extensions").FileExtension[];
|
|
216
216
|
default: import("./file-extensions").FileExtension;
|
|
217
217
|
};
|
|
218
|
-
|
|
218
|
+
"pcm-16": {
|
|
219
219
|
possible: import("./file-extensions").FileExtension[];
|
|
220
220
|
default: import("./file-extensions").FileExtension;
|
|
221
221
|
};
|
|
@@ -224,20 +224,20 @@ export declare const RenderInternals: {
|
|
|
224
224
|
vp9: {
|
|
225
225
|
default: import("./file-extensions").FileExtension;
|
|
226
226
|
forAudioCodec: {
|
|
227
|
-
|
|
227
|
+
opus: {
|
|
228
228
|
possible: import("./file-extensions").FileExtension[];
|
|
229
229
|
default: import("./file-extensions").FileExtension;
|
|
230
230
|
};
|
|
231
|
-
|
|
231
|
+
"pcm-16": {
|
|
232
232
|
possible: import("./file-extensions").FileExtension[];
|
|
233
233
|
default: import("./file-extensions").FileExtension;
|
|
234
234
|
};
|
|
235
235
|
};
|
|
236
236
|
};
|
|
237
|
-
|
|
237
|
+
prores: {
|
|
238
238
|
default: import("./file-extensions").FileExtension;
|
|
239
239
|
forAudioCodec: {
|
|
240
|
-
|
|
240
|
+
aac: {
|
|
241
241
|
possible: import("./file-extensions").FileExtension[];
|
|
242
242
|
default: import("./file-extensions").FileExtension;
|
|
243
243
|
};
|
|
@@ -260,22 +260,22 @@ export declare const RenderInternals: {
|
|
|
260
260
|
};
|
|
261
261
|
};
|
|
262
262
|
};
|
|
263
|
-
|
|
263
|
+
mp3: {
|
|
264
264
|
default: import("./file-extensions").FileExtension;
|
|
265
265
|
forAudioCodec: {
|
|
266
|
+
mp3: {
|
|
267
|
+
possible: import("./file-extensions").FileExtension[];
|
|
268
|
+
default: import("./file-extensions").FileExtension;
|
|
269
|
+
};
|
|
266
270
|
"pcm-16": {
|
|
267
271
|
possible: import("./file-extensions").FileExtension[];
|
|
268
272
|
default: import("./file-extensions").FileExtension;
|
|
269
273
|
};
|
|
270
274
|
};
|
|
271
275
|
};
|
|
272
|
-
|
|
276
|
+
wav: {
|
|
273
277
|
default: import("./file-extensions").FileExtension;
|
|
274
278
|
forAudioCodec: {
|
|
275
|
-
aac: {
|
|
276
|
-
possible: import("./file-extensions").FileExtension[];
|
|
277
|
-
default: import("./file-extensions").FileExtension;
|
|
278
|
-
};
|
|
279
279
|
"pcm-16": {
|
|
280
280
|
possible: import("./file-extensions").FileExtension[];
|
|
281
281
|
default: import("./file-extensions").FileExtension;
|
|
@@ -312,8 +312,8 @@ export declare const RenderInternals: {
|
|
|
312
312
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
313
313
|
readonly wav: readonly ["pcm-16"];
|
|
314
314
|
};
|
|
315
|
-
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
316
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
315
|
+
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif")[]>;
|
|
316
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
|
|
317
317
|
getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd", indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => string;
|
|
318
318
|
callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], indent: boolean, logLevel: "verbose" | "info" | "warn" | "error", options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
|
|
319
319
|
dynamicLibraryPathOptions: (indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => {
|
|
@@ -331,7 +331,7 @@ export declare const RenderInternals: {
|
|
|
331
331
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
332
332
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
333
333
|
DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
|
|
334
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
334
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "none" | "jpeg" | "png";
|
|
335
335
|
DEFAULT_JPEG_QUALITY: number;
|
|
336
336
|
chalk: {
|
|
337
337
|
enabled: () => boolean;
|
|
@@ -521,11 +521,12 @@ export declare const RenderInternals: {
|
|
|
521
521
|
validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
522
522
|
copyImageToClipboard: (src: string, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
|
|
523
523
|
isIpV6Supported: (flattened: import("os").NetworkInterfaceInfo[]) => boolean;
|
|
524
|
-
getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, }: {
|
|
524
|
+
getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, timeoutInMilliseconds, }: {
|
|
525
525
|
browserExecutable: import("./browser-executable").BrowserExecutable;
|
|
526
526
|
indent: boolean;
|
|
527
527
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
528
528
|
chromiumOptions: import("./open-browser").ChromiumOptions;
|
|
529
|
+
timeoutInMilliseconds: number;
|
|
529
530
|
}) => Promise<{
|
|
530
531
|
feature: string;
|
|
531
532
|
status: string;
|