difference between the onseeking event and onseeked event - Javascript DOM Event

Javascript examples for DOM Event:onseeked

Description

difference between the onseeking event and onseeked event

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<video controls onseeking="myFunction()" onseeked="mySecondFunction()">
  <source src="your.mp4" type="video/mp4">
  <source src="your.ogg" type="video/ogg">
  Your browser does not support HTML5 video.
</video>//from w w w.ja  v  a2s  .c  o m

<p>seeking occured: <span id="demo"></span> times.</p>
<p>seeked occured: <span id="demo2"></span> times.</p>

<script>
x = 0;
function myFunction() {
    document.getElementById("demo").innerHTML = x += 1;
}

y = 0;
function mySecondFunction() {
    document.getElementById("demo2").innerHTML = y += 1;
}
</script>

</body>
</html>

Related Tutorials