🎥 Make videos programmatically with React
Describe `trimAfter` and `loop` in the docs without version markers
JonnyBurgerc8d9a2650ce5
diff --git a/packages/docs/docs/interactive.mdx b/packages/docs/docs/interactive.mdxindex fa0815bd91..9280a3a95f 100644--- a/packages/docs/docs/interactive.mdx+++ b/packages/docs/docs/interactive.mdx@@ -74,8 +74,6 @@ Controls inherited from [`<Sequence>`](/docs/sequence):`durationInFrames`, `from`, `trimBefore`, `trimAfter`, `playbackRate`, `loop`, `freeze`, `hidden`, `name` and `showInTimeline`.-`trimAfter` and `loop` are included since <AvailableFrom v="4.0.530" inline />.-Use it for components that render a `<Sequence>` internally and forward these props to it.```tsx twoslash title="schema.ts"@@ -92,7 +90,7 @@ export const shapeSchema = {} as const satisfies InteractivitySchema;```-### `Interactive.baseSchemaWithoutLoop`<AvailableFrom v="4.0.530" />+### `Interactive.baseSchemaWithoutLoop`The same controls as [`Interactive.baseSchema`](#interactivebaseschema) without `loop`.diff --git a/packages/docs/docs/loop.mdx b/packages/docs/docs/loop.mdxindex 15b5eb0656..c3755b19cd 100644--- a/packages/docs/docs/loop.mdx+++ b/packages/docs/docs/loop.mdx@@ -63,7 +63,7 @@ CSS styles to be applied to the container. If `layout` is set to `none`, there i`<Loop>` inherits [`premountFor`](/docs/sequence#premountfor), [`postmountFor`](/docs/sequence#postmountfor), [`styleWhilePremounted`](/docs/sequence#stylewhilepremounted) and [`styleWhilePostmounted`](/docs/sequence#stylewhilepostmounted) from [`<Sequence>`](/docs/sequence). These props require `layout="absolute-fill"` (the default). Postmounting the end of the loop requires a finite `times`.-## Relation to `<Sequence loop>`<AvailableFrom v="4.0.530" />+## Relation to `<Sequence loop>`[`<Sequence>`](/docs/sequence#loop) and other timed components accept a [`loop`](/docs/timing#loop-repeat-an-item) prop that repeats the range selected by `trimBefore` and `trimAfter`.diff --git a/packages/docs/docs/sequence.mdx b/packages/docs/docs/sequence.mdxindex 8174d3eeda..f49d0f0b19 100644--- a/packages/docs/docs/sequence.mdx+++ b/packages/docs/docs/sequence.mdx@@ -216,7 +216,7 @@ export const MyVideo = () => {In the example above, `Child` mounts at composition frame `30` and receives frame `15`.-### `trimAfter?`<AvailableFrom v="4.0.530" />+### `trimAfter?`Ends the child timeline at the specified frame, measured in the same clock as [`trimBefore`](#trimbefore).Children receive frames from `trimBefore` up to, but not including, `trimAfter`.@@ -243,7 +243,7 @@ In the example above, `Child` receives frames `15` through `44` and the sequenceSee [Timing and trimming](/docs/timing#why-both-trimafter-and-durationinframes) for how `trimAfter` and `durationInFrames` differ.-### `loop?`<AvailableFrom v="4.0.530" />+### `loop?`Repeats the child range selected by [`trimBefore`](#trimbefore) and [`trimAfter`](#trimafter). Default: `false`.diff --git a/packages/docs/docs/studio/make-component-interactive.mdx b/packages/docs/docs/studio/make-component-interactive.mdxindex 9b15b5c2ea..7205d392f5 100644--- a/packages/docs/docs/studio/make-component-interactive.mdx+++ b/packages/docs/docs/studio/make-component-interactive.mdx@@ -295,7 +295,7 @@ The component now has a timeline row, inherits the common `<Sequence>` props andUse it when the component renders a `<Sequence>` internally.-### `Interactive.baseSchemaWithoutLoop`<AvailableFrom v="4.0.530" />+### `Interactive.baseSchemaWithoutLoop`Use it instead of `Interactive.baseSchema` when the output of the component does not change with the frame, so that no `Loop` control is shown.diff --git a/packages/docs/docs/timing.mdx b/packages/docs/docs/timing.mdxindex 198ff4f375..045f559891 100644--- a/packages/docs/docs/timing.mdx+++ b/packages/docs/docs/timing.mdx@@ -93,7 +93,7 @@ export const MyComposition = () => ();```-## `trimAfter`: Trim the end<AvailableFrom v="4.0.530" />+## `trimAfter`: Trim the end`trimAfter` selects where the content ends, measured in the same clock as `trimBefore`: the frame that the children receive from [`useCurrentFrame()`](/docs/use-current-frame).@@ -122,9 +122,7 @@ For `<Video>` and `<Audio>`, the child clock is the position in the source fileAt 30 composition FPS, `trimBefore={45}` and `trimAfter={105}` select the source from 1.5 to 3.5 seconds.If `trimAfter` is omitted, playback continues until the end of the file.-Before 4.0.530, `trimAfter` was only available on `<Video>` and `<Audio>`.--## `loop`: Repeat an item<AvailableFrom v="4.0.530" />+## `loop`: Repeat an item`loop` repeats the range selected by `trimBefore` and `trimAfter`.@@ -158,8 +156,6 @@ All other items require `trimAfter` to loop, because they have no intrinsic end.[`<Loop>`](/docs/loop) is a shorthand for the same behavior with a period measured in the parent timeline: `<Loop durationInFrames={50} times={3}>` is equivalent to `trimAfter={50}`, `durationInFrames={150}` and `loop`.-Before 4.0.530, `loop` was only available on `<Video>` and `<Audio>`.-## Why both `trimAfter` and `durationInFrames`?`trimAfter` is a position in the child clock, `durationInFrames` is a length in the parent timeline.