HTML Audio / Video DOM seekable attribute
HTML Audio / Video DOM Reference
Examples
Get the first seconds of video addressable range (section):
myVid=document.getElementById("video1");
alert("Start: " + myVid.seekable.start(0)
+ " End: " + myVid.seekable.end(0));
alert("Start: " + myVid.seekable.start(0)
+ " End: " + myVid.seekable.end(0));
try it"
Definition and Usage
seekable property returns TimeRanges object.
TimeRanges object represents the audio / video user addressable range.
Addressable range refers to the user in the audio / video addressable (moving the playback position) time frame.
For non-streaming video, video can usually be addressed to any position, even if it is not completed buffering.
Browser Support
All major browsers support seekable attribute.
Note: 8 and earlier versions of Internet Explorer does not support this property.
grammar
audio|video .seekable
return value
类型 | 描述 |
---|---|
TimeRanges Object | 表示音频/视频中的可寻址部分。 TimeRanges 对象的属性:
注释:第一个可寻址范围的下标 index 是 0。 |
HTML Audio / Video DOM Reference