@remotion/renderer 4.0.34 → 4.0.36
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/browser/Product.d.ts +16 -0
- package/dist/browser/Product.js +17 -0
- package/dist/browser/create-browser-fetcher.d.ts +17 -0
- package/dist/browser/create-browser-fetcher.js +58 -0
- package/dist/browser/revisions.d.ts +20 -0
- package/dist/browser/revisions.js +21 -0
- package/dist/index.d.ts +5 -5
- package/dist/options/offthreadvideo-cache-size.js +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2020 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
|
+
export type Product = 'chrome' | 'firefox';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2020 Google Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2020 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
|
+
import type { Product } from './Product';
|
|
17
|
+
export declare function downloadBrowser(product: Product): Promise<void>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2020 Google Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.downloadBrowser = void 0;
|
|
19
|
+
const BrowserFetcher_1 = require("./BrowserFetcher");
|
|
20
|
+
const revisions_1 = require("./revisions");
|
|
21
|
+
const supportedProducts = {
|
|
22
|
+
chrome: 'Chromium',
|
|
23
|
+
firefox: 'Firefox Nightly',
|
|
24
|
+
};
|
|
25
|
+
function getRevision(product) {
|
|
26
|
+
if (product === 'chrome') {
|
|
27
|
+
return revisions_1.PUPPETEER_REVISIONS.chromium;
|
|
28
|
+
}
|
|
29
|
+
throw new Error(`Unsupported product ${product}`);
|
|
30
|
+
}
|
|
31
|
+
async function downloadBrowser(product) {
|
|
32
|
+
const revision = getRevision(product);
|
|
33
|
+
const revisionInfo = (0, BrowserFetcher_1.getRevisionInfo)(revision, product);
|
|
34
|
+
await (0, BrowserFetcher_1.download)({
|
|
35
|
+
revision: revisionInfo.revision,
|
|
36
|
+
progressCallback: (downloadedBytes, totalBytes) => {
|
|
37
|
+
console.log('Downloading', supportedProducts[product], toMegabytes(downloadedBytes) + '/' + toMegabytes(totalBytes));
|
|
38
|
+
},
|
|
39
|
+
product,
|
|
40
|
+
platform: (0, BrowserFetcher_1.getPlatform)(product),
|
|
41
|
+
downloadHost: (0, BrowserFetcher_1.getDownloadHost)(product),
|
|
42
|
+
downloadsFolder: (0, BrowserFetcher_1.getDownloadsFolder)(product),
|
|
43
|
+
});
|
|
44
|
+
const _localRevisions = await (0, BrowserFetcher_1.localRevisions)((0, BrowserFetcher_1.getDownloadsFolder)(product), product, (0, BrowserFetcher_1.getPlatform)(product));
|
|
45
|
+
console.log(`${supportedProducts[product]} (${revisionInfo.revision}) downloaded to ${revisionInfo.folderPath}`);
|
|
46
|
+
await Promise.all(_localRevisions
|
|
47
|
+
.filter((__revision) => {
|
|
48
|
+
return __revision !== revisionInfo.revision;
|
|
49
|
+
})
|
|
50
|
+
.map((__revision) => {
|
|
51
|
+
return (0, BrowserFetcher_1.removeBrowser)(__revision, (0, BrowserFetcher_1.getFolderPath)(revision, (0, BrowserFetcher_1.getDownloadsFolder)(product), (0, BrowserFetcher_1.getPlatform)(product)));
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
exports.downloadBrowser = downloadBrowser;
|
|
55
|
+
function toMegabytes(bytes) {
|
|
56
|
+
const mb = bytes / 1024 / 1024;
|
|
57
|
+
return `${Math.round(mb * 10) / 10} Mb`;
|
|
58
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2020 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
|
+
type Revisions = Readonly<{
|
|
17
|
+
readonly chromium: string;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const PUPPETEER_REVISIONS: Revisions;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2020 Google Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PUPPETEER_REVISIONS = void 0;
|
|
19
|
+
exports.PUPPETEER_REVISIONS = {
|
|
20
|
+
chromium: '1002410',
|
|
21
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -123,8 +123,8 @@ export declare const RenderInternals: {
|
|
|
123
123
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
124
124
|
DEFAULT_BROWSER: "chrome";
|
|
125
125
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
126
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
127
|
-
validateOpenGlRenderer: (option: "
|
|
126
|
+
DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | null;
|
|
127
|
+
validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | null) => "angle" | "swangle" | "egl" | "swiftshader" | null;
|
|
128
128
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
129
129
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
130
130
|
validateJpegQuality: (q: number | undefined) => void;
|
|
@@ -312,8 +312,8 @@ export declare const RenderInternals: {
|
|
|
312
312
|
};
|
|
313
313
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
314
314
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
315
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
316
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
315
|
+
DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
|
|
316
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "jpeg" | "png" | "none";
|
|
317
317
|
DEFAULT_JPEG_QUALITY: number;
|
|
318
318
|
chalk: {
|
|
319
319
|
enabled: () => boolean;
|
|
@@ -426,7 +426,7 @@ export declare const RenderInternals: {
|
|
|
426
426
|
frame: number;
|
|
427
427
|
serializedInputPropsWithCustomSchema: string;
|
|
428
428
|
serializedResolvedPropsWithCustomSchema: string;
|
|
429
|
-
imageFormat: "
|
|
429
|
+
imageFormat: "jpeg" | "png" | "webp" | "pdf";
|
|
430
430
|
jpegQuality: number;
|
|
431
431
|
puppeteerInstance: HeadlessBrowser | null;
|
|
432
432
|
envVariables: Record<string, string>;
|
|
@@ -17,7 +17,7 @@ const validateOffthreadVideoCacheSizeInBytes = (option) => {
|
|
|
17
17
|
if (typeof option !== 'number') {
|
|
18
18
|
throw new Error('Expected a number');
|
|
19
19
|
}
|
|
20
|
-
if (option < 0) {
|
|
20
|
+
if (option < 0 || option === 0) {
|
|
21
21
|
throw new Error('Expected a positive number');
|
|
22
22
|
}
|
|
23
23
|
if (Number.isNaN(option)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.36",
|
|
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.
|
|
21
|
+
"remotion": "4.0.36"
|
|
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-
|
|
44
|
-
"@remotion/compositor-
|
|
45
|
-
"@remotion/compositor-linux-arm64-
|
|
46
|
-
"@remotion/compositor-linux-
|
|
47
|
-
"@remotion/compositor-linux-x64-
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-
|
|
43
|
+
"@remotion/compositor-darwin-x64": "4.0.36",
|
|
44
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.36",
|
|
45
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.36",
|
|
46
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.36",
|
|
47
|
+
"@remotion/compositor-linux-x64-musl": "4.0.36",
|
|
48
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.36",
|
|
49
|
+
"@remotion/compositor-darwin-arm64": "4.0.36"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|