Video played Attribute
Definition and Usage
played
This property returns a TimeRanges object.
The TimeRanges object represents the video range that the user has played (watched).
The playback range is the time range of the video being played. If there are jumps in the video, the user will receive multiple playback ranges.
Note:This property is read-only.
Example
Get the first playback range (partial) of the video, in seconds:
var x = document.getElementById("myVideo"); document.getElementById("demo").innerHTML = "Start: " + x.played.start(0) + " End: " + x.played.end(0)
syntax
videoObject.played
TimeRanges Object
Return Value | Type |
---|---|
Description |
TimeRanges Object Represents the play part of the video.
Note:The first play range is index 0. |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 9.0 | Support | Support | Support |