Javascript examples for DOM Event:onended
The onended event occurs when the audio/video has reached the end.
Bubbles | No |
---|---|
Cancelable | No |
Supported HTML tags: | <audio> and <video> |
<!DOCTYPE html> <html> <body> <audio controls onended="myFunction()"> <source src="your.ogg" type="audio/ogg"> <source src="your.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio>//from www . jav a 2s. c om <script> function myFunction() { console.log("The video has ended"); } </script> </body> </html>