Audio seekable attribute
Definition and Usage
seekable
This property returns a TimeRanges object.
The TimeRanges object represents the audio range that is available for the user to search (seek, retrieve).
The searchable range is the audio time range that the user can search (move the playback position) to.
For non-streaming audio, it is usually possible to search at any position in the audio even before buffering.
Note:This property is read-only.
Example
Get the first searchable range (part) of the audio (in seconds):
var x = document.getElementById("myAudio"); document.getElementById("demo").innerHTML = "Start: " + x.seekable.start(0) + " End: " + x.seekable.end(0);
Syntax
audioObject.seekable
返回值
Return Value | Type |
---|---|
Description |
TimeRanges Object Represents the searchable part of the audio.
Note:The first searchable range is index 0. |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |