fastSeek()
The HTMLMediaElement.fastSeek() method quickly seeks the media to the new time with precision tradeoff.
Note: If you need to seek with precision, you should set HTMLMediaElement.currentTime instead.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| | | 31 | 8 | | 8 | |
1+Supported (version) Not supported ※Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Syntax
JAVASCRIPT
const video = document.querySelector('video');
// Fast seek (by keyframe)
video.fastSeek(30);
// Precise seek (by frame)
// video.currentTime = 30; Live demo
Fast seek behavior
Explain that fastSeek jumps toward the requested time using efficient seek points.
PreviewFullscreen
Seek method comparison
Compare approximate fast seeking with direct currentTime assignment.
PreviewFullscreen
Use cases
-
Enhance media playback
Use fastSeek() when audio, video, or responsive media needs better control or more capable browser behavior.
-
Deliver flexible assets
Apply fastSeek() to adapt media loading or presentation more closely to user context and device capability.
Cautions
- Test fastSeek() in your target browsers and input environments before depending on it as a primary behavior.
- Provide a fallback path or acceptable degradation strategy when support is still limited.
Accessibility
- Pair richer media behavior with captions, transcripts, controls, and loading behavior that remain understandable to all users.