Skip to content

Commit

Permalink
Fixed song name
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishav-01 committed Sep 22, 2024
1 parent c5d3b5c commit d1529a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ Array.from(document.getElementsByClassName("song-item-play")).forEach(

// Update the current song index and play the new song
songIndex = newSongIdx;
let newSong = songs[songIndex].songName;
document.getElementById("current-song").innerText = newSong;
audioElement.src = `assets/songs/${songIndex + 1}.mp3`;
audioElement.currentTime = 0;
myProgressbar.value = 0;
Expand Down

0 comments on commit d1529a5

Please sign in to comment.