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 @@
-
+
- +