Skip to content

fix(core,producer): resolve relative data-start id-refs in render compile - #3252

Open
valeriangalliat wants to merge 1 commit into
heygen-com:mainfrom
ArcadeHQ:patch/data-start-idref
Open

fix(core,producer): resolve relative data-start id-refs in render compile#3252
valeriangalliat wants to merge 1 commit into
heygen-com:mainfrom
ArcadeHQ:patch/data-start-idref

Conversation

@valeriangalliat

@valeriangalliat valeriangalliat commented Aug 13, 2026

Copy link
Copy Markdown

What

data-start="intro" (and intro + 0.5) already resolves in the live player. Render compile treated it as a number, so relative starts failed in actual renders.

Why

compileTimingAttrs / injectDurations wrote data-end from parseFloat("intro"). Extract prefers data-end over duration, so the clip's end was unusable.

parseSubCompositions did the same parseFloat on the host, so nested media inherited a broken offset.

How

  • Use parseNumeric in the timing compiler. If start isn't numeric, leave data-end off so extract can resolve the id-ref.
  • Use the existing engine resolveReferencedStart when reading sub-composition host start (same helper video/audio/image extract already use).

No new resolver. Regex compiler still has no DOM.

Test plan

  • Unit tests added/updated
  • Manual testing performed
  • Documentation updated (if applicable)

  • bunx vitest run src/compiler/timingCompiler.test.ts in packages/core
  • bunx vitest run src/services/videoFrameExtractor.test.ts -t "still resolves relative data-start" in packages/engine
  • bun test src/services/htmlCompiler.test.ts -t "resolves a host data-start" in packages/producer

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.

1 participant