YouTip LogoYouTip

Av Event Seeking

## HTML Audio/Video DOM: `seeking` Event The `seeking` event fires when the user starts moving or skipping to a new playback position in an audio or video element. This event is highly useful for tracking user interaction, updating custom media player progress bars, or pausing background processes while the media buffer catches up to the new playback position. --- ## Definition and Usage The `seeking` event is triggered the moment a seek operation begins. * **Opposite Event:** The opposite of the `seeking` event is the [`seeked`](/tags/av-event-seeked.html) event, which fires when the user has finished moving to the new playback position and the media is ready to resume playing. * **Retrieving Position:** You can use the `currentTime` property of the Audio/Video object to get the current playback position (in seconds) during the seek operation. --- ## Browser Support The numbers in the table specify the first browser version that fully supports this event. | Event | Chrome | Internet Explorer / Edge | Firefox | Safari | Opera | | :--- | :--- | :--- | :--- | :--- | :--- | | **seeking** | Yes | 9.0 | Yes | Yes | Yes | --- ## Syntax You can register the `seeking` event in three different ways: ### 1. In HTML ```html ``` ### 2. In JavaScript (using the `onseeking` event handler) ```javascript audioOrVideoElement.onseeking = function() { // Your code here }; ``` ### 3. In JavaScript (using `addEventListener`) ```javascript audioOrVideoElement.addEventListener("seeking", myScript); ``` > **Note:** Internet Explorer 8 and earlier versions do not support the `addEventListener()` method. --- ## Technical Details | Feature | Support Details | | :--- | :--- | | **Supported HTML Tags** | `
← Av Event StalledAv Event Seeked β†’