diff --git a/templates/index.html b/templates/index.html
index ef12b47..a1887dd 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1058,14 +1058,14 @@
-
+
Začetek: ${formatTime(startInit)}
Konec: ${formatTime(endInit)}
Trajanje: ${(endInit-startInit).toFixed(1)}s
-
+
@@ -1215,9 +1215,21 @@
if (!video) return;
const t = which === "start" ? trimStart : trimEnd;
video.currentTime = t;
- if (which === "start") video.play();
+ if (which === "start") {
+ video.play();
+ }
};
+ // Auto-stop predvajanje ko doseže trimEnd (kot iPhone trim preview)
+ if (video) {
+ video.addEventListener("timeupdate", () => {
+ if (!video.paused && video.currentTime >= trimEnd) {
+ video.pause();
+ video.currentTime = trimStart; // reset na začetek označenega dela
+ }
+ });
+ }
+
// Initial render — počakaj da DOM ima dimenzije (modal je bil pravkar dodan)
console.log("[EditModal] init", { startInit, endInit, videoDuration, trimStart, trimEnd });