🎥 Make videos programmatically with React
@remotion/brand: Fix Studio timeline controls
Jonny Burger559867307761
diff --git a/.agents/skills/interactivity-best-practices/SKILL.md b/.agents/skills/interactivity-best-practices/SKILL.mdindex afdf77c73e..ddf7fd2909 100644--- a/.agents/skills/interactivity-best-practices/SKILL.md+++ b/.agents/skills/interactivity-best-practices/SKILL.md@@ -10,3 +10,5 @@ Use the canonical interactivity best-practices page instead:To make an element or custom component interactive, use:[packages/docs/docs/studio/make-component-interactive.mdx](../../../packages/docs/docs/studio/make-component-interactive.mdx)++When using `Interactive.withSchema()`, include `Interactive.baseSchema` in the schema so standard timeline controls such as trimming and visibility remain available.diff --git a/packages/brand/src/video-elements/Studio.tsx b/packages/brand/src/video-elements/Studio.tsxindex aed83e3436..fc3de46bbf 100644--- a/packages/brand/src/video-elements/Studio.tsx+++ b/packages/brand/src/video-elements/Studio.tsx@@ -10,6 +10,7 @@ import {staticFile,useCurrentFrame,useVideoConfig,+ type InteractiveBaseProps,type InteractivitySchema,type SequenceControls,} from 'remotion';@@ -77,7 +78,7 @@ export const studioReferenceSchema = z.object({export type StudioReferenceProps = z.infer<typeof studioReferenceSchema>;-export type StudioProps = {+export type StudioProps = InteractiveBaseProps & {readonly compositionName: string;readonly compositionWidth: number;readonly compositionHeight: number;@@ -90,6 +91,7 @@ export type StudioProps = {};const studioInteractivitySchema = {+ ...Interactive.baseSchema,viewportWidth: {type: 'number',default: 1600,@@ -1549,8 +1551,14 @@ const StudioInner = React.forwardRef<content,controls,durationInFrames,+ from,+ freeze,frame,+ hidden,+ name,responsivenessProgress,+ showInTimeline,+ trimBefore,viewportHeight,viewportWidth,},@@ -1600,9 +1608,15 @@ const StudioInner = React.forwardRef<return (<Sequencecontrols={controls}+ durationInFrames={durationInFrames}+ freeze={freeze}+ from={from ?? 0}+ hidden={hidden}layout="none"- name="<Studio>"+ name={name ?? '<Studio>'}outlineRef={outlineRef}+ showInTimeline={showInTimeline ?? true}+ trimBefore={trimBefore}><divref={outlineRef}diff --git a/packages/docs/docs/interactive-with-schema.mdx b/packages/docs/docs/interactive-with-schema.mdxindex 878cf6f737..a8527a3e35 100644--- a/packages/docs/docs/interactive-with-schema.mdx+++ b/packages/docs/docs/interactive-with-schema.mdx@@ -128,6 +128,8 @@ Forward it to the `<Sequence>` that registers the component in the timeline.An [`InteractivitySchema`](/docs/interactivity-schema) that describes which props are editable in Remotion Studio.+As a rule, include [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema) in every schema passed to `Interactive.withSchema()` so standard timeline controls remain available.+Use [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema) for Sequence-like timeline props. Use [`Interactive.transformSchema`](/docs/interactive#interactivetransformschema) if the component accepts a `style` prop and should expose transform controls. Use [`Interactive.cropSchema`](/docs/interactive#interactivecropschema) with `InteractiveCropProps` to opt the component into crop controls.For reliable source updates, follow [Interactivity best practices](/docs/studio/interactivity-best-practices): Keep editable values inline, use hardcoded `interpolate()` keyframe arrays, use `translate`, `scale`, `rotate` and `opacity` directly, and avoid animated layout props or `transform` strings.diff --git a/packages/docs/docs/studio/make-component-interactive.mdx b/packages/docs/docs/studio/make-component-interactive.mdxindex 8f950c6581..a085c4e36c 100644--- a/packages/docs/docs/studio/make-component-interactive.mdx+++ b/packages/docs/docs/studio/make-component-interactive.mdx@@ -17,6 +17,8 @@ An [`InteractivitySchema`](/docs/interactivity-schema) describes which props theUse [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema) for props inherited from [`<Sequence>`](/docs/sequence), such as [`from`](/docs/sequence#from), [`trimBefore`](/docs/sequence#trimbefore), [`durationInFrames`](/docs/sequence#durationinframes), [`freeze`](/docs/sequence#freeze), [`hidden`](/docs/sequence#hidden), [`name`](/docs/sequence#name) and [`showInTimeline`](/docs/sequence#showintimeline).+As a rule, include `Interactive.baseSchema` in every schema passed to `Interactive.withSchema()` so trimming and visibility controls remain available.+Use [`Interactive.transformSchema`](/docs/interactive#interactivetransformschema) if your component accepts a `style` prop and applies it to the rendered element.Use [`Interactive.cropSchema`](/docs/interactive#interactivecropschema) and `InteractiveCropProps` to opt a component into the crop controls inherited from an absolute-fill [`<Sequence>`](/docs/sequence).diff --git a/packages/docs/elements/contributing.mdx b/packages/docs/elements/contributing.mdxindex 9df19265ef..c1fc44312a 100644--- a/packages/docs/elements/contributing.mdx+++ b/packages/docs/elements/contributing.mdx@@ -101,8 +101,8 @@ Wrap the exported component with [`Interactive.withSchema()`](/docs/interactive-Export the schema-enabled component directly and wire up the common props:-- Add [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema) to the schema and pass `controls` unchanged to the component's `<Sequence>`.-- Pass `from`, `durationInFrames`, `trimBefore`, `freeze`, and `name` to that Sequence.+- Add [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema) to every `Interactive.withSchema()` schema and pass `controls` unchanged to the component's `<Sequence>`.+- Pass `from`, `durationInFrames`, `trimBefore`, `freeze`, `hidden`, `name`, and `showInTimeline` to that Sequence.- Pass `style` and the ref to the rendered outline. When the Sequence uses `layout="none"`, pass [`outlineRef`](/docs/sequence#outlineref) to it. Set the dimensions in the component because Element metadata does not pass them as props.- Render frame-dependent animation in a child below the Sequence. This makes [`useCurrentFrame()`](/docs/use-current-frame) respect `from`, `trimBefore`, and `freeze`. If the component that returns the Sequence calls it, it reads the parent clock.diff --git a/packages/skills/skills/remotion-interactivity/SKILL.md b/packages/skills/skills/remotion-interactivity/SKILL.mdindex b7e1b3016c..10dccc68e2 100644--- a/packages/skills/skills/remotion-interactivity/SKILL.md+++ b/packages/skills/skills/remotion-interactivity/SKILL.md@@ -239,6 +239,8 @@ Render separate elements if one version should have effects and another should n## Making your own component interactive+When using `Interactive.withSchema()`, include `Interactive.baseSchema` in the schema so standard timeline controls such as trimming and visibility remain available.+To make a custom userland component interactive, use:[Make a component interactive](https://www.remotion.dev/docs/studio/make-component-interactive.md)