Skip to content

🎥 Make videos programmatically with React

Improve docs for LoopedOffthreadVideo, fixes #4123

Jonny Burger0d80d4432e64
diff --git a/packages/docs/docs/offthreadvideo.mdx b/packages/docs/docs/offthreadvideo.mdx
index fad17dd407..155b07bb16 100644
--- a/packages/docs/docs/offthreadvideo.mdx
+++ b/packages/docs/docs/offthreadvideo.mdx
@@ -336,12 +336,14 @@ export const RemotionRoot: React.FC = () => {
const fps = 30;
return {
- durationInFrames: Math.floor(durationInSeconds * fps),
+ // Set any duration, here as an example, we loop the video 5 times
+ durationInFrames: Math.floor(durationInSeconds * fps * 5),
fps,
width,
height,
props: {
...props,
+ // Pass the durationInSeconds as prop to the React component
durationInSeconds,
}
};