mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
fix(engine,core): wait for async timelines and force rebind before capture
Two fixes for compositions that register timelines after async data loading (e.g. fetch for TopoJSON map data): 1. engine/frameCapture: remove the hosts.length <= 1 early return so the timeline readiness poll runs for ALL compositions, not just multi-composition galleries. Single-composition pages with async setup were silently skipped. 2. core/runtime/init: expose window.__hfForceTimelineRebind() which resets childrenBound and re-runs bindRootTimelineIfAvailable(). The renderer calls this after all timelines are confirmed present, ensuring the root player discovers late-registered timelines from fetch callbacks. Without these fixes, compositions using fetch() to load data at runtime would render blank frames because the root player bound timelines before the async setup completed, and seek() never reached the unbound composition timeline.
This commit is contained in:
@@ -964,6 +964,11 @@ export function initSandboxRuntimeModular(): void {
|
||||
return true;
|
||||
};
|
||||
|
||||
(window as any).__hfForceTimelineRebind = () => {
|
||||
childrenBound = false;
|
||||
bindRootTimelineIfAvailable();
|
||||
};
|
||||
|
||||
const emitRootStageLayoutDiagnostics = () => {
|
||||
const rootNode = resolveRootCompositionElement();
|
||||
if (!(rootNode instanceof HTMLElement)) {
|
||||
|
||||
Reference in New Issue
Block a user