Easy Tutorial
❮ Event Onpaste Prop Nodelist Length ❯

Video played Property

Video Object

Example

Get the first played range in seconds within the video:

var x = document.getElementById("myVideo");
document.getElementById("demo").innerHTML = "Start: " + x.played.start(0) + " End: " + x.played.end(0)

x Output value is:

Start: 0 End: 2.162583

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.

The played ranges are the time ranges of the video that have been played. If the user skips around 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 does not support this property.


Syntax

Return Value

Type Description
TimeRanges Object Represents the played ranges of the video. Properties of the TimeRanges object: length - Gets the number of played ranges in the video<br>start(index) - Gets the start position of a played range<br>end(index) - Gets the end position of a played range<br>Note: The index of the first played range is 0.
❮ Event Onpaste Prop Nodelist Length ❯