Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/client/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3562,7 +3562,13 @@ function Player({
// A paused or starved element is not a clock: let the wall clock carry
// on rather than freezing the playhead while the buffer fills.
if (!v || v.paused || v.readyState < 2) return null;
return seg.start + (v.currentTime - (seg.el.trimStart ?? 0));
// Never before the clip's own start. The clip coming in can sit a little
// short of its trim at the cut (a transition's incoming side is only
// nudged into step, and a browser may report a frame early for a trim
// that falls between frames). Read as is, that put the playhead back on
// the previous clip, which played on past the cut and handed back, and
// the preview bounced between the two clips at that one cut.
return Math.max(seg.start, seg.start + (v.currentTime - (seg.el.trimStart ?? 0)));
};
return () => {
mediaClock.current = null;
Expand Down
Loading