Interface: shaka.extern.SegmentIndex

Methods

find(time) → {number}

Finds the position of the segment for the given time, in seconds, relative to the start of the presentation. Returns the position of the segment with the largest end time if more than one segment is known for the given time.
Parameters:
Name Type Description
time number
Source:
Returns:
The position of the segment, or null if the position of the segment could not be determined.
Type
number

get(position) → {shaka.media.SegmentReference}

Gets the SegmentReference for the segment at the given position.
Parameters:
Name Type Description
position number The position of the segment as returned by find().
Source:
Returns:
The SegmentReference, or null if no such SegmentReference exists.
Type
shaka.media.SegmentReference

getNumEvicted() → {number}

Gets number of already evicted segments.
Source:
Returns:
Type
number

getNumReferences() → {number}

Get number of references.
Source:
Returns:
Type
number