🎥 Make videos programmatically with React
Update order-of-operations.mdx
Jonny Burgerd3761276704e
diff --git a/packages/docs/docs/audio/order-of-operations.mdx b/packages/docs/docs/audio/order-of-operations.mdxindex 9a1c2fe32e..623eacaa2e 100644--- a/packages/docs/docs/audio/order-of-operations.mdx+++ b/packages/docs/docs/audio/order-of-operations.mdx@@ -10,9 +10,7 @@ import Tabs from '@theme/Tabs';import TabItem from '@theme/TabItem';import {AvailableFrom} from '../../src/components/AvailableFrom';-Before Remotion v4.0.141, it was not defined in which order audio and video operations would be applied. Behavior in preview and render could deviate.--Since Remotion v4.0.141, the order of operations is guaranteed to be the following:+Since Remotion v4.0.141, the order of operations is guaranteed to be the following for `<Video>`, `<Audio>`, `<Html5Audio>`, `<Html5Video>` and `<OffthreadVideo>`, :1. Trim audio (using [`trimBefore`](/docs/html5-audio#trimbefore--trimafter)).2. Offset audio (by putting it in a [`<Sequence>`](/docs/sequence)).@@ -20,9 +18,9 @@ Since Remotion v4.0.141, the order of operations is guaranteed to be the followiExample for a 30 FPS composition which is 60 frames long:-1. An [`<Html5Audio>`](/docs/html5-audio) tag has a [`trimBefore`](/docs/html5-audio#trimbefore--trimafter) value of 45. The first 1.5 seconds of the audio get trimmed off.-2. The [`<Html5Audio>`](/docs/html5-audio) tag is in a [`<Sequence>`](/docs/sequence) which starts at `30`. The audio only begins playing at the 1.0 second timeline mark at the 1.5 second audio position.-3. The [`<Html5Audio>`](/docs/html5-audio) has a [`playbackRate`](/docs/html5-audio#playbackrate) of `2`. The audio gets sped up by 2x, but the starting position and start offset is not affected.+1. An [`<Audio>`](/docs/media/audio) tag has a [`trimBefore`](/docs/media/audio#trimbefore--trimafter) value of 45. The first 1.5 seconds of the audio get trimmed off.+2. The [`<Audio>`](/docs/media/audio) tag is in a [`<Sequence>`](/docs/sequence) which starts at `30`. The audio only begins playing at the 1.0 second timeline mark at the 1.5 second audio position.+3. The [`<Audio>`](/docs/media/audio) has a [`playbackRate`](/docs/html5-audio#playbackrate) of `2`. The audio gets sped up by 2x, but the starting position and start offset is not affected.4. The composition is 60 frames long, so the audio must stop at the 3.5 second mark:> (comp_duration - offset) \* playback_rate + start_from> (60 - 30) \* 2 + 45 => frame 105 or the 3.5 second mark