🎥 Make videos programmatically with React
Docs: Remove redundant Sequence wrappers from examples (#9862)
Jonny Burger252b0d993747
diff --git a/packages/docs/docs/audio/delaying.mdx b/packages/docs/docs/audio/delaying.mdxindex 0b51d500ea..37598c5e44 100644--- a/packages/docs/docs/audio/delaying.mdx+++ b/packages/docs/docs/audio/delaying.mdx@@ -9,20 +9,18 @@ crumb: 'Audio'import Tabs from '@theme/Tabs';import TabItem from '@theme/TabItem';-Use a [`<Sequence>`](/docs/sequence) with a positive [`from`](/docs/sequence#from) value to delay the audio from playing.+Use the [`from`](/docs/media/audio#from) prop to delay the audio from playing.In the following example, the audio will start playing after 100 frames.```tsx twoslash {6-8}-import {AbsoluteFill, Sequence, staticFile} from 'remotion';+import {AbsoluteFill, staticFile} from 'remotion';import {Audio} from '@remotion/media';export const MyComposition = () => {return (<AbsoluteFill>- <Sequence from={100}>- <Audio src={staticFile('audio.mp3')} />- </Sequence>+ <Audio from={100} src={staticFile('audio.mp3')} /></AbsoluteFill>);};diff --git a/packages/docs/docs/audio/sfx.mdx b/packages/docs/docs/audio/sfx.mdxindex ca2fd709f5..74ede4f4ad 100644--- a/packages/docs/docs/audio/sfx.mdx+++ b/packages/docs/docs/audio/sfx.mdx@@ -13,17 +13,13 @@ The [`@remotion/sfx`](/docs/sfx) package provides a collection of ready-to-use s```tsx twoslash title="MyComp.tsx"import {whoosh, whip} from '@remotion/sfx';-import {Audio, Sequence} from 'remotion';+import {Audio} from '@remotion/media';const MyVideo = () => {return (<>- <Sequence from={0} durationInFrames={30}>- <Audio src={whip} />- </Sequence>- <Sequence from={30} durationInFrames={30}>- <Audio src={whoosh} />- </Sequence>+ <Audio from={0} durationInFrames={30} src={whip} />+ <Audio from={30} durationInFrames={30} src={whoosh} /></>);};@@ -36,7 +32,7 @@ See the [full list of available sounds](/docs/sfx).You can also use the [`remotion.media`](https://remotion.media/#category-sound-effects) CDN URLs directly without installing the package:```tsx twoslash title="MyComp.tsx"-import {Audio} from 'remotion';+import {Audio} from '@remotion/media';const MyVideo = () => {return <Audio src="https://remotion.media/whoosh.wav" />;diff --git a/packages/docs/docs/layers.mdx b/packages/docs/docs/layers.mdxindex 488124bbe1..9165cf6b48 100644--- a/packages/docs/docs/layers.mdx+++ b/packages/docs/docs/layers.mdx@@ -32,21 +32,21 @@ export const MyComp: React.FC = () => {This will render the text on top of the image.-If you want to only show an element for a certain duration, you can use a [`<Sequence>`](/docs/sequence) component, which by default is also absolutely positioned.+If you want to only show a layer for a certain duration, pass timing props to [`<AbsoluteFill>`](/docs/absolute-fill).```tsx twoslash title="MyComp.tsx"import React from 'react';-import {AbsoluteFill, Img, staticFile, Sequence} from 'remotion';+import {AbsoluteFill, Img, staticFile} from 'remotion';export const MyComp: React.FC = () => {return (<AbsoluteFill>- <Sequence>+ <AbsoluteFill><Img src={staticFile('bg.png')} />- </Sequence>- <Sequence from={60} durationInFrames={40}>+ </AbsoluteFill>+ <AbsoluteFill from={60} durationInFrames={40}><h1>This text appears after 60 frames!</h1>- </Sequence>+ </AbsoluteFill></AbsoluteFill>);};@@ -58,5 +58,4 @@ If you are aware of this behavior, you can use it to your advantage and avoid us## See also- [`<AbsoluteFill>`](/docs/absolute-fill)-- [`<Sequence>`](/docs/sequence)- [Build a timeline-based video editor](/docs/building-a-timeline)diff --git a/packages/docs/docs/miscellaneous/automatic-duration.mdx b/packages/docs/docs/miscellaneous/automatic-duration.mdxindex 9f080900b8..ed3008d35f 100644--- a/packages/docs/docs/miscellaneous/automatic-duration.mdx+++ b/packages/docs/docs/miscellaneous/automatic-duration.mdx@@ -20,22 +20,22 @@ It is currently **not supported** to derive the duration of a composition be fro};```-- **`<Series>` and `<Sequence>` can be dynamic too**- While it is true that many compositions use [`<Sequence>`](/docs/sequence) or [`<Series>`](/docs/series) from which the duration could be derived in many cases, it is also not a bulletproof solution.+- **Timing props and `<Series>` can be dynamic too**+ While it is true that many compositions use timing props or [`<Series>`](/docs/series) from which the duration could be derived in many cases, it is also not a bulletproof solution.- It is perfectly acceptable to change the values of the `from` or `durationInFrames` props of a [`<Sequence>`](/docs/sequence) over time:+ It is valid to change the values of the `from` or `durationInFrames` props over time:```tsx twoslash title="ChangingDuration.tsx"- import {Sequence, useCurrentFrame} from 'remotion';+ import {AbsoluteFill, useCurrentFrame} from 'remotion';const ChangingDuration: React.FC = () => {const frame = useCurrentFrame();return (// This is fine!- <Sequence from={frame} durationInFrames={30}>+ <AbsoluteFill from={frame} durationInFrames={30}><div>Hello World!</div>- </Sequence>+ </AbsoluteFill>);};```diff --git a/packages/docs/docs/multiple-fps.mdx b/packages/docs/docs/multiple-fps.mdxindex c59a61e186..5533d5a3fb 100644--- a/packages/docs/docs/multiple-fps.mdx+++ b/packages/docs/docs/multiple-fps.mdx@@ -39,18 +39,16 @@ const animationProgress = interpolate(frame, [1 * fps, 2 * fps], [0, 1], {});```-Also use the `fps` value when specifying `from` and `durationInFrames` of a `<Sequence>`:+Also use the `fps` value when specifying `from` and `durationInFrames`:```tsx twoslashimport React from 'react';-import {interpolate, useCurrentFrame, Sequence, useVideoConfig} from 'remotion';+import {Interactive, interpolate, useCurrentFrame, useVideoConfig} from 'remotion';const frame = useCurrentFrame();const {fps, durationInFrames} = useVideoConfig();// ---cut---// Show for 3 seconds-<Sequence durationInFrames={3 * fps}>- <div />-</Sequence>;+<Interactive.Div durationInFrames={3 * fps} />;```And when passing `fps`, `delay` and `durationInFrames` of a `spring()`:diff --git a/packages/docs/docs/player/autoplay.mdx b/packages/docs/docs/player/autoplay.mdxindex 02bfc80e15..4b66862039 100644--- a/packages/docs/docs/player/autoplay.mdx+++ b/packages/docs/docs/player/autoplay.mdx@@ -65,19 +65,15 @@ Consider the following scenario:```tsx twoslashimport {Audio, Video} from '@remotion/media';-import {AbsoluteFill, Sequence, staticFile} from 'remotion';+import {AbsoluteFill, staticFile} from 'remotion';// ---cut---export const MyComp = () => {return (<AbsoluteFill><Audio src={staticFile('audio.mp3')} />- <Sequence from={120}>- <Audio src={staticFile('audio2.mp3')} />- </Sequence>- <Sequence from={120}>- <Video src={staticFile('video.mp4')} />- </Sequence>+ <Audio from={120} src={staticFile('audio2.mp3')} />+ <Video from={120} src={staticFile('video.mp4')} /></AbsoluteFill>);};diff --git a/packages/docs/docs/player/drag-and-drop/Layer.tsx b/packages/docs/docs/player/drag-and-drop/Layer.tsxindex d59839ac21..c0a659b07b 100644--- a/packages/docs/docs/player/drag-and-drop/Layer.tsx+++ b/packages/docs/docs/player/drag-and-drop/Layer.tsx@@ -1,5 +1,5 @@import React, {useMemo} from 'react';-import {Sequence} from 'remotion';+import {Interactive} from 'remotion';import type {Item} from './item';export const Layer: React.FC<{@@ -17,13 +17,10 @@ export const Layer: React.FC<{}, [item.color, item.height, item.left, item.top, item.width]);return (- <Sequence- key={item.id}+ <Interactive.Divfrom={item.from}durationInFrames={item.durationInFrames}- layout="none"- >- <div style={style} />- </Sequence>+ style={style}+ />);};diff --git a/packages/docs/docs/player/drag-and-drop/SelectionOutline.tsx b/packages/docs/docs/player/drag-and-drop/SelectionOutline.tsxindex 7b29b29218..ccde650a94 100644--- a/packages/docs/docs/player/drag-and-drop/SelectionOutline.tsx+++ b/packages/docs/docs/player/drag-and-drop/SelectionOutline.tsx@@ -1,5 +1,5 @@import React, {useCallback, useMemo} from 'react';-import {useCurrentScale} from 'remotion';+import {Interactive, useCurrentScale} from 'remotion';import type {Item} from './item';import {ResizeHandle} from './ResizeHandle';@@ -92,7 +92,9 @@ export const SelectionOutline: React.FC<{);return (- <div+ <Interactive.Div+ from={item.from}+ durationInFrames={item.durationInFrames}onPointerDown={onPointerDown}onPointerEnter={onMouseEnter}onPointerLeave={onMouseLeave}@@ -106,6 +108,6 @@ export const SelectionOutline: React.FC<{<ResizeHandle item={item} setItem={changeItem} type="bottom-right" /></>) : null}- </div>+ </Interactive.Div>);};diff --git a/packages/docs/docs/player/drag-and-drop/SortedOutlines.tsx b/packages/docs/docs/player/drag-and-drop/SortedOutlines.tsxindex e5a62f4915..4caba2ee74 100644--- a/packages/docs/docs/player/drag-and-drop/SortedOutlines.tsx+++ b/packages/docs/docs/player/drag-and-drop/SortedOutlines.tsx@@ -1,5 +1,4 @@import React from 'react';-import {Sequence} from 'remotion';import type {Item} from './item';import {SelectionOutline} from './SelectionOutline';@@ -31,20 +30,14 @@ export const SortedOutlines: React.FC<{return itemsToDisplay.map((item) => {return (- <Sequence+ <SelectionOutlinekey={item.id}- from={item.from}- durationInFrames={item.durationInFrames}- layout="none"- >- <SelectionOutline- changeItem={changeItem}- item={item}- setSelectedItem={setSelectedItem}- selectedItem={selectedItem}- isDragging={isDragging}- />- </Sequence>+ changeItem={changeItem}+ item={item}+ setSelectedItem={setSelectedItem}+ selectedItem={selectedItem}+ isDragging={isDragging}+ />);});};diff --git a/packages/docs/docs/player/drag-and-drop/index.mdx b/packages/docs/docs/player/drag-and-drop/index.mdxindex 8dfd60aa65..691eaf52d8 100644--- a/packages/docs/docs/player/drag-and-drop/index.mdx+++ b/packages/docs/docs/player/drag-and-drop/index.mdx@@ -173,7 +173,7 @@ export const ResizeHandle: React.FC<{```twoslash include Layerimport React, {useMemo} from 'react';-import {Sequence} from 'remotion';+import {Interactive} from 'remotion';import type {Item} from './item';export const Layer: React.FC<{@@ -191,21 +191,18 @@ export const Layer: React.FC<{}, [item.color, item.height, item.left, item.top, item.width]);return (- <Sequence- key={item.id}+ <Interactive.Divfrom={item.from}durationInFrames={item.durationInFrames}- layout="none"- >- <div style={style} />- </Sequence>+ style={style}+ />);};``````twoslash include SelectionOutlineimport React, {useCallback, useMemo} from 'react';-import {useCurrentScale} from 'remotion';+import {Interactive, useCurrentScale} from 'remotion';import {ResizeHandle} from './ResizeHandle';import type {Item} from './item';@@ -299,7 +296,9 @@ export const SelectionOutline: React.FC<{);return (- <div+ <Interactive.Div+ from={item.from}+ durationInFrames={item.durationInFrames}onPointerDown={onPointerDown}onPointerEnter={onMouseEnter}onPointerLeave={onMouseLeave}@@ -313,14 +312,13 @@ export const SelectionOutline: React.FC<{<ResizeHandle item={item} setItem={changeItem} type="bottom-right" /></>) : null}- </div>+ </Interactive.Div>);};``````twoslash include SortedOutlinesimport React from 'react';-import {Sequence} from 'remotion';import {SelectionOutline} from './SelectionOutline';import type {Item} from './item';@@ -352,20 +350,14 @@ export const SortedOutlines: React.FC<{return itemsToDisplay.map((item) => {return (- <Sequence+ <SelectionOutlinekey={item.id}- from={item.from}- durationInFrames={item.durationInFrames}- layout="none"- >- <SelectionOutline- changeItem={changeItem}- item={item}- setSelectedItem={setSelectedItem}- selectedItem={selectedItem}- isDragging={isDragging}- />- </Sequence>+ changeItem={changeItem}+ item={item}+ setSelectedItem={setSelectedItem}+ selectedItem={selectedItem}+ isDragging={isDragging}+ />);});};@@ -540,9 +532,9 @@ Declare a React component that renders the item.// @include: Layer```-By using a [`<Sequence>`](/docs/sequence) component, the item is only displayed from `from` until `from + durationInFrames`.+By passing `from` and `durationInFrames` to `Interactive.Div`, the item is only displayed from `from` until `from + durationInFrames`.-By adding [`layout="none"`](/docs/sequence#layout), the `<div>` is mounted as a direct child to the DOM.+`Interactive.Div` renders the draggable `<div>` directly, without an additional layout wrapper.### <TitleStep>3</TitleStep> Outline renderingdiff --git a/packages/docs/docs/player/premounting.mdx b/packages/docs/docs/player/premounting.mdxindex 2841f5e4a2..e1d5a95e13 100644--- a/packages/docs/docs/player/premounting.mdx+++ b/packages/docs/docs/player/premounting.mdx@@ -32,25 +32,29 @@ It carries the style <code>opacity: 0</code> to make it invisible.It's time defined by{' '}<a href="/docs/use-current-frame"><code>useCurrentFrame()</code></a>{' '}is frozen at <code>0</code>.:::-## Preloading a `<Sequence>`+## Premounting componentsFrom [v5.0](/docs/5-0-migration), all [`<Sequence>`](/docs/sequence) components are premounted for 1 second (`fps` frames) by default.You can opt out by passing `premountFor={0}`.In v4, add the [`premountFor`](/docs/sequence#premountfor) prop to the [`<Sequence>`](/docs/sequence) component to enable premounting.+[`<Video>`](/docs/media/video) and [`<Audio>`](/docs/media/audio) from `@remotion/media` accept `premountFor` directly from <AvailableFrom v="4.0.495" inline />. They remain layoutless, carry `display: none` while premounted and register the premounted range in the Studio timeline.+The number you pass is the number in frames you premount the component for.```tsx twoslash title="Premounted.tsx"import {Video} from '@remotion/media';-import {Sequence, staticFile} from 'remotion';+import {staticFile} from 'remotion';// ---cut---const MyComp: React.FC = () => {return (- <Sequence premountFor={100}>- <Video src={staticFile('bigbuckbunny.mp4')} />- </Sequence>+ <Video+ from={100}+ premountFor={100}+ src={staticFile('bigbuckbunny.mp4')}+ />);};```@@ -65,19 +69,6 @@ A premounted [`<Sequence>`](/docs/sequence) does carry the styles `opacity: 0` aIt is not possible to premount a [`<Sequence>`](/docs/sequence) with `layout="none"` because such a sequence does not have a container to apply the styles to.-## Premounting media<AvailableFrom v="4.0.495" />--[`<Video>`](/docs/media/video) and [`<Audio>`](/docs/media/audio) from `@remotion/media` accept `premountFor` directly. They remain layoutless, carry `display: none` while premounted and register the premounted range in the Studio timeline.--```tsx twoslash title="PremountedVideo.tsx"-import {Video} from '@remotion/media';-import {staticFile} from 'remotion';--export const MyVideo = () => {- return <Video src={staticFile('video.mp4')} from={60} premountFor={30} />;-};-```-## With `<Series>` and `<TransitionSeries>``premountFor` is also available on [`<Series.Sequence>`](/docs/series) and [`<TransitionSeries.Sequence>`](/docs/transitions/transitionseries).diff --git a/packages/docs/docs/studio/interactivity-best-practices.mdx b/packages/docs/docs/studio/interactivity-best-practices.mdxindex ebbcc23d46..cae3bbc4d1 100644--- a/packages/docs/docs/studio/interactivity-best-practices.mdx+++ b/packages/docs/docs/studio/interactivity-best-practices.mdx@@ -39,9 +39,9 @@ Add a `name` prop to elements to make them easily identifyable.</Interactive.Div><Img name="Avatar" src="https://remotion.media/image.jpeg" /><Video name="Background" src="https://remotion.media/video.mp4" />- <Sequence name="Title">+ <Interactive.Div name="Title">Launch day- </Sequence>+ </Interactive.Div></>```diff --git a/packages/docs/docs/transitions/presentations/push-cut.mdx b/packages/docs/docs/transitions/presentations/push-cut.mdxindex 4ec526bb22..52c4b0efbe 100644--- a/packages/docs/docs/transitions/presentations/push-cut.mdx+++ b/packages/docs/docs/transitions/presentations/push-cut.mdx@@ -34,7 +34,6 @@ const Letter: React.FC<{);};// ---cut----import {Sequence} from 'remotion';import {linearTiming, TransitionSeries} from '@remotion/transitions';import {pushCut} from '@remotion/transitions/push-cut';@@ -58,9 +57,9 @@ export const PushCutTransition = () => {<TransitionSeries.SequencedurationInFrames={60 + outgoingPunchFrames}>- <Sequence from={outgoingPunchFrames}>+ <AbsoluteFill from={outgoingPunchFrames}><Letter color="pink">B</Letter>- </Sequence>+ </AbsoluteFill></TransitionSeries.Sequence></TransitionSeries>);diff --git a/packages/docs/docs/troubleshooting/video-flicker.mdx b/packages/docs/docs/troubleshooting/video-flicker.mdxindex 9d62bbe1b7..c42cc2c979 100644--- a/packages/docs/docs/troubleshooting/video-flicker.mdx+++ b/packages/docs/docs/troubleshooting/video-flicker.mdx@@ -10,17 +10,21 @@ Consider the following markup:```tsx twoslash title="MyComponent.tsx"import {Video} from '@remotion/media';-import {AbsoluteFill, Sequence} from 'remotion';+import {AbsoluteFill} from 'remotion';const MyComponent: React.FC = () => {return (<AbsoluteFill>- <Sequence from={0} durationInFrames={120}>- <Video src="https://example.com/video1.mp4" />- </Sequence>- <Sequence from={120} durationInFrames={120}>- <Video src="https://example.com/video2.mp4" />- </Sequence>+ <Video+ from={0}+ durationInFrames={120}+ src="https://example.com/video1.mp4"+ />+ <Video+ from={120}+ durationInFrames={120}+ src="https://example.com/video2.mp4"+ /></AbsoluteFill>);};diff --git a/packages/docs/docs/use-current-frame.mdx b/packages/docs/docs/use-current-frame.mdxindex b6a43c01cd..9c270c592d 100644--- a/packages/docs/docs/use-current-frame.mdx+++ b/packages/docs/docs/use-current-frame.mdx@@ -7,12 +7,12 @@ crumb: 'API'With this hook, you can retrieve the current frame of the video. Frames are 0-indexed, meaning the first frame is `0`, the last frame is the duration of the composition in frames minus one. To learn more about how Remotion works with time, read the page about [the fundamentals](/docs/the-fundamentals).-If the component you are writing is wrapped in a [`<Sequence>`](/docs/sequence), `useCurrentFrame` will return the frame relative to when the Sequence starts.+If the component you are writing is inside a component with a [`from`](/docs/sequence#from) prop, `useCurrentFrame()` will return the frame relative to when the parent starts.-Say the timeline marker is positioned at frame 25. In the example below, `useCurrentFrame()` will return `25`, except within the Subtitle component, where it will return `15` because it is within a sequence that starts at frame 10.+Say the timeline marker is positioned at frame 25. In the example below, `useCurrentFrame()` will return `25`, except within the `Subtitle` component, where it will return `15` because it is inside an [`<AbsoluteFill>`](/docs/absolute-fill) that starts at frame 10.```tsx twoslash-import {Sequence, useCurrentFrame} from 'remotion';+import {AbsoluteFill, useCurrentFrame} from 'remotion';const Title = () => {const frame = useCurrentFrame(); // 25@@ -30,22 +30,22 @@ const MyVideo = () => {return (<div><Title />- <Sequence from={10}>+ <AbsoluteFill from={10}><Subtitle />- </Sequence>+ </AbsoluteFill></div>);};```-Using `<Sequence />`'s, you can compose multiple elements together and time-shift them independently from each other without changing their animation.+Using timing props, you can compose multiple elements together and time-shift them independently without changing their animation.### Getting the absolute frame of the timeline-In rare circumstances, you want access to the absolute frame of the timeline inside a sequence, use `useCurrentFrame()` at the top-level component and then pass it down as a prop to the children of the `<Sequence />`.+In rare circumstances, you want access to the absolute frame of the timeline inside a timed component. Call `useCurrentFrame()` in the top-level component and pass it down as a prop.```tsx twoslash-import {Sequence, useCurrentFrame} from 'remotion';+import {AbsoluteFill, useCurrentFrame} from 'remotion';// ---cut---@@ -60,9 +60,9 @@ const MyVideo = () => {const frame = useCurrentFrame(); // 25return (- <Sequence from={10}>+ <AbsoluteFill from={10}><Subtitle absoluteFrame={frame} />- </Sequence>+ </AbsoluteFill>);};```diff --git a/packages/docs/docs/videos/index.mdx b/packages/docs/docs/videos/index.mdxindex c458716682..492b4bfdab 100644--- a/packages/docs/docs/videos/index.mdx+++ b/packages/docs/docs/videos/index.mdx@@ -60,20 +60,16 @@ export const MyComp: React.FC = () => {## Delaying-Use the [`<Sequence>`](/docs/sequence) component to delay the appearance of a video.+Use the [`from`](/docs/media/video#from) prop to delay the appearance of a video.In the example below, the video will start playing at frame 60.```tsx twoslashimport React from 'react';import {Video} from '@remotion/media';-import {Sequence, staticFile} from 'remotion';+import {staticFile} from 'remotion';export const MyComp: React.FC = () => {- return (- <Sequence from={60}>- <Video src={staticFile('video.mp4')} />- </Sequence>- );+ return <Video from={60} src={staticFile('video.mp4')} />;};```diff --git a/packages/docs/learn/2022-12-22-apple-wow.mdx b/packages/docs/learn/2022-12-22-apple-wow.mdxindex 77172d4205..3c07674cf4 100644--- a/packages/docs/learn/2022-12-22-apple-wow.mdx+++ b/packages/docs/learn/2022-12-22-apple-wow.mdx@@ -378,7 +378,7 @@ The order is crucial here. Things are done from inside out:1. Apply a scale so that the dots become smaller over time.2. Apply the move animation.-3. Apply a delay between the animation start of each dot by using Remotion's `<Sequence>` component.+3. Apply a delay between the animation start of each dot using the `from` prop.```tsx twoslash title="src/Trail.tsx"// @filename: Move.tsx@@ -390,7 +390,7 @@ export const Move: React.FC<{// @filename: Trail.tsx// ---cut---import React from 'react';-import {AbsoluteFill, Sequence} from 'remotion';+import {AbsoluteFill} from 'remotion';import {Move} from './Move';export const Trail: React.FC<{@@ -401,19 +401,17 @@ export const Trail: React.FC<{<AbsoluteFill>{new Array(amount).fill(true).map((a, i) => {return (- <Sequence from={i * 3}>- <AbsoluteFill>- <Move delay={0}>- <AbsoluteFill- style={{- scale: String(1 - i / amount),- }}- >- {children}- </AbsoluteFill>- </Move>- </AbsoluteFill>- </Sequence>+ <AbsoluteFill from={i * 3}>+ <Move delay={0}>+ <AbsoluteFill+ style={{+ scale: String(1 - i / amount),+ }}+ >+ {children}+ </AbsoluteFill>+ </Move>+ </AbsoluteFill>);})}</AbsoluteFill>@@ -589,7 +587,7 @@ export const Trail: React.FC<{// @filename: MyComposition.tsx// ---cut---import React from 'react';-import {Sequence} from 'remotion';+import {AbsoluteFill} from 'remotion';import {Dot} from './Dot';import {Explosion} from './Explosion';import {Shrinking} from './Shrinking';@@ -600,9 +598,9 @@ export const Dots: React.FC = () => {<Explosion><Trail amount={4}><Shrinking>- <Sequence from={5}>+ <AbsoluteFill from={5}><Dot />- </Sequence>+ </AbsoluteFill></Shrinking></Trail></Explosion>@@ -851,7 +849,7 @@ export const Move: React.FC<{// @filename: Trail.tsx// ---cut---import React from 'react';-import {AbsoluteFill, Sequence} from 'remotion';+import {AbsoluteFill} from 'remotion';import {Move} from './Move';export const Trail: React.FC<{@@ -863,23 +861,22 @@ export const Trail: React.FC<{<AbsoluteFill>{new Array(amount).fill(true).map((a, i) => {return (- <Sequence from={i * 3}>- <AbsoluteFill- style={{- translate: `0 ${-extraOffset}px`,- }}- >- <Move delay={0}>- <AbsoluteFill- style={{- scale: String(1 - i / amount),- }}- >- {children}- </AbsoluteFill>- </Move>- </AbsoluteFill>- </Sequence>+ <AbsoluteFill+ from={i * 3}+ style={{+ translate: `0 ${-extraOffset}px`,+ }}+ >+ <Move delay={0}>+ <AbsoluteFill+ style={{+ scale: String(1 - i / amount),+ }}+ >+ {children}+ </AbsoluteFill>+ </Move>+ </AbsoluteFill>);})}</AbsoluteFill>diff --git a/packages/docs/src/helpers/system-prompt.ts b/packages/docs/src/helpers/system-prompt.tsindex e5c250d18a..42a577a6c7 100644--- a/packages/docs/src/helpers/system-prompt.ts+++ b/packages/docs/src/helpers/system-prompt.ts@@ -155,29 +155,29 @@ export const MyComp: React.FC = () => {};\`\`\`-Any Element can be wrapped in a "Sequence" component from "remotion" to place the element later in the video.+Components such as "Interactive", "AbsoluteFill", "Audio" and "Video" accept timing props that place them later in the video.\`\`\`tsx-import {Sequence} from 'remotion';+import {Interactive} from 'remotion';export const MyComp: React.FC = () => {return (- <Sequence from={10} durationInFrames={20}>- <div>This only appears after 10 frames</div>- </Sequence>+ <Interactive.Div from={10} durationInFrames={20}>+ This only appears after 10 frames+ </Interactive.Div>);};\`\`\`-A Sequence has a "from" prop that specifies the frame number where the element should appear.-A Sequence has a "trimBefore" prop that trims the start of the child timeline by a number of frames.+The "from" prop specifies the frame number where the element should appear.+The "trimBefore" prop trims the start of the component timeline by a number of frames.-A Sequence has a "durationInFrames" prop that specifies how long the element should appear.+The "durationInFrames" prop specifies how long the element should appear.-If a child component of Sequence calls "useCurrentFrame()", the enumeration starts from the first frame the Sequence appears and starts at "trimBefore".+If a child of a timed component calls "useCurrentFrame()", the enumeration starts from the first frame the parent appears and starts at "trimBefore".\`\`\`tsx-import {Sequence} from 'remotion';+import {AbsoluteFill} from 'remotion';export const Child: React.FC = () => {const frame = useCurrentFrame();@@ -187,9 +187,9 @@ export const Child: React.FC = () => {export const MyComp: React.FC = () => {return (- <Sequence from={10} durationInFrames={20}>+ <AbsoluteFill from={10} durationInFrames={20}><Child />- </Sequence>+ </AbsoluteFill>);};\`\`\`diff --git a/packages/docs/static/llms.txt b/packages/docs/static/llms.txtindex 0b515d7af0..97142bba19 100644--- a/packages/docs/static/llms.txt+++ b/packages/docs/static/llms.txt@@ -152,29 +152,29 @@ export const MyComp: React.FC = () => {};```-Any Element can be wrapped in a "Sequence" component from "remotion" to place the element later in the video.+Components such as "Interactive", "AbsoluteFill", "Audio" and "Video" accept timing props that place them later in the video.```tsx-import {Sequence} from 'remotion';+import {Interactive} from 'remotion';export const MyComp: React.FC = () => {return (- <Sequence from={10} durationInFrames={20}>- <div>This only appears after 10 frames</div>- </Sequence>+ <Interactive.Div from={10} durationInFrames={20}>+ This only appears after 10 frames+ </Interactive.Div>);};```-A Sequence has a "from" prop that specifies the frame number where the element should appear.-A Sequence has a "trimBefore" prop that trims the start of the child timeline by a number of frames.+The "from" prop specifies the frame number where the element should appear.+The "trimBefore" prop trims the start of the component timeline by a number of frames.-A Sequence has a "durationInFrames" prop that specifies how long the element should appear.+The "durationInFrames" prop specifies how long the element should appear.-If a child component of Sequence calls "useCurrentFrame()", the enumeration starts from the first frame the Sequence appears and starts at "trimBefore".+If a child of a timed component calls "useCurrentFrame()", the enumeration starts from the first frame the parent appears and starts at "trimBefore".```tsx-import {Sequence} from 'remotion';+import {AbsoluteFill} from 'remotion';export const Child: React.FC = () => {const frame = useCurrentFrame();@@ -184,9 +184,9 @@ export const Child: React.FC = () => {export const MyComp: React.FC = () => {return (- <Sequence from={10} durationInFrames={20}>+ <AbsoluteFill from={10} durationInFrames={20}><Child />- </Sequence>+ </AbsoluteFill>);};```