@remotion/renderer 4.0.220 → 4.0.222
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-file.js +13 -6
- package/dist/browser/browser-download-progress-bar.js +2 -1
- package/dist/client.d.ts +7 -7
- package/dist/ensure-browser.d.ts +1 -1
- package/dist/ensure-browser.js +6 -1
- package/dist/index.d.ts +5 -5
- package/dist/options/color-space.d.ts +1 -1
- package/dist/options/gl.d.ts +1 -1
- package/dist/options/index.d.ts +3 -3
- package/dist/options/metadata.d.ts +1 -1
- package/dist/options/options-map.d.ts +3 -3
- package/dist/options/webhook-custom-data.d.ts +1 -1
- package/package.json +10 -10
|
@@ -37,6 +37,7 @@ const downloadFileWithoutRetries = ({ onProgress, url, to: toFn }) => {
|
|
|
37
37
|
}, 20000);
|
|
38
38
|
};
|
|
39
39
|
refreshTimeout();
|
|
40
|
+
let finishEventSent = false;
|
|
40
41
|
(0, read_file_1.readFile)(url)
|
|
41
42
|
.then((res) => {
|
|
42
43
|
var _a, _b;
|
|
@@ -55,11 +56,13 @@ const downloadFileWithoutRetries = ({ onProgress, url, to: toFn }) => {
|
|
|
55
56
|
if (rejected) {
|
|
56
57
|
return;
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
if (!finishEventSent) {
|
|
60
|
+
onProgress === null || onProgress === void 0 ? void 0 : onProgress({
|
|
61
|
+
downloaded,
|
|
62
|
+
percent: 1,
|
|
63
|
+
totalSize: downloaded,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
63
66
|
refreshTimeout();
|
|
64
67
|
return resolveAndFlag({ sizeInBytes: downloaded, to });
|
|
65
68
|
});
|
|
@@ -70,11 +73,15 @@ const downloadFileWithoutRetries = ({ onProgress, url, to: toFn }) => {
|
|
|
70
73
|
refreshTimeout();
|
|
71
74
|
downloaded += d.length;
|
|
72
75
|
refreshTimeout();
|
|
76
|
+
const percent = totalSize === null ? null : downloaded / totalSize;
|
|
73
77
|
onProgress === null || onProgress === void 0 ? void 0 : onProgress({
|
|
74
78
|
downloaded,
|
|
75
|
-
percent
|
|
79
|
+
percent,
|
|
76
80
|
totalSize,
|
|
77
81
|
});
|
|
82
|
+
if (percent === 1) {
|
|
83
|
+
finishEventSent = true;
|
|
84
|
+
}
|
|
78
85
|
});
|
|
79
86
|
res.on('close', () => {
|
|
80
87
|
if (totalSize !== null && downloaded !== totalSize) {
|
|
@@ -9,7 +9,8 @@ const defaultBrowserDownloadProgress = ({ indent, logLevel, api, }) => () => {
|
|
|
9
9
|
let lastProgress = 0;
|
|
10
10
|
return {
|
|
11
11
|
onProgress: (progress) => {
|
|
12
|
-
if (progress.downloadedBytes > lastProgress + 10000000
|
|
12
|
+
if (progress.downloadedBytes > lastProgress + 10000000 ||
|
|
13
|
+
progress.percent === 1) {
|
|
13
14
|
lastProgress = progress.downloadedBytes;
|
|
14
15
|
logger_1.Log.info({ indent, logLevel }, `Downloading Chrome Headless Shell - ${(0, to_megabytes_1.toMegabytes)(progress.downloadedBytes)}/${(0, to_megabytes_1.toMegabytes)(progress.totalSizeInBytes)}`);
|
|
15
16
|
}
|
package/dist/client.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare const BrowserSafeApis: {
|
|
|
12
12
|
validPixelFormatsForCodec: (codec: import("./codec").Codec) => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
|
|
13
13
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
14
14
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
15
|
-
DEFAULT_PIXEL_FORMAT: "yuv420p" | "
|
|
15
|
+
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
16
16
|
DEFAULT_TIMEOUT: number;
|
|
17
17
|
DEFAULT_JPEG_QUALITY: number;
|
|
18
18
|
DEFAULT_COLOR_SPACE: "default";
|
|
@@ -392,7 +392,7 @@ export declare const BrowserSafeApis: {
|
|
|
392
392
|
webhookCustomDataOption: {
|
|
393
393
|
name: string;
|
|
394
394
|
cliFlag: "webhook-custom-data";
|
|
395
|
-
description: (type: "
|
|
395
|
+
description: (type: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
396
396
|
ssrName: "customData";
|
|
397
397
|
docLink: string;
|
|
398
398
|
type: Record<string, unknown> | null;
|
|
@@ -412,7 +412,7 @@ export declare const BrowserSafeApis: {
|
|
|
412
412
|
source: string;
|
|
413
413
|
value: import("./options/color-space").ColorSpace;
|
|
414
414
|
};
|
|
415
|
-
setConfig: (value: "
|
|
415
|
+
setConfig: (value: "bt709" | "bt2020-ncl" | "default" | null) => void;
|
|
416
416
|
};
|
|
417
417
|
deleteAfterOption: {
|
|
418
418
|
name: string;
|
|
@@ -805,7 +805,7 @@ export declare const BrowserSafeApis: {
|
|
|
805
805
|
metadataOption: {
|
|
806
806
|
name: string;
|
|
807
807
|
cliFlag: "metadata";
|
|
808
|
-
description: (mode: "
|
|
808
|
+
description: (mode: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
809
809
|
docLink: string;
|
|
810
810
|
type: import("./options/metadata").Metadata;
|
|
811
811
|
getValue: ({ commandLine }: {
|
|
@@ -938,7 +938,7 @@ export declare const BrowserSafeApis: {
|
|
|
938
938
|
source: string;
|
|
939
939
|
value: import("./options/color-space").ColorSpace;
|
|
940
940
|
};
|
|
941
|
-
setConfig: (value: "
|
|
941
|
+
setConfig: (value: "bt709" | "bt2020-ncl" | "default" | null) => void;
|
|
942
942
|
};
|
|
943
943
|
readonly codec: {
|
|
944
944
|
name: string;
|
|
@@ -1678,7 +1678,7 @@ export declare const BrowserSafeApis: {
|
|
|
1678
1678
|
source: string;
|
|
1679
1679
|
value: import("./options/color-space").ColorSpace;
|
|
1680
1680
|
};
|
|
1681
|
-
setConfig: (value: "
|
|
1681
|
+
setConfig: (value: "bt709" | "bt2020-ncl" | "default" | null) => void;
|
|
1682
1682
|
};
|
|
1683
1683
|
readonly muted: {
|
|
1684
1684
|
name: string;
|
|
@@ -1942,7 +1942,7 @@ export declare const BrowserSafeApis: {
|
|
|
1942
1942
|
source: string;
|
|
1943
1943
|
value: import("./options/color-space").ColorSpace;
|
|
1944
1944
|
};
|
|
1945
|
-
setConfig: (value: "
|
|
1945
|
+
setConfig: (value: "bt709" | "bt2020-ncl" | "default" | null) => void;
|
|
1946
1946
|
};
|
|
1947
1947
|
readonly audioBitrate: {
|
|
1948
1948
|
name: string;
|
package/dist/ensure-browser.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ type InternalEnsureBrowserOptions = {
|
|
|
20
20
|
export type EnsureBrowserOptions = Partial<{
|
|
21
21
|
browserExecutable: BrowserExecutable;
|
|
22
22
|
} & ToOptions<typeof BrowserSafeApis.optionsMap.ensureBrowser>>;
|
|
23
|
-
export declare const internalEnsureBrowser: (
|
|
23
|
+
export declare const internalEnsureBrowser: (options: InternalEnsureBrowserOptions) => Promise<BrowserStatus>;
|
|
24
24
|
/**
|
|
25
25
|
* Ensures a browser is locally installed so a Remotion render can be executed. This function manages the browser's download or validates existing browser paths.
|
|
26
26
|
* @see [Documentation](https://remotion.dev/docs/renderer/ensure-browser)
|
package/dist/ensure-browser.js
CHANGED
|
@@ -8,7 +8,8 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
8
8
|
const BrowserFetcher_1 = require("./browser/BrowserFetcher");
|
|
9
9
|
const browser_download_progress_bar_1 = require("./browser/browser-download-progress-bar");
|
|
10
10
|
const get_local_browser_1 = require("./get-local-browser");
|
|
11
|
-
|
|
11
|
+
let currentEnsureBrowserOperation = Promise.resolve();
|
|
12
|
+
const internalEnsureBrowserUncapped = async ({ indent, logLevel, browserExecutable, onBrowserDownload, }) => {
|
|
12
13
|
const status = getBrowserStatus(browserExecutable);
|
|
13
14
|
if (status.type === 'no-browser') {
|
|
14
15
|
const { onProgress, version } = onBrowserDownload();
|
|
@@ -17,6 +18,10 @@ const internalEnsureBrowser = async ({ indent, logLevel, browserExecutable, onBr
|
|
|
17
18
|
const newStatus = getBrowserStatus(browserExecutable);
|
|
18
19
|
return newStatus;
|
|
19
20
|
};
|
|
21
|
+
const internalEnsureBrowser = (options) => {
|
|
22
|
+
currentEnsureBrowserOperation = currentEnsureBrowserOperation.then(() => internalEnsureBrowserUncapped(options));
|
|
23
|
+
return currentEnsureBrowserOperation;
|
|
24
|
+
};
|
|
20
25
|
exports.internalEnsureBrowser = internalEnsureBrowser;
|
|
21
26
|
const getBrowserStatus = (browserExecutable) => {
|
|
22
27
|
if (browserExecutable) {
|
package/dist/index.d.ts
CHANGED
|
@@ -139,10 +139,10 @@ export declare const RenderInternals: {
|
|
|
139
139
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
140
140
|
DEFAULT_BROWSER: "chrome";
|
|
141
141
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
142
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
142
|
+
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
143
143
|
validateOpenGlRenderer: (option: unknown) => import("./options/gl").OpenGlRenderer | null;
|
|
144
144
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "h264-ts", "gif"];
|
|
145
|
-
DEFAULT_PIXEL_FORMAT: "yuv420p" | "
|
|
145
|
+
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
146
146
|
validateJpegQuality: (q: unknown) => void;
|
|
147
147
|
DEFAULT_TIMEOUT: number;
|
|
148
148
|
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
@@ -352,8 +352,8 @@ export declare const RenderInternals: {
|
|
|
352
352
|
}) => execa.ExecaChildProcess<string>;
|
|
353
353
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
354
354
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
355
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
356
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
355
|
+
DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
|
|
356
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "none" | "png" | "jpeg";
|
|
357
357
|
DEFAULT_JPEG_QUALITY: number;
|
|
358
358
|
chalk: {
|
|
359
359
|
enabled: () => boolean;
|
|
@@ -926,7 +926,7 @@ export declare const RenderInternals: {
|
|
|
926
926
|
audio: boolean;
|
|
927
927
|
};
|
|
928
928
|
toMegabytes: typeof toMegabytes;
|
|
929
|
-
internalEnsureBrowser: (
|
|
929
|
+
internalEnsureBrowser: (options: {
|
|
930
930
|
browserExecutable: import("./browser-executable").BrowserExecutable;
|
|
931
931
|
indent: boolean;
|
|
932
932
|
} & import("./options/option").ToOptions<{
|
|
@@ -17,7 +17,7 @@ export declare const colorSpaceOption: {
|
|
|
17
17
|
source: string;
|
|
18
18
|
value: ColorSpace;
|
|
19
19
|
};
|
|
20
|
-
setConfig: (value: "
|
|
20
|
+
setConfig: (value: "bt709" | "bt2020-ncl" | "default" | null) => void;
|
|
21
21
|
};
|
|
22
22
|
export declare const validateColorSpace: (option: unknown) => void;
|
|
23
23
|
export {};
|
package/dist/options/gl.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
2
2
|
export type OpenGlRenderer = (typeof validOpenGlRenderers)[number];
|
|
3
3
|
export declare const DEFAULT_OPENGL_RENDERER: OpenGlRenderer | null;
|
|
4
|
-
export declare const getChromiumOpenGlRenderer: () => "
|
|
4
|
+
export declare const getChromiumOpenGlRenderer: () => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
5
5
|
export declare const setChromiumOpenGlRenderer: (renderer: OpenGlRenderer) => void;
|
|
6
6
|
export declare const glOption: {
|
|
7
7
|
cliFlag: "gl";
|
package/dist/options/index.d.ts
CHANGED
|
@@ -171,7 +171,7 @@ export declare const allOptions: {
|
|
|
171
171
|
webhookCustomDataOption: {
|
|
172
172
|
name: string;
|
|
173
173
|
cliFlag: "webhook-custom-data";
|
|
174
|
-
description: (type: "
|
|
174
|
+
description: (type: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
175
175
|
ssrName: "customData";
|
|
176
176
|
docLink: string;
|
|
177
177
|
type: Record<string, unknown> | null;
|
|
@@ -191,7 +191,7 @@ export declare const allOptions: {
|
|
|
191
191
|
source: string;
|
|
192
192
|
value: import("./color-space").ColorSpace;
|
|
193
193
|
};
|
|
194
|
-
setConfig: (value: "
|
|
194
|
+
setConfig: (value: "bt709" | "bt2020-ncl" | "default" | null) => void;
|
|
195
195
|
};
|
|
196
196
|
deleteAfterOption: {
|
|
197
197
|
name: string;
|
|
@@ -584,7 +584,7 @@ export declare const allOptions: {
|
|
|
584
584
|
metadataOption: {
|
|
585
585
|
name: string;
|
|
586
586
|
cliFlag: "metadata";
|
|
587
|
-
description: (mode: "
|
|
587
|
+
description: (mode: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
588
588
|
docLink: string;
|
|
589
589
|
type: import("./metadata").Metadata;
|
|
590
590
|
getValue: ({ commandLine }: {
|
|
@@ -2,7 +2,7 @@ export type Metadata = Record<string, string>;
|
|
|
2
2
|
export declare const metadataOption: {
|
|
3
3
|
name: string;
|
|
4
4
|
cliFlag: "metadata";
|
|
5
|
-
description: (mode: "
|
|
5
|
+
description: (mode: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
docLink: string;
|
|
7
7
|
type: Metadata;
|
|
8
8
|
getValue: ({ commandLine }: {
|
|
@@ -115,7 +115,7 @@ export declare const optionsMap: {
|
|
|
115
115
|
source: string;
|
|
116
116
|
value: import("./color-space").ColorSpace;
|
|
117
117
|
};
|
|
118
|
-
setConfig: (value: "
|
|
118
|
+
setConfig: (value: "bt709" | "bt2020-ncl" | "default" | null) => void;
|
|
119
119
|
};
|
|
120
120
|
readonly codec: {
|
|
121
121
|
name: string;
|
|
@@ -855,7 +855,7 @@ export declare const optionsMap: {
|
|
|
855
855
|
source: string;
|
|
856
856
|
value: import("./color-space").ColorSpace;
|
|
857
857
|
};
|
|
858
|
-
setConfig: (value: "
|
|
858
|
+
setConfig: (value: "bt709" | "bt2020-ncl" | "default" | null) => void;
|
|
859
859
|
};
|
|
860
860
|
readonly muted: {
|
|
861
861
|
name: string;
|
|
@@ -1119,7 +1119,7 @@ export declare const optionsMap: {
|
|
|
1119
1119
|
source: string;
|
|
1120
1120
|
value: import("./color-space").ColorSpace;
|
|
1121
1121
|
};
|
|
1122
|
-
setConfig: (value: "
|
|
1122
|
+
setConfig: (value: "bt709" | "bt2020-ncl" | "default" | null) => void;
|
|
1123
1123
|
};
|
|
1124
1124
|
readonly audioBitrate: {
|
|
1125
1125
|
name: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const webhookCustomDataOption: {
|
|
2
2
|
name: string;
|
|
3
3
|
cliFlag: "webhook-custom-data";
|
|
4
|
-
description: (type: "
|
|
4
|
+
description: (type: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
ssrName: "customData";
|
|
6
6
|
docLink: string;
|
|
7
7
|
type: Record<string, unknown> | null;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/renderer"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/renderer",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.222",
|
|
7
7
|
"description": "Render Remotion videos using Node.js or Bun",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.17.1",
|
|
21
|
-
"remotion": "4.0.
|
|
22
|
-
"@remotion/streaming": "4.0.
|
|
21
|
+
"remotion": "4.0.222",
|
|
22
|
+
"@remotion/streaming": "4.0.222"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": ">=16.8.0",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"@types/ws": "8.5.10"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@remotion/compositor-darwin-
|
|
38
|
-
"@remotion/compositor-
|
|
39
|
-
"@remotion/compositor-linux-
|
|
40
|
-
"@remotion/compositor-
|
|
41
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
42
|
-
"@remotion/compositor-
|
|
43
|
-
"@remotion/compositor-
|
|
37
|
+
"@remotion/compositor-darwin-x64": "4.0.222",
|
|
38
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.222",
|
|
39
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.222",
|
|
40
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.222",
|
|
41
|
+
"@remotion/compositor-linux-x64-musl": "4.0.222",
|
|
42
|
+
"@remotion/compositor-darwin-arm64": "4.0.222",
|
|
43
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.222"
|
|
44
44
|
},
|
|
45
45
|
"keywords": [
|
|
46
46
|
"remotion",
|