MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / ensureChildCandidatesActive

Function ensureChildCandidatesActive

packages/core/src/runtime/init.ts:903–922  ·  view source on GitHub ↗
(
      candidates: Array<{
        compositionId: string;
        timeline: RuntimeTimelineLike;
        durationSeconds: number;
      }>,
    )

Source from the content-addressed store, hash-verified

901 };
902 const rootChildCandidates = collectRootChildCandidates();
903 const ensureChildCandidatesActive = (
904 candidates: Array<{
905 compositionId: string;
906 timeline: RuntimeTimelineLike;
907 durationSeconds: number;
908 }>,
909 ): void => {
910 for (const candidate of candidates) {
911 const timelineWithPaused = candidate.timeline as RuntimeTimelineLike & {
912 paused?: (value?: boolean) => unknown;
913 };
914 if (typeof timelineWithPaused.paused !== "function") continue;
915 try {
916 timelineWithPaused.paused(false);
917 } catch (err) {
918 // keep runtime resilient against timeline API quirks
919 swallow("runtime.init.site5", err);
920 }
921 }
922 };
923 if (rootChildCandidates.length > 0) {
924 ensureChildCandidatesActive(rootChildCandidates);
925 }

Callers 1

Calls 2

swallowFunction · 0.90
pausedMethod · 0.65

Tested by

no test coverage detected