HTML Audio/Video DOMplayedProperty
HTML Audio/Video DOM Reference Manual
Example
Get the first played range (part) of the video, in seconds:
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 Yourself »
Definition and Usage
The played property returns a TimeRanges object.
The TimeRanges object represents the audio/video ranges that the user has played or seen.
Played ranges refer to the time ranges of the audio/video that has been played. If the user jumps in the audio/video, multiple played ranges will be obtained.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the played property.
Note:Internet Explorer 8 and earlier versions do not support this property.
Syntax
audio|video.played
Return Value
| Type | Description |
|---|---|
| TimeRanges Object | Represents the played ranges of the audio/video. Properties of the TimeRanges object:
Note:The index of the played range in the first segmentindexis 0. |
HTML Audio/Video DOM Reference Manualother extensions