/** * DocDoe Cinematic Video Engine — Remotion Composition * * Sequences all scenes through VideoSceneRenderer using Remotion's Series. * This component is passed to @remotion/player's `component` prop — it does * NOT need to be registered in Root.tsx for browser preview use. * * For server-side rendering (remotion render CLI), register in Root.tsx. * * NO framer-motion. All animation is Remotion-native. */ import { AbsoluteFill, Series } from "remotion"; import type { CSSProperties } from "react"; import type { VideoPlan } from "./types"; import { normalizePlan } from "./engine/sceneBuilder"; import { buildVideoTimeline } from "./engine/timeline"; import { VideoSceneRenderer } from "./engine/VideoSceneRenderer"; // ── Props ───────────────────────────────────────────────────────────────── export type VideoEngineProps = { plan: VideoPlan; }; // ── Composition ─────────────────────────────────────────────────────────── /** * VideoEngineComposition renders a full VideoPlan as a Remotion composition. * * @example — in @remotion/player: * */ export function VideoEngineComposition({ plan }: VideoEngineProps) { // Always normalize — handles legacy shapes and fills safe defaults const safePlan = normalizePlan(plan); const timeline = buildVideoTimeline(safePlan.scenes); return ( {timeline.map((entry) => ( ))} {/* Preview watermark — shown when plan.show_preview_watermark is true */} {safePlan.show_preview_watermark ? (
Preview
) : null}
); } // ── Watermark style ─────────────────────────────────────────────────────── const watermarkStyle: CSSProperties = { position: "absolute", top: 46, right: 58, zIndex: 200, background: "rgba(255, 255, 255, 0.10)", border: "1px solid rgba(255, 255, 255, 0.18)", borderRadius: 10, padding: "8px 18px", color: "#ffffff", fontSize: 22, fontWeight: 900, letterSpacing: "0.14em", textTransform: "uppercase", pointerEvents: "none", backdropFilter: "blur(4px)", };