Zweite version

Playist management
This commit is contained in:
mikka 2026-04-19 11:19:35 +02:00
parent 39f95c2857
commit 46e9d5c40d
7 changed files with 70 additions and 14 deletions

7
static/script.js Executable file → Normal file
View file

@ -1,6 +1,11 @@
const audios = document.querySelectorAll("audio")
for (const [index,audio] of audios.entries()){
audio.addEventListener("ended", (event) => { audios[index + 1].play()})
audio.addEventListener("ended", (event) => {
if (index+1!= audios.length){
audios[index + 1].play()
}
})
}
console.log(audios)