Skip to content

πŸŽ₯ Make videos programmatically with React

Merge branch 'main' into feature/boolean-prop-editing-timeline

JonnyBurger9c95cbec716d
diff --cc packages/light-leaks/src/LightLeak.tsx
index ee204a1ebe,21eea37c4c..8fa55f050d
--- a/packages/light-leaks/src/LightLeak.tsx
+++ b/packages/light-leaks/src/LightLeak.tsx
@@@ -231,16 -231,11 +231,16 @@@ const LightLeakCanvas: React.FC<
* @description Renders a WebGL-based light leak effect as a Sequence.
* @see [Documentation](https://www.remotion.dev/docs/light-leaks/light-leak)
*/
-const lightLeakSchema = z.object({
- seed: z.number().describe('Seed'),
- hueShift: z.number().min(0).max(360).describe('Hue Shift'),
- from: z.number().default(0).describe('From'),
-});
+const lightLeakSchema = {
- seed: {type: 'number', description: 'Random seed for the light leak pattern'},
++ seed: {type: 'number', description: 'Seed'},
+ hueShift: {
+ type: 'number',
+ min: 0,
+ max: 360,
- description: 'Hue rotation in degrees (0–360)',
++ description: 'Hue Shift',
+ },
- from: {type: 'number', description: 'Starting frame of the light leak'},
++ from: {type: 'number', description: 'From'},
+} as const satisfies SequenceSchema;
export const LightLeak: React.FC<LightLeakProps> = ({
seed: seedProp = 0,
diff --cc packages/media/src/audio/audio-for-preview.tsx
index c8e7c7fc96,8a917bd456..78e93890c2
--- a/packages/media/src/audio/audio-for-preview.tsx
+++ b/packages/media/src/audio/audio-for-preview.tsx
@@@ -507,13 -507,23 +507,25 @@@ type InnerAudioProps =
readonly onError?: MediaOnError;
};
-const audioSchema = z.object({
- volume: z
- .number()
- .min(0)
- .max(20)
- .multipleOf(0.01)
- .default(1)
- .describe('Volume'),
- playbackRate: z
- .number()
- .min(0)
- .multipleOf(0.01)
- .default(1)
- .describe('Playback Rate'),
- trimBefore: z.number().min(0).default(0),
- trimAfter: z.number().min(0).default(0),
-});
+const audioSchema = {
- volume: {type: 'number', min: 0, max: 20, step: 0.01, default: 1},
- playbackRate: {type: 'number', min: 0, step: 0.01, default: 1},
++ volume: {
++ type: 'number',
++ min: 0,
++ max: 20,
++ step: 0.01,
++ default: 1,
++ description: 'Volume',
++ },
++ playbackRate: {
++ type: 'number',
++ min: 0,
++ step: 0.01,
++ default: 1,
++ description: 'Playback Rate',
++ },
+ trimBefore: {type: 'number', min: 0, default: 0},
+ trimAfter: {type: 'number', min: 0, default: 0},
- loop: {type: 'boolean', default: false},
+} as const satisfies SequenceSchema;
export const AudioForPreview: React.FC<InnerAudioProps> = ({
loop,
diff --cc packages/media/src/video/video-for-preview.tsx
index f0a6369fc5,a21412e8ab..9ead754712
--- a/packages/media/src/video/video-for-preview.tsx
+++ b/packages/media/src/video/video-for-preview.tsx
@@@ -528,13 -528,23 +528,25 @@@ const VideoForPreviewAssertedShowing: R
);
};
-const videoSchema = z.object({
- volume: z
- .number()
- .min(0)
- .max(20)
- .multipleOf(0.01)
- .default(1)
- .describe('Volume'),
- playbackRate: z
- .number()
- .min(0)
- .multipleOf(0.01)
- .default(1)
- .describe('Playback Rate'),
- trimBefore: z.number().min(0).default(0),
- trimAfter: z.number().min(0).default(0),
-});
+const videoSchema = {
- volume: {type: 'number', min: 0, max: 20, step: 0.01, default: 1},
- playbackRate: {type: 'number', min: 0, step: 0.01, default: 1},
++ volume: {
++ type: 'number',
++ min: 0,
++ max: 20,
++ step: 0.01,
++ default: 1,
++ description: 'Volume',
++ },
++ playbackRate: {
++ type: 'number',
++ min: 0,
++ step: 0.01,
++ default: 1,
++ description: 'Playback Rate',
++ },
+ trimBefore: {type: 'number', min: 0, default: 0},
+ trimAfter: {type: 'number', min: 0, default: 0},
- loop: {type: 'boolean', default: false},
+} as const satisfies SequenceSchema;
export const VideoForPreview: React.FC<VideoForPreviewProps> = (props) => {
const schemaInput = useMemo(() => {
diff --cc packages/studio/src/helpers/timeline-layout.ts
index 675d7d1bf9,77961f585c..3b1ad161b4
--- a/packages/studio/src/helpers/timeline-layout.ts
+++ b/packages/studio/src/helpers/timeline-layout.ts
@@@ -32,6 -51,7 +33,7 @@@ export const getSchemaFields =
const supported = SUPPORTED_SCHEMA_TYPES.has(typeName);
return {
key,
- description: getZodSchemaDescription(fieldSchema),
++ description: fieldSchema.description,
typeName,
supported,
rowHeight: supported