Latest web development tutorials

HTML DOM Video played Properties

Video Object Reference Video Object

Examples

Get video segment to the first range (part) in seconds elapsed:

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

x output values:

Start: 0 End: 2.162583

try it"

Definition and Usage

played TimeRanges property returns an object.

TimeRanges objects that the user has been played or seen the video range.

It has broadcast a range is being played video time. If you jump in the video, you will get more of the play range.

Note: This property is read-only.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support played Properties

Note: Internet Explorer 8 or earlier browser does not support this property.


grammar

videoObject .played

return value

Types of description
TimeRanges objects

It indicates that the video has been broadcast range.

TimeRanges object properties:

  • length - already get video broadcast range of the number of
  • start(index) - get a start position of the range have been sown
  • end(index) - has obtained a broadcast range of the end position

Note: The first segment has been broadcast range index is 0.



Video Object Reference Video Object