In JavaScript:
object.onseeked = function(){
myScript};
This example uses the HTML DOM to assign an "onseeked" event to a video element.
<!DOCTYPE html> <html> <body> <p>Move to a new position in the video.</p> <video controls id="myVideo"> <source src="video.mp4" type="video/mp4"> <source src="video.ogg" type="video/ogg"> Your browser does not support HTML5 video. </video>/*from w ww. j a va2 s. c om*/ <p id="demo"></p> <script> document.getElementById("myVideo").onseeked = function() {myFunction()}; function myFunction() { document.getElementById("demo").innerHTML = "Seek operation completed!"; } </script> </body> </html>
Bubbles: | No |
---|---|
Cancelable: | No |
Event type: | Event |
Supported HTML tags: | <audio> and <video> |