HTML DOM Audio seekable attribute
Examples
Awarded the first seconds of audio addressable range (section):
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);
x output values:
Start: 0 End: 12.612
try it"
Definition and Usage
seekable property returns TimeRanges object.
TimeRanges object represents the audio user addressable range.
Addressable range refers to the user in audio addressable (moving the playback position) time frame.
For streaming audio, the audio can usually be addressed in any position, even if it is not completed buffering.
Note: This property is read-only attribute.
Browser Support
All major browsers support seekable attribute.
Note: Internet Explorer 8 or earlier browser does not support this property.
grammar
audioObject .seekable
return value
类型 | 描述 |
---|---|
TimeRanges 对象 |
表示音频中的可寻址部分。 TimeRanges 对象的属性:
注释:第一个可寻址范围的下标 index 是 0。 |
Audio Object