Audio seekableProperty
Examples
Get the first addressable range of the audio in seconds (partial):
var x = document.getElementById("myAudio");
document.getElementById("demo").innerHTML = "Start: " + x.seekable.start(0)
+ " End: " + x.seekable.end(0);
document.getElementById("demo").innerHTML = "Start: " + x.seekable.start(0)
+ " End: " + x.seekable.end(0);
xThe output value is:
Start: 0 End: 12.612
Try it yourself »
Definition and Usage
The seekable property returns a TimeRanges object.
The TimeRanges object represents the ranges of the audio that the user can seek.
An addressable range refers to the time range in which the user can seek (move the playback position) within the audio.
For streaming audio, you can usually seek to any position in the audio, even if it has not finished buffering.
Note:This property is read-only.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the seekable property.
Note:Internet Explorer 8 or earlier browsers do not support this property.
Syntax
audioObject.seekable
Return Value
| Type | Description |
|---|---|
| TimeRanges object |
Represents the addressable parts of the audio. Properties of the TimeRanges object:
Note:The index of the first addressable range is 0. |
Audio Object Other Extensions