hls.js 1.4.7 → 1.4.8
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 +12 -9
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +12 -9
- 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 +12 -9
- 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 +12 -9
- 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 +6 -5
- package/src/controller/stream-controller.ts +6 -2
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.8"}`);
|
|
406
406
|
} catch (e) {
|
|
407
407
|
exportedLogger = fakeLogger;
|
|
408
408
|
}
|
|
@@ -8815,10 +8815,8 @@ class BaseStreamController extends TaskLoop {
|
|
|
8815
8815
|
retryConfig
|
|
8816
8816
|
} = errorAction || {};
|
|
8817
8817
|
if (errorAction && action === NetworkErrorAction.RetryRequest && retryConfig) {
|
|
8818
|
-
|
|
8819
|
-
|
|
8820
|
-
this.nextLoadPosition = this.startPosition;
|
|
8821
|
-
}
|
|
8818
|
+
var _this$levelLastLoaded;
|
|
8819
|
+
this.resetStartWhenNotLoaded((_this$levelLastLoaded = this.levelLastLoaded) != null ? _this$levelLastLoaded : frag.level);
|
|
8822
8820
|
const delay = getRetryDelay(retryConfig, retryCount);
|
|
8823
8821
|
this.warn(`Fragment ${frag.sn} of ${filterType} ${frag.level} errored with ${data.details}, retrying loading ${retryCount + 1}/${retryConfig.maxNumRetry} in ${delay}ms`);
|
|
8824
8822
|
errorAction.resolved = true;
|
|
@@ -8918,9 +8916,10 @@ class BaseStreamController extends TaskLoop {
|
|
|
8918
8916
|
}
|
|
8919
8917
|
}
|
|
8920
8918
|
resetWhenMissingContext(chunkMeta) {
|
|
8919
|
+
var _this$levelLastLoaded2;
|
|
8921
8920
|
this.warn(`The loading context changed while buffering fragment ${chunkMeta.sn} of level ${chunkMeta.level}. This chunk will not be buffered.`);
|
|
8922
8921
|
this.removeUnbufferedFrags();
|
|
8923
|
-
this.resetStartWhenNotLoaded(chunkMeta.level);
|
|
8922
|
+
this.resetStartWhenNotLoaded((_this$levelLastLoaded2 = this.levelLastLoaded) != null ? _this$levelLastLoaded2 : chunkMeta.level);
|
|
8924
8923
|
this.resetLoadingState();
|
|
8925
8924
|
}
|
|
8926
8925
|
removeUnbufferedFrags(start = 0) {
|
|
@@ -8992,7 +8991,10 @@ class BaseStreamController extends TaskLoop {
|
|
|
8992
8991
|
}
|
|
8993
8992
|
recoverWorkerError(data) {
|
|
8994
8993
|
if (data.event === 'demuxerWorker') {
|
|
8994
|
+
var _ref, _this$levelLastLoaded3, _this$fragCurrent3;
|
|
8995
|
+
this.fragmentTracker.removeAllFragments();
|
|
8995
8996
|
this.resetTransmuxer();
|
|
8997
|
+
this.resetStartWhenNotLoaded((_ref = (_this$levelLastLoaded3 = this.levelLastLoaded) != null ? _this$levelLastLoaded3 : (_this$fragCurrent3 = this.fragCurrent) == null ? void 0 : _this$fragCurrent3.level) != null ? _ref : 0);
|
|
8996
8998
|
this.resetLoadingState();
|
|
8997
8999
|
}
|
|
8998
9000
|
}
|
|
@@ -15186,6 +15188,7 @@ class StreamController extends BaseStreamController {
|
|
|
15186
15188
|
}
|
|
15187
15189
|
|
|
15188
15190
|
// Avoid buffering if backtracking this fragment
|
|
15191
|
+
const notFirstFragment = frag.sn !== (details == null ? void 0 : details.startSN);
|
|
15189
15192
|
if (video && remuxResult.independent !== false) {
|
|
15190
15193
|
if (details) {
|
|
15191
15194
|
const {
|
|
@@ -15211,7 +15214,7 @@ class StreamController extends BaseStreamController {
|
|
|
15211
15214
|
const bufferInfo = this.getMainFwdBufferInfo();
|
|
15212
15215
|
const targetBufferTime = (bufferInfo ? bufferInfo.end : this.getLoadPosition()) + this.config.maxBufferHole;
|
|
15213
15216
|
const startTime = video.firstKeyFramePTS ? video.firstKeyFramePTS : startPTS;
|
|
15214
|
-
if (targetBufferTime < startTime - this.config.maxBufferHole) {
|
|
15217
|
+
if (notFirstFragment && targetBufferTime < startTime - this.config.maxBufferHole) {
|
|
15215
15218
|
this.backtrack(frag);
|
|
15216
15219
|
return;
|
|
15217
15220
|
}
|
|
@@ -15225,7 +15228,7 @@ class StreamController extends BaseStreamController {
|
|
|
15225
15228
|
}
|
|
15226
15229
|
this.bufferFragmentData(video, frag, part, chunkMeta);
|
|
15227
15230
|
}
|
|
15228
|
-
} else if (remuxResult.independent === false) {
|
|
15231
|
+
} else if (notFirstFragment && remuxResult.independent === false) {
|
|
15229
15232
|
this.backtrack(frag);
|
|
15230
15233
|
return;
|
|
15231
15234
|
}
|
|
@@ -18082,7 +18085,7 @@ class Hls {
|
|
|
18082
18085
|
* Get the video-dev/hls.js package version.
|
|
18083
18086
|
*/
|
|
18084
18087
|
static get version() {
|
|
18085
|
-
return "1.4.
|
|
18088
|
+
return "1.4.8";
|
|
18086
18089
|
}
|
|
18087
18090
|
|
|
18088
18091
|
/**
|