fix(remotion-composer): resolve videoSrc through resolveAsset in TalkingHead

TalkingHead passes videoSrc straight to OffthreadVideo, so relative asset
paths (e.g. "clips/source.mp4" under public/) fail to load at render time.
Every other composition that accepts a video source (TitledVideo, Explainer,
CinematicRenderer) already routes it through resolveAsset; this brings
TalkingHead in line with them.

Verified by rendering the TalkingHead composition with a public/-relative
videoSrc before (load failure) and after (renders) this change.
This commit is contained in:
Sakurao Yoshitatsu
2026-08-15 22:12:36 +09:00
parent 95e1c3d0ab
commit 76871c7d6b

View File

@@ -7,6 +7,7 @@ import {
useVideoConfig,
} from "remotion";
import { CaptionOverlay, WordCaption } from "./components/CaptionOverlay";
import { resolveAsset } from "./lib/resolveAsset";
import { TextCard } from "./components/TextCard";
import { StatCard } from "./components/StatCard";
import { CalloutBox } from "./components/CalloutBox";
@@ -318,7 +319,7 @@ export const TalkingHead: React.FC<TalkingHeadProps> = ({
<AbsoluteFill style={{ backgroundColor: "#000" }}>
{/* Layer 1: Video background */}
<OffthreadVideo
src={videoSrc}
src={resolveAsset(videoSrc)}
style={{ width: "100%", height: "100%", objectFit: "cover" }}
/>