Skip to content

fix(core): skip the metadata rebind on still-capture pages once renderSeek starts - #7725

Open
sx4im wants to merge 1 commit into
heygen-com:mainfrom
sx4im:fix-7706-check-media-rebind-timeline
Open

sx4im wants to merge 1 commit into
heygen-com:mainfrom
sx4im:fix-7706-check-media-rebind-timeline

Conversation

@sx4im

@sx4im sx4im commented Nov 14, 2026

Copy link
Copy Markdown

What broke

On projects built from data-composition-src scenes plus audio/video clips, hyperframes check --no-cache gave different findings on every run of an unchanged project, and some described the t=0 frame instead of the sampled time.

The cause is the async media-metadata rebind: its debounced timer calls resolveRootTimelineFromDocument(), which nests and un-pauses the scene timelines. Under renderSeek the scenes are driven standalone while the root stays at 0, so GSAP renders each scene at its parent's playhead and the frame jumps to t=0 between the seek and the read. The timer is skipped only when isExportRenderDrivingFrames() is true, and check pages set no __HF_EXPORT_RENDER_SEEK_CONFIG.

What changed

Still-capture pages already mark themselves with __HF_REPLAY_SKIPPED_FRAMES before navigation (openSettledCompositionPage). The rebind now also returns early once such a page has started driving frames with renderSeek (isStillCaptureDrivingFrames), the same pair shape as isExportRenderDrivingFrames, so Studio's static-seek preview keeps the self-correction it needs. The transport loop is untouched.

How verified

Two regression tests in packages/core/src/runtime/init.test.ts (HF#7706): the rebind is ignored once a capture page has started seeking (fails on the old code: the rebind fires), and still applies before any seek. Full init.test.ts: 281/281 pass. Runtime typecheck clean, oxlint/oxfmt clean.

Fixes #7706

…rSeek starts

On check pages the async media-metadata rebind races the sweep: its
resolveRootTimelineFromDocument nests and un-pauses the scene timelines,
so GSAP renders each at the root's playhead (0) between a renderSeek and
the read. Identical runs then give different findings, and some describe
the t=0 frame instead of the sampled time.

Still-capture pages already mark themselves with
__HF_REPLAY_SKIPPED_FRAMES before navigation. Gate the rebind on that
flag paired with renderCaptureSeekStarted, the same pair shape as
isExportRenderDrivingFrames, so Studio's static-seek preview keeps the
self-correction it needs.

Tests: two regression tests in init.test.ts (HF#7706). The rebind is
ignored once a capture page has started seeking, and still applies
before any seek. Full init.test.ts 281/281 pass; runtime typecheck clean.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

check: a media-metadata rebind rewinds scene timelines to 0 between a seek and its read, so findings change between identical runs

1 participant