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

Function forEachSiblingTimeline

packages/core/src/runtime/player.ts:61–76  ·  view source on GitHub ↗
(
  registry: Record<string, RuntimeTimelineLike | undefined> | undefined | null,
  master: RuntimeTimelineLike,
  fn: (tl: RuntimeTimelineLike) => void,
)

Source from the content-addressed store, hash-verified

59};
60
61function forEachSiblingTimeline(
62 registry: Record<string, RuntimeTimelineLike | undefined> | undefined | null,
63 master: RuntimeTimelineLike,
64 fn: (tl: RuntimeTimelineLike) => void,
65): void {
66 if (!registry) return;
67 for (const tl of Object.values(registry)) {
68 if (!tl || tl === master) continue;
69 try {
70 fn(tl);
71 } catch (err) {
72 // ignore sibling failures — one broken timeline shouldn't poison play/pause
73 swallow("runtime.player.site1", err);
74 }
75 }
76}
77
78function seekTimelineDeterministically(
79 timeline: RuntimeTimelineLike,

Calls 1

swallowFunction · 0.90

Tested by

no test coverage detected