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

Function resolveSoleTimelineFallback

packages/core/src/runtime/init.ts:746–762  ·  view source on GitHub ↗
(reason: string)

Source from the content-addressed store, hash-verified

744 // root. Multiple registered → ambiguous, so we still return null and let
745 // the loud warning fire.
746 const resolveSoleTimelineFallback = (reason: string): TimelineResolution => {
747 const usable = Object.entries(timelines).filter(
748 (entry): entry is [string, RuntimeTimelineLike] =>
749 !!entry[1] && typeof entry[1].play === "function" && typeof entry[1].pause === "function",
750 );
751 if (usable.length !== 1) return { timeline: null };
752 const [soleId, soleTimeline] = usable[0];
753 return {
754 timeline: soleTimeline,
755 selectedTimelineIds: [soleId],
756 selectedDurationSeconds: getTimelineDurationSeconds(soleTimeline),
757 diagnostics: {
758 code: "root_timeline_sole_registered_fallback",
759 details: { reason, soleTimelineId: soleId },
760 },
761 };
762 };
763 const startResolver = createRuntimeStartTimeResolver({
764 timelineRegistry: timelines,
765 includeAuthoredTimingAttrs: true,

Callers 1

Calls 2

entriesMethod · 0.80

Tested by

no test coverage detected