Skip to content

🎥 Make videos programmatically with React

fix(threejs): fallback to swangle on Lambda

“niladrix719”d444c3f9f62f
diff --git a/packages/serverless/src/get-browser-instance.ts b/packages/serverless/src/get-browser-instance.ts
index 53edfc77c0..d3473e2221 100644
--- a/packages/serverless/src/get-browser-instance.ts
+++ b/packages/serverless/src/get-browser-instance.ts
@@ -82,7 +82,11 @@ export const getBrowserInstanceImplementation: GetBrowserInstance = async <
const actualChromiumOptions: ChromiumOptions = {
...chromiumOptions,
// Override the `null` value, which might come from CLI with swANGLE
- gl: chromiumOptions.gl ?? 'swangle',
+ // If the user specifies `angle`, we also switch to `swangle` because `angle` is not supported on Lambda
+ gl:
+ chromiumOptions.gl === 'angle' || chromiumOptions.gl === null
+ ? 'swangle'
+ : chromiumOptions.gl,
enableMultiProcessOnLinux: false,
};
const configurationString = makeConfigurationString(