Movie Editor: Play from end-of-timeline restarts from the beginning

If the playhead is at/past the end (or on no clip) when Play is pressed, reset it to 0 and
play from the top instead of doing nothing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
digital-garbage
2026-06-08 00:31:37 +03:00
co-authored by Claude Opus 4.8
parent 8119ba2809
commit 4e9d0e4c1d
+2
View File
@@ -181,6 +181,8 @@
}
function _play() {
// At (or past) the end of the timeline → loop the playhead back to the start.
if (_phSec >= (_totalSecCur || 0) - 0.05 || !_clipFrom(_phSec)) _phSec = 0;
const clip = _clipFrom(_phSec);
if (!clip) return;
if (_phSec < clip.startSec) _phSec = clip.startSec;