DOM Properties
HTMLMediaElement.seekable
TimeRanges snapshot of intervals that can currently be sought. They need not equal buffered intervals, especially for streams. Use seekable to decide which positions may be requested in a seek UI. A stream or range-enabled resource may allow seeking to content that is not yet buffered. No source means there are no available ranges in the example. Example result: 0.
Formal Syntax & Structure
html syntaxhtml
media.seekableReturn Value
TimeRanges
A static normalized TimeRanges object containing currently seekable intervals.
Working Example
Example Snippethtml
<p> Result: <output id="result"></output></p><script> const result = document.getElementById("result"); (async () => { const media = document.createElement("audio"); document.body.append(media); result.textContent = media.seekable.length; })().catch(error => { result.textContent = "Error: " + error.name; });</script>