Skip to content

Commit eeaf421

Browse files
author
Miriad
committed
fix: pass all scene data through mapInputProps to Remotion
mapInputProps() was cherry-picking only 6 fields per scene, dropping sceneType, code, list, comparison, mockup, and wordTimestamps. This caused SceneRouter to fall through to the generic Scene component for every scene, making all videos look like plain word overlays. Fix: spread the full scene object (...s) instead of cherry-picking. Added missing fields to RenderInput type: sceneType, code, list, comparison, mockup, wordTimestamps.
1 parent 75fe97c commit eeaf421

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/services/remotion.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@ export interface RenderInput {
4848
bRollKeywords?: string[];
4949
sceneNumber?: number;
5050
durationEstimate?: number;
51+
sceneType?: string;
52+
code?: { snippet: string; language: string; highlightLines?: number[] };
53+
list?: { items: string[]; icon?: string };
54+
comparison?: { leftLabel: string; rightLabel: string; rows: { left: string; right: string }[] };
55+
mockup?: { deviceType: string; screenContent: string };
5156
infographicUrl?: string;
57+
wordTimestamps?: Array<{ text: string; startMs: number; endMs: number }>;
5258
}>;
5359
cta: string;
5460
};
@@ -112,13 +118,8 @@ function mapInputProps(input: RenderInput): Record<string, unknown> {
112118
audioDurationInSeconds: input.audioDurationSeconds,
113119
hook: input.script.hook,
114120
scenes: input.script.scenes.map((s, i) => ({
115-
narration: s.narration,
116-
visualDescription: s.visualDescription,
117-
bRollKeywords: s.bRollKeywords,
118-
sceneNumber: s.sceneNumber,
119-
durationEstimate: s.durationEstimate,
121+
...s,
120122
bRollUrl: input.bRollUrls[i],
121-
...(s.infographicUrl ? { infographicUrl: s.infographicUrl } : {}),
122123
})),
123124
cta: input.script.cta,
124125
sponsor: input.sponsor,

0 commit comments

Comments
 (0)