mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 14:50:02 +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,
|
||||
resolveBrowserMediaEnd(el.start, el.end, el.duration),
|
||||
);
|
||||
if (
|
||||
projectedEnd > 0 &&
|
||||
(existing.end <= 0 || Math.abs(existing.end - projectedEnd) > BROWSER_MEDIA_EPSILON)
|
||||
) {
|
||||
existing.end = projectedEnd;
|
||||
if (projectedEnd > 0) {
|
||||
existing.end =
|
||||
existing.end <= 0 ? projectedEnd : Math.min(existing.end, projectedEnd);
|
||||
}
|
||||
if (
|
||||
el.mediaStart > 0 &&
|
||||
@@ -554,11 +552,9 @@ export async function runProbeStage(input: ProbeStageInput): Promise<ProbeStageR
|
||||
el.start,
|
||||
resolveBrowserMediaEnd(el.start, el.end, el.duration),
|
||||
);
|
||||
if (
|
||||
projectedEnd > 0 &&
|
||||
(existing.end <= 0 || Math.abs(existing.end - projectedEnd) > BROWSER_MEDIA_EPSILON)
|
||||
) {
|
||||
existing.end = projectedEnd;
|
||||
if (projectedEnd > 0) {
|
||||
existing.end =
|
||||
existing.end <= 0 ? projectedEnd : Math.min(existing.end, projectedEnd);
|
||||
}
|
||||
if (
|
||||
el.mediaStart > 0 &&
|
||||
|
||||
Reference in New Issue
Block a user