1 out of 1 rated this helpful - Rate this topic

duration property

Gets the duration, in seconds, of the current media resource, a NaN value if duration is not available, or Infinity if the media resource is streaming.

HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.8.9.6Internet Explorer 9

Syntax

JavaScript

fSeconds = object.duration

Property values

Type: Floating-point

The duration of the current media resource, in seconds.

time in seconds

The duration of the current media, in seconds.

NaN (Not a Number)

The duration is not available.

Infinity

The media is streaming.

Standards information

See also

media
audio
audio
video element
video object
How to use HTML5 to play video files on your webpage
How to use HTML5 to Add an Audio Player to your Webpage

 

 

Send comments about this topic to Microsoft

Build date: 11/27/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.