( el: Element, timelineRegistry: Record<string, RuntimeTimelineLike | undefined>, rootDuration: number, absoluteStart: number, )
| 77 | |
| 78 | // Used only to filter out zero-duration (decorative) elements at build time. |
| 79 | function resolveDuration( |
| 80 | el: Element, |
| 81 | timelineRegistry: Record<string, RuntimeTimelineLike | undefined>, |
| 82 | rootDuration: number, |
| 83 | absoluteStart: number, |
| 84 | ): number { |
| 85 | const attr = parseNum(el.getAttribute("data-duration")); |
| 86 | if (attr != null && attr > 0) return attr; |
| 87 | return ( |
| 88 | durationFromTimeline(el, timelineRegistry) ?? |
| 89 | durationFromMedia(el) ?? |
| 90 | Math.max(0, rootDuration - absoluteStart) |
| 91 | ); |
| 92 | } |
| 93 | |
| 94 | function linkParentChild(elementToNode: Map<Element, MutableClipNode>): void { |
| 95 | for (const [el, node] of elementToNode) { |
no test coverage detected