import BaseStreamController from 'hls.js/src/controller/base-stream-controller.ts'
BaseStreamController
Extends:
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
|
|
public |
config: HlsConfig |
|
public |
|
|
public |
fragCurrent: * |
|
public |
|
|
public |
fragPrevious: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
levels: * |
|
public |
|
|
public |
log: * |
|
public |
|
|
public |
media: * |
|
public |
mediaBuffer: * |
|
public |
|
|
public |
onvended: * |
|
public |
onvseeking: * |
|
public |
|
|
public |
|
|
public |
|
|
public set |
|
|
public get |
state: * |
|
public |
transmuxer: * |
|
public |
warn: * |
Private Members | ||
private |
|
Method Summary
Public Methods | ||
public |
afterBufferFlushed(media: Bufferable, bufferType: SourceBufferName, playlistType: PlaylistLevelType) |
|
public |
alignPlaylists(details: LevelDetails, previousDetails: LevelDetails): number |
|
public |
bufferFragmentData(data: RemuxedTrack, frag: Fragment, part: undefined, chunkMeta: ChunkMetadata) |
|
public |
doFragPartsLoad(frag: Fragment, partList: undefined, partIndex: number, progressCallback: FragmentLoadProgressCallback): Promise |
|
public |
doTick() |
|
public |
flushBufferGap(frag: Fragment) |
|
public |
flushMainBuffer(startOffset: number, endOffset: number, type: undefined) |
|
public |
fragBufferedComplete(frag: Fragment, part: undefined) |
|
public |
fragContextChanged(frag: undefined): * |
|
public |
getCurrentContext(chunkMeta: ChunkMetadata): {"frag": *, "part": *, "level": *} |
|
public |
getFragmentAtPosition(bufferEnd: number, end: number, levelDetails: LevelDetails): * |
|
public |
getFwdBufferInfo(bufferable: Bufferable, type: PlaylistLevelType): * |
|
public |
getInitialLiveFragment(levelDetails: LevelDetails, fragments: Array): * |
|
public |
|
|
public |
getMaxBufferLength(levelBitrate: number): number |
|
public |
getNextFragment(pos: number, levelDetails: LevelDetails): * |
|
public |
getNextPart(partList: undefined, frag: Fragment, targetBufferTime: number): number |
|
public |
handleFragLoadAborted(frag: Fragment, part: undefined) |
|
public |
handleFragLoadError(undefined: LoadError): * |
|
public |
loadFragment(frag: Fragment, levelDetails: LevelDetails, targetBufferTime: number) |
|
public |
loadKey(frag: Fragment, details: LevelDetails) |
|
public |
loadedEndOfParts(partList: undefined, targetBufferTime: number): boolean |
|
public |
mapToInitFragWhenRequired(frag: undefined): * |
|
public |
onFragmentOrKeyLoadError(filterType: PlaylistLevelType, data: ErrorData) |
|
public |
|
|
public |
|
|
public |
onKeyLoaded(event: undefined, data: KeyLoadedData) |
|
public |
onMediaAttached(event: undefined, data: MediaAttachingData) |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
reduceMaxBufferLength(threshold: number): boolean |
|
public |
resetFragmentLoading(frag: Fragment) |
|
public |
resetLiveStartWhenNotLoaded(level: number): boolean |
|
public |
|
|
public |
|
|
public |
setStartPosition(details: LevelDetails, sliding: number) |
|
public |
|
|
public |
stopLoad() |
|
public |
synchronizeToLiveEdge(levelDetails: LevelDetails) |
|
public |
updateLevelTiming(frag: Fragment, part: undefined, level: Level, partial: boolean) |
|
public |
waitForCdnTuneIn(details: LevelDetails): * |
Private Methods | ||
private |
_doFragLoad(frag: Fragment, details: LevelDetails, targetBufferTime: undefined, progressCallback: FragmentLoadProgressCallback): Promise |
|
private |
_handleFragmentLoadComplete(fragLoadedEndData: PartsLoadedData) |
|
private |
_handleFragmentLoadProgress(frag: FragLoadedData) |
|
private |
_handleTransmuxerFlush(chunkMeta: ChunkMetadata) |
|
private |
_loadFragForPlayback(frag: Fragment, levelDetails: LevelDetails, targetBufferTime: number) |
|
private |
_loadInitSegment(frag: Fragment) |
|
private |
_streamEnded(bufferInfo: undefined, levelDetails: LevelDetails): boolean |
Public Constructors
public constructor() source
Public Members
public config: HlsConfig source
public fragCurrent: * source
public fragPrevious: * source
public fragmentLoader: FragmentLoader source
public fragmentTracker: FragmentTracker source
public levelLastLoaded: * source
public levels: * source
public log: * source
public media: * source
public mediaBuffer: * source
public onvended: * source
public onvseeking: * source
public get state: * source
public transmuxer: * source
public warn: * source
Private Members
Public Methods
public afterBufferFlushed(media: Bufferable, bufferType: SourceBufferName, playlistType: PlaylistLevelType) source
Params:
Name | Type | Attribute | Description |
media | Bufferable | ||
bufferType | SourceBufferName | ||
playlistType | PlaylistLevelType |
public alignPlaylists(details: LevelDetails, previousDetails: LevelDetails): number source
Params:
Name | Type | Attribute | Description |
details | LevelDetails | ||
previousDetails | LevelDetails |
public bufferFragmentData(data: RemuxedTrack, frag: Fragment, part: undefined, chunkMeta: ChunkMetadata) source
Params:
Name | Type | Attribute | Description |
data | RemuxedTrack | ||
frag | Fragment | ||
part | undefined | ||
chunkMeta | ChunkMetadata |
public doFragPartsLoad(frag: Fragment, partList: undefined, partIndex: number, progressCallback: FragmentLoadProgressCallback): Promise source
public doTick() source
public fragContextChanged(frag: undefined): * source
Params:
Name | Type | Attribute | Description |
frag | undefined |
Return:
* |
public getCurrentContext(chunkMeta: ChunkMetadata): {"frag": *, "part": *, "level": *} source
Params:
Name | Type | Attribute | Description |
chunkMeta | ChunkMetadata |
Return:
{"frag": *, "part": *, "level": *} |
public getFragmentAtPosition(bufferEnd: number, end: number, levelDetails: LevelDetails): * source
Params:
Name | Type | Attribute | Description |
bufferEnd | number | ||
end | number | ||
levelDetails | LevelDetails |
Return:
* |
public getFwdBufferInfo(bufferable: Bufferable, type: PlaylistLevelType): * source
Params:
Name | Type | Attribute | Description |
bufferable | Bufferable | ||
type | PlaylistLevelType |
Return:
* |
public getInitialLiveFragment(levelDetails: LevelDetails, fragments: Array): * source
Params:
Name | Type | Attribute | Description |
levelDetails | LevelDetails | ||
fragments | Array |
Return:
* |
public getMaxBufferLength(levelBitrate: number): number source
Params:
Name | Type | Attribute | Description |
levelBitrate | number |
public getNextFragment(pos: number, levelDetails: LevelDetails): * source
Params:
Name | Type | Attribute | Description |
pos | number | ||
levelDetails | LevelDetails |
Return:
* |
public handleFragLoadError(undefined: LoadError): * source
Params:
Name | Type | Attribute | Description |
undefined | LoadError |
Return:
* |
public loadFragment(frag: Fragment, levelDetails: LevelDetails, targetBufferTime: number) source
Params:
Name | Type | Attribute | Description |
frag | Fragment | ||
levelDetails | LevelDetails | ||
targetBufferTime | number |
public loadKey(frag: Fragment, details: LevelDetails) source
Params:
Name | Type | Attribute | Description |
frag | Fragment | ||
details | LevelDetails |
public mapToInitFragWhenRequired(frag: undefined): * source
Params:
Name | Type | Attribute | Description |
frag | undefined |
Return:
* |
public onFragmentOrKeyLoadError(filterType: PlaylistLevelType, data: ErrorData) source
Params:
Name | Type | Attribute | Description |
filterType | PlaylistLevelType | ||
data | ErrorData |
public onHandlerDestroyed() source
public onHandlerDestroying() source
public onKeyLoaded(event: undefined, data: KeyLoadedData) source
Params:
Name | Type | Attribute | Description |
event | undefined | ||
data | KeyLoadedData |
public onMediaAttached(event: undefined, data: MediaAttachingData) source
Params:
Name | Type | Attribute | Description |
event | undefined | ||
data | MediaAttachingData |
public onMediaDetaching() source
public onMediaEnded() source
public onMediaSeeking() source
public onTickEnd() source
public reduceMaxBufferLength(threshold: number): boolean source
Params:
Name | Type | Attribute | Description |
threshold | number |
public resetFragmentLoading(frag: Fragment) source
Params:
Name | Type | Attribute | Description |
frag | Fragment |
public resetLiveStartWhenNotLoaded(level: number): boolean source
Params:
Name | Type | Attribute | Description |
level | number |
public resetLoadingState() source
public resetTransmuxer() source
public setStartPosition(details: LevelDetails, sliding: number) source
Params:
Name | Type | Attribute | Description |
details | LevelDetails | ||
sliding | number |
public startLoad(startPosition: number) source
Params:
Name | Type | Attribute | Description |
startPosition | number |
public stopLoad() source
public synchronizeToLiveEdge(levelDetails: LevelDetails) source
Params:
Name | Type | Attribute | Description |
levelDetails | LevelDetails |
public waitForCdnTuneIn(details: LevelDetails): * source
Params:
Name | Type | Attribute | Description |
details | LevelDetails |
Return:
* |
Private Methods
private _doFragLoad(frag: Fragment, details: LevelDetails, targetBufferTime: undefined, progressCallback: FragmentLoadProgressCallback): Promise source
Params:
Name | Type | Attribute | Description |
frag | Fragment | ||
details | LevelDetails | ||
targetBufferTime | undefined | ||
progressCallback | FragmentLoadProgressCallback |
private _handleFragmentLoadComplete(fragLoadedEndData: PartsLoadedData) source
Params:
Name | Type | Attribute | Description |
fragLoadedEndData | PartsLoadedData |
private _handleFragmentLoadProgress(frag: FragLoadedData) source
Params:
Name | Type | Attribute | Description |
frag | FragLoadedData |
private _handleTransmuxerFlush(chunkMeta: ChunkMetadata) source
Params:
Name | Type | Attribute | Description |
chunkMeta | ChunkMetadata |
private _loadFragForPlayback(frag: Fragment, levelDetails: LevelDetails, targetBufferTime: number) source
Params:
Name | Type | Attribute | Description |
frag | Fragment | ||
levelDetails | LevelDetails | ||
targetBufferTime | number |
private _streamEnded(bufferInfo: undefined, levelDetails: LevelDetails): boolean source
Params:
Name | Type | Attribute | Description |
bufferInfo | undefined | ||
levelDetails | LevelDetails |