🎥 Make videos programmatically with React
`@remotion/cloudrun`: `renderId` is optional
Jonny Burger9421b1149e9a
diff --git a/packages/cloudrun/src/api/render-media-on-cloudrun.ts b/packages/cloudrun/src/api/render-media-on-cloudrun.tsindex f564018ab0..604e7e2e13 100644--- a/packages/cloudrun/src/api/render-media-on-cloudrun.ts+++ b/packages/cloudrun/src/api/render-media-on-cloudrun.ts@@ -66,18 +66,18 @@ type InternalRenderMediaOnCloudrun = {} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>>;export type RenderMediaOnCloudrunInput = {- cloudRunUrl?: string;- serviceName?: string;region: GcpRegion;serveUrl: string;composition: string;+ renderId?: string | undefined;+ codec: CloudrunCodec;+ cloudRunUrl?: string;+ serviceName?: string;inputProps?: Record<string, unknown>;privacy?: 'public' | 'private';forceBucketName?: string;outName?: string;updateRenderProgress?: (progress: number, error?: boolean) => void;- renderId: string | undefined;- codec: CloudrunCodec;audioCodec?: AudioCodec;encodingMaxRate?: string | null;encodingBufferSize?: string | null;diff --git a/packages/docs/docs/studio/deploy-static.mdx b/packages/docs/docs/studio/deploy-static.mdxindex 3ff69460b1..c21866311a 100644--- a/packages/docs/docs/studio/deploy-static.mdx+++ b/packages/docs/docs/studio/deploy-static.mdx@@ -2,13 +2,13 @@image: /generated/articles-docs-studio-deploy-static.pngtitle: Deploy Remotion Studio as static sitesidebar_label: Deploy as static site-crumb: "Remotion Studio"+crumb: 'Remotion Studio'---_available from v4.0.97_-import Tabs from "@theme/Tabs";-import TabItem from "@theme/TabItem";+import Tabs from '@theme/Tabs';+import TabItem from '@theme/TabItem';You can deploy the Remotion Studio as a static site, for example to Vercel or Netlify.While the Render button will be disabled, it may be used as a [Serve URL](/docs/terminology/serve-url) to pass to rendering APIs.@@ -60,7 +60,7 @@ on:workflow_dispatch:push:branches:- - "main"+ - 'main'permissions:contents: writejobs:@@ -88,8 +88,7 @@ The --public-path flag for `npx remotion bundle` is available only from remotion<Step>3</Step> Go to the settings of your repository (github.com/[username]/[repo]/settings/pages) <br />-<Step>4</Step> In the Branch section, select the <code>gh-pages</code> branch and-click save.+<Step>4</Step> In the Branch section, select the <code>gh-pages</code> branch and click save.## Rendering from a URL@@ -124,27 +123,27 @@ npx remotion render https://remotion-helloworld.vercel.app HelloWorld --props '{```tsx twoslash title="render.mjs"// @module: esnext// @target: es2017-const outputLocation = "/path/to/frames";+const outputLocation = '/path/to/frames';-import { renderMedia, selectComposition } from "@remotion/renderer";+import {renderMedia, selectComposition} from '@remotion/renderer';// ---cut---const inputProps = {- titleText: "Hello World",+ titleText: 'Hello World',};-const serveUrl = "https://remotion-helloworld.vercel.app";+const serveUrl = 'https://remotion-helloworld.vercel.app';const composition = await selectComposition({serveUrl,- id: "HelloWorld",+ id: 'HelloWorld',inputProps,});await renderMedia({composition,serveUrl,- codec: "h264",+ codec: 'h264',inputProps,});```@@ -163,16 +162,16 @@ npx remotion lambda render https://remotion-helloworld.vercel.app HelloWorld --p// @module: esnext// @target: es2017// ---cut----import { renderMediaOnLambda } from "@remotion/lambda/client";--const { bucketName, renderId } = await renderMediaOnLambda({- region: "us-east-1",- functionName: "remotion-render-bds9aab",- composition: "HelloWorld",- serveUrl: "https://remotion-helloworld.vercel.app",- codec: "h264",+import {renderMediaOnLambda} from '@remotion/lambda/client';++const {bucketName, renderId} = await renderMediaOnLambda({+ region: 'us-east-1',+ functionName: 'remotion-render-bds9aab',+ composition: 'HelloWorld',+ serveUrl: 'https://remotion-helloworld.vercel.app',+ codec: 'h264',inputProps: {- titleText: "Hello World",+ titleText: 'Hello World',},});```@@ -191,20 +190,20 @@ npx remotion cloudrun render https://remotion-helloworld.vercel.app HelloWorld -// @module: esnext// @target: es2017// ---cut----import { renderMediaOnCloudrun } from "@remotion/cloudrun/client";+import {renderMediaOnCloudrun} from '@remotion/cloudrun/client';const result = await renderMediaOnCloudrun({- region: "us-east1",- serviceName: "remotion-render-bds9aab",- composition: "HelloWorld",- serveUrl: "https://remotion-helloworld.vercel.app",- codec: "h264",+ region: 'us-east1',+ serviceName: 'remotion-render-bds9aab',+ composition: 'HelloWorld',+ serveUrl: 'https://remotion-helloworld.vercel.app',+ codec: 'h264',inputProps: {- titleText: "Hello World",+ titleText: 'Hello World!',},});-if (result.type === "success") {+if (result.type === 'success') {console.log(result.bucketName);console.log(result.renderId);}