YouTip LogoYouTip

Av Prop Seeking

## HTML Audio/Video DOM seeking Property The `seeking` property returns a Boolean value indicating whether the user is currently seeking to a new position in the audio or video. "Seeking" refers to the action of moving or jumping to a new playback position (time point) within the media timeline, either by dragging the progress bar or programmatically setting the `currentTime` property. --- ## Syntax ```javascript audioOrVideoElement.seeking ``` ### Return Value | Type | Description | | :--- | :--- | | **Boolean** | Returns `true` if the media is currently seeking to a new position; otherwise, it returns `false`. | --- ## Browser Support | Property | Chrome | Edge/IE | Firefox | Safari | Opera | | :--- | :--- | :--- | :--- | :--- | :--- | | **seeking** | Yes | Yes (IE 9+) | Yes | Yes | Yes | *Note: Internet Explorer 8 and earlier versions do not support the `seeking` property.* --- ## Code Examples ### Example 1: Basic Usage The following example checks if the video is currently in a seeking state and displays the status in a `` element. ```html HTML5 Video seeking Property Demo

Is seeking active? false

``` --- ## Technical Considerations & Related Events To fully utilize the `seeking` property, it is important to understand its lifecycle and how it interacts with HTML5 media events: 1. **`seeking` Event**: This event fires as soon as the user starts moving the playhead to a new position, or when a script updates `currentTime`. At this point, the `seeking` property becomes `true`. 2. **`seeked` Event**: This event fires once the seek operation is complete and the media has successfully jumped to the new position. At this point, the `seeking` property changes back to `false`. 3. **UI Loading Indicators**: You can use the `seeking` property or listen to the `seeking` and `seeked` events to show and hide a loading spinner or buffering indicator while the browser fetches media data for the new timestamp.
← Av Prop SrcAv Prop Seekable β†’