Repository navigation
Conversation
The playhead follows the playing video. When the clip coming in read a little short of its trim at the cut, the playhead landed back on the previous clip, which played on past the cut and handed forward again, so the preview looped at that one cut. The clock now never reads earlier than the clip's own start.
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.
Reported on an iPad: playing through one cut, the preview kept jumping back and forth between the clip before it and the clip after it. Other cuts in the same project played fine.
Cause
While a video plays, the preview's playhead follows that video's position. At a cut, the playhead moves to the next clip and follows its video. If that video reads even slightly before its trim point, the playhead lands before the cut. Then:
The incoming clip can read short in two ways:
Every playhead write was checked. All
seek()calls are user actions, and the wall clock only moves forward, so the media clock is the only thing that can move the playhead backward on its own.Fix
The media clock never returns a time earlier than the active clip's start (
src/client/edit.tsx, one line).Known cost: on a transition where the incoming video arrives behind, the playhead now waits at the cut for that gap (up to 0.08 s, or 0.4 s if not buffered) while the video shows the frames just before its trim point. That's a brief one-off instead of an endless loop.
Not verified
Check on a device: scrub to just before a cut that has a transition, or one trimmed between frames, and press play.