@remotion/renderer 4.0.221 → 4.0.223
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 +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/options/color-space.d.ts +1 -1
- package/dist/options/index.d.ts +1 -1
- package/dist/options/options-map.d.ts +3 -3
- package/ensure-browser.mjs +20 -8
- 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";
|
|
@@ -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;
|
|
@@ -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/index.d.ts
CHANGED
|
@@ -142,7 +142,7 @@ export declare const RenderInternals: {
|
|
|
142
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";
|
|
@@ -353,7 +353,7 @@ export declare const RenderInternals: {
|
|
|
353
353
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
354
354
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
355
355
|
DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
|
|
356
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
356
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "none" | "png" | "jpeg";
|
|
357
357
|
DEFAULT_JPEG_QUALITY: number;
|
|
358
358
|
chalk: {
|
|
359
359
|
enabled: () => boolean;
|
|
@@ -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/index.d.ts
CHANGED
|
@@ -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;
|
|
@@ -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;
|
package/ensure-browser.mjs
CHANGED
|
@@ -2887,6 +2887,7 @@ var downloadFileWithoutRetries = ({ onProgress, url, to: toFn }) => {
|
|
|
2887
2887
|
}, 20000);
|
|
2888
2888
|
};
|
|
2889
2889
|
refreshTimeout();
|
|
2890
|
+
let finishEventSent = false;
|
|
2890
2891
|
readFile(url).then((res) => {
|
|
2891
2892
|
const contentDisposition = res.headers["content-disposition"] ?? null;
|
|
2892
2893
|
const contentType = res.headers["content-type"] ?? null;
|
|
@@ -2900,11 +2901,13 @@ var downloadFileWithoutRetries = ({ onProgress, url, to: toFn }) => {
|
|
|
2900
2901
|
if (rejected) {
|
|
2901
2902
|
return;
|
|
2902
2903
|
}
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2904
|
+
if (!finishEventSent) {
|
|
2905
|
+
onProgress?.({
|
|
2906
|
+
downloaded,
|
|
2907
|
+
percent: 1,
|
|
2908
|
+
totalSize: downloaded
|
|
2909
|
+
});
|
|
2910
|
+
}
|
|
2908
2911
|
refreshTimeout();
|
|
2909
2912
|
return resolveAndFlag({ sizeInBytes: downloaded, to });
|
|
2910
2913
|
});
|
|
@@ -2915,11 +2918,15 @@ var downloadFileWithoutRetries = ({ onProgress, url, to: toFn }) => {
|
|
|
2915
2918
|
refreshTimeout();
|
|
2916
2919
|
downloaded += d.length;
|
|
2917
2920
|
refreshTimeout();
|
|
2921
|
+
const percent = totalSize === null ? null : downloaded / totalSize;
|
|
2918
2922
|
onProgress?.({
|
|
2919
2923
|
downloaded,
|
|
2920
|
-
percent
|
|
2924
|
+
percent,
|
|
2921
2925
|
totalSize
|
|
2922
2926
|
});
|
|
2927
|
+
if (percent === 1) {
|
|
2928
|
+
finishEventSent = true;
|
|
2929
|
+
}
|
|
2923
2930
|
});
|
|
2924
2931
|
res.on("close", () => {
|
|
2925
2932
|
if (totalSize !== null && downloaded !== totalSize) {
|
|
@@ -3164,7 +3171,7 @@ var defaultBrowserDownloadProgress = ({
|
|
|
3164
3171
|
let lastProgress = 0;
|
|
3165
3172
|
return {
|
|
3166
3173
|
onProgress: (progress) => {
|
|
3167
|
-
if (progress.downloadedBytes > lastProgress + 1e7) {
|
|
3174
|
+
if (progress.downloadedBytes > lastProgress + 1e7 || progress.percent === 1) {
|
|
3168
3175
|
lastProgress = progress.downloadedBytes;
|
|
3169
3176
|
Log.info({ indent, logLevel }, `Downloading Chrome Headless Shell - ${toMegabytes(progress.downloadedBytes)}/${toMegabytes(progress.totalSizeInBytes)}`);
|
|
3170
3177
|
}
|
|
@@ -3188,7 +3195,8 @@ var getLocalBrowser = () => {
|
|
|
3188
3195
|
};
|
|
3189
3196
|
|
|
3190
3197
|
// src/ensure-browser.ts
|
|
3191
|
-
var
|
|
3198
|
+
var currentEnsureBrowserOperation = Promise.resolve();
|
|
3199
|
+
var internalEnsureBrowserUncapped = async ({
|
|
3192
3200
|
indent,
|
|
3193
3201
|
logLevel,
|
|
3194
3202
|
browserExecutable,
|
|
@@ -3202,6 +3210,10 @@ var internalEnsureBrowser = async ({
|
|
|
3202
3210
|
const newStatus = getBrowserStatus(browserExecutable);
|
|
3203
3211
|
return newStatus;
|
|
3204
3212
|
};
|
|
3213
|
+
var internalEnsureBrowser = (options) => {
|
|
3214
|
+
currentEnsureBrowserOperation = currentEnsureBrowserOperation.then(() => internalEnsureBrowserUncapped(options));
|
|
3215
|
+
return currentEnsureBrowserOperation;
|
|
3216
|
+
};
|
|
3205
3217
|
var getBrowserStatus = (browserExecutable) => {
|
|
3206
3218
|
if (browserExecutable) {
|
|
3207
3219
|
if (!fs5.existsSync(browserExecutable)) {
|
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.223",
|
|
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.223",
|
|
22
|
+
"@remotion/streaming": "4.0.223"
|
|
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-
|
|
38
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
39
|
-
"@remotion/compositor-
|
|
40
|
-
"@remotion/compositor-darwin-
|
|
41
|
-
"@remotion/compositor-linux-x64-
|
|
42
|
-
"@remotion/compositor-
|
|
43
|
-
"@remotion/compositor-
|
|
37
|
+
"@remotion/compositor-darwin-x64": "4.0.223",
|
|
38
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.223",
|
|
39
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.223",
|
|
40
|
+
"@remotion/compositor-darwin-arm64": "4.0.223",
|
|
41
|
+
"@remotion/compositor-linux-x64-musl": "4.0.223",
|
|
42
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.223",
|
|
43
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.223"
|
|
44
44
|
},
|
|
45
45
|
"keywords": [
|
|
46
46
|
"remotion",
|