Keep playhead visible for recorded streams
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user