Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

nsIDOMHTMLTimeRanges

The nsIDOMHTMLTimeRanges interface represents a set of time ranges in media; it's primarily used by the nsIDOMHTMLMediaElement interface, and implements the DOM TimeRanges interface.

Each time range represented by an nsIDOMHTMLTimeRanges object has an index number; you call the start() and end() methods to obtain the start and end times of each range, specifying the index number of the range to look up.

Please add a summary to this article.
  Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Inherits from: nsISupports

Method overview

float start(in unsigned long index);
float end(in unsigned long index);

Attributes

Attribute Type Description
length unsigned long
The number of ranges represented by the nsIDOMHTMLTimeRanges object. Read only.

Methods

end()

Returns the time offset to the end of the specified time range.

float end(
  in unsigned long index
);
Parameters
index
The index to the time range whose end time is to be returned.
Return value

The time at which the specified range ends, in seconds measured from the beginning of the timeline represented by the object.

Exceptions thrown
INDEX_SIZE_ERR
The specified index is not valid.

start()

Returns the time offset to the start of the specified time range.

float start(
  in unsigned long index
);
Parameters
index
The index to the time range whose start time is to be returned.
Return value

The time at which the specified range starts, in seconds measured from the beginning of the timeline represented by the object.

Exceptions thrown
INDEX_SIZE_ERR
The specified index is not valid.

See also

Document Tags and Contributors

 Contributors to this page: Sheppy
 Last updated by: Sheppy,