mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-16 06:19:21 +00:00
The runtime clamps a clip's live duration to the composition length when it builds the timeline/manifest, so the Studio's stored element durations are truncated (an 8s clip whose start sits near the comp end reads as ~3.8s). The content-driven duration sync measured the furthest clip end from those store durations, so every move/resize/delete fed the truncated value back in and the composition length could only ratchet DOWN — never grow to fit a clip longer than the current length. Moving a clip past the end just re-truncated it. Fix: measure the furthest clip end from the PATCHED SOURCE HTML (raw data-duration) via furthestClipEndFromSource, for all four duration-sync sites (single move, batched move, resize, delete). Since the source carries the authored, untruncated durations, the composition grows to fit and the runtime clamp becomes a no-op. Extracted furthestClipEndFromDocument from readTimelineDurationFromDocument (excluding the root) and reused it. Replaces the store-based resolveMovedContentEnd (removed). Tests updated: furthestClipEndFromSource units + a persist-level test proving the saved source grows to the raw 8s end (fails if the sync is removed). Runtime-side clamp (clipTree/timeline) left for a separate framework-level decision.