Home Reference Source
import PlaylistLoader from 'hls.js/src/loader/playlist-loader.js'
public class | source

PlaylistLoader

Extends:

EventHandler → PlaylistLoader

Static Member Summary

Static Public Members
public static get
public static get

Static Method Summary

Static Public Methods
public static
public static

getResponseUrl(response: *, context: *): *

public static

Map context.type to LevelType

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

loaders: {}

Method Summary

Public Methods
public

createInternalLoader(context: object): XHRLoader

Returns defaults or configured loader-type overloads (pLoader and loader config params) Default loader is XHRLoader (see utils)

public
public

Call destroy on all internal loader instances mapped (one per context type)

public

getInternalLoader(context: *): *

public

load(url: *, context: *): boolean

public

loaderror(response: *, context: *, networkDetails: undefined)

public

loadsuccess(response: *, stats: *, context: *, networkDetails: undefined)

public

loadtimeout(stats: *, context: *, networkDetails: undefined)

public
public

onLevelLoading(data: *)

public
public
public

resetInternalLoader(contextType: *)

Private Methods
private

_handleManifestParsingError(response: *, context: *, reason: *, networkDetails: *)

private

_handleMasterPlaylist(response: *, stats: *, context: *, networkDetails: *)

private

_handleNetworkError(context: *, networkDetails: *, timeout: boolean)

private

_handlePlaylistLoaded(response: *, stats: *, context: *, networkDetails: *)

private

_handleSidxRequest(response: *, context: *)

private

_handleTrackOrLevelPlaylist(response: *, stats: *, context: *, networkDetails: *)

Inherited Summary

From class EventHandler
public
public

hls: *

public
public
public
public

onEvent(event: *, data: *)

arguments: event (string), data (any)

public

onEventGeneric(event: *, data: *)

public
public
public
public

Static Public Members

public static get ContextType: * source

public static get LevelType: * source

Static Public Methods

public static canHaveQualityLevels(type: ContextType): boolean source

Params:

NameTypeAttributeDescription
type ContextType

Return:

boolean

public static getResponseUrl(response: *, context: *): * source

Params:

NameTypeAttributeDescription
response *
context *

Return:

*

public static mapContextToLevelType(context: {type: ContextType}): LevelType source

Map context.type to LevelType

Params:

NameTypeAttributeDescription
context {type: ContextType}

Return:

LevelType

Public Constructors

public constructor(hls: Hls) source

Override:

EventHandler#constructor

Params:

NameTypeAttributeDescription
hls Hls

Public Members

public loaders: {} source

Public Methods

public createInternalLoader(context: object): XHRLoader source

Returns defaults or configured loader-type overloads (pLoader and loader config params) Default loader is XHRLoader (see utils)

Params:

NameTypeAttributeDescription
context object

Return:

XHRLoader

or other compatible configured overload

public destroy() source

Override:

EventHandler#destroy

public destroyInternalLoaders() source

Call destroy on all internal loader instances mapped (one per context type)

public getInternalLoader(context: *): * source

Params:

NameTypeAttributeDescription
context *

Return:

*

public load(url: *, context: *): boolean source

Params:

NameTypeAttributeDescription
url *
context *

Return:

boolean

public loaderror(response: *, context: *, networkDetails: undefined) source

Params:

NameTypeAttributeDescription
response *
context *
networkDetails undefined
  • optional
  • default: undefined

public loadsuccess(response: *, stats: *, context: *, networkDetails: undefined) source

Params:

NameTypeAttributeDescription
response *
stats *
context *
networkDetails undefined
  • optional
  • default: undefined

public loadtimeout(stats: *, context: *, networkDetails: undefined) source

Params:

NameTypeAttributeDescription
stats *
context *
networkDetails undefined
  • optional
  • default: undefined

public onAudioTrackLoading(data: *) source

Params:

NameTypeAttributeDescription
data *

public onLevelLoading(data: *) source

Params:

NameTypeAttributeDescription
data *

public onManifestLoading(data: *) source

Params:

NameTypeAttributeDescription
data *

public onSubtitleTrackLoading(data: *) source

Params:

NameTypeAttributeDescription
data *

public resetInternalLoader(contextType: *) source

Params:

NameTypeAttributeDescription
contextType *

Private Methods

private _handleManifestParsingError(response: *, context: *, reason: *, networkDetails: *) source

Params:

NameTypeAttributeDescription
response *
context *
reason *
networkDetails *

private _handleMasterPlaylist(response: *, stats: *, context: *, networkDetails: *) source

Params:

NameTypeAttributeDescription
response *
stats *
context *
networkDetails *

private _handleNetworkError(context: *, networkDetails: *, timeout: boolean) source

Params:

NameTypeAttributeDescription
context *
networkDetails *
timeout boolean
  • optional
  • default: false

private _handlePlaylistLoaded(response: *, stats: *, context: *, networkDetails: *) source

Params:

NameTypeAttributeDescription
response *
stats *
context *
networkDetails *

private _handleSidxRequest(response: *, context: *) source

Params:

NameTypeAttributeDescription
response *
context *

private _handleTrackOrLevelPlaylist(response: *, stats: *, context: *, networkDetails: *) source

Params:

NameTypeAttributeDescription
response *
stats *
context *
networkDetails *