HTML DOM Audio played Properties
Examples
Get the audio to the first paragraph of the scope (part) in seconds elapsed:
var x = document.getElementById("myAudio");
document.getElementById("demo").innerHTML = "Start: " + x.played.start(0)
+ " End: " + x.played.end(0)
document.getElementById("demo").innerHTML = "Start: " + x.played.start(0)
+ " End: " + x.played.end(0)
x The output is:
Start: 0 End: 2.162583
try it"
Definition and Usage
played TimeRanges property returns an object.
TimeRanges objects that the user has been played or seen the audible range.
Has been broadcast range refers to the audio playback time. If you jump in the audio, a plurality of the playback range is obtained.
Note: This property is read-only.
Browser Support
All major browsers support played attribute.
Note: Internet Explorer 8 and earlier versions of IE does not support this property.
grammar
audioObject .played
return value
类型 | 描述 |
---|---|
TimeRanges 对象 |
表示音频的已播范围。 TimeRanges 对象的属性:
注释:首段已播范围的下标是 0。 |
Audio Object