🎥 Make videos programmatically with React
use local
Jonny Burgere9d34e2433cb
diff --git a/packages/lambda/src/test/integration/renders/regular-audio.bmp b/packages/lambda/src/test/integration/renders/regular-audio.bmpindex 31d8c4c46e..dd67ddc1b2 100644Binary files a/packages/lambda/src/test/integration/renders/regular-audio.bmp and b/packages/lambda/src/test/integration/renders/regular-audio.bmp differdiff --git a/packages/lambda/src/test/integration/webhooks.test.ts b/packages/lambda/src/test/integration/webhooks.test.tsindex 6e08656fb5..cd6f94b444 100644--- a/packages/lambda/src/test/integration/webhooks.test.ts+++ b/packages/lambda/src/test/integration/webhooks.test.ts@@ -1,4 +1,5 @@import {RenderInternals} from '@remotion/renderer';+import path from 'path';import {VERSION} from 'remotion/version';import {beforeAll, beforeEach, describe, expect, test, vi} from 'vitest';import {LambdaRoutines} from '../../defaults';@@ -41,11 +42,24 @@ describe('Webhooks', () => {process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE = '2048';process.env.AWS_LAMBDA_FUNCTION_NAME = 'remotion-dev-lambda';+ const exampleBuild = path.join(process.cwd(), '..', 'example', 'build');++ const {port, close} = await RenderInternals.serveStatic(exampleBuild, {+ binariesDirectory: null,+ concurrency: 1,+ downloadMap: RenderInternals.makeDownloadMap(),+ indent: false,+ logLevel: 'error',+ offthreadVideoCacheSizeInBytes: null,+ port: null,+ remotionRoot: path.dirname(exampleBuild),+ forceIPv4: false,+ });+const res = await callLambda({type: LambdaRoutines.start,payload: {- serveUrl:- 'https://64d3734a6bb69052c34d3616--spiffy-kelpie-71657b.netlify.app/',+ serveUrl: `http://localhost:${port}`,chromiumOptions: {},codec: 'h264',composition: 'react-svg',@@ -137,11 +151,27 @@ describe('Webhooks', () => {},expect.anything(),);+ await close();});test('Should call webhook upon timeout', async () => {process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE = '2048';+ const exampleBuild = path.join(process.cwd(), '..', 'example', 'build');++ // Maybe this can use simulateLambdaRender instead+ const {port, close} = await RenderInternals.serveStatic(exampleBuild, {+ binariesDirectory: null,+ concurrency: 1,+ downloadMap: RenderInternals.makeDownloadMap(),+ indent: false,+ logLevel: 'error',+ offthreadVideoCacheSizeInBytes: null,+ port: null,+ remotionRoot: path.dirname(exampleBuild),+ forceIPv4: false,+ });+await callLambda({functionName: 'remotion-dev-lambda',receivedStreamingPayload: () => undefined,@@ -149,8 +179,7 @@ describe('Webhooks', () => {type: LambdaRoutines.launch,payload: {offthreadVideoCacheSizeInBytes: null,- serveUrl:- 'https://64d3734a6bb69052c34d3616--spiffy-kelpie-71657b.netlify.app/',+ serveUrl: `http://localhost:${port}`,chromiumOptions: {},codec: 'h264',composition: 'react-svg',@@ -223,5 +252,6 @@ describe('Webhooks', () => {},expect.anything(),);+ await close();});});