Skip to content

🎥 Make videos programmatically with React

finetuning

Jonny Burgerfcad0cabf55c
diff --git a/packages/lambda/src/api/render-media-on-lambda.ts b/packages/lambda/src/api/render-media-on-lambda.ts
index 25085524b6..6950e8fa54 100644
--- a/packages/lambda/src/api/render-media-on-lambda.ts
+++ b/packages/lambda/src/api/render-media-on-lambda.ts
@@ -76,7 +76,7 @@ export type RenderMediaOnLambdaOutput = {
* @param params.region The AWS region in which the media should be rendered.
* @param params.maxRetries How often rendering a chunk may fail before the media render gets aborted. Default "1"
* @param params.logLevel Level of logging that Lambda function should perform. Default "info".
- * @param params.webhook Webhook URL to be called upon completion or timeout of the rendering process.
+ * @param params.webhook Configuration for webhook called upon completion or timeout of the render.
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
*/
diff --git a/packages/lambda/src/shared/constants.ts b/packages/lambda/src/shared/constants.ts
index 5b3397e291..da16decb9b 100644
--- a/packages/lambda/src/shared/constants.ts
+++ b/packages/lambda/src/shared/constants.ts
@@ -194,6 +194,11 @@ export enum LambdaRoutines {
still = 'still',
}
+type WebhookOption = null | {
+ url: string;
+ secret: string | null;
+};
+
export type LambdaPayloads = {
info: {
type: LambdaRoutines.info;
@@ -226,10 +231,7 @@ export type LambdaPayloads = {
muted: boolean;
version: string;
overwrite: boolean;
- webhook: null | {
- url: string;
- secret: string | null;
- };
+ webhook: WebhookOption;
};
launch: {
type: LambdaRoutines.launch;
@@ -260,10 +262,7 @@ export type LambdaPayloads = {
downloadBehavior: DownloadBehavior;
muted: boolean;
overwrite: boolean;
- webhook: null | {
- url: string;
- secret: string | null;
- };
+ webhook: WebhookOption;
};
status: {
type: LambdaRoutines.status;
diff --git a/packages/lambda/src/shared/invoke-webhook.ts b/packages/lambda/src/shared/invoke-webhook.ts
index cd69b35639..ae6d3b703a 100644
--- a/packages/lambda/src/shared/invoke-webhook.ts
+++ b/packages/lambda/src/shared/invoke-webhook.ts
@@ -63,21 +63,6 @@ export const mockableHttpClients = {
https: https.request,
};
-/**
- * @description Calls a webhook.
- * @link https://remotion.dev/docs/lambda/rendermediaonlambda#webhook
- * @param params.url URL of webhook to call.
- * @param params.renderId assigned render ID.
- * @param params.secret webhook secret provided by the user.
- * @param params.bucketName S3 bucket name.
- * @param params.expectedBucketOwner owner of S3 bucket.
- * @param params.outputUrl URL of rendered media file.
- * @param params.lambdaErrors non-fatal errors that have occurred during the render process.
- * @param params.errors fatal errors that have been thrown during the render process.
- * @param params.outputFile output file.
- * @param params.timeToFinish time to finish of rendering process.
- * @returns {Promise<void>} Promise of HTTP request with resolve/reject to be used for error handling.
- */
export function invokeWebhook({
payload,
secret,