| 143 | } |
| 144 | |
| 145 | export 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 | |
| 168 | export const enum PlaylistContextType { |
| 169 | MANIFEST = 'manifest', |
no outgoing calls
no test coverage detected
searching dependent graphs…