🎥 Make videos programmatically with React
Remove Interactive default duration option
JonnyBurger3cd983340dd9
diff --git a/packages/core/src/Interactive.tsx b/packages/core/src/Interactive.tsxindex c6d6d0de83..ee9999b0c6 100644--- a/packages/core/src/Interactive.tsx+++ b/packages/core/src/Interactive.tsx@@ -293,7 +293,6 @@ type WithSchema = {Component,WithSchemaReservedKey>;- readonly defaultDurationInFrames?: number;readonly wrapInSequence: true;},): React.FC<@@ -314,7 +313,6 @@ type WithSchemaImplementationOptions = Omit<'Component' | 'supportsEffects'> & {readonly Component: React.ComponentType<object>;- readonly defaultDurationInFrames?: number;readonly supportsEffects?: boolean;readonly wrapInSequence?: false | true;};@@ -335,7 +333,6 @@ const withSchema: WithSchema = (untypedOptions: unknown) => {const {Component,componentName,- defaultDurationInFrames,schema,wrapInSequence: _,...rest@@ -380,8 +377,6 @@ const withSchema: WithSchema = (untypedOptions: unknown) => {readonly style?: React.CSSProperties;readonly [key: string]: unknown;};- const resolvedDurationInFrames =- durationInFrames ?? defaultDurationInFrames;const {effectivePremountFor,effectivePostmountFor,@@ -393,7 +388,7 @@ const withSchema: WithSchema = (untypedOptions: unknown) => {} = usePremounting({from: from ?? 0,durationInFrames: resolveSequenceDuration({- durationInFrames: resolvedDurationInFrames,+ durationInFrames,playbackRate,loop,}),@@ -417,7 +412,7 @@ const withSchema: WithSchema = (untypedOptions: unknown) => {<Freeze frame={freezeFrame} active={isPremountingOrPostmounting}><SequenceWithoutSchemalayout="none"- durationInFrames={resolvedDurationInFrames}+ durationInFrames={durationInFrames}from={from}trimBefore={trimBefore}playbackRate={playbackRate}diff --git a/packages/docs/docs/interactive-with-schema.mdx b/packages/docs/docs/interactive-with-schema.mdxindex bd2b3bc15d..bb1d9e56a4 100644--- a/packages/docs/docs/interactive-with-schema.mdx+++ b/packages/docs/docs/interactive-with-schema.mdx@@ -77,10 +77,6 @@ It must accept a `style?: React.CSSProperties` prop and apply it to its visual rThe component name used by Studio and in validation messages.-### `defaultDurationInFrames?`<AvailableFrom v="4.0.530" />--Sets the default [`<Sequence>`](/docs/sequence) duration when no `durationInFrames` prop is passed.-### `schema`An [`InteractivitySchema`](/docs/interactivity-schema) that describes which props are editable in Remotion Studio.diff --git a/packages/docs/elements/audio/waveform-progress/audio-waveform-progress.tsx b/packages/docs/elements/audio/waveform-progress/audio-waveform-progress.tsxindex 759eb3f76d..1a92a5c0ee 100644--- a/packages/docs/elements/audio/waveform-progress/audio-waveform-progress.tsx+++ b/packages/docs/elements/audio/waveform-progress/audio-waveform-progress.tsx@@ -195,7 +195,6 @@ const AudioWaveformProgressInner: React.FC<AudioWaveformProgressProps> = ({export const AudioWaveformProgress = Interactive.withSchema({Component: AudioWaveformProgressInner,componentName: '<AudioWaveformProgress>',- defaultDurationInFrames: 271,schema: audioWaveformProgressSchema,wrapInSequence: true,});diff --git a/packages/docs/elements/guidelines.mdx b/packages/docs/elements/guidelines.mdxindex 439d945b9b..598e12bb9b 100644--- a/packages/docs/elements/guidelines.mdx+++ b/packages/docs/elements/guidelines.mdx@@ -50,8 +50,6 @@ Use `installationMode: 'component-owned-sequence'` when Studio interactivity doeWrap the exported component with [`Interactive.withSchema()`](/docs/interactive-with-schema) and set `wrapInSequence: true`. The user gets one timeline layer that they can trim. The component must accept a `style` prop and apply it to its visual root. The implementation does not appear as separate editable layers.-Use `defaultDurationInFrames` to preserve a component-owned default duration.-`Interactive.withSchema()`:- Supplies [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema), [`Interactive.premountSchema`](/docs/interactive#interactivepremountschema), [`Interactive.cropSchema`](/docs/interactive#interactivecropschema), [`Interactive.transformSchema`](/docs/interactive#interactivetransformschema), the corresponding props and a `<Sequence layout="none">`.diff --git a/packages/skills/skills/remotion-interactivity/SKILL.md b/packages/skills/skills/remotion-interactivity/SKILL.mdindex d3a6accc34..4a549e04d8 100644--- a/packages/skills/skills/remotion-interactivity/SKILL.md+++ b/packages/skills/skills/remotion-interactivity/SKILL.md@@ -307,8 +307,6 @@ Render separate elements if one version should have effects and another should nUse `Interactive.withSchema()` and set `wrapInSequence: true`. It supplies `Interactive.baseSchema`, `Interactive.premountSchema`, `Interactive.cropSchema` and `Interactive.transformSchema`, wraps the component in `<Sequence layout="none">` and exposes standard timeline, mounting, cropping and transform controls. The component must accept a `style?: React.CSSProperties` prop and apply it to its visual root so the wrapper can apply premounting and crop styles.-Use `defaultDurationInFrames` when the wrapped component needs a default duration.-The wrapper exposes `InteractivePremountProps`: `premountFor`, `postmountFor`, `styleWhilePremounted` and `styleWhilePostmounted`. In v4, `premountFor` defaults to `0`. In v5, it defaults to one second (`fps` frames); pass `premountFor={0}` to opt out. `postmountFor` defaults to `0`.It also exposes `InteractiveCropProps`: `cropLeft`, `cropRight`, `cropTop` and `cropBottom`. The wrapper merges the premounting and crop styles into the component's `style`.