From bf9d20e25e5e168c714de1b4a9acd350eeb46622 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Mon, 4 May 2026 18:20:51 +0200 Subject: [PATCH] fix: improve volume slider functionality --- static/player.ts | 5 ++++- templates/components/video_player.gohtml | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/static/player.ts b/static/player.ts index 239c23b..f7f8c69 100644 --- a/static/player.ts +++ b/static/player.ts @@ -695,11 +695,14 @@ const initPlayer = (): void => { } const syncVolumeUI = (): void => { + const volumeValue = video.muted ? 0 : Math.round(video.volume * 100) if (volumeRange) { - const volumeValue = video.muted ? 0 : Math.round(video.volume * 100) volumeRange.value = String(volumeValue) volumeRange.style.setProperty('--volume-percent', `${volumeValue}%`) } + if (volumeUnderline) { + volumeUnderline.style.height = `${volumeValue}%` + } if (!video.muted && video.volume > 0) { lastKnownVolume = video.volume } diff --git a/templates/components/video_player.gohtml b/templates/components/video_player.gohtml index a94c8de..63e7ec8 100644 --- a/templates/components/video_player.gohtml +++ b/templates/components/video_player.gohtml @@ -20,7 +20,7 @@
-
+
@@ -30,10 +30,10 @@
-
+
- +