Video played property
Example
Get the first played range (portion) of the video, in seconds:
var x = document.getElementById("myVideo");
document.getElementById("demo").innerHTML = "Start: " + x.played.start(0)
- " End: " + x.played.end(0)
xOutput value:
Start: 0 End: 2.162583
Try it »
Definition and Usage
The played attribute returns a TimeRanges object.
The TimeRanges object represents the video ranges that the user has played or seen.
The played range refers to the time range of the played video. If the user jumps within 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 attribute.
Syntax
videoObject
.played
Return Value
| Type | Description |
|---|---|
| TimeRanges Object |
Represents the played range of the video. TimeRanges object properties: |
Note:The index of the first played range is 0.
|
The Video object