Skip to content

🎥 Make videos programmatically with React

Update for renderMediaOnLambda()

Pramod10345272fddf
diff --git a/packages/docs/docs/lambda/renderstillonlambda.mdx b/packages/docs/docs/lambda/renderstillonlambda.mdx
index 8bf5ca68fc..483caf926c 100644
--- a/packages/docs/docs/lambda/renderstillonlambda.mdx
+++ b/packages/docs/docs/lambda/renderstillonlambda.mdx
@@ -235,6 +235,10 @@ Passes `forcePathStyle` to the AWS S3 client. If you don't know what this is, yo
An [identifier](https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html#sc-compare) for the S3 storage class of the rendered media. Default: `undefined` (which is `STANDARD`).
+### `licenseKey?`<AvailableFrom v="4.0.999"/>
+
+<Options id="license-key" />
+
### ~~`dumpBrowserLogs?`~~
Deprecated in v4.0 in favor of [`logLevel`](#loglevel).
diff --git a/packages/lambda-client/src/make-lambda-payload.ts b/packages/lambda-client/src/make-lambda-payload.ts
index 7b64fe9d69..69e902e873 100644
--- a/packages/lambda-client/src/make-lambda-payload.ts
+++ b/packages/lambda-client/src/make-lambda-payload.ts
@@ -88,7 +88,9 @@ export type InnerRenderMediaOnLambdaInput = {
metadata: Record<string, string> | null;
storageClass: StorageClass | null;
requestHandler: RequestHandler | null;
-} & ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnLambda>;
+} & ToOptions<
+ Omit<typeof BrowserSafeApis.optionsMap.renderMediaOnLambda, 'apiKey'>
+>;
export const makeLambdaRenderMediaPayload = async ({
rendererFunctionName,
@@ -140,7 +142,6 @@ export const makeLambdaRenderMediaPayload = async ({
offthreadVideoThreads,
storageClass,
requestHandler,
- apiKey,
}: InnerRenderMediaOnLambdaInput): Promise<
ServerlessStartPayload<AwsProvider>
> => {
@@ -218,7 +219,6 @@ export const makeLambdaRenderMediaPayload = async ({
preferLossless: preferLossless ?? false,
forcePathStyle: forcePathStyle ?? false,
metadata: metadata ?? null,
- apiKey: apiKey ?? null,
licenseKey: licenseKey ?? null,
offthreadVideoThreads: offthreadVideoThreads ?? null,
mediaCacheSizeInBytes: mediaCacheSizeInBytes ?? null,
diff --git a/packages/lambda-client/src/render-media-on-lambda.ts b/packages/lambda-client/src/render-media-on-lambda.ts
index 5ff3a0668f..e2bf868fc4 100644
--- a/packages/lambda-client/src/render-media-on-lambda.ts
+++ b/packages/lambda-client/src/render-media-on-lambda.ts
@@ -205,7 +205,6 @@ export const renderMediaOnLambdaOptionalToRequired = (
forcePathStyle: options.forcePathStyle ?? false,
indent: false,
metadata: options.metadata ?? null,
- apiKey: options.apiKey ?? null,
licenseKey: options.apiKey ?? options.licenseKey ?? null,
storageClass: options.storageClass ?? null,
requestHandler: options.requestHandler ?? null,
diff --git a/packages/lambda-client/src/test/concurrency-payload.test.ts b/packages/lambda-client/src/test/concurrency-payload.test.ts
index 8c859731df..ce1c1a37ae 100644
--- a/packages/lambda-client/src/test/concurrency-payload.test.ts
+++ b/packages/lambda-client/src/test/concurrency-payload.test.ts
@@ -48,7 +48,6 @@ test('Should include concurrency field in payload', async () => {
indent: false,
forcePathStyle: false,
metadata: null,
- apiKey: null,
licenseKey: null,
offthreadVideoCacheSizeInBytes: null,
mediaCacheSizeInBytes: null,
@@ -108,7 +107,6 @@ test('Should handle null concurrency', async () => {
indent: false,
forcePathStyle: false,
metadata: null,
- apiKey: null,
licenseKey: null,
offthreadVideoCacheSizeInBytes: null,
mediaCacheSizeInBytes: null,
diff --git a/packages/lambda/src/cli/commands/render/render.ts b/packages/lambda/src/cli/commands/render/render.ts
index e4308d7186..7169b7ac65 100644
--- a/packages/lambda/src/cli/commands/render/render.ts
+++ b/packages/lambda/src/cli/commands/render/render.ts
@@ -352,8 +352,6 @@ export const renderCommand = async ({
indent: false,
forcePathStyle: parsedLambdaCli['force-path-style'] ?? false,
metadata: metadata ?? null,
- apiKey:
- parsedLambdaCli[BrowserSafeApis.options.apiKeyOption.cliFlag] ?? null,
licenseKey:
parsedLambdaCli[BrowserSafeApis.options.licenseKeyOption.cliFlag] ?? null,
storageClass: parsedLambdaCli['storage-class'] ?? null,
diff --git a/packages/lambda/src/test/integration/webhooks.test.ts b/packages/lambda/src/test/integration/webhooks.test.ts
index 4e7a1ac26d..b4ac11c890 100644
--- a/packages/lambda/src/test/integration/webhooks.test.ts
+++ b/packages/lambda/src/test/integration/webhooks.test.ts
@@ -94,7 +94,6 @@ test(
preferLossless: false,
forcePathStyle: false,
metadata: {Author: 'Lunar'},
- apiKey: null,
licenseKey: null,
storageClass: null,
mediaCacheSizeInBytes: null,
diff --git a/packages/serverless-client/src/constants.ts b/packages/serverless-client/src/constants.ts
index d03a888dc9..79e1b42624 100644
--- a/packages/serverless-client/src/constants.ts
+++ b/packages/serverless-client/src/constants.ts
@@ -158,7 +158,6 @@ export type ServerlessStartPayload<Provider extends CloudProvider> = {
preferLossless: boolean;
forcePathStyle: boolean;
metadata: Record<string, string> | null;
- apiKey: string | null;
licenseKey: string | null;
storageClass: Provider['storageClass'] | null;
};