new VideoTimeRanges(element, property)
This object describe the video time ranges.
Parameters:
Name | Type | Description |
---|---|---|
element |
Element | HTMLVideoElement | The HTMLVideoElement that handle the ranges. |
property |
string | The property of the video element that handles ranges (can be "buffered" or "played"). |
- Source:
Extends
Members
(readonly) alive :boolean
Get the alive flag value of the object.
Type:
- boolean
- Inherited From:
- Source:
(readonly) className :string
Get the class name of the object.
Type:
- string
- Inherited From:
- Source:
(readonly) complete :boolean
Get the complete status of ranges, return true if there is a unique range that covers the entire media.
Type:
- boolean
- Source:
data :*
Get and set any custom data you want to associate to this object.
Type:
- *
- Inherited From:
- Source:
debug :boolean
Get and set the debug flag.
Type:
- boolean
- Inherited From:
- Source:
(readonly) length :number
Get the length of time ranges.
Type:
- number
- Source:
(readonly) onDestroy :FORGE.EventDispatcher
Get the onDestroy FORGE.EventDispatcher, this event is emitted at the end of the destroy sequence.
Type:
- Inherited From:
- Source:
(readonly) tags :Array
Get the tags associated to this object.
Type:
- Array
- Inherited From:
- Source:
(readonly) uid :string
Get the uid of the object.
Type:
- string
- Inherited From:
- Source:
warning :boolean
Get and set the warning flag.
Type:
- boolean
- Inherited From:
- Source:
Methods
destroy()
Basic destroy method, prevent double destroy, change the alive flag.
- Inherited From:
- Source:
getTimeRange(index) → (nullable) {VideoTimeRangeObject}
Get a time range from it's index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index of the asked range. |
- Source:
Returns:
Returns an object that contains the start and the end value of the asked range.
- Type
- VideoTimeRangeObject
isInRanges(time, duration) → {boolean}
Know if a given point in time is in any ranges.
Parameters:
Name | Type | Description |
---|---|---|
time |
number | The time of your request. |
duration |
number | The duration of your requested range. |
- Source:
Returns:
Returns true if you requested range exists.
- Type
- boolean
log(value)
Basic log method, log a string in the console if debug is enabled.
Parameters:
Name | Type | Description |
---|---|---|
value |
* | The value you want to log in the console. |
- Inherited From:
- Source:
warn(valuenullable)
Basic warn method, log a warn string in the console if warning is enabled.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
value |
string | Object |
<nullable> |
The value you want to warn in the console. |
- Inherited From:
- Source: