🎥 Make videos programmatically with React
set swangle to default gl
Matt McGillivray9ab984bd8a4d
diff --git a/packages/cloudrun/src/functions/render-media-single-thread.ts b/packages/cloudrun/src/functions/render-media-single-thread.tsindex 76796d2283..6fb162ae71 100644--- a/packages/cloudrun/src/functions/render-media-single-thread.ts+++ b/packages/cloudrun/src/functions/render-media-single-thread.ts@@ -1,6 +1,6 @@import type * as ff from '@google-cloud/functions-framework';import {Storage} from '@google-cloud/storage';-import type {RenderMediaOnProgress} from '@remotion/renderer';+import type {ChromiumOptions, RenderMediaOnProgress} from '@remotion/renderer';import {RenderInternals, renderMedia} from '@remotion/renderer';import {randomHash} from '../shared/random-hash';import {getCompositionFromBody} from './helpers/get-composition-from-body';@@ -34,6 +34,12 @@ export const renderMediaSingleThread = async (res.writeHead(200, {'Content-Type': 'text/html'});+ const actualChromiumOptions: ChromiumOptions = {+ ...body.chromiumOptions,+ // Override the `null` value, which might come from CLI with swANGLE+ gl: body.chromiumOptions?.gl ?? 'swangle',+ };+await renderMedia({composition: {...composition,@@ -58,7 +64,7 @@ export const renderMediaSingleThread = async (onProgress,frameRange: body.frameRange,envVariables: body.envVariables,- chromiumOptions: body.chromiumOptions,+ chromiumOptions: actualChromiumOptions,muted: body.muted,verbose: RenderInternals.isEqualOrBelowLogLevel(body.logLevel, 'verbose'),});diff --git a/packages/cloudrun/src/functions/render-still-single-thread.ts b/packages/cloudrun/src/functions/render-still-single-thread.tsindex ba92754e8d..bae8d46cfc 100644--- a/packages/cloudrun/src/functions/render-still-single-thread.ts+++ b/packages/cloudrun/src/functions/render-still-single-thread.ts@@ -1,6 +1,10 @@import type * as ff from '@google-cloud/functions-framework';import {Storage} from '@google-cloud/storage';-import {RenderInternals, renderStill} from '@remotion/renderer';+import {+ ChromiumOptions,+ RenderInternals,+ renderStill,+} from '@remotion/renderer';import {Log} from '../cli/log';import {randomHash} from '../shared/random-hash';import {getCompositionFromBody} from './helpers/get-composition-from-body';@@ -29,6 +33,12 @@ export const renderStillSingleThread = async (const tempFilePath = '/tmp/still.png';const renderId = randomHash({randomInTests: true});+ const actualChromiumOptions: ChromiumOptions = {+ ...body.chromiumOptions,+ // Override the `null` value, which might come from CLI with swANGLE+ gl: body.chromiumOptions?.gl ?? 'swangle',+ };+await renderStill({composition: {...composition,@@ -42,7 +52,7 @@ export const renderStillSingleThread = async (imageFormat: body.imageFormat,scale: body.scale,envVariables: body.envVariables,- chromiumOptions: body.chromiumOptions,+ chromiumOptions: actualChromiumOptions,frame: body.frame,verbose: RenderInternals.isEqualOrBelowLogLevel(body.logLevel, 'verbose'),});diff --git a/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar b/packages/cloudrun/src/gcpInstaller/gcpInstaller.tarindex cf9281da7d..da96822a89 100644Binary files a/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar and b/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar differ