Home Reference Source
import LevelController from 'hls.js/src/controller/level-controller.ts'
public class | source

LevelController

Extends:

src/controller/base-playlist-controller.js~BasePlaylistController → LevelController

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public get
public set
public get
public set
public get

levels: *

public get
public set
public
public get
public set
public
public
public get
public set
Private Members
private
private

_levels: *

private

Method Summary

Public Methods
public
public

loadPlaylist(hlsUrlParameters: HlsUrlParameters)

public

onAudioTrackSwitched(event: undefined, data: TrackSwitchedData)

public

onError(event: undefined, data: ErrorData)

public

onFragLoaded(event: undefined, undefined: FragLoadedData)

public

onLevelLoaded(event: undefined, data: LevelLoadedData)

public

onManifestLoaded(event: undefined, data: ManifestLoadedData)

public

recoverLevel(errorEvent: ErrorData, levelIndex: number, levelError: boolean, levelSwitch: boolean)

Switch to a redundant stream if any available.

public

redundantFailover(levelIndex: number)

public

removeLevel(levelIndex: undefined, urlId: undefined)

public
Private Methods
private
private

Public Constructors

public constructor() source

Public Members

public currentLevelIndex: number source

public get firstLevel: number source

public set firstLevel: undefined source

public get level: number source

public set level: number source

public get levels: * source

public get manualLevel: number source

public set manualLevel: undefined source

public manualLevelIndex: number source

public get nextLoadLevel: * source

public set nextLoadLevel: undefined source

public onParsedComplete: Function source

public retryCount: number source

public get startLevel: * source

public set startLevel: undefined source

Private Members

private _firstLevel: number source

private _levels: * source

private _startLevel: number source

Public Methods

public destroy() source

public loadPlaylist(hlsUrlParameters: HlsUrlParameters) source

Params:

NameTypeAttributeDescription
hlsUrlParameters HlsUrlParameters

public onAudioTrackSwitched(event: undefined, data: TrackSwitchedData) source

Params:

NameTypeAttributeDescription
event undefined
data TrackSwitchedData

public onError(event: undefined, data: ErrorData) source

Params:

NameTypeAttributeDescription
event undefined
data ErrorData

public onFragLoaded(event: undefined, undefined: FragLoadedData) source

Params:

NameTypeAttributeDescription
event undefined
undefined FragLoadedData

public onLevelLoaded(event: undefined, data: LevelLoadedData) source

Params:

NameTypeAttributeDescription
event undefined
data LevelLoadedData

public onManifestLoaded(event: undefined, data: ManifestLoadedData) source

Params:

NameTypeAttributeDescription
event undefined
data ManifestLoadedData

public recoverLevel(errorEvent: ErrorData, levelIndex: number, levelError: boolean, levelSwitch: boolean) source

Switch to a redundant stream if any available. If redundant stream is not available, emergency switch down if ABR mode is enabled.

Params:

NameTypeAttributeDescription
errorEvent ErrorData
levelIndex number
levelError boolean
levelSwitch boolean

public redundantFailover(levelIndex: number) source

Params:

NameTypeAttributeDescription
levelIndex number

public removeLevel(levelIndex: undefined, urlId: undefined) source

Params:

NameTypeAttributeDescription
levelIndex undefined
urlId undefined

public startLoad() source

Private Methods

private _registerListeners() source

private _unregisterListeners() source