Refactored to reflect changes in audioPlayerPlaylist.js

This commit is contained in:
Anon 2024-02-11 18:08:18 -08:00
parent febac5c7d5
commit 0b20391c65

View File

@ -66,9 +66,9 @@ function audioPlayer()
currentSong = wrap(idx, aListLinks.length)
aListLinks[currentSong].classList.add("current-song");
aPlay.src = musicList[currentSong][0]
aTrack.innerHTML = musicList[currentSong][1]
aArtist.innerHTML = musicList[currentSong][2]
aPlay.src = musicList[currentSong][3]
aTrack.innerHTML = musicList[currentSong][0]
aArtist.innerHTML = musicList[currentSong][1]
aCoverArt.src = musicList[currentSong][4]
if (doplay === true)
{
@ -77,7 +77,9 @@ function audioPlayer()
}
musicList.forEach((value, index, array) => {
const el = appendMusicList(aList, value[1], value[3])
const trackTitle = value[0]
const trackTime = value[2]
const el = appendMusicList(aList, trackTitle, trackTime)
aListLinks.push(el)
el.addEventListener("click", () => {
// el.preventDefault();