fix(core,producer): stamp render ids on empty-src media and pair the snapshot by them - #3513
Open
valeriangalliat wants to merge 1 commit into
Open
Conversation
…snapshot by them Residual of heygen-com#3340: runtime-assigned src is skipped by the static parse, so the browser snapshot was still keying clips by author id. Colliding scenes collapsed onto one window.
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.
What
Empty-src
<video>/<audio>now get a document-uniquedata-hf-render-id, and the browser snapshot / visibility / volume probes key and look up by that id instead of the author id.Fixes #3512.
Why
#3342 stamped render ids only when a playable source was already on the element. Authors who assign
el.src = urlin the scene script leavesrc=""in markup. The static parse skips those elements, so their clips exist only in the browser snapshot. That snapshot still keyed by author id. After inline, two scenes sharingid="clip"collapse onto one window: the first scene plays the second scene's footage, the second scene paints blank. Preview is fine because each scene's script is scoped.Duplicate ids across nested compositions are legal per file.
checkdoes not flag them.How
assignMediaRenderIdsstamps everyvideo/audio(andimg[src]), including emptysrc. Authorids are still not rewritten.discoverMediaFromBrowserreportsdata-hf-render-idwhen present.__hfMediaEl(already installed on the probe page) withgetElementByIdas fallback.Test plan
New tests
mediaRenderIds.test.ts: collidingsrc=""videos getclip/clip__hf2; no-src and empty<source>child are stamped too.htmlCompiler.test.ts: snapshot reports colliding empty-src videos by render id;compileForRenderof two empty-src scenes stamps unique render ids (static list still empty).Reproduction: https://github.com/ArcadeHQ/hyperframes-repros/tree/patch/runtime-src-duplicate-ids
On
main, scene A at t≈2s shows ~42 (scene B's window) and scene B at t≈6s is blank. After this change both should match preview (~12 and ~46).