Constructor
(export) new SegmentReference(position, startTime, endTime, uris, startByte, endBytenullable)
Creates a SegmentReference, which provides the start time, end time, and
location to a media segment.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
position |
number | The segment's position within a particular Period. The following should hold true between any two SegmentReferences from the same Period, r1 and r2: IF r2.position > r1.position THEN [ (r2.startTime > r1.startTime) OR (r2.startTime == r1.startTime AND r2.endTime >= r1.endTime) ] | |
startTime |
number | The segment's start time in seconds, relative to the start of a particular Period. | |
endTime |
number | The segment's end time in seconds, relative to the start of a particular Period. The segment ends the instant before this time, so |endTime| must be strictly greater than |startTime|. | |
uris |
function(): !Array.<string> | A function that creates the URIs of the resource containing the segment. | |
startByte |
number | The offset from the start of the resource to the start of the segment. | |
endByte |
number |
<nullable> |
The offset from the start of the resource to the end of the segment, inclusive. A value of null indicates that the segment extends to the end of the resource. |
- Source:
Members
getUris :function(): !Array.<string>
Type:
- function(): !Array.<string>
- Source:
Methods
(export) createUris() → (non-null) {Array.<string>}
Creates the URIs of the resource containing the segment.
- Source:
Returns:
- Type
- Array.<string>
(export) getEndByte() → (nullable) {number}
Returns the offset from the start of the resource to the end of the segment,
inclusive. A value of null indicates that the segment extends to the end of
the resource.
- Source:
Returns:
- Type
- number
(export) getEndTime() → {number}
Returns the segment's end time in seconds, relative to
the start of a particular Period.
- Source:
Returns:
- Type
- number
(export) getPosition() → {number}
Returns the segment's position within a particular Period.
- Source:
Returns:
The segment's position.
- Type
- number
getSize() → (nullable) {number}
Returns the size of the segment.
- Source:
Returns:
- Type
- number
(export) getStartByte() → {number}
Returns the offset from the start of the resource to the
start of the segment.
- Source:
Returns:
- Type
- number
(export) getStartTime() → {number}
Returns the segment's start time in seconds, relative to
the start of a particular Period.
- Source:
Returns:
- Type
- number