Advertisement
Home Open Editor ❯

HTML Audio/Video DOM seeking Event

Example

//Accessing the element
var vid = document.getElementById("myVideo");

//Creating a function
vid.onseeking = function() {
    alert("Seeking is began!");
};

Try this code ❯

Meaning

The seeking event run when the user starts moving/skipping to a new position in the audio/video.


Standard Syntax

HTML:

<element onseeking="myScript">

JavaScript:

object.onseeking=function(){myScript};

JavaScript, using the addEventListener() method::

object.addEventListener("seeking", myScript);


Advertisement

Technical Details

Type Description
Supported HTML tags: <audio> and <video>
Supported JavaScript objects: Audio, Video
Home Open Editor ❯
Advertisement