mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 23:00:03 +00:00
fix(producer): clamp embedded video/audio windows to the scene (#3332)
Browser probe end reflects full source duration, not the scene slot. Never extend a compile-time end — only fill missing or shrink — so long recordings sliced across short scenes don't inflate extraction windows and time out black on Cloud Run (ARC-13403).
This commit is contained in:
@@ -508,11 +508,9 @@ export async function runProbeStage(input: ProbeStageInput): Promise<ProbeStageR
|
|||||||
el.start,
|
el.start,
|
||||||
resolveBrowserMediaEnd(el.start, el.end, el.duration),
|
resolveBrowserMediaEnd(el.start, el.end, el.duration),
|
||||||
);
|
);
|
||||||
if (
|
if (projectedEnd > 0) {
|
||||||
projectedEnd > 0 &&
|
existing.end =
|
||||||
(existing.end <= 0 || Math.abs(existing.end - projectedEnd) > BROWSER_MEDIA_EPSILON)
|
existing.end <= 0 ? projectedEnd : Math.min(existing.end, projectedEnd);
|
||||||
) {
|
|
||||||
existing.end = projectedEnd;
|
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
el.mediaStart > 0 &&
|
el.mediaStart > 0 &&
|
||||||
@@ -554,11 +552,9 @@ export async function runProbeStage(input: ProbeStageInput): Promise<ProbeStageR
|
|||||||
el.start,
|
el.start,
|
||||||
resolveBrowserMediaEnd(el.start, el.end, el.duration),
|
resolveBrowserMediaEnd(el.start, el.end, el.duration),
|
||||||
);
|
);
|
||||||
if (
|
if (projectedEnd > 0) {
|
||||||
projectedEnd > 0 &&
|
existing.end =
|
||||||
(existing.end <= 0 || Math.abs(existing.end - projectedEnd) > BROWSER_MEDIA_EPSILON)
|
existing.end <= 0 ? projectedEnd : Math.min(existing.end, projectedEnd);
|
||||||
) {
|
|
||||||
existing.end = projectedEnd;
|
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
el.mediaStart > 0 &&
|
el.mediaStart > 0 &&
|
||||||
|
|||||||
Reference in New Issue
Block a user