Execute a JavaScript when the user is finished moving/skipping to a new position in the video: - Javascript DOM Event

Javascript examples for DOM Event:onseeked

Description

Execute a JavaScript when the user is finished moving/skipping to a new position in the video:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p>This example demonstrates how to assign an "onseeked" event to a video element.</p>

<p>Move to a new position in the video.</p>

<video controls onseeked="myFunction()">
  <source src="your.mp4" type="video/mp4">
  <source src="your.ogg" type="video/ogg">
  Your browser does not support HTML5 video.
</video>/* www. j  av a  2  s  . c  o  m*/

<script>
function myFunction() {
    console.log("Seek operation completed!");
}
</script>

</body>
</html>

Related Tutorials