Zweite version
Playist management
This commit is contained in:
parent
39f95c2857
commit
46e9d5c40d
7 changed files with 70 additions and 14 deletions
7
static/script.js
Executable file → Normal file
7
static/script.js
Executable file → Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue