added a simple fix to fix the progress bar

This commit is contained in:
zyqunix 2024-12-05 21:10:49 +01:00
parent 93c65bc7c4
commit 3cd079bdf9

View file

@ -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);