Answer the question
In order to leave comments, you need to log in
How to catch the event of the end of playback of audio elements created programmatically?
A number of tags are created on the page. How to make a certain function be called if any of the elements finish playing the music?
This option doesn't work:
document.getElementsByTagName('audio').onended(a_ended());
Answer the question
In order to leave comments, you need to log in
Use plugin , latest demo.
And so you have an error in your code: .onended(a_ended()); you call the a_ended function right here, but you just need to pass a link there: .onended(a_ended)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question