Class: shaka.media.SegmentReference

Constructor

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. null indicates that the segment extends to the end of the resource.
Source:

Members

(constant, nullable) endByte :number

Type:
  • number
Source:

(constant) endTime :number

Type:
  • number
Source:

getUris :function(): !Array.<string>

Type:
  • function(): !Array.<string>
Source:

(constant) position :number

Type:
  • number
Source:

(constant) startByte :number

Type:
  • number
Source:

(constant) startTime :number

Type:
  • number
Source: