Audio played attribute
Definition and Usage
played
The property returns a TimeRanges object.
The TimeRanges object represents the audio range played by the user.
The playback range is the time range of the audio played. If there is a jump in the audio, the user will get several playback ranges.
Note:This property is read-only.
Example
Get the first playback range (partial) of the audio, in seconds:
var x = document.getElementById("myAudio"); document.getElementById("demo").innerHTML = "Start: " + x.played.start(0) + " End: " + x.played.end(0)
Grammar
audioObject.played
Return Value
Return Value | Type |
---|---|
Description |
TimeRanges Object Represents the playing part of the audio.
Note:The first play range is index 0 |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |