diff --git a/services/web-ui/public/screens-playout.jsx b/services/web-ui/public/screens-playout.jsx index a5535fd..75a2e8a 100644 --- a/services/web-ui/public/screens-playout.jsx +++ b/services/web-ui/public/screens-playout.jsx @@ -36,7 +36,7 @@ async function poFetch(path, opts) { // ── Helpers ─────────────────────────────────────────────────────────────────── -function fmtDuration(secs) { +function playoutFmtDur(secs) { if (!secs || secs < 0) return '—'; const s = Math.floor(secs); const h = Math.floor(s / 3600); @@ -47,7 +47,7 @@ function fmtDuration(secs) { return h > 0 ? `${h}:${mm}:${ssStr}` : `${m}:${ssStr}`; } -function fmtTimecode(secs) { +function playoutFmtTC(secs) { // HH:MM:SS:FF at 29.97 (rounded) const s = Math.floor(secs); const h = Math.floor(s / 3600); @@ -317,7 +317,7 @@ function Playlist({ channel, playlistId, items, activeIndex, onReload }) {
Playlist - {items.length} clip{items.length !== 1 ? 's' : ''} · {fmtDuration(totalSecs)} + {items.length} clip{items.length !== 1 ? 's' : ''} · {playoutFmtDur(totalSecs)} {dropErr && {dropErr}}
@@ -338,7 +338,7 @@ function Playlist({ channel, playlistId, items, activeIndex, onReload }) { {isActive ? : index + 1} {it.clip_name || it.asset_id} - {fmtDuration(dur)} + {playoutFmtDur(dur)} {fmtTimecode(elapsed)} +
{playoutFmtTC(elapsed)}
)}
@@ -580,7 +580,7 @@ function ProgramMonitor({ channel, engine, elapsed }) { {timeRemaining > 0 && ( - -{fmtDuration(timeRemaining)} + -{playoutFmtDur(timeRemaining)} )} {engine.loop && } @@ -761,8 +761,8 @@ function NowPlayingCard({ engine, elapsed, items }) {
- {fmtDuration(elapsed)} - -{fmtDuration(timeRemaining)} + {playoutFmtDur(elapsed)} + -{playoutFmtDur(timeRemaining)}
{nextItem && ( @@ -813,7 +813,7 @@ function Timeline({ items, activeIndex, elapsed, breaks }) {
Timeline - {fmtDuration(totalSecs)} total + {playoutFmtDur(totalSecs)} total
{activeIndex >= 0 && ( @@ -833,9 +833,9 @@ function Timeline({ items, activeIndex, elapsed, breaks }) {
+ title={`${it.clip_name || it.asset_id} · ${playoutFmtDur(dur)}`}> {it.clip_name || it.asset_id} - {fmtDuration(dur)} + {playoutFmtDur(dur)} {it.media_status === 'staging' && ( )} @@ -849,7 +849,7 @@ function Timeline({ items, activeIndex, elapsed, breaks }) {
{totalSecs > 0 && Array.from({ length: 5 }).map((_, i) => ( - {fmtDuration((totalSecs * i) / 4)} + {playoutFmtDur((totalSecs * i) / 4)} ))}
@@ -907,7 +907,7 @@ function AsRunDrawer({ channel, refreshKey, open, onClose }) { {r.clip_name || r.item_id || '—'} {r.duration_s != null - ? fmtDuration(Number(r.duration_s)) + ? playoutFmtDur(Number(r.duration_s)) : (r.ended_at ? '—' : 'on air')}