🎥 Make videos programmatically with React
Update trimming docs to use the new trimAfter
Jonny Burger9dc5439843c8
diff --git a/packages/docs/docs/videos/index.mdx b/packages/docs/docs/videos/index.mdxindex 5b9e28582d..0452e2521e 100644--- a/packages/docs/docs/videos/index.mdx+++ b/packages/docs/docs/videos/index.mdx@@ -12,9 +12,7 @@ import React from 'react';import {OffthreadVideo, staticFile} from 'remotion';export const MyComp: React.FC = () => {- return (- <OffthreadVideo src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" />- );+ return <OffthreadVideo src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" />;};```@@ -33,7 +31,7 @@ export const MyComp: React.FC = () => {## Trimming-By using the [`startFrom`](/docs/offthreadvideo#startfrom) prop, you can remove the first few seconds of the video.+By using the [`trimBefore`](/docs/offthreadvideo#trimbefore) prop, you can remove the first few seconds of the video.In the example below, the first two seconds of the video are skipped (assuming a composition FPS of 30).```tsx twoslash@@ -41,20 +39,18 @@ import React from 'react';import {OffthreadVideo, staticFile} from 'remotion';export const MyComp: React.FC = () => {- return <OffthreadVideo src={staticFile('video.mp4')} startFrom={60} />;+ return <OffthreadVideo src={staticFile('video.mp4')} trimBefore={60} />;};```-Similarly, you can use [`endAt`](/docs/offthreadvideo#endat) to trim the end of the video.+Similarly, you can use [`trimAfter`](/docs/offthreadvideo#trimafter) to trim the end of the video.```tsx twoslashimport React from 'react';import {OffthreadVideo, staticFile} from 'remotion';export const MyComp: React.FC = () => {- return (- <OffthreadVideo src={staticFile('video.mp4')} startFrom={60} endAt={120} />- );+ return <OffthreadVideo src={staticFile('video.mp4')} trimBefore={60} trimAfter={120} />;};```