From 7e034d07ca2c01c4d58eb0a8053d4a5c51912bed 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 9baafbb..1cbde07 100644 --- a/index.html +++ b/index.html @@ -44,7 +44,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; } @@ -100,7 +100,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; } } @@ -139,8 +142,8 @@ - - + +
- 0:00 / 0:00 + --:--:-- / 0:00 --:--:-- @@ -505,7 +508,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(); @@ -519,6 +522,7 @@ initialOffset = offset; wrap.classList.add("has-video"); 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(); @@ -527,7 +531,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(); });