From 9cee32e894a65793077cc5f956dfd7c5a8b4d629 Mon Sep 17 00:00:00 2001 From: human insan Date: Thu, 27 Aug 2026 23:18:09 +0100 Subject: [PATCH] Improve player controls on small screens --- index.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 6a4237e..054322f 100644 --- a/index.html +++ b/index.html @@ -40,7 +40,7 @@ .scrub:hover .scrub-hover { display: block; } /* control row */ - .ctrl-row { display: flex; align-items: center; gap: 8px; } + .ctrl-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ctrl-row button { background: none; border: none; color: #fff; cursor: pointer; padding: 4px; border-radius: 50%; display: grid; place-items: center; } .ctrl-row button:hover { background: rgba(255,255,255,.15); } .ctrl-row svg { width: 22px; height: 22px; fill: currentColor; } @@ -96,7 +96,10 @@ @media (max-width: 600px) { .page { padding: 8px; } - .ctrl-row svg { width: 18px; height: 18px; } + .ctrl-row { gap: 4px; } + .ctrl-row button { min-width: 36px; min-height: 34px; } + .ctrl-row svg { width: 20px; height: 20px; } + .time-label { font-size: 11px; } .hours span:nth-child(even) { display: none; } } @@ -134,8 +137,8 @@ - - + +
- 0:00 / 0:00 + --:--:-- / 0:00 --:--:-- @@ -500,7 +503,7 @@ dateSelect.innerHTML = d.dates.map(day => ``).join(""); dateSelect.value = date || d.dates[0]; document.querySelector("#clock").textContent = "--:--:--"; - document.querySelector("#time-cur").textContent = "0:00"; + document.querySelector("#time-cur").textContent = "--:--:--"; document.querySelector("#time-dur").textContent = "0:00"; scrubFill.style.width = "0%"; drawTimeline(); @@ -513,6 +516,7 @@ activeClip = clip; initialOffset = offset; document.querySelector("#clock").textContent = timeOfDay(clip.start + offset); + document.querySelector("#time-cur").textContent = timeOfDay(clip.start + offset); video.src = `/video?date=${dateSelect.value}&name=${encodeURIComponent(clip.name)}&offset=${offset.toFixed(3)}`; video.play().catch(() => {}); drawTimeline(); @@ -521,7 +525,7 @@ video.addEventListener("timeupdate", () => { if (!activeClip) return; document.querySelector("#clock").textContent = timeOfDay(activeClip.start + initialOffset + video.currentTime); - document.querySelector("#time-cur").textContent = fmt(video.currentTime); + document.querySelector("#time-cur").textContent = timeOfDay(activeClip.start + initialOffset + video.currentTime); updateScrub(); drawTimeline(); });