Skip to content

🎥 Make videos programmatically with React

fix testlambda.mjs

Jonny Burgeree268d368b26
diff --git a/packages/example/src/HugePayload.tsx b/packages/example/src/HugePayload.tsx
index b39a270ef5..cece669f22 100644
--- a/packages/example/src/HugePayload.tsx
+++ b/packages/example/src/HugePayload.tsx
@@ -7,14 +7,14 @@ export const hugePayloadSchema = z.object({
file: z.string(),
});
-export const HugePayload: React.FC<z.infer<typeof hugePayloadSchema>> = ({
- str,
- date,
- file,
-}) => {
+export const HugePayload: React.FC<
+ z.infer<typeof hugePayloadSchema> & {
+ dontCareAboutSize?: boolean;
+ }
+> = ({str, date, file, dontCareAboutSize}) => {
const {defaultProps} = useVideoConfig();
- if (str.length !== 6000000) {
+ if (str.length !== 6000000 && !dontCareAboutSize) {
throw new Error('str is not 6,000,000 characters long');
}
diff --git a/packages/example/src/Root.tsx b/packages/example/src/Root.tsx
index d447e4623f..1b5dab48fa 100644
--- a/packages/example/src/Root.tsx
+++ b/packages/example/src/Root.tsx
@@ -228,6 +228,7 @@ export const Index: React.FC = () => {
str: 'a'.repeat(140 * 1000),
date: new Date('2020-01-01'),
file: staticFile('nested/mp4.png'),
+ dontCareAboutSize: true,
},
};
}}