MCPcopy
hub / github.com/video-dev/hls.js / Loader

Interface Loader

src/types/loader.ts:145–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145export interface Loader<T extends LoaderContext> {
146 destroy(): void;
147 abort(): void;
148 load(
149 context: T,
150 config: LoaderConfiguration,
151 callbacks: LoaderCallbacks<T>,
152 ): void;
153 /**
154 * `getCacheAge()` is called by hls.js to get the duration that a given object
155 * has been sitting in a cache proxy when playing live. If implemented,
156 * this should return a value in seconds.
157 *
158 * For HTTP based loaders, this should return the contents of the "age" header.
159 *
160 * @returns time object being lodaded
161 */
162 getCacheAge?: () => number | null;
163 getResponseHeader?: (name: string) => string | null;
164 context: T | null;
165 stats: LoaderStats;
166}
167
168export const enum PlaylistContextType {
169 MANIFEST = 'manifest',

Callers 24

destroyMethod · 0.65
onHandlerDestroyingMethod · 0.65
onHandlerDestroyedMethod · 0.65
recoverWorkerErrorMethod · 0.65
stopLoadMethod · 0.65
loadSteeringManifestMethod · 0.65
destroyMethod · 0.65
destroyMethod · 0.65
abortInternalMethod · 0.65
abortInternalMethod · 0.65
stopLoadMethod · 0.65
abortMethod · 0.65

Implementers 7

XhrLoadersrc/utils/xhr-loader.ts
FetchLoadersrc/utils/fetch-loader.ts
CmcdPlaylistLoadersrc/controller/cmcd-controller.ts
CmcdFragmentLoadersrc/controller/cmcd-controller.ts
KeyLoadersrc/loader/key-loader.ts
FragmentLoadersrc/loader/fragment-loader.ts
MockXhrtests/mocks/loader.mock.ts

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…