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

Function shouldIncludeTimelineNode

packages/core/scripts/debug-timeline.ts:118–141  ·  view source on GitHub ↗
(tag: ParsedTag, rootCompositionId: string | null)

Source from the content-addressed store, hash-verified

116}
117
118function shouldIncludeTimelineNode(tag: ParsedTag, rootCompositionId: string | null): boolean {
119 const attrs = tag.attrs;
120 if (
121 attrs["data-composition-id"] &&
122 rootCompositionId &&
123 attrs["data-composition-id"] === rootCompositionId
124 ) {
125 return false;
126 }
127 if (
128 tag.tagName === "script" ||
129 tag.tagName === "style" ||
130 tag.tagName === "link" ||
131 tag.tagName === "meta"
132 ) {
133 return false;
134 }
135 if ((attrs.class || "").split(/\s+/).includes("__preview_render_frame__")) return false;
136 if (attrs["data-start"] != null) return true;
137 if (attrs["data-track-index"] != null) return true;
138 if (attrs["data-composition-src"] != null) return true;
139 if (attrs["data-composition-id"] != null) return true;
140 return tag.tagName === "video" || tag.tagName === "audio" || tag.tagName === "img";
141}
142
143function inferClipDuration(tag: ParsedTag, start: number, maxDuration: number): number | null {
144 const attrs = tag.attrs;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected