mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-22 22:48:09 +02:00
- Suppression de la page « Générateur Vidéo » (/remotion) : routes /api/remotion, pipeline de rendu d'images, composition ImageVideo et aperçu associé. Le générateur de Reels est conservé. - Plus de badge « New » à côté des menus. - Tableau de bord : bouton pour supprimer un Reel en échec et sa notification. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017tFkVXQDATYfw5aFtjQahi
32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
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<P extends { totalDuration: number }>(): CalculateMetadataFunction<P> {
|
|
return ({ props }) => ({ durationInFrames: Math.max(1, Math.round(props.totalDuration * REEL_FPS)) });
|
|
}
|
|
|
|
export const RemotionRoot: React.FC = () => {
|
|
return (
|
|
<>
|
|
<Composition
|
|
id="ReelVideo"
|
|
component={ReelVideo}
|
|
fps={REEL_FPS}
|
|
width={REEL_WIDTH}
|
|
height={REEL_HEIGHT}
|
|
durationInFrames={REEL_FPS * 10}
|
|
calculateMetadata={byTotalDuration<ReelVideoProps>()}
|
|
defaultProps={{
|
|
videoUrl: "",
|
|
videoDuration: 10,
|
|
totalDuration: 10,
|
|
words: [],
|
|
captionStyle: DEFAULT_CAPTION_STYLE,
|
|
} as ReelVideoProps}
|
|
/>
|
|
</>
|
|
);
|
|
};
|