@bycrux/editor 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -702,7 +702,13 @@ export function useVideoPlayback(
|
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
704
|
|
|
705
|
-
|
|
705
|
+
// A normalized cache can encode a few ms SHORTER than its computed window
|
|
706
|
+
// (outPoint − inPoint), so the <video> reaches its natural end (`ended`)
|
|
707
|
+
// before currentTime ever reaches outPoint. Treat EOF as reaching the
|
|
708
|
+
// boundary too — otherwise the clip switch never fires and playback stalls
|
|
709
|
+
// at that clip's end (raw full-length sources never hit this; trimmed
|
|
710
|
+
// window caches can).
|
|
711
|
+
if (video.currentTime >= outPoint || video.ended) {
|
|
706
712
|
if (clip.loop) {
|
|
707
713
|
const projectT = clip.start + loopOffsetRef.current + (video.currentTime - clipInPoint)
|
|
708
714
|
if (projectT < clip.end) {
|