Javascript DOM onseeking Event via HTML Tag onseeking attribute

Introduction

This example demonstrates how to assign an "onseeking" event to a video element.

View in separate window

<!DOCTYPE html>
<html>
<body>
<p>Move to a new position in the video.</p>

<video controls onseeking="myFunction()">
  <source src="video.mp4" type="video/mp4">
  <source src="video.ogg" type="video/ogg">
  Your browser does not support HTML5 video.
</video>/*  ww w .  j av a  2  s  .  com*/

<p id="demo"></p>
<script>
function myFunction() {
  document.getElementById("demo").innerHTML = "Seek operation began!";
}
</script>

</body>
</html>
Bubbles: No
Cancelable: No
Event type: Event
Supported HTML tags: <audio> and <video>



PreviousNext

Related