TimeRanges

Objects implementing the TimeRanges interface represent a list of ranges (periods) of time.

When a TimeRanges object is said to be a normalized TimeRanges object, the ranges it represents must obey the following criteria: The start of a range must be greater than the end of all earlier ranges. The start of a range must be less than the end of that same range. In other words, the ranges in such an object are ordered, don't overlap, aren't empty, and don't touch (adjacent ranges are folded into one bigger range).


Supported Platform(s)

- BlackBerry OS 6.0+
- BlackBerry PlayBook 1.0+
- BlackBerry 10
- Ripple Emulator
View Supported Platform Table
APIBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
end   Y Y Y Y YY
start   Y Y Y Y YY
length   Y Y Y Y YY

Configuration Document Settings

To use all of the API described for this object, you must ensure the following settings are in your configuration document:

This API does not require a <feature> element to be declared in the configuration document of your BlackBerry WebWorks Application.

Permission Elements (PlayBook and BlackBerry 10+)
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application.

Functions

Number end
Number start

Properties

Number length

Functions

Number end (index : Number)


Returns the position of the end of the indexth range represented by the object, in seconds measured from the start of the timeline that the object covers


Supported Platforms
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook 1.0+
 - BlackBerry 10
 - Ripple Emulator


Parameters
index Indexth range represented by the object

Return:

Returns the time for the end of the range with the given index.


Number start (index : Number)


Return the position of the start of the indexth range represented by the object, in seconds measured from the start of the timeline that the object covers


Supported Platforms
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook 1.0+
 - BlackBerry 10
 - Ripple Emulator


Parameters
index Indexth range represented by the object

Return:

Returns the time for the start of the range with the given index.


Properties

readonly Number length


Return the number of ranges represented by the object.


Supported Platforms
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook 1.0+
 - BlackBerry 10
 - Ripple Emulator

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Feb 11 2013 14:51:10 GMT-0500 (EST)