Constructor
new SegmentReference(startTime, endTime, uris, startByte, endBytenullable, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
startTime |
number | The segment's start time in seconds. | |
endTime |
number | The segment's end time in seconds. The segment ends the instant before this time, so |endTime| must be strictly greater than |startTime|. | |
uris |
function | 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. |
initSegmentReference |
shaka.media.InitSegmentReference | The segment's initialization segment metadata, or null if the segments are self-initializing. | |
timestampOffset |
number | The amount of time, in seconds, that must be added to the segment's
internal timestamps to align it to the presentation timeline.
For DASH, this value should equal the Period start time minus the first presentation timestamp of the first frame/sample in the Period. For example, for MP4 based streams, this value should equal Period start minus the first segment's tfdt box's 'baseMediaDecodeTime' field (after it has been converted to seconds). For HLS, this value should be 0 to keep the presentation time at the most recent discontinuity minus the corresponding media time. |
|
appendWindowStart |
number | The start of the append window for this reference, relative to the presentation. Any content from before this time will be removed by MediaSource. | |
appendWindowEnd |
number | The end of the append window for this reference, relative to the presentation. Any content from after this time will be removed by MediaSource. |
- Source:
Members
getUrisInner :function(): !Array.<string>
Type:
- function(): !Array.<string>
- Source:
Methods
getEndByte() → {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
getEndTime() → {number}
Returns the segment's end time in seconds.
- Source:
Returns:
- Type
- number
getSize() → {number}
Returns the size of the segment.
- Source:
Returns:
- Type
- number
getStartByte() → {number}
Returns the offset from the start of the resource to the
start of the segment.
- Source:
Returns:
- Type
- number
getStartTime() → {number}
Returns the segment's start time in seconds.
- Source:
Returns:
- Type
- number
getUris() → {Array.<string>}
Creates and returns the URIs of the resource containing the segment.
- Source:
Returns:
- Type
- Array.<string>