The seeking
event is fired when a seek operation starts, meaning the Boolean seeking
attribute has changed to true
and the media is seeking a new position.
Bubbles | No |
---|---|
Cancelable | No |
Interface | Event |
Target | Element |
Default Action | None |
Event handler property | GlobalEventHandlers.onseeking |
Specification | HTML5 media |
Examples
These examples add an event listener for the HTMLMediaElement's seeking
event, then post a message when that event handler has reacted to the event firing.
Using addEventListener()
:
const video = document.querySelector('video');
video.addEventListener('seeking', (event) => {
console.log('Video is seeking a new position.');
});
Using the onseeking
event handler property:
const video = document.querySelector('video');
video.onseeking = (event) => {
console.log('Video is seeking a new position.');
};
Specifications
Specification | Status |
---|---|
HTML Living Standard The definition of 'seeking media event' in that specification. |
Living Standard |
HTML5 The definition of 'seeking media event' in that specification. |
Recommendation |
Browser compatibility
BCD tables only load in the browser
Related Events
HTMLMediaElement: playing event
HTMLMediaElement: waiting event
HTMLMediaElement: seeking event
HTMLMediaElement: seeked event
HTMLMediaElement: ended event
HTMLMediaElement: loadedmetadata event
HTMLMediaElement: loadeddata event
HTMLMediaElement: canplay event
HTMLMediaElement: canplaythrough event
HTMLMediaElement: durationchange event
HTMLMediaElement: timeupdate event
HTMLMediaElement: play event
HTMLMediaElement: pause event
HTMLMediaElement: ratechange event
HTMLMediaElement: volumechange event
HTMLMediaElement: suspend event
HTMLMediaElement: emptied event
HTMLMediaElement: stalled event