diff --git a/sdk/cloud/image/Cut.tsx b/sdk/cloud/image/Cut.tsx index 297f7674..b00233ea 100644 --- a/sdk/cloud/image/Cut.tsx +++ b/sdk/cloud/image/Cut.tsx @@ -15,10 +15,10 @@ // // A moment lasts its take's span (endAt - startFrom), or `frames` when it has no take. `said` is the cut's words in its // own frames, as `raea cut` gives them for these spans in this order. -import { Audio, Sequence, useCurrentFrame } from "raea"; +import { Audio, Sequence, useCurrentFrame, useVideoConfig } from "raea"; import EndCard from "./EndCard"; import Said from "./Said"; -import Shot, { type Layout } from "./Shot"; +import Shot, { facesOn, type Layout } from "./Shot"; import Title from "./Title"; type Who = number | string; @@ -166,6 +166,11 @@ export default function Cut({ moments, said, keys, emoji, hook, hookFrames, bed const firstEnd = said?.find((w) => /[.?!]$/.test(w.text))?.to; const hookLen = hookFrames ?? Math.min(60, firstEnd ?? 60); const showHook = !!hook && f < hookLen; + // the hook keeps off the faces of the shots under it (framed as one speaker: a split or a stack's faces aren't these) + const { width: W, height: H, fps } = useVideoConfig(); + const hookFaces = showHook + ? moments.flatMap((m, i) => (sp[i].from < hookLen && m.src && (m.show === "speaker" || m.show === "wide" || m.show === "product") ? facesOn(m.src, m.startFrom, m.endAt, m.who, W, H, fps) : [])) + : []; return ( <> {moments.map((m, i) => ( @@ -181,7 +186,7 @@ export default function Cut({ moments, said, keys, emoji, hook, hookFrames, bed ))} {bed ?