Skip to content

🎥 Make videos programmatically with React

Merge branch 'main' into browser-with-codecs

Jonny Burger1ef0677591f9
diff --cc packages/renderer/src/browser/BrowserFetcher.ts
index 67ea133dc7,40dd0ea82d..4931302aa0
--- a/packages/renderer/src/browser/BrowserFetcher.ts
+++ b/packages/renderer/src/browser/BrowserFetcher.ts
@@@ -97,13 -93,46 +98,26 @@@ function archiveName
}
}
- function _downloadURL(product: Product, platform: Platform): string {
- const url = downloadURLs[product][platform] as string;
- return url;
+ function _downloadURL(
+ product: Product,
+ platform: Platform,
+ host: string,
+ revision: string
+ ): string {
+ if (platform === 'win64' || platform === 'win32') {
+ return 'https://remotionchromium-binaries.s3.eu-central-1.amazonaws.com/thorium-107.zip';
+ }
+
+ return util.format(
+ downloadURLs[product][platform],
+ host,
+ revision,
+ archiveName(product, platform, revision)
+ );
}
-function handleArm64(): void {
- let exists = fs.existsSync('/usr/bin/chromium-browser');
- if (exists) {
- return;
- }
-
- exists = fs.existsSync('/usr/bin/chromium');
- if (exists) {
- return;
- }
-
- console.error(
- 'The chromium binary is not available for arm64.' +
- '\nIf you are on Ubuntu, you can install with: ' +
- '\n\n sudo apt install chromium\n' +
- '\n\n sudo apt install chromium-browser\n'
- );
- throw new Error();
-}
-
-const readdirAsync = promisify(fs.readdir.bind(fs));
-const mkdirAsync = promisify(fs.mkdir.bind(fs));
+const readdirAsync = fs.promises.readdir;
+const mkdirAsync = fs.promises.mkdir;
const unlinkAsync = promisify(fs.unlink.bind(fs));
const chmodAsync = promisify(fs.chmod.bind(fs));