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.
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
indexis 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
indexis not valid.
