Execute a JavaScript when data for the current frame is available - Javascript DOM Event

Javascript examples for DOM Event:onloadeddata

Description

Execute a JavaScript when data for the current frame is available

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<audio controls onloadeddata="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  ww w  .j a  va2  s .  c om

<script>
function myFunction() {
    console.log("Browser has loaded the current frame");
}
</script>

</body>
</html>

Related Tutorials