Repository navigation
fix(studio): splitting a video in an untimed wrapper cuts the video, not the wrapper - #5486
Merged
Merged
Conversation
…not the wrapper The split timed both wrapper copies and left both inner videos on the original window with the same id, so the two halves played together.
Contributor
Edit accuracy: accurate 2061 (base branch 2061), smooth 1567 of thoseThe gate passes. Quarantined, measured but not gated (0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Splitting a clip whose
<video>sits inside an untimed wrapper<div>now produces two working clips. The second video gets its own id and starts its media at the cut, and neither wrapper gets timing written onto it.Why
Before this change, the split treated the wrapper as the clip:
Both wrappers got timing, both videos kept the full original window, and both kept the id
v. The two halves played over each other, so the sound was doubled.How
splitElementInHtmlis the one HTML rewrite behind every split: the Studio single-clip route, the Studio split-all batch route, the CLI and freeze frame. It now cuts the inner media instead of the wrapper when all of these hold:data-start, no authored duration, and is not a sub-composition host;videooraudiowith an authored start and duration;In that case the media pair gets the start, duration and in-point, and the wrappers stay untimed. The cloned media gets a fresh unique id that also avoids the wrapper copy's new id, and its CSS rules are copied.
A GSAP scene whose range differs from the video inside it still splits on its own window, as before. Every other target (a timed div, a media element, a composition host) goes through the same code as before.
Known limits of this change:
Test plan
sourceMutationSplitAndGroup.test.ts:main(the wrapper getsdata-start), passes with the fix;data-start, its own duration, or a composition id is still cut itself. Each case fails if its guard is removed.sourceMutationSplitAndGroup.test.ts48/48 (3 runs in a row),routes/files.test.tsandroutes/freezeFrame.test.tspass. CLItimeline.e2e.test.ts: 49/49 passed.tsc --noEmit(studio-server),oxlintandoxfmt --checkon the changed files are clean.