@remotion/renderer 4.0.538 → 4.0.540
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/download-and-map-assets-to-file.js +16 -3
- package/dist/assets/download-file.js +9 -2
- package/dist/assets/download-map.d.ts +1 -1
- package/dist/assets/read-file.d.ts +1 -1
- package/dist/assets/read-file.js +7 -7
- package/dist/browser/BrowserFetcher.js +4 -1
- package/dist/browser/BrowserPage.js +27 -8
- package/dist/browser/NetworkManager.js +6 -1
- package/dist/browser/devtools-commands.d.ts +6 -1
- package/dist/browser/get-chrome-download-url.d.ts +1 -1
- package/dist/browser/get-chrome-download-url.js +4 -1
- package/dist/check-version-requirements.js +6 -6
- package/dist/client.d.ts +459 -238
- package/dist/esm/client.mjs +372 -314
- package/dist/esm/index.mjs +393 -349
- package/dist/get-compositions.js +6 -3
- package/dist/index.d.ts +113 -41
- package/dist/index.js +4 -2
- package/dist/make-page.d.ts +3 -1
- package/dist/make-page.js +2 -1
- package/dist/merge-audio-track.d.ts +1 -1
- package/dist/merge-audio-track.js +24 -23
- package/dist/options/allow-html-in-canvas.d.ts +1 -1
- package/dist/options/api-key.d.ts +1 -1
- package/dist/options/ask-ai.d.ts +1 -1
- package/dist/options/ask-ai.js +1 -1
- package/dist/options/audio-bitrate.d.ts +1 -1
- package/dist/options/beep-on-finish.d.ts +1 -1
- package/dist/options/benchmark-concurrencies.d.ts +1 -1
- package/dist/options/binaries-directory.d.ts +1 -1
- package/dist/options/browser-executable.d.ts +1 -1
- package/dist/options/browser-executable.js +1 -1
- package/dist/options/browser.d.ts +1 -1
- package/dist/options/bundle-cache.d.ts +1 -1
- package/dist/options/canvas-tabs.d.ts +1 -1
- package/dist/options/chrome-mode.d.ts +1 -1
- package/dist/options/color-space.d.ts +1 -1
- package/dist/options/concurrency.d.ts +1 -1
- package/dist/options/config.d.ts +1 -1
- package/dist/options/crf.d.ts +1 -1
- package/dist/options/crf.js +1 -1
- package/dist/options/cross-site-isolation.d.ts +1 -1
- package/dist/options/cross-site-isolation.js +2 -2
- package/dist/options/dark-mode.d.ts +1 -1
- package/dist/options/default-coding-agent.d.ts +1 -1
- package/dist/options/default-editor.d.ts +1 -1
- package/dist/options/default-premount-in-seconds.d.ts +1 -1
- package/dist/options/delete-after.d.ts +1 -1
- package/dist/options/disable-git-source.d.ts +2 -2
- package/dist/options/disable-shared-memory-capture.d.ts +1 -1
- package/dist/options/disable-web-security.d.ts +1 -1
- package/dist/options/disallow-parallel-encoding.d.ts +1 -1
- package/dist/options/enable-cancellation.d.ts +1 -1
- package/dist/options/enable-lambda-insights.d.ts +1 -1
- package/dist/options/enable-lambda-insights.js +2 -2
- package/dist/options/enable-multiprocess-on-linux.d.ts +1 -1
- package/dist/options/enable-multiprocess-on-linux.js +2 -2
- package/dist/options/encoding-buffer-size.d.ts +1 -1
- package/dist/options/encoding-max-rate.d.ts +1 -1
- package/dist/options/enforce-audio.d.ts +1 -1
- package/dist/options/env-file.d.ts +1 -1
- package/dist/options/every-nth-frame.d.ts +1 -1
- package/dist/options/experimental-keep-audio-context-alive.d.ts +1 -1
- package/dist/options/folder-expiry.d.ts +1 -1
- package/dist/options/folder-expiry.js +1 -1
- package/dist/options/for-seamless-aac-concatenation.d.ts +1 -1
- package/dist/options/force-new-studio.d.ts +1 -1
- package/dist/options/frames.d.ts +1 -1
- package/dist/options/gl.d.ts +1 -1
- package/dist/options/gop-size.d.ts +1 -1
- package/dist/options/headless.d.ts +1 -1
- package/dist/options/ignore-certificate-errors.d.ts +1 -1
- package/dist/options/image-sequence-pattern.d.ts +1 -1
- package/dist/options/image-sequence.d.ts +1 -1
- package/dist/options/index.d.ts +119 -102
- package/dist/options/index.js +2 -0
- package/dist/options/interactivity.d.ts +1 -1
- package/dist/options/ipv4.d.ts +1 -1
- package/dist/options/is-production.d.ts +1 -1
- package/dist/options/is-production.js +1 -1
- package/dist/options/jpeg-quality.d.ts +1 -1
- package/dist/options/keyboard-shortcuts.d.ts +1 -1
- package/dist/options/latency-hint.d.ts +1 -1
- package/dist/options/license-key.d.ts +1 -1
- package/dist/options/license-key.js +1 -1
- package/dist/options/log-level.d.ts +1 -1
- package/dist/options/metadata.d.ts +1 -1
- package/dist/options/mute.d.ts +1 -1
- package/dist/options/no-open.d.ts +1 -1
- package/dist/options/number-of-gif-loops.d.ts +1 -1
- package/dist/options/number-of-shared-audio-tags.d.ts +1 -1
- package/dist/options/offthreadvideo-cache-size.d.ts +1 -1
- package/dist/options/offthreadvideo-threads.d.ts +1 -1
- package/dist/options/on-browser-download.d.ts +1 -1
- package/dist/options/options-map.d.ts +340 -136
- package/dist/options/options-map.js +13 -0
- package/dist/options/out-dir.d.ts +1 -1
- package/dist/options/override-duration.d.ts +1 -1
- package/dist/options/override-fps.d.ts +1 -1
- package/dist/options/override-height.d.ts +1 -1
- package/dist/options/override-width.d.ts +1 -1
- package/dist/options/overwrite.d.ts +1 -1
- package/dist/options/package-manager.d.ts +1 -1
- package/dist/options/pixel-format.d.ts +1 -1
- package/dist/options/port.d.ts +1 -1
- package/dist/options/prefer-lossless.d.ts +1 -1
- package/dist/options/preferred-effect-backend.d.ts +18 -0
- package/dist/options/preferred-effect-backend.js +28 -0
- package/dist/options/preserve-pitch-on-playback.d.ts +1 -1
- package/dist/options/preview-sample-rate.d.ts +1 -1
- package/dist/options/props.d.ts +1 -1
- package/dist/options/prores-profile.d.ts +1 -1
- package/dist/options/public-dir.d.ts +1 -1
- package/dist/options/public-license-key.d.ts +1 -1
- package/dist/options/public-path.d.ts +1 -1
- package/dist/options/repro.d.ts +1 -1
- package/dist/options/rspack.d.ts +1 -1
- package/dist/options/runs.d.ts +1 -1
- package/dist/options/sample-rate.d.ts +1 -1
- package/dist/options/scale.d.ts +1 -1
- package/dist/options/sequence-activity-limit.d.ts +1 -1
- package/dist/options/show-layer-frame-numbers.d.ts +1 -1
- package/dist/options/show-premounting.d.ts +1 -1
- package/dist/options/skip-skills.d.ts +1 -1
- package/dist/options/still-frame.d.ts +1 -1
- package/dist/options/still-image-format.d.ts +1 -1
- package/dist/options/throw-if-site-exists.d.ts +2 -2
- package/dist/options/timeout.d.ts +1 -1
- package/dist/options/user-agent.d.ts +1 -1
- package/dist/options/version-flag.d.ts +1 -1
- package/dist/options/video-bitrate.d.ts +1 -1
- package/dist/options/video-cache-size.d.ts +1 -1
- package/dist/options/video-codec.d.ts +1 -1
- package/dist/options/video-image-format.d.ts +1 -1
- package/dist/options/webhook-custom-data.d.ts +1 -1
- package/dist/options/webpack-poll.d.ts +1 -1
- package/dist/options/x264-preset.d.ts +1 -1
- package/dist/render-frames.js +6 -3
- package/dist/render-media.d.ts +1 -1
- package/dist/render-media.js +4 -2
- package/dist/render-still.js +6 -2
- package/dist/select-composition.js +6 -3
- package/dist/serve-handler/range-parser.js +1 -1
- package/dist/serve-static.js +4 -1
- package/dist/set-props-and-env.d.ts +2 -0
- package/dist/set-props-and-env.js +8 -3
- package/dist/stringify-ffmpeg-filter.js +6 -2
- package/dist/symbolicate-stacktrace.js +1 -1
- package/dist/validate-selected-frames.d.ts +4 -4
- package/dist/validate-selected-frames.js +2 -31
- package/package.json +15 -15
|
@@ -57,8 +57,12 @@ const waitForAssetToBeDownloaded = ({ src, downloadDir, downloadMap, }) => {
|
|
|
57
57
|
if (!downloadMap.listeners[src][downloadDir]) {
|
|
58
58
|
downloadMap.listeners[src][downloadDir] = [];
|
|
59
59
|
}
|
|
60
|
-
return new Promise((resolve) => {
|
|
61
|
-
downloadMap.listeners[src][downloadDir].push(() => {
|
|
60
|
+
return new Promise((resolve, reject) => {
|
|
61
|
+
downloadMap.listeners[src][downloadDir].push((err) => {
|
|
62
|
+
if (err) {
|
|
63
|
+
reject(err);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
62
66
|
const srcMap = downloadMap.hasBeenDownloadedMap[src];
|
|
63
67
|
if (!(srcMap === null || srcMap === void 0 ? void 0 : srcMap[downloadDir])) {
|
|
64
68
|
throw new Error('Expected file for ' + src + 'to be available in ' + downloadDir);
|
|
@@ -82,7 +86,7 @@ const notifyAssetIsDownloaded = ({ src, downloadDir, to, downloadMap, }) => {
|
|
|
82
86
|
downloadMap.hasBeenDownloadedMap[src] = {};
|
|
83
87
|
}
|
|
84
88
|
downloadMap.hasBeenDownloadedMap[src][downloadDir] = to;
|
|
85
|
-
downloadMap.listeners[src][downloadDir].forEach((fn) => fn());
|
|
89
|
+
downloadMap.listeners[src][downloadDir].forEach((fn) => fn(null));
|
|
86
90
|
};
|
|
87
91
|
const validateMimeType = (mimeType, src) => {
|
|
88
92
|
if (!mimeType.includes('/')) {
|
|
@@ -189,6 +193,15 @@ const downloadAsset = async ({ src, downloadMap, indent, logLevel, shouldAnalyze
|
|
|
189
193
|
indent,
|
|
190
194
|
logLevel,
|
|
191
195
|
abortSignal: downloadMap.cleanupController.signal,
|
|
196
|
+
}).catch((err) => {
|
|
197
|
+
var _a, _b, _c;
|
|
198
|
+
var _d;
|
|
199
|
+
// https://github.com/remotion-dev/remotion/issues/12817
|
|
200
|
+
(_a = downloadMap.isDownloadingMap[src]) === null || _a === void 0 ? true : delete _a[downloadDir];
|
|
201
|
+
const listeners = (_d = (_b = downloadMap.listeners[src]) === null || _b === void 0 ? void 0 : _b[downloadDir]) !== null && _d !== void 0 ? _d : [];
|
|
202
|
+
(_c = downloadMap.listeners[src]) === null || _c === void 0 ? true : delete _c[downloadDir];
|
|
203
|
+
listeners.forEach((fn) => fn(err));
|
|
204
|
+
throw err;
|
|
192
205
|
});
|
|
193
206
|
notifyAssetIsDownloaded({ src, downloadMap, downloadDir, to });
|
|
194
207
|
if (shouldAnalyzeAudioImmediately) {
|
|
@@ -38,23 +38,30 @@ const downloadFileWithoutRetries = ({ onProgress, url, to: toFn, abortSignal, })
|
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
40
|
rejectAndFlag(new Error(`Tried to download file ${url}, ${noDataSentToken} 20 seconds`));
|
|
41
|
+
closeConnection();
|
|
41
42
|
}, 20000);
|
|
42
43
|
};
|
|
43
44
|
refreshTimeout();
|
|
44
45
|
let finishEventSent = false;
|
|
45
|
-
|
|
46
|
+
// Until a response arrives, closing the connection aborts the pending request
|
|
47
|
+
const requestController = new AbortController();
|
|
48
|
+
let closeConnection = () => requestController.abort();
|
|
46
49
|
const onAbort = () => {
|
|
47
50
|
rejectAndFlag(new Error(CANCELLED_ERROR));
|
|
48
51
|
closeConnection();
|
|
49
52
|
};
|
|
50
53
|
abortSignal.addEventListener('abort', onAbort);
|
|
51
|
-
(0, read_file_1.readFile)(url)
|
|
54
|
+
(0, read_file_1.readFile)(url, requestController.signal)
|
|
52
55
|
.then(({ response, request }) => {
|
|
53
56
|
var _a, _b;
|
|
54
57
|
closeConnection = () => {
|
|
55
58
|
request.destroy();
|
|
56
59
|
response.destroy();
|
|
57
60
|
};
|
|
61
|
+
if (rejected) {
|
|
62
|
+
closeConnection();
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
58
65
|
if (abortSignal.aborted) {
|
|
59
66
|
onAbort();
|
|
60
67
|
return;
|
|
@@ -23,7 +23,7 @@ export type DownloadMap = {
|
|
|
23
23
|
};
|
|
24
24
|
listeners: {
|
|
25
25
|
[key: string]: {
|
|
26
|
-
[downloadDir: string]: (() => void)[];
|
|
26
|
+
[downloadDir: string]: ((err: Error | null) => void)[];
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
durationOfAssetCache: Record<string, AudioChannelsAndDurationResultCache>;
|
|
@@ -3,5 +3,5 @@ type NodeRequestAndResponse = {
|
|
|
3
3
|
request: http.ClientRequest;
|
|
4
4
|
response: http.IncomingMessage;
|
|
5
5
|
};
|
|
6
|
-
export declare const readFile: (url: string, redirectsSoFar?: number) => Promise<NodeRequestAndResponse>;
|
|
6
|
+
export declare const readFile: (url: string, signal: AbortSignal | null, redirectsSoFar?: number) => Promise<NodeRequestAndResponse>;
|
|
7
7
|
export {};
|
package/dist/assets/read-file.js
CHANGED
|
@@ -17,7 +17,7 @@ const getClient = (url) => {
|
|
|
17
17
|
}
|
|
18
18
|
throw new Error(`Can only download URLs starting with http:// or https://, got "${url}"`);
|
|
19
19
|
};
|
|
20
|
-
const readFileWithoutRedirect = (url) => {
|
|
20
|
+
const readFileWithoutRedirect = (url, signal) => {
|
|
21
21
|
return new Promise((resolve, reject) => {
|
|
22
22
|
const client = getClient(url);
|
|
23
23
|
const req = client(url,
|
|
@@ -27,8 +27,9 @@ const readFileWithoutRedirect = (url) => {
|
|
|
27
27
|
headers: {
|
|
28
28
|
'user-agent': 'Mozilla/5.0 (@remotion/renderer - https://remotion.dev)',
|
|
29
29
|
},
|
|
30
|
+
signal: signal !== null && signal !== void 0 ? signal : undefined,
|
|
30
31
|
}
|
|
31
|
-
: {}, (res) => {
|
|
32
|
+
: { signal: signal !== null && signal !== void 0 ? signal : undefined }, (res) => {
|
|
32
33
|
resolve({ request: req, response: res });
|
|
33
34
|
});
|
|
34
35
|
req.on('error', (err) => {
|
|
@@ -37,20 +38,19 @@ const readFileWithoutRedirect = (url) => {
|
|
|
37
38
|
});
|
|
38
39
|
});
|
|
39
40
|
};
|
|
40
|
-
const readFile = async (url, redirectsSoFar = 0) => {
|
|
41
|
+
const readFile = async (url, signal, redirectsSoFar = 0) => {
|
|
41
42
|
if (redirectsSoFar > 10) {
|
|
42
43
|
throw new Error(`Too many redirects while downloading ${url}`);
|
|
43
44
|
}
|
|
44
|
-
const { request, response } = await readFileWithoutRedirect(url);
|
|
45
|
+
const { request, response } = await readFileWithoutRedirect(url, signal);
|
|
45
46
|
if (redirect_status_codes_1.redirectStatusCodes.includes(response.statusCode)) {
|
|
46
47
|
if (!response.headers.location) {
|
|
47
48
|
throw new Error(`Received a status code ${response.statusCode} but no "Location" header while calling ${response.headers.location}`);
|
|
48
49
|
}
|
|
49
|
-
const
|
|
50
|
-
const redirectUrl = new URL(response.headers.location, origin).toString();
|
|
50
|
+
const redirectUrl = new URL(response.headers.location, url).toString();
|
|
51
51
|
request.destroy();
|
|
52
52
|
response.destroy();
|
|
53
|
-
return (0, exports.readFile)(redirectUrl, redirectsSoFar + 1);
|
|
53
|
+
return (0, exports.readFile)(redirectUrl, signal, redirectsSoFar + 1);
|
|
54
54
|
}
|
|
55
55
|
if (response.statusCode >= 400) {
|
|
56
56
|
const body = await tryToObtainBody(response);
|
|
@@ -128,9 +128,12 @@ const writeVersionFile = (chromeMode, version) => {
|
|
|
128
128
|
fs.writeFileSync(versionFilePath, version);
|
|
129
129
|
};
|
|
130
130
|
const downloadBrowser = async ({ logLevel, indent, onProgress, version, chromeMode, }) => {
|
|
131
|
+
var _a;
|
|
131
132
|
const platform = (0, exports.getPlatform)();
|
|
132
133
|
const downloadURL = (0, get_chrome_download_url_1.getChromeDownloadUrl)({ platform, version, chromeMode });
|
|
133
|
-
|
|
134
|
+
// remotion.media URLs carry a ?clear query string, and "?" is not a valid
|
|
135
|
+
// file name character on Windows.
|
|
136
|
+
const fileName = (_a = downloadURL.split('/').pop()) === null || _a === void 0 ? void 0 : _a.split('?')[0];
|
|
134
137
|
if (!fileName) {
|
|
135
138
|
throw new Error(`A malformed download URL was found: ${downloadURL}.`);
|
|
136
139
|
}
|
|
@@ -198,6 +198,25 @@ class Page extends EventEmitter_1.EventEmitter {
|
|
|
198
198
|
client.on('Runtime.consoleAPICalled', (event) => {
|
|
199
199
|
return __classPrivateFieldGet(this, _Page_instances, "m", _Page_onConsoleAPI).call(this, event);
|
|
200
200
|
});
|
|
201
|
+
client.on('Runtime.exceptionThrown', (event) => {
|
|
202
|
+
var _a;
|
|
203
|
+
var _b, _c;
|
|
204
|
+
const { exception, text, stackTrace, url, lineNumber, columnNumber } = event.exceptionDetails;
|
|
205
|
+
const description = exception
|
|
206
|
+
? ((_b = exception.description) !== null && _b !== void 0 ? _b : String((_c = exception.unserializableValue) !== null && _c !== void 0 ? _c : exception.value))
|
|
207
|
+
: null;
|
|
208
|
+
(_a = this.onBrowserLog) === null || _a === void 0 ? void 0 : _a.call(this, {
|
|
209
|
+
type: 'error',
|
|
210
|
+
text: description === null ? text : `${text} ${description}`,
|
|
211
|
+
stackTrace: (stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.callFrames.length)
|
|
212
|
+
? stackTrace.callFrames.map((frame) => ({
|
|
213
|
+
url: frame.url,
|
|
214
|
+
lineNumber: frame.lineNumber,
|
|
215
|
+
columnNumber: frame.columnNumber,
|
|
216
|
+
}))
|
|
217
|
+
: [{ url, lineNumber, columnNumber }],
|
|
218
|
+
});
|
|
219
|
+
});
|
|
201
220
|
client.on('Runtime.bindingCalled', (event) => {
|
|
202
221
|
return __classPrivateFieldGet(this, _Page_instances, "m", _Page_onBindingCalled).call(this, event);
|
|
203
222
|
});
|
|
@@ -350,8 +369,7 @@ _Page_client = new WeakMap(), _Page_target = new WeakMap(), _Page_timeoutSetting
|
|
|
350
369
|
// This error message is being checked against in is-flaky-error.ts
|
|
351
370
|
this.emit('error', new Error('Page crashed!'));
|
|
352
371
|
}, _Page_onLogEntryAdded = function _Page_onLogEntryAdded(event) {
|
|
353
|
-
|
|
354
|
-
const { level, text, args, source, url, lineNumber } = event.entry;
|
|
372
|
+
const { level, text, args, source, url, lineNumber, stackTrace } = event.entry;
|
|
355
373
|
if (args) {
|
|
356
374
|
args.map((arg) => {
|
|
357
375
|
return (0, util_1.releaseObject)(__classPrivateFieldGet(this, _Page_client, "f"), arg);
|
|
@@ -363,16 +381,17 @@ _Page_client = new WeakMap(), _Page_target = new WeakMap(), _Page_timeoutSetting
|
|
|
363
381
|
type: level,
|
|
364
382
|
text,
|
|
365
383
|
args: [],
|
|
366
|
-
stackTraceLocations:
|
|
384
|
+
stackTraceLocations: (stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.callFrames.length)
|
|
385
|
+
? stackTrace.callFrames.map((frame) => ({
|
|
386
|
+
url: frame.url,
|
|
387
|
+
lineNumber: frame.lineNumber,
|
|
388
|
+
columnNumber: frame.columnNumber,
|
|
389
|
+
}))
|
|
390
|
+
: [{ url, lineNumber }],
|
|
367
391
|
previewString,
|
|
368
392
|
logLevel: logLevelFromRemotionLog !== null && logLevelFromRemotionLog !== void 0 ? logLevelFromRemotionLog : logLevelFromEvent,
|
|
369
393
|
tag,
|
|
370
394
|
});
|
|
371
|
-
(_a = this.onBrowserLog) === null || _a === void 0 ? void 0 : _a.call(this, {
|
|
372
|
-
stackTrace: message.stackTrace(),
|
|
373
|
-
text: message.text,
|
|
374
|
-
type: message.type,
|
|
375
|
-
});
|
|
376
395
|
__classPrivateFieldGet(this, _Page_onConsole, "f").call(this, message);
|
|
377
396
|
}
|
|
378
397
|
}, _Page_onConsoleAPI = function _Page_onConsoleAPI(event) {
|
|
@@ -58,7 +58,12 @@ class NetworkManager extends EventEmitter_1.EventEmitter {
|
|
|
58
58
|
__classPrivateFieldGet(this, _NetworkManager_client, "f").on('Network.responseReceivedExtraInfo', __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_onResponseReceivedExtraInfo).bind(this));
|
|
59
59
|
}
|
|
60
60
|
async initialize() {
|
|
61
|
-
|
|
61
|
+
// We consume request events, but never read response bodies from DevTools.
|
|
62
|
+
// Avoid retaining frame and media responses in its per-tab body cache.
|
|
63
|
+
await __classPrivateFieldGet(this, _NetworkManager_client, "f").send('Network.enable', {
|
|
64
|
+
maxTotalBufferSize: 0,
|
|
65
|
+
maxResourceBufferSize: 0,
|
|
66
|
+
});
|
|
62
67
|
}
|
|
63
68
|
}
|
|
64
69
|
exports.NetworkManager = NetworkManager;
|
|
@@ -241,7 +241,12 @@ export interface Commands {
|
|
|
241
241
|
returnType: void;
|
|
242
242
|
};
|
|
243
243
|
'Network.enable': {
|
|
244
|
-
paramsType: [
|
|
244
|
+
paramsType: [
|
|
245
|
+
{
|
|
246
|
+
maxTotalBufferSize: number;
|
|
247
|
+
maxResourceBufferSize: number;
|
|
248
|
+
}?
|
|
249
|
+
];
|
|
245
250
|
returnType: void;
|
|
246
251
|
};
|
|
247
252
|
'Target.detachFromTarget': {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LogLevel } from '../log-level';
|
|
2
2
|
import type { ChromeMode } from '../options/chrome-mode';
|
|
3
|
-
export declare const TESTED_VERSION = "
|
|
3
|
+
export declare const TESTED_VERSION = "158.0.8127.2";
|
|
4
4
|
export type Platform = 'linux64' | 'linux-arm64' | 'mac-x64' | 'mac-arm64' | 'win64';
|
|
5
5
|
export declare const isAmazonLinux2023: () => boolean;
|
|
6
6
|
export declare const canUseRemotionMediaBinaries: () => boolean;
|
|
@@ -38,7 +38,7 @@ exports.getChromeDownloadUrl = getChromeDownloadUrl;
|
|
|
38
38
|
const fs = __importStar(require("node:fs"));
|
|
39
39
|
const os = __importStar(require("node:os"));
|
|
40
40
|
const logger_1 = require("../logger");
|
|
41
|
-
exports.TESTED_VERSION = '
|
|
41
|
+
exports.TESTED_VERSION = '158.0.8127.2';
|
|
42
42
|
const isAmazonLinux2023 = () => {
|
|
43
43
|
if (os.platform() !== 'linux') {
|
|
44
44
|
return false;
|
|
@@ -114,6 +114,9 @@ function getChromeDownloadUrl({ platform, version, chromeMode, }) {
|
|
|
114
114
|
if (platform === 'mac-arm64') {
|
|
115
115
|
return `https://remotion.media/chromium-headless-shell-mac-arm64-${exports.TESTED_VERSION}.zip?clear`;
|
|
116
116
|
}
|
|
117
|
+
if (platform === 'win64') {
|
|
118
|
+
return `https://remotion.media/chromium-headless-shell-win-x64-${exports.TESTED_VERSION}.zip?clear`;
|
|
119
|
+
}
|
|
117
120
|
if (platform === 'linux64' || platform === 'linux-arm64') {
|
|
118
121
|
const architecture = platform === 'linux64' ? 'x64' : 'arm64';
|
|
119
122
|
if ((0, exports.isAmazonLinux2023)()) {
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.checkRuntimeVersion = exports.gLibCErrorMessage = void 0;
|
|
7
7
|
const node_os_1 = __importDefault(require("node:os"));
|
|
8
8
|
const no_react_1 = require("remotion/no-react");
|
|
9
|
+
const get_chrome_download_url_1 = require("./browser/get-chrome-download-url");
|
|
9
10
|
const get_executable_path_1 = require("./compositor/get-executable-path");
|
|
10
11
|
const logger_1 = require("./logger");
|
|
11
12
|
const getRequiredLibCVersion = () => {
|
|
@@ -15,12 +16,11 @@ const getRequiredLibCVersion = () => {
|
|
|
15
16
|
if ((0, get_executable_path_1.isMusl)({ indent: false, logLevel: 'warn' })) {
|
|
16
17
|
return null;
|
|
17
18
|
}
|
|
18
|
-
//
|
|
19
|
-
if (process.arch === 'arm64') {
|
|
20
|
-
return [2,
|
|
19
|
+
// Amazon Linux 2023 on ARM64 is supported with its system glibc.
|
|
20
|
+
if (process.arch === 'arm64' && (0, get_chrome_download_url_1.isAmazonLinux2023)()) {
|
|
21
|
+
return [2, 34];
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
return [2, 31];
|
|
23
|
+
return [2, 35];
|
|
24
24
|
};
|
|
25
25
|
const required = getRequiredLibCVersion();
|
|
26
26
|
const gLibCErrorMessage = (libCString) => {
|
|
@@ -37,7 +37,7 @@ const gLibCErrorMessage = (libCString) => {
|
|
|
37
37
|
if (Number(split[0]) > required[0]) {
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
|
-
return `Rendering videos requires glibc ${required.join('.')}
|
|
40
|
+
return `Rendering videos requires glibc ${required.join('.')} or higher on your OS. Your system has glibc ${libCString}.`;
|
|
41
41
|
};
|
|
42
42
|
exports.gLibCErrorMessage = gLibCErrorMessage;
|
|
43
43
|
const checkLibCRequirement = (logLevel, indent) => {
|