import { Composition, type CalculateMetadataFunction } from "remotion"; import { DEFAULT_CAPTION_STYLE, REEL_FPS, REEL_HEIGHT, REEL_WIDTH } from "@shared/captions"; import { ReelVideo, type ReelVideoProps } from "./ReelVideo"; /** La durée vient des propriétés : chaque Reel a la sienne. */ function byTotalDuration

(): CalculateMetadataFunction

{ return ({ props }) => ({ durationInFrames: Math.max(1, Math.round(props.totalDuration * REEL_FPS)) }); } export const RemotionRoot: React.FC = () => { return ( <> ()} defaultProps={{ videoUrl: "", videoDuration: 10, totalDuration: 10, words: [], captionStyle: DEFAULT_CAPTION_STYLE, } as ReelVideoProps} /> ); };