Video playedProperty
Examples
Get the first played range (in seconds) of the video (part):
var x = document.getElementById("myVideo");
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)
xThe output value is:
Start: 0 End: 2.162583
Try it Yourself »
Definition and Usage
The played property returns a TimeRanges object.
The TimeRanges object represents the ranges of the video that the user has played or seen.
A played range refers to the time range of the video that has been played. If the user jumps in the video, multiple played ranges will be obtained.
Note:This property is read-only.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the played property.
Note:Internet Explorer 8 or earlier browsers do not support this property.
Syntax
videoObject.played
Return Value
| Type | Description |
|---|---|
| TimeRanges object |
Represents the played ranges of the video. TimeRanges object properties:
Note:The index of the first played range is 0. |
Video Object Other extensions