Skip to content

🎥 Make videos programmatically with React

document

Jonny Burgerfd3c884bb39c
diff --git a/packages/core/src/config/chromium-flags.ts b/packages/core/src/config/chromium-flags.ts
index 5e473bb4c7..bf39f24d75 100644
--- a/packages/core/src/config/chromium-flags.ts
+++ b/packages/core/src/config/chromium-flags.ts
@@ -7,6 +7,6 @@ export const setChromiumDisableWebSecurity = (should: boolean) => {
chromiumDisableWebSecurity = should;
};
-export const setIgnoreCertificateErrors = (should: boolean) => {
+export const setChromiumIgnoreCertificateErrors = (should: boolean) => {
ignoreCertificateErrors = should;
};
diff --git a/packages/core/src/config/index.ts b/packages/core/src/config/index.ts
index d48f8be2bf..4cb96821cb 100644
--- a/packages/core/src/config/index.ts
+++ b/packages/core/src/config/index.ts
@@ -24,7 +24,7 @@ import {FfmpegExecutable, setFfmpegExecutable} from './ffmpeg-executable';
import {setPuppeteerTimeout} from './timeout';
import {
setChromiumDisableWebSecurity,
- setIgnoreCertificateErrors,
+ setChromiumIgnoreCertificateErrors,
} from './chromium-flags';
export const Config = {
@@ -85,7 +85,7 @@ export const Config = {
* Setting whether to ignore any invalid SSL certificates, such as self-signed ones.
* Default: false
*/
- setIgnoreCertificateErrors,
+ setChromiumIgnoreCertificateErrors,
},
Rendering: {
/**
diff --git a/packages/docs/docs/chromium-flags.md b/packages/docs/docs/chromium-flags.md
index 6df3dd46b0..b97039cbef 100644
--- a/packages/docs/docs/chromium-flags.md
+++ b/packages/docs/docs/chromium-flags.md
@@ -13,6 +13,20 @@ This will most notably disable CORS among other security features.
In [`getCompositions()`](/docs/get-compositions), [`renderStill()`](/docs/render-still) and [`renderFrames()`](/docs/render-frames), you can pass [`chromiumOptions.disableWebSecurity`](/docs/render-still#disablewebsecurity).
+### Enabling via CLI
+
+Pass [`--disable-web-security`](/docs/cli#--disable-web-security) in a `remotion render` or `remotion still` command.
+
+### Enabling via config file
+
+```tsx twoslash
+import { Config } from "remotion";
+
+// ---cut---
+
+Config.Puppeteer.setChromiumDisableWebSecurity(true);
+```
+
## `--ignore-certificate-errors`
Results in invalid SSL certificates, such as self-signed ones being ignored.
@@ -20,3 +34,17 @@ Results in invalid SSL certificates, such as self-signed ones being ignored.
### Enabling in Node.JS APIs
In [`getCompositions()`](/docs/get-compositions), [`renderStill()`](/docs/render-still) and [`renderFrames()`](/docs/render-frames), you can pass [`chromiumOptions.ignoreCertificateErrors`](/docs/render-still#ignorecertificateerrors).
+
+### Enabling via CLI
+
+Pass [`--ignore-certificate-errors`](/docs/cli#--ignore-certificate-errors) in a `remotion render` or `remotion still` command.
+
+### Enabling via config file
+
+```tsx twoslash
+import { Config } from "remotion";
+
+// ---cut---
+
+Config.Puppeteer.setChromiumIgnoreCertificateErrors(true);
+```
diff --git a/packages/docs/docs/cli.md b/packages/docs/docs/cli.md
index 5e1b04a229..7f87e9cdce 100644
--- a/packages/docs/docs/cli.md
+++ b/packages/docs/docs/cli.md
@@ -178,6 +178,19 @@ _available for `still`, `render` command_
Define how long a single frame may take to resolve all [`delayRender()`](/docs/delay-render) calls before it times out. Default: `30000`
+### `--ignore-certificate-errors`
+
+_available for `still`, `render` command_
+
+Results in invalid SSL certificates in Chrome, such as self-signed ones being ignored. Available since v2.6.5.
+
+### `--disable-web-security`
+
+_available for `still`, `render` command_
+
+This will most notably disable CORS in Chrome among other security features.
+Available since v2.6.5.
+
### `--help`
Print the list of available CLI commands and flags.
@@ -190,7 +203,7 @@ npx remotion render --codec=vp8 src/index.tsx HelloWorld out/video.webm
## Fig.io autocompletion
-Fig adds visual apps, shortcuts, and autocomplete to your existing Terminal. The remotion autocompletion is available on Fig, try i with `npx remotion`, `remotion`, `yarn create video`. Useful if you have a memory lapse.
+Install [Fig](https://fig.io) (macOS only) to add Remotion autocomplete to your terminal. Type `npx remotion` to start get suggestions.
## See also
diff --git a/packages/docs/docs/config.md b/packages/docs/docs/config.md
index d6aa7e20ee..14af2f6873 100644
--- a/packages/docs/docs/config.md
+++ b/packages/docs/docs/config.md
@@ -131,6 +131,38 @@ Config.Puppeteer.setTimeoutInMilliseconds(60000);
The [command line flag](/docs/cli#--timeout) `--timeout` will take precedence over this option.
+### setChromiumDisableWebSecurity()
+
+_Available from Version 2.6.5._
+
+This will most notably disable CORS among other security features.
+
+```tsx twoslash
+import { Config } from "remotion";
+
+// ---cut---
+
+Config.Puppeteer.setChromiumDisableWebSecurity(true);
+```
+
+The [command line flag](/docs/cli#--disable-web-security) `--disable-web-security` will take precedence over this option.
+
+### setChromiumIgnoreCertificateErrors()
+
+_Available from Version 2.6.5._
+
+Results in invalid SSL certificates, such as self-signed ones being ignored.
+
+```tsx twoslash
+import { Config } from "remotion";
+
+// ---cut---
+
+Config.Puppeteer.setChromiumIgnoreCertificateErrors(true);
+```
+
+The [command line flag](/docs/cli#--ignore-certificate-errors) `--ignore-certificate-errors` will take precedence over this option.
+
## Rendering
### setConcurrency()
diff --git a/packages/example/remotion.config.ts b/packages/example/remotion.config.ts
index f5c26afd0b..5b50ea3479 100644
--- a/packages/example/remotion.config.ts
+++ b/packages/example/remotion.config.ts
@@ -56,3 +56,4 @@ export const webpackOverride: WebpackOverrideFn = (currentConfiguration) => {
};
Config.Bundling.overrideWebpackConfig(webpackOverride);
+Config.Puppeteer.setChromiumIgnoreCertificateErrors(true);