FragmentTracker
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
|
|
public |
activePart: * |
|
public |
|
|
public |
fragments: Partial |
|
public |
hls: * |
|
public |
timeRanges: * |
Method Summary
Public Methods | ||
public |
|
|
public |
destroy() |
|
public |
detectEvictedFragments(elementaryStream: SourceBufferName, timeRange: TimeRanges) 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) |
|
public |
detectPartialFragments(data: FragBufferedData) Checks if the fragment passed in is loaded in the buffer properly Partially loaded fragments will be registered as a partial fragment |
|
public |
getAppendedFrag(position: number, levelType: PlaylistLevelType): * Return a Fragment with an appended range that matches the position and levelType. |
|
public |
getBacktrackData(fragment: Fragment): * |
|
public |
getBufferedFrag(position: number, levelType: PlaylistLevelType): * Return a buffered Fragment that matches the position and levelType. |
|
public |
getBufferedTimes(fragment: Fragment, part: undefined, partial: boolean, timeRange: TimeRanges): FragmentBufferedRange |
|
public |
getPartialFragment(time: number): * Gets the partial fragment for a certain time |
|
public |
|
|
public |
hasFragment(fragment: Fragment): boolean |
|
public |
isTimeBuffered(startPTS: number, endPTS: number, timeRange: TimeRanges): boolean |
|
public |
onBufferAppended(event: undefined, data: BufferAppendedData) |
|
public |
onFragBuffered(event: undefined, data: FragBufferedData) |
|
public |
onFragLoaded(event: undefined, data: FragLoadedData) |
|
public |
|
|
public |
removeFragment(fragment: Fragment) |
Private Methods | ||
private |
|
|
private |
|
Public Constructors
public constructor() source
Public Members
public activeFragment: * source
public activePart: * source
public fragments: Partial source
public hls: * source
public timeRanges: * source
Public Methods
public backtrack(frag: Fragment, data: FragLoadedData) source
Params:
Name | Type | Attribute | Description |
frag | Fragment | ||
data | FragLoadedData |
public destroy() source
public detectEvictedFragments(elementaryStream: SourceBufferName, timeRange: TimeRanges) source
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)
Params:
Name | Type | Attribute | Description |
elementaryStream | SourceBufferName | ||
timeRange | TimeRanges |
public detectPartialFragments(data: FragBufferedData) source
Checks if the fragment passed in is loaded in the buffer properly Partially loaded fragments will be registered as a partial fragment
Params:
Name | Type | Attribute | Description |
data | FragBufferedData |
public getAppendedFrag(position: number, levelType: PlaylistLevelType): * source
Return a Fragment with an appended range that matches the position and levelType. If not found any Fragment, return null
Params:
Name | Type | Attribute | Description |
position | number | ||
levelType | PlaylistLevelType |
Return:
* |
public getBacktrackData(fragment: Fragment): * source
Params:
Name | Type | Attribute | Description |
fragment | Fragment |
Return:
* |
public getBufferedFrag(position: number, levelType: PlaylistLevelType): * source
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
Params:
Name | Type | Attribute | Description |
position | number | ||
levelType | PlaylistLevelType |
Return:
* |
public getBufferedTimes(fragment: Fragment, part: undefined, partial: boolean, timeRange: TimeRanges): FragmentBufferedRange source
Params:
Name | Type | Attribute | Description |
fragment | Fragment | ||
part | undefined | ||
partial | boolean | ||
timeRange | TimeRanges |
Return:
FragmentBufferedRange |
public getPartialFragment(time: number): * source
Gets the partial fragment for a certain time
Params:
Name | Type | Attribute | Description |
time | number |
Return:
* |
public getState(fragment: Fragment): FragmentState source
Params:
Name | Type | Attribute | Description |
fragment | Fragment |
Return:
FragmentState |
public hasFragment(fragment: Fragment): boolean source
Params:
Name | Type | Attribute | Description |
fragment | Fragment |
public isTimeBuffered(startPTS: number, endPTS: number, timeRange: TimeRanges): boolean source
Params:
Name | Type | Attribute | Description |
startPTS | number | ||
endPTS | number | ||
timeRange | TimeRanges |
public onBufferAppended(event: undefined, data: BufferAppendedData) source
Params:
Name | Type | Attribute | Description |
event | undefined | ||
data | BufferAppendedData |
public onFragBuffered(event: undefined, data: FragBufferedData) source
Params:
Name | Type | Attribute | Description |
event | undefined | ||
data | FragBufferedData |
public onFragLoaded(event: undefined, data: FragLoadedData) source
Params:
Name | Type | Attribute | Description |
event | undefined | ||
data | FragLoadedData |
public removeAllFragments() source
public removeFragment(fragment: Fragment) source
Params:
Name | Type | Attribute | Description |
fragment | Fragment |