mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-15 13:58:20 +00:00
<hyperframes-player> couldn't play a raw anime.js composition from src: the inline hyperframesAnime.register() call throws before the runtime exists, and the existing late-injection fallback only fires for GSAP's __timelines and appends the runtime after parse, which is too late for a call that already ran. Add a runtime-src attribute to override the runtime URL, and a pre-parse path in the probe: once it observes a same-origin composition that references hyperframesAnime but never got a runtime/timeline/registry, fetch the original src, inject the runtime script + a <base> tag ahead of the composition's own scripts, and reload via srcdoc (once per src). shouldInjectRuntime now also refuses to late-inject once an anime registry is present, since that path can never help these compositions.