English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML Audio/Video DOM seeking event

The seeking event is triggered when the seeking operation starts, which means the Boolean seeking attribute has been changed to true, and the media is searching for a new position

HTML Audio/Video DOM Reference Manual

Online Example

When the user starts to move/When jumping to a new position in the video, warn some text:

!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML Audio/video onseeking event usage-Basic Tutorial(oldtoolbag.com)</title>
</head>
<body>
<p>Move the playback position of the video</p>
<video id="myVideo" width="320" height="176" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support HTML5 video tag.
</video>
<script>
var vid = document.getElementById("myVideo");
vid.onseeking = function() 
{
    alert("Addressing operation starts!");
};
</script> 
</body>
</html>
Test and see ‹/›

More examples are included at the bottom of this article.

Definition and Usage

The seeking event is triggered when the user starts to move/Jump to a new audio/video (audio/triggered when the playback position of video (audio

Tip:  The opposite event of seeking event isseeked Events.

Tip:Using Audio/The playback position of the Video Object currentTime Property to get playback position.

Browser Compatibility

IEFirefoxOperaChromeSafari

Technical Details
Supported HTML Tags:<audio> and <video>
Supported JavaScript Objects:Audio, Video