fastSeek()
The fastSeek() method seeks an <audio> or <video> element as fast as possible, by seeking to a keyframe instead of exactly the requested time. It is most useful when native HTML semantics or browser capabilities can replace custom implementation work.
Overview
The fastSeek() method seeks an <audio> or <video> element as fast as possible, by seeking to a keyframe instead of exactly the requested time. It is most useful when native HTML semantics or browser capabilities can replace custom implementation work.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| | | 31 | 8 | | 8 | |
Syntax
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.
Seek method comparison
Compare approximate fast seeking with direct currentTime assignment.
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.
Related links
Powered by web-features