hls.js 1.5.14-0.canary.10658 → 1.5.14-0.canary.10659
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hls.js +16 -15
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +16 -15
- package/dist/hls.light.js.map +1 -1
- package/dist/hls.light.min.js +1 -1
- package/dist/hls.light.min.js.map +1 -1
- package/dist/hls.light.mjs +15 -15
- package/dist/hls.light.mjs.map +1 -1
- package/dist/hls.min.js +1 -1
- package/dist/hls.min.js.map +1 -1
- package/dist/hls.mjs +14 -15
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/package.json +1 -1
- package/src/exports-named.ts +17 -9
- package/src/loader/fragment-loader.ts +13 -12
@@ -11,6 +11,7 @@ import type {
|
|
11
11
|
Loader,
|
12
12
|
LoaderConfiguration,
|
13
13
|
FragmentLoaderContext,
|
14
|
+
LoaderCallbacks,
|
14
15
|
} from '../types/loader';
|
15
16
|
|
16
17
|
const MIN_CHUNK_SIZE = Math.pow(2, 17); // 128kb
|
@@ -94,7 +95,7 @@ export default class FragmentLoader {
|
|
94
95
|
};
|
95
96
|
// Assign frag stats to the loader's stats reference
|
96
97
|
frag.stats = loader.stats;
|
97
|
-
|
98
|
+
const callbacks: LoaderCallbacks<FragmentLoaderContext> = {
|
98
99
|
onSuccess: (response, stats, context, networkDetails) => {
|
99
100
|
this.resetLoader(frag, loader);
|
100
101
|
let payload = response.data as ArrayBuffer;
|
@@ -152,17 +153,17 @@ export default class FragmentLoader {
|
|
152
153
|
}),
|
153
154
|
);
|
154
155
|
},
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
}
|
164
|
-
|
165
|
-
|
156
|
+
};
|
157
|
+
if (onProgress) {
|
158
|
+
callbacks.onProgress = (stats, context, data, networkDetails) =>
|
159
|
+
onProgress({
|
160
|
+
frag,
|
161
|
+
part: null,
|
162
|
+
payload: data as ArrayBuffer,
|
163
|
+
networkDetails,
|
164
|
+
});
|
165
|
+
}
|
166
|
+
loader.load(loaderContext, loaderConfig, callbacks);
|
166
167
|
});
|
167
168
|
}
|
168
169
|
|