Repository navigation
Fork patch: Discover JS-src nested video onto host window - #8
Draft
valeriangalliat wants to merge 2 commits into
Draft
valeriangalliat wants to merge 2 commits into
valeriangalliat wants to merge 2 commits into
Conversation
valeriangalliat
force-pushed
the
patch/discover-host-window
branch
from
October 24, 2026 23:23
70a263a to
1f46037
Compare
Collaborator
Author
|
🤖 AI agent: sync/2026-10-24 (tags moved the same day): rebased onto upstream First pass on this date, onto The range-diff below is against 1: 21ad4c618 ! 1: 95ed1fc0b fix(producer): map discovered nested media onto the host window
@@ packages/producer/src/services/render/stages/probeStage.test.ts: import { afterA
import { mkdtempSync, rmSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
-+import { MEDIA_RENDER_ID_ATTR } from "@hyperframes/core";
-
- const workDir = mkdtempSync(join(tmpdir(), "hf-stage-test-"));
- afterAll(() => rmSync(workDir, { recursive: true, force: true }));
+-import type { RateSpec } from "@hyperframes/core";
++import { MEDIA_RENDER_ID_ATTR, type RateSpec } from "@hyperframes/core";
+ import { parseAudioElements, videoAudioId } from "../../../../../engine/src/services/audioMixer.js";
+ import {
+ parseVideoElements,
@@ packages/producer/src/services/render/stages/probeStage.test.ts: let mediaPreflightComposition: unknown;
let afterMediaPreflight: (() => void) | null = null;
let fileServerCloseCallCount = 0;
@@ packages/producer/src/services/render/stages/probeStage.ts
@@ packages/producer/src/services/render/stages/probeStage.ts: import type { RenderJob } from "../../renderOrchestrator.js";
import { isActionableProbeFailure } from "./probeFailures.js";
import { preflightCompositionAssetMediaTypes } from "../../assetMediaType.js";
- import { resolveCaptureImageFormat } from "../captureImageFormat.js";
+ import { resolveCaptureImageFormat, resolveCaptureJpegQuality } from "../captureImageFormat.js";
+import { createHostWindowMapper } from "../../hostWindowMapper.js";
export interface ProbeStageInput {
projectDir: string;
@@ packages/producer/src/services/render/stages/probeStage.ts: export async function runProbeStage(input: ProbeStageInput): Promise<ProbeStageR
- const existingImageIds = new Set(composition.images.map((image) => image.id));
+ const authoredStarts = authoredMediaStarts(compiled.html);
pruneMutedBrowserMedia(composition, browserMedia, existingAudioIds);
+ const mapHost = createHostWindowMapper(compiled.html);
@@ packages/producer/src/services/render/stages/probeStage.ts: export async functio
for (const el of browserMedia) {
if (!el.src || el.src === "about:blank") continue;
@@ packages/producer/src/services/render/stages/probeStage.ts: export async function runProbeStage(input: ProbeStageInput): Promise<ProbeStageR
- }
+ if (audio) audio.loop = existing.loop;
}
- } else {
+ } else if (!compiled.droppedMediaIds.has(el.id)) {
- // New video discovered from browser
+ const placed = mapHost(
+ el.id,
@@ packages/producer/src/services/render/stages/probeStage.ts: export async functio
+ start: placed.start,
+ end: placed.end,
mediaStart: el.mediaStart,
+ playbackRate: el.playbackRate,
loop: el.loop,
- hasAudio: el.hasAudio && !el.muted,
@@ packages/producer/src/services/render/stages/probeStage.ts: export async function runProbeStage(input: ProbeStageInput): Promise<ProbeStageR
}
}
- } else {
+ } else if (!compiled.droppedMediaIds.has(el.id)) {
+ const placed = mapHost(
+ el.id,
+ el.start,
@@ packages/producer/src/services/render/stages/probeStage.ts: export async functio
+ start: placed.start,
+ end: placed.end,
mediaStart: el.mediaStart,
- layer: 0,
- volume: el.volume,
+ loop: el.loop,
+ playbackRate: el.playbackRate,
@@ packages/producer/src/services/render/stages/probeStage.ts: export async function runProbeStage(input: ProbeStageInput): Promise<ProbeStageR
}
}
- } else {
+ } else if (!compiled.droppedMediaIds.has(el.id)) {
+ const placed = mapHost(
+ el.id,
+ el.start,
2: 70a263aaa = 2: 859737fe0 fix(producer): close discovered nested media at the host's timing window |
Edit accuracy: accurate 271 (base branch 271), smooth 126 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (3)
|
Keep-local: empty-src videos get a runtime src after compile, so discover was adding them at scene-local t=0. Shift by host offset/limit (same shape compile uses). Do not upstream (silenced media_missing_data_start).
Same rule as the compile-time collector (upstream heygen-com#3975): the host's end comes from the runtime's authored timing window, so a positive data-duration wins over data-end and a non-positive duration is ignored. A runtime-src video in a shortened scene stops with the scene instead of running to its file end.
valeriangalliat
force-pushed
the
patch/discover-host-window
branch
from
October 25, 2026 02:43
1f46037 to
859737f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI agent: Arcade fork patch. Do not merge.
This draft shows
patch/discover-host-windowagainstmain, the upstream mirror, so the patch has one page for its diff, its revisions and its reason. Arcade's/hyperframes-updaterebases the branch ontomainand cherry-picks it ontoarcade; this PR is not part of that flow. When a rebuild changes the patch, itsgit range-diffagainst the previoussync/<date>/discover-host-windowtag is posted as a comment.Why
A nested video with an empty
srcgets its realsrcfrom script after compile. Probe discovery then finds it and places it at scene-local t=0, so when its host scene does not start at 0 the video plays at the wrong time. This patch shifts discovered media by the host's offset and limit, the same way compile does. It also closes them at the end of the host's authored timing window (resolveAuthoredTimingWindow, the rule from upstream heygen-com#3975), so a runtime-srcvideo in a shortened scene stops with the scene instead of running to the end of its file.Upstream
Kept local. Upstream's answer to untimed media is the
media_missing_data_startcheck error. Arcade's generated compositions silence that check.Drop when
Not recorded yet. Likely the same as
patch/discover-video-opacity: once Arcade's generator emits timed video (ARC-13573) and saved compositions no longer rely on runtime-srcnested video.Arcade
ARC-14843 · corpus scene ArcadeHQ/arcade#9987