🎥 Make videos programmatically with React
yes
Jonny Burger8e1913f7b969
diff --git a/packages/docs/blog/2021-08-11-remotion-2-3.md b/packages/docs/blog/2021-08-11-remotion-2-3.mdindex 09171bcaf3..1857f2d0b5 100644--- a/packages/docs/blog/2021-08-11-remotion-2-3.md+++ b/packages/docs/blog/2021-08-11-remotion-2-3.md@@ -17,7 +17,7 @@ So far we focused on streamlining the workflow for making videos. While it was a[This new component](/docs/still) is the same as [`<Composition />`](/docs/composition) but is meant for defining a compositions that output a still image. Since it's already implied, you don't have to define the `fps` and `durationInFrames` properties.```tsx twoslash-import { Still } from "remotion";+import {Still} from 'remotion';const Thumbnail: React.FC = () => null;// ---cut---<Still@@ -26,11 +26,11 @@ const Thumbnail: React.FC = () => null;width={1200}height={627}defaultProps={{- title: "Welcome to Remotion",- description: "Edit Video.tsx to change template",- slogan: "Write videos\nin React",+ title: 'Welcome to Remotion',+ description: 'Edit Video.tsx to change template',+ slogan: 'Write videos\nin React',}}-/>;+/>```## Optimized editor for stills@@ -61,23 +61,28 @@ npx remotion still --props='{"custom": "data"}' src/index.tsx my-comp out.pngIf you render using the Node.JS APIs, we have a new equivalent API for rendering stills as well.```ts twoslash-import { bundle } from "@remotion/bundler";-import { getCompositions, renderStill } from "@remotion/renderer";+// @module: ESNext+// @target: ESNext+import {bundle} from '@remotion/bundler';+import {+ getCompositions,+ renderStill+} from '@remotion/renderer';// The composition you want to render-const compositionId = "HelloWorld";+const compositionId = 'HelloWorld'-const bundleLocation = await bundle(require.resolve("./src/index"));+const bundleLocation = await bundle(require.resolve('./src/index'))const comps = await getCompositions(bundleLocation, {inputProps: {- custom: "data",+ custom: 'data',},-});-const composition = comps.find((c) => c.id === compositionId);+})+const composition = comps.find((c) => c.id === compositionId)if (!composition) {- throw new Error(`No composition with the ID ${compositionId} found`);+ throw new Error(`No composition with the ID ${compositionId} found`)}// ---cut---@@ -85,17 +90,14 @@ if (!composition) {await renderStill({composition,serveUrl: bundleLocation,- output: "/tmp/still.png",+ output: '/tmp/still.png',onError: (error) => {- console.error(- "The following error occured when rendering the still: ",- error.message- );+ console.error("The following error occured when rendering the still: ", error.message)},inputProps: {- custom: "data",- },-});+ custom: 'data'+ }+})```## New Stills template with server renderingdiff --git a/packages/docs/docs/deletefunction.md b/packages/docs/docs/deletefunction.mdindex 8c151d3753..3b40db6baa 100644--- a/packages/docs/docs/deletefunction.md+++ b/packages/docs/docs/deletefunction.md@@ -11,16 +11,19 @@ To retrieve a list of functions, call [`getFunctions()`](/docs/lambda/getfunctio## Example```ts twoslash-import { deleteFunction, getFunctions } from "@remotion/lambda";+// @module: esnext+// @target: es2017++import {deleteFunction, getFunctions} from '@remotion/lambda';const functions = await getFunctions({- region: "us-east-1",- compatibleOnly: false,+ region: 'us-east-1',+ compatibleOnly: false});for (const fn of functions) {await deleteFunction({- region: "us-east-1",- functionName: fn.functionName,+ region: 'us-east-1',+ functionName: fn.functionName});}```diff --git a/packages/docs/docs/deployfunction.md b/packages/docs/docs/deployfunction.mdindex 58fc7aca84..58835d78bd 100644--- a/packages/docs/docs/deployfunction.md+++ b/packages/docs/docs/deployfunction.md@@ -9,14 +9,17 @@ Creates an [AWS Lambda](https://aws.amazon.com/lambda/) function in your AWS acc## Example```ts twoslash-import { deployFunction } from "@remotion/lambda";+// @module: esnext+// @target: es2017-const { functionName } = await deployFunction({- region: "us-east-1",+import {deployFunction} from '@remotion/lambda';++const {functionName} = await deployFunction({+ region: 'us-east-1',timeoutInSeconds: 120,- memorySizeInMb: 1024,+ memorySizeInMb: 1024});-console.log(functionName);+console.log(functionName)```## Argumentsdiff --git a/packages/docs/docs/deploysite.md b/packages/docs/docs/deploysite.mdindex 8fc93a129f..2a478d343e 100644--- a/packages/docs/docs/deploysite.md+++ b/packages/docs/docs/deploysite.md@@ -13,29 +13,24 @@ Before calling this function, you should create a bucket, see [`getOrCreateBucke## Example```ts twoslash-import { deploySite } from "@remotion/lambda";--const { url } = await deploySite({- entryPoint: "/Users/jonnyburger/my-remotion-video/src/index.tsx",- bucketName: "remotionlambda-c7fsl3d",- region: "us-east-1",+// @module: esnext+// @target: es2017+import {deploySite} from '@remotion/lambda';++const {url} = await deploySite({+ entryPoint: '/Users/jonnyburger/my-remotion-video/src/index.tsx',+ bucketName: 'remotionlambda-c7fsl3d',+ region: 'us-east-1',options: {onBundleProgress: (progress) => {// Progress is between 0 and 100- console.log(`Bundle progress: ${progress}%`);- },- onUploadProgress: ({- totalFiles,- filesUploaded,- totalSize,- sizeUploaded,- }) => {- console.log(- `Upload progress: Total files ${totalFiles}, Files uploaded ${filesUploaded}, Total size ${totalSize}, Size uploaded ${sizeUploaded}`- );+ console.log(`Bundle progress: ${progress}%`)},- },-});+ onUploadProgress: ({totalFiles, filesUploaded, totalSize, sizeUploaded}) => {+ console.log(`Upload progress: Total files ${totalFiles}, Files uploaded ${filesUploaded}, Total size ${totalSize}, Size uploaded ${sizeUploaded}`, )+ }+ }+})console.log(url);```diff --git a/packages/docs/docs/get-audio-data.md b/packages/docs/docs/get-audio-data.mdindex 1aa93241ba..965924a2e7 100644--- a/packages/docs/docs/get-audio-data.md+++ b/packages/docs/docs/get-audio-data.md@@ -27,6 +27,8 @@ A string pointing to an audio asset.## Example```ts twoslash+// @module: ESNext+// @target: ESNextimport { Audio } from "remotion";// ---cut---import { getAudioData } from "@remotion/media-utils";diff --git a/packages/docs/docs/get-audio-duration.md b/packages/docs/docs/get-audio-duration.mdindex 234494d4de..8c3c89aeae 100644--- a/packages/docs/docs/get-audio-duration.md+++ b/packages/docs/docs/get-audio-duration.md@@ -20,6 +20,8 @@ A string pointing to an audio asset## Example```tsx twoslash+// @module: ESNext+// @target: ESNextimport { Audio } from "remotion";// ---cut---import { getAudioDuration } from "@remotion/media-utils";diff --git a/packages/docs/docs/get-video-metadata.md b/packages/docs/docs/get-video-metadata.mdindex 3d6e348ad3..d2a7218005 100644--- a/packages/docs/docs/get-video-metadata.md+++ b/packages/docs/docs/get-video-metadata.md@@ -26,6 +26,8 @@ A string pointing to an asset.## Example```tsx twoslash+// @module: ESNext+// @target: ESNextimport { Audio } from "remotion";// ---cut---import { getVideoMetadata } from "@remotion/media-utils";diff --git a/packages/docs/docs/getfunctioninfo.md b/packages/docs/docs/getfunctioninfo.mdindex c60ae646c4..6018d12107 100644--- a/packages/docs/docs/getfunctioninfo.md+++ b/packages/docs/docs/getfunctioninfo.md@@ -13,16 +13,19 @@ To deploy a function, use [`deployFunction()`](/docs/lambda/deployfunction).## Example```ts twoslash-import { getFunctionInfo } from "@remotion/lambda";+// @module: esnext+// @target: es2017++import {getFunctionInfo} from '@remotion/lambda';const info = await getFunctionInfo({- functionName: "remotion-render-d7nd2a9f",- region: "eu-central-1",+ functionName: 'remotion-render-d7nd2a9f',+ region: 'eu-central-1'});-console.log(info.functionName); // remotion-render-d7nd2a9f-console.log(info.memorySizeInMb); // 1500-console.log(info.version); // '2021-07-14'-console.log(info.timeoutInSeconds); // 120+console.log(info.functionName) // remotion-render-d7nd2a9f+console.log(info.memorySizeInMb) // 1500+console.log(info.version) // '2021-07-14'+console.log(info.timeoutInSeconds) // 120```## Argumentsdiff --git a/packages/docs/docs/getfunctions.md b/packages/docs/docs/getfunctions.mdindex 7514261862..f1b664e429 100644--- a/packages/docs/docs/getfunctions.md+++ b/packages/docs/docs/getfunctions.md@@ -13,18 +13,21 @@ To get information about only a single function, use [`getFunctionInfo()`](/docs## Example```ts twoslash-import { getFunctions } from "@remotion/lambda";+// @module: esnext+// @target: es2017++import {getFunctions} from '@remotion/lambda';const info = await getFunctions({- region: "eu-central-1",- compatibleOnly: true,+ region: 'eu-central-1',+ compatibleOnly: true});for (const fn of info) {- console.log(fn.functionName); // "remotion-render-d8a03x"- console.log(fn.memorySizeInMb); // 1536- console.log(fn.timeoutInSeconds); // 120- console.log(fn.version); // "2021-07-25"+ console.log(fn.functionName) // "remotion-render-d8a03x"+ console.log(fn.memorySizeInMb) // 1536+ console.log(fn.timeoutInSeconds) // 120+ console.log(fn.version) // "2021-07-25"}```diff --git a/packages/docs/docs/getorcreatebucket.md b/packages/docs/docs/getorcreatebucket.mdindex fc00ee0863..8a2c3b9327 100644--- a/packages/docs/docs/getorcreatebucket.md+++ b/packages/docs/docs/getorcreatebucket.md@@ -9,11 +9,13 @@ Creates a bucket for Remotion Lambda in your S3 account. If one already exists,**Only 1 bucket per region** is necessary for Remotion Lambda to function.```ts twoslash-import { getOrCreateBucket } from "@remotion/lambda";+// @module: ESNext+// @target: ESNext+import {getOrCreateBucket} from '@remotion/lambda';-const { bucketName } = await getOrCreateBucket({ region: "us-east-1" });+const {bucketName} = await getOrCreateBucket({region: 'us-east-1'})-console.log(bucketName); // "remtionlambda-32df3p"+console.log(bucketName) // "remtionlambda-32df3p"```## Argumentsdiff --git a/packages/docs/docs/getrenderprogress.md b/packages/docs/docs/getrenderprogress.mdindex 30ffe27da5..94835bde60 100644--- a/packages/docs/docs/getrenderprogress.md+++ b/packages/docs/docs/getrenderprogress.md@@ -9,16 +9,18 @@ Gets the current status of a render originally triggered via [`renderVideoOnLamb## Example```tsx twoslash-import { getRenderProgress } from "@remotion/lambda";+// @module: esnext+// @target: es2017+import {getRenderProgress} from '@remotion/lambda';// ---cut---const progress = await getRenderProgress({- renderId: "d7nlc2y",- bucketName: "remotionlambda-d9mafgx",- functionName: "remotion-render-la8ffw",- region: "us-east-1",-});+ renderId: 'd7nlc2y',+ bucketName: 'remotionlambda-d9mafgx',+ functionName: 'remotion-render-la8ffw',+ region: 'us-east-1'+})```## APIdiff --git a/packages/docs/docs/lambda-deletesite.md b/packages/docs/docs/lambda-deletesite.mdindex 0d9927e509..5c94b12a67 100644--- a/packages/docs/docs/lambda-deletesite.md+++ b/packages/docs/docs/lambda-deletesite.md@@ -13,21 +13,23 @@ Each project is located in the `sites/` subdirectory of your S3 bucket. CallingGets all sites and deletes them.```ts twoslash-import { AwsRegion, deleteSite, getSites } from "@remotion/lambda";+// @module: ESNext+// @target: ESNext+import {AwsRegion, deleteSite, getSites} from '@remotion/lambda';-const region: AwsRegion = "eu-central-1";+const region: AwsRegion = 'eu-central-1';-const { sites } = await getSites({- region,+const {sites} = await getSites({+ region});for (const site of sites) {await deleteSite({bucketName: site.bucketName,siteName: site.id,- region,- });- console.log(`Site ${site.id} deleted.`);+ region+ })+ console.log(`Site ${site.id} deleted.`)}```diff --git a/packages/docs/docs/lambda-getsites.md b/packages/docs/docs/lambda-getsites.mdindex b6c7fe8e8a..702b4e6938 100644--- a/packages/docs/docs/lambda-getsites.md+++ b/packages/docs/docs/lambda-getsites.md@@ -13,23 +13,25 @@ The projects are located in the `sites/` subdirectory of your S3 bucket. RemembeGets all sites and logs information about them.```ts twoslash-import { getSites } from "@remotion/lambda";+// @module: ESNext+// @target: ESNext+import {getSites} from '@remotion/lambda';-const { sites, buckets } = await getSites({- region: "eu-central-1",-});+const {sites, buckets} = await getSites({+ region: 'eu-central-1'+})for (const site of sites) {- console.log(site.id); // A unique ID for referring to that project- console.log(site.bucketName); // In which bucket the site resides in.- console.log(site.lastModified); // A unix timestamp, but may also be null- console.log(site.sizeInBytes); // Size of all contents in the folder+ console.log(site.id) // A unique ID for referring to that project+ console.log(site.bucketName) // In which bucket the site resides in.+ console.log(site.lastModified) // A unix timestamp, but may also be null+ console.log(site.sizeInBytes) // Size of all contents in the folder}for (const bucket of buckets) {- console.log(bucket.region); // 'eu-central-1'- console.log(bucket.name); // The name of the S3 bucket.- console.log(bucket.creationDate); // A unix timestamp of when the site was created.+ console.log(bucket.region) // 'eu-central-1'+ console.log(bucket.name) // The name of the S3 bucket.+ console.log(bucket.creationDate) // A unix timestamp of when the site was created.}```diff --git a/packages/docs/docs/lambda-setup.md b/packages/docs/docs/lambda-setup.mdindex c1d09b4554..6e010a3e2d 100644--- a/packages/docs/docs/lambda-setup.md+++ b/packages/docs/docs/lambda-setup.md@@ -104,14 +104,16 @@ npx remotion lambda functions deployYou can deploy a function using [`deployFunction()`](/docs/lambda/deployfunction).```ts twoslash-import { deployFunction } from "@remotion/lambda";+// @module: ESNext+// @target: ESNext+import {deployFunction} from '@remotion/lambda';// ---cut----const { functionName } = await deployFunction({- region: "us-east-1",+const {functionName} = await deployFunction({+ region: 'us-east-1',timeoutInSeconds: 120,- memorySizeInMb: 1536,-});+ memorySizeInMb: 1536+})```The function name is returned which you'll need for rendering.@@ -143,29 +145,33 @@ A URL will be printed pointing to the deployed project.First, you need to create an S3 bucket in your preferred region. If one already exists, it will be used instead:```ts twoslash-import path from "path";-import { deploySite, getOrCreateBucket } from "@remotion/lambda";--const { bucketName } = await getOrCreateBucket({- region: "us-east-1",-});+// @module: ESNext+// @target: ESNext+import path from 'path';+import {deploySite, getOrCreateBucket} from '@remotion/lambda';++const {bucketName} = await getOrCreateBucket({+ region: 'us-east-1'+})```Next, upload your Remotion project to an S3 bucket. Specify the entry point of your Remotion project, this is the file where [`registerRoot()`](/docs/register-root) is called.```ts twoslash-import path from "path";-import { deploySite, getOrCreateBucket } from "@remotion/lambda";--const { bucketName } = await getOrCreateBucket({- region: "us-east-1",-});+// @module: ESNext+// @target: ESNext+import path from 'path';+import {deploySite, getOrCreateBucket} from '@remotion/lambda';++const {bucketName} = await getOrCreateBucket({+ region: 'us-east-1'+})// ---cut----const { url } = await deploySite({+const {url} = await deploySite({bucketName,- entryPoint: path.resolve(process.cwd(), "src/index.tsx"),- region: "us-east-1",-});+ entryPoint: path.resolve(process.cwd(), 'src/index.tsx'),+ region: 'us-east-1'+})```You are now ready to render a video.@@ -198,93 +204,87 @@ Progress will be printed until the video finished rendering. Congrats! You rendeYou already have the function name from a previous step. But since you only need to deploy a function once, it's useful to retrieve the name of your deployed function programmatically before rendering a video in case your Node.JS program restarts. We can call [`getFunctions()`](/docs/lambda/getfunctions) with the `compatibleOnly` flag to get only functions with a matching version.```ts twoslash-import {- getFunctions,- renderVideoOnLambda,- getRenderProgress,-} from "@remotion/lambda";+// @module: ESNext+// @target: ESNext+import {getFunctions, renderVideoOnLambda, getRenderProgress} from '@remotion/lambda';const functions = await getFunctions({- region: "us-east-1",- compatibleOnly: true,-});+ region: 'us-east-1',+ compatibleOnly: true+})-const functionName = functions[0].functionName;+const functionName = functions[0].functionName```We can now trigger a render using the [`renderVideoOnLambda()`](/docs/lambda/rendervideoonlambda) function.```ts twoslash-import {- getFunctions,- renderVideoOnLambda,- getRenderProgress,-} from "@remotion/lambda";+// @module: ESNext+// @target: ESNext+import {getFunctions, renderVideoOnLambda, getRenderProgress} from '@remotion/lambda';-const url = "string";+const url = 'string'const functions = await getFunctions({- region: "us-east-1",- compatibleOnly: true,-});+ region: 'us-east-1',+ compatibleOnly: true+})-const functionName = functions[0].functionName;+const functionName = functions[0].functionName// ---cut----const { renderId, bucketName } = await renderVideoOnLambda({- region: "us-east-1",+const {renderId, bucketName} = await renderVideoOnLambda({+ region: 'us-east-1',functionName,serveUrl: url,- composition: "HelloWorld",+ composition: 'HelloWorld',inputProps: {},- codec: "h264-mkv",- imageFormat: "jpeg",- maxRetries: 3,-});+ codec: 'h264-mkv',+ imageFormat: 'jpeg',+ maxRetries: 3+})```The render will now run and after a while the video will be available in your S3 bucket. You can at any time get the status of the video render by calling [`getRenderProgress()`](/docs/lambda/getrenderprogress).```ts twoslash-import {- getFunctions,- renderVideoOnLambda,- getRenderProgress,-} from "@remotion/lambda";+// @module: ESNext+// @target: ESNext+import {getFunctions, renderVideoOnLambda, getRenderProgress} from '@remotion/lambda';-const url = "string";+const url = 'string'const functions = await getFunctions({- region: "us-east-1",- compatibleOnly: true,-});+ region: 'us-east-1',+ compatibleOnly: true+})-const functionName = functions[0].functionName;+const functionName = functions[0].functionName-const { renderId, bucketName } = await renderVideoOnLambda({- region: "us-east-1",+const {renderId, bucketName} = await renderVideoOnLambda({+ region: 'us-east-1',functionName,serveUrl: url,- composition: "HelloWorld",+ composition: 'HelloWorld',inputProps: {},- codec: "h264-mkv",- imageFormat: "jpeg",- maxRetries: 3,-});+ codec: 'h264-mkv',+ imageFormat: 'jpeg',+ maxRetries: 3+})// ---cut---while (true) {- await new Promise((resolve) => setTimeout(resolve, 1000));+ await new Promise(resolve => setTimeout(resolve, 1000))const progress = await getRenderProgress({renderId,bucketName,functionName,- region: "us-east-1",- });+ region: 'us-east-1'+ })if (progress.done) {- console.log("Render finished!", progress.outputFile);- process.exit(0);+ console.log('Render finished!', progress.outputFile)+ process.exit(0)}if (progress.fatalErrorEncountered) {- console.error("Error enountered", progress.errors);- process.exit(1);+ console.error('Error enountered', progress.errors)+ process.exit(1)}}```diff --git a/packages/docs/docs/parametrized-rendering.md b/packages/docs/docs/parametrized-rendering.mdindex cd48c7e56c..afac450ce3 100644--- a/packages/docs/docs/parametrized-rendering.md+++ b/packages/docs/docs/parametrized-rendering.md@@ -90,6 +90,8 @@ npx remotion render src/index.tsx HelloWorld out/helloworld.mp4 --props=./path/tWhen server-rendering using `renderFrames`, you can pass props using the `inputProps` option:```tsx twoslash {9-11}+// @module: esnext+// @target: es2017const video = { fps: 30, durationInFrames: 30, width: 1080, height: 1080 };const bundled = "/path/to/bundle";const framesDir = "/path/to/frames";diff --git a/packages/docs/docs/render-still.md b/packages/docs/docs/render-still.mdindex 700e9aa8ed..34a281acfd 100644--- a/packages/docs/docs/render-still.md+++ b/packages/docs/docs/render-still.md@@ -14,6 +14,8 @@ If you want to render a full image sequence and possibly encode it to a video laYou first need to bundle the project and fetch the compositions. Read [the code snippet on the site for server-side rendering](/docs/ssr/#render-a-video-programmatically) for an example how to come up with the `bundleLocation` and `composition` variables.```ts twoslash+// @module: ESNext+// @target: ESNextimport { bundle } from "@remotion/bundler";import { getCompositions, renderStill } from "@remotion/renderer";@@ -116,14 +118,16 @@ _optional_Allows you to react to an exception thrown in your React code. The callback has an argument which is the error.```tsx twoslash-const renderStill = (options: { onError: (err: Error) => void }) => {};+const renderStill = (options: {+ onError: (err: Error) => void;+}) => {}// ---cut---renderStill({// ... other argumentsonError: (err: Error) => {// Handle error here- },-});+ }+})```### `overwrite?`diff --git a/packages/docs/docs/renderstillonlambda.md b/packages/docs/docs/renderstillonlambda.mdindex daf1c55843..d380e51d91 100644--- a/packages/docs/docs/renderstillonlambda.md+++ b/packages/docs/docs/renderstillonlambda.md@@ -13,22 +13,27 @@ If you want to render a still locally instead, use [`renderStill()`](/docs/rende## Example```tsx twoslash-import { renderStillOnLambda } from "@remotion/lambda";+// @module: esnext+// @target: es2017+import {renderStillOnLambda} from '@remotion/lambda';// ---cut----const { estimatedPrice, url, size } = await renderStillOnLambda({- region: "us-east-1",- functionName: "remotion-render-bds9aab",- serveUrl:- "https://remotionlambda-qg35eyp1s1.s3.eu-central-1.amazonaws.com/sites/bf2jrbfkw",- composition: "MyVideo",+const {+ estimatedPrice,+ url,+ size+} = await renderStillOnLambda({+ region: 'us-east-1',+ functionName: 'remotion-render-bds9aab',+ serveUrl: 'https://remotionlambda-qg35eyp1s1.s3.eu-central-1.amazonaws.com/sites/bf2jrbfkw',+ composition: 'MyVideo',inputProps: {},- imageFormat: "png",+ imageFormat: 'png',maxRetries: 3,- privacy: "public",+ privacy: 'public',envVariables: {},- frame: 10,-});+ frame: 10+})```## Argumentsdiff --git a/packages/docs/docs/rendervideoonlambda.md b/packages/docs/docs/rendervideoonlambda.mdindex c19afa8a8a..7b138f4aba 100644--- a/packages/docs/docs/rendervideoonlambda.md+++ b/packages/docs/docs/rendervideoonlambda.md@@ -11,22 +11,23 @@ Triggers a render on a lambda given a composition and a lambda function.## Example```tsx twoslash-import { renderVideoOnLambda } from "@remotion/lambda";+// @module: esnext+// @target: es2017+import {renderVideoOnLambda} from '@remotion/lambda';// ---cut----const { bucketName, renderId } = await renderVideoOnLambda({- region: "us-east-1",- functionName: "remotion-render-bds9aab",- composition: "MyVideo",+const {bucketName, renderId} = await renderVideoOnLambda({+ region: 'us-east-1',+ functionName: 'remotion-render-bds9aab',+ composition: 'MyVideo',framesPerLambda: 20,- serveUrl:- "https://remotionlambda-qg35eyp1s1.s3.eu-central-1.amazonaws.com/sites/bf2jrbfkw",+ serveUrl: 'https://remotionlambda-qg35eyp1s1.s3.eu-central-1.amazonaws.com/sites/bf2jrbfkw',inputProps: {},- codec: "h264-mkv",- imageFormat: "jpeg",+ codec: 'h264-mkv',+ imageFormat: 'jpeg',maxRetries: 3,- privacy: "public",-});+ privacy: 'public'+})```## Argumentsdiff --git a/packages/docs/docs/simulatepermissions.md b/packages/docs/docs/simulatepermissions.mdindex 02063533b9..d0c8559ab9 100644--- a/packages/docs/docs/simulatepermissions.md+++ b/packages/docs/docs/simulatepermissions.md@@ -15,15 +15,18 @@ The function does reject with an error if a permission is missing, rather the mi## Example```ts twoslash-import { simulatePermissions } from "@remotion/lambda";+// @module: esnext+// @target: es2017++import {simulatePermissions} from '@remotion/lambda';-const { results } = await simulatePermissions({- region: "us-east-1",+const {results} = await simulatePermissions({+ region: 'us-east-1',});for (const result of results) {- console.log(result.decision); // "allowed"- console.log(result.name); // "iam:GetUser"+ console.log(result.decision) // "allowed"+ console.log(result.name) // "iam:GetUser"}```@@ -45,14 +48,14 @@ A callback function that gets called every time a new simulation has been execut// @module: esnext// @target: es2017-import { simulatePermissions } from "@remotion/lambda";+import {simulatePermissions} from '@remotion/lambda';-const { results } = await simulatePermissions({- region: "us-east-1",+const {results} = await simulatePermissions({+ region: 'us-east-1',onSimulation: (result) => {- console.log(result.decision); // "allowed"- console.log(result.name); // "iam:GetUser"- },+ console.log(result.decision) // "allowed"+ console.log(result.name) // "iam:GetUser"+ }});```