hls.js 1.4.5 → 1.4.7
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 +54 -46
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +11 -5
- 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 +13 -5
- 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 +60 -52
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/package.json +1 -1
- package/src/controller/base-stream-controller.ts +4 -0
- package/src/controller/error-controller.ts +5 -3
- package/src/controller/subtitle-stream-controller.ts +21 -20
- package/src/controller/timeline-controller.ts +23 -24
- package/src/utils/webvtt-parser.ts +8 -6
- package/src/utils/xhr-loader.ts +1 -0
package/dist/hls.light.mjs
CHANGED
|
@@ -402,7 +402,7 @@ function enableLogs(debugConfig, id) {
|
|
|
402
402
|
// Some browsers don't allow to use bind on console object anyway
|
|
403
403
|
// fallback to default if needed
|
|
404
404
|
try {
|
|
405
|
-
exportedLogger.log(`Debug logs enabled for "${id}" in hls.js version ${"1.4.
|
|
405
|
+
exportedLogger.log(`Debug logs enabled for "${id}" in hls.js version ${"1.4.7"}`);
|
|
406
406
|
} catch (e) {
|
|
407
407
|
exportedLogger = fakeLogger;
|
|
408
408
|
}
|
|
@@ -5019,15 +5019,20 @@ class ErrorController {
|
|
|
5019
5019
|
var _data$frag, _data$context2;
|
|
5020
5020
|
// Search for next level to retry
|
|
5021
5021
|
let nextLevel = -1;
|
|
5022
|
-
const
|
|
5022
|
+
const {
|
|
5023
|
+
levels,
|
|
5024
|
+
loadLevel,
|
|
5025
|
+
minAutoLevel,
|
|
5026
|
+
maxAutoLevel
|
|
5027
|
+
} = hls;
|
|
5023
5028
|
const fragErrorType = (_data$frag = data.frag) == null ? void 0 : _data$frag.type;
|
|
5024
5029
|
const {
|
|
5025
5030
|
type: playlistErrorType,
|
|
5026
5031
|
groupId: playlistErrorGroupId
|
|
5027
5032
|
} = (_data$context2 = data.context) != null ? _data$context2 : {};
|
|
5028
5033
|
for (let i = levels.length; i--;) {
|
|
5029
|
-
const candidate = (i +
|
|
5030
|
-
if (candidate !==
|
|
5034
|
+
const candidate = (i + loadLevel) % levels.length;
|
|
5035
|
+
if (candidate !== loadLevel && candidate >= minAutoLevel && candidate <= maxAutoLevel && levels[candidate].loadError === 0) {
|
|
5031
5036
|
const levelCandidate = levels[candidate];
|
|
5032
5037
|
// Skip level switch if GAP tag is found in next level at same position
|
|
5033
5038
|
if (data.details === ErrorDetails.FRAG_GAP && data.frag) {
|
|
@@ -8829,6 +8834,8 @@ class BaseStreamController extends TaskLoop {
|
|
|
8829
8834
|
} else {
|
|
8830
8835
|
logger.warn(`${data.details} reached or exceeded max retry (${retryCount})`);
|
|
8831
8836
|
}
|
|
8837
|
+
} else if ((errorAction == null ? void 0 : errorAction.action) === NetworkErrorAction.SendAlternateToPenaltyBox) {
|
|
8838
|
+
this.state = State.WAITING_LEVEL;
|
|
8832
8839
|
} else {
|
|
8833
8840
|
this.state = State.ERROR;
|
|
8834
8841
|
}
|
|
@@ -17247,6 +17254,7 @@ class XhrLoader {
|
|
|
17247
17254
|
const stats = this.stats;
|
|
17248
17255
|
stats.loading.first = 0;
|
|
17249
17256
|
stats.loaded = 0;
|
|
17257
|
+
stats.aborted = false;
|
|
17250
17258
|
const xhrSetup = this.xhrSetup;
|
|
17251
17259
|
if (xhrSetup) {
|
|
17252
17260
|
Promise.resolve().then(() => {
|
|
@@ -18074,7 +18082,7 @@ class Hls {
|
|
|
18074
18082
|
* Get the video-dev/hls.js package version.
|
|
18075
18083
|
*/
|
|
18076
18084
|
static get version() {
|
|
18077
|
-
return "1.4.
|
|
18085
|
+
return "1.4.7";
|
|
18078
18086
|
}
|
|
18079
18087
|
|
|
18080
18088
|
/**
|