From 3cd079bdf9c566054411544152dc0ac4531caf68 Mon Sep 17 00:00:00 2001 From: zyqunix Date: Thu, 5 Dec 2024 21:10:49 +0100 Subject: [PATCH] added a simple fix to fix the progress bar --- bio/audio.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bio/audio.js b/bio/audio.js index b36e799..b81f6b5 100644 --- a/bio/audio.js +++ b/bio/audio.js @@ -61,6 +61,11 @@ progressBar.addEventListener('wheel', function (event) { event.preventDefault(); }); +progressBar.addEventListener("input", function (event) { + const newTime = (progressBar.value / 100) * videoPlayer.duration; + videoPlayer.currentTime = newTime; +}); + document.getElementById("prev").addEventListener("click", () => { currentSongIndex = (currentSongIndex - 1 + songs.length) % songs.length; loadSong(currentSongIndex);