The onseeked attribute is an event-handler attribute for <audio> and <video>. It runs JavaScript when the seeked event fires — a seek finished: the playback position changed, and the Boolean seeking property became false.
The event is not cancelable and does not bubble. Scrub the timeline, jump with currentTime, or use chapter buttons — when the media finds the new position, seeked fires. Pair with onseeking (seek started) and contrast with ontimeupdate (ongoing time changes).
Baseline · Widely available.
Not deprecated and not experimental. The seeked event is stable across modern browsers since about July 2015.
Prefer addEventListener in apps.
Inline onseeked is fine for learning. Production code usually uses media.addEventListener("seeked", handler).
Syntax
HTML Syntax
syntax.html
<video|audio onseeked="script">
script is JavaScript that runs when seeked fires. Equivalent JS: media.onseeked = handler or media.addEventListener("seeked", handler).
Values
Attribute Values
The attribute value is always a script. Common patterns:
Scrub the timeline or jump ahead. Status updates for seeking and seeked.
Media
Sample /video/count.mp4 or /audio/count.mp3. Drag the seek bar or use Jump.
Player
Idle — scrub or jump
Code
HTML Examples
Short, copy-ready snippets. Use Try It Yourself for a live editor.
Example 1 — Inline onseeked on Video
Show currentTime when a seek finishes.
HTML
<video id="clip" width="400" height="225" controls onseeked="onSeekDone()">
<source src="/video/count.mp4" type="video/mp4">
</video>
<p id="status">Scrub the timeline…</p>
<script>
function onSeekDone() {
var t = document.getElementById("clip").currentTime.toFixed(1);
document.getElementById("status").textContent =
"seeked — now at " + t + "s";
}
</script>
seeking — seek started; show a brief loader if needed.
seeked — seek done; hide loader and read currentTime.
Fast local seeks may flash through seeking quickly — that’s normal.
For ongoing playtime use ontimeupdate, not only seeked.
Edge Cases & Pitfalls
Most confusion is mixing seeked with continuous timeupdate, or expecting a seek before media is ready.
vs seeking
seeking ≠ seeked
seeking means the seek started (seeking === true). seeked means it finished (seeking === false).
timeupdate
Not a progress ticker
timeupdate fires often during playback. Use seeked for “jump finished,” not for every second of play.
ready
Seek before data is ready
Setting currentTime too early may delay or fail until enough media is loaded. Wait for metadata or a usable readyState.
bubble
Does not bubble
Listen on the audio/video element itself. Parent listeners will not see a bubbling seeked.
property
.onseeked = replaces listeners
Assigning the IDL property overwrites a previous assignment. Prefer addEventListener for multiple handlers.
Compatibility
Browser Support
onseeked is an HTML event-handler attribute for media elements in the browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
onseeked
Widely available since about July 2015. Chrome, Firefox, Safari, Edge, and Opera support the seeked event on audio and video.
97%Global support (approx.)
Google Chrome3+
Full support
Mozilla Firefox3.5+
Full support
Apple Safari3.1+
Full support
Microsoft Edge12+
Full support
Opera10.5+
Full support
Samsung InternetModern · Full
Full support
Internet Explorer9+
Supported
onseekedWidely supported
Bottom line: Safe to use for scrub UI. Prefer addEventListener in production, and pair with seeking when you need a loading state during jumps.
Remember
Key Takeaways
Role: run script when a media seek has completed.
Signal: position changed and seeking is now false.
Pair with:onseeking for start; ontimeupdate for play progress.
Read:currentTime after seeked for the new position.
One line:onseeked means “the jump finished” — read currentTime, and use onseeking if you need a mid-seek loading state.
Frequently Asked Questions
It is an event-handler attribute on audio or video. When a seek finishes — the playback position has moved and the seeking property becomes false — the seeked event fires and the script runs.
The HTML audio and video elements. Put the handler on the media element itself.
onseeking fires when a seek starts (seeking becomes true). onseeked fires when the seek completes (seeking becomes false). Pair them for loading UI during scrubbing.
ontimeupdate fires often while currentTime changes during normal playback. onseeked fires once when a seek operation completes (scrub, jump, or currentTime assignment that seeks).
Both work. For learning, onseeked in HTML is fine. In production code, prefer media.addEventListener("seeked", handler).
No. The seeked event and onseeked handler are standard HTML media features and Baseline widely available since about July 2015.