HTML Audio / Video DOM played Properties
HTML Audio / Video DOM Reference
Examples
Get video segment to the first range (part) in seconds elapsed:
myVid=document.getElementById("video1");
alert("Start: " + myVid.played.start(0)
+ " End: " + myVid.played.end(0));
alert("Start: " + myVid.played.start(0)
+ " End: " + myVid.played.end(0));
try it"
Definition and Usage
played TimeRanges property returns an object.
TimeRanges object represents the user has seen or play audio / video range.
Has been broadcast range refers to the time play audio / video. If you jump in the audio / video, a plurality of the playback range is obtained.
Browser Support
All major browsers support played attribute.
Note: 8 and earlier versions of Internet Explorer does not support this property.
grammar
audio|video .played
return value
类型 | 描述 |
---|---|
TimeRanges 对象 | 表示音频/视频的已播范围。 TimeRanges 对象的属性:
注释:第一段已播范围的下标 index 是 0。 |
HTML Audio / Video DOM Reference