Keep playhead visible for recorded streams

This commit is contained in:
2026-06-12 20:02:35 -07:00
parent 99388b6487
commit 6135a6f535
2 changed files with 16 additions and 10 deletions

View File

@@ -1344,12 +1344,13 @@ function syncPlayhead() {
const duration = state.duration;
const hasDuration = Number.isFinite(duration) && duration > 0;
const canScrub = state.seekable && hasDuration;
const showPlayhead = Boolean(state.session);
const max = hasDuration ? duration : 1;
const value = hasDuration ? clampNumber(currentTime, 0, max) : 0;
const progress = hasDuration && max > 0 ? (value / max) * 100 : 0;
elements.playhead.hidden = !canScrub;
elements.playhead.setAttribute('aria-hidden', String(!canScrub));
elements.playhead.hidden = !showPlayhead;
elements.playhead.setAttribute('aria-hidden', String(!showPlayhead));
elements.currentTime.textContent = formatTime(currentTime);
elements.totalTime.textContent = formatTime(duration);
elements.seek.max = String(max);