Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>HTML DOM Events</h1>
<h2>The onplaying Event</h2>
<p>Assign an "onplaying" event to a video element.</p>
<video controls onplaying="myFunction()">
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>
<p>Play, pause and then play the video again.</p>
<p id="demo"></p>
<script>
function myFunction() {
  document.getElementById("demo").innerHTML += "The video is playing. ";
}
</script>
</body>
</html>