From a0335da1f8402523cb13080761a1852e2636dc9a Mon Sep 17 00:00:00 2001 From: Physcik Date: Sat, 13 Dec 2025 22:31:06 +0500 Subject: More frontend controls --- static/index.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'static/index.js') diff --git a/static/index.js b/static/index.js index 237386c..991eb6c 100644 --- a/static/index.js +++ b/static/index.js @@ -19,6 +19,7 @@ function SetRandomSong() { document.getElementById("Start").innerHTML = "Start: " + body.Start + "s"; player.play(); + player.currentTime = body.Start document.getElementById("Status").innerHTML = "Playing"; })); } @@ -46,3 +47,9 @@ function ToggleInfo() { isInfoShown = true; } } + +function SetVolume() { + const player = document.getElementById("mainAudio"); + const slider = document.getElementById("volumeRange"); + player.volume = slider.value / 100; +} -- cgit v1.3