Home > hls.js > Loader

Loader interface

Signature:

export interface Loader<T extends LoaderContext> 

Properties

Property

Modifiers

Type

Description

context

T | null

getCacheAge?

() => number | null

(Optional) getCacheAge() is called by hls.js to get the duration that a given object has been sitting in a cache proxy when playing live. If implemented, this should return a value in seconds.

For HTTP based loaders, this should return the contents of the "age" header.

getResponseHeader?

(name: string) => string | null

(Optional)

stats

LoaderStats

Methods

Method

Description

abort()

destroy()

load(context, config, callbacks)