Home > hls.js > FragmentTracker

FragmentTracker class

Signature:

export declare class FragmentTracker implements ComponentAPI 

Implements: ComponentAPI

Constructors

Constructor

Modifiers

Description

(constructor)(hls)

Constructs a new instance of the FragmentTracker class

Methods

Method

Modifiers

Description

destroy()

detectEvictedFragments(elementaryStream, timeRange, playlistType, appendedPart, removeAppending)

Partial fragments effected by coded frame eviction will be removed The browser will unload parts of the buffer to free up memory for new buffer data Fragments will need to be reloaded when the buffer is freed up, removing partial fragments will allow them to reload(since there might be parts that are still playable)

detectPartialFragments(data)

Checks if the fragment passed in is loaded in the buffer properly Partially loaded fragments will be registered as a partial fragment

fragBuffered(frag, force)

getAppendedFrag(position, levelType)

Return a Fragment or Part with an appended range that matches the position and levelType Otherwise, return null

getBufferedFrag(position, levelType)

Return a buffered Fragment that matches the position and levelType. A buffered Fragment is one whose loading, parsing and appending is done (completed or "partial" meaning aborted). If not found any Fragment, return null

getFragAtPos(position, levelType, buffered)

getPartialFragment(time)

Gets the partial fragment for a certain time

getState(fragment)

hasFragments(type)

hasParts(type)

isEndListAppended(type)

removeAllFragments()

removeFragment(fragment)

removeFragmentsInRange(start, end, playlistType, withGapOnly, unbufferedOnly)