diff --git a/templates/index.html b/templates/index.html
index 8289747..1d9e265 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1453,17 +1453,19 @@
const playPauseHandler = (e) => {
const isPlayKey = e.code === "Enter" || e.code === "Space";
if (!isPlayKey) return;
- // Ne moti če uporabnik tipka v inputu/textarea
if (e.target.tagName === "INPUT" || e.target.tagName === "TEXTAREA") return;
e.preventDefault();
if (video) {
if (video.paused) {
// Pred play-em: postavi trikotnik na trenutno pozicijo
- // Loči levi/desni glede na bližino handle-jev
+ // Logika: razdeli prostor po SREDINI clipa
+ // t < center → IN trikotnik (zelen)
+ // t > center → OUT trikotnik (rdeč)
+ // Razlog: če je IN že nastavljen pravilno (60s) in zdaj iščeš
+ // OUT (klikaš pri 80s blizu desnega handle), naj se premakne OUT.
const t = video.currentTime;
- const distToLeft = Math.abs(t - trimStart);
- const distToRight = Math.abs(t - trimEnd);
- if (distToLeft <= distToRight) {
+ const center = (trimStart + trimEnd) / 2;
+ if (t < center) {
markerInTime = t;
} else {
markerOutTime = t;