Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>HTML DOM Events</h1>
<h2>The onseeked Event</h2>
<p>Attach a "seeked" event to a video element.</p>
<p>The currentTime property returns the current position (in seconds) of the playback.</p>
<video id="myVideo" controls>
  <source src="mov_bbb.mp4" type="video/mp4">
  <source src="mov_bbb.ogg" type="video/ogg">
  Your browser does not support HTML5 video.
</video>
<p>Video courtesy of <a href="https://www.bigbuckbunny.org/" target="_blank">Big Buck Bunny</a>.</p>
<p>Try to move to a new position in the video.</p>
<p>Seeked to position: <span id="demo"></span></p>
<script>
// Get the video element:
const video = document.getElementById("myVideo");
// Attach a seeked event to the video element:
video.addEventListener("seeked", myFunction);
// Function to display the time position of the video:
function myFunction() {
  document.getElementById("demo").innerHTML = video.currentTime;
}
</script>
</body>
</html>