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.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
|
}
|
|
@@ -9320,10 +9320,8 @@ class BaseStreamController extends TaskLoop {
|
|
|
9320
9320
|
retryConfig
|
|
9321
9321
|
} = errorAction || {};
|
|
9322
9322
|
if (errorAction && action === NetworkErrorAction.RetryRequest && retryConfig) {
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
this.nextLoadPosition = this.startPosition;
|
|
9326
|
-
}
|
|
9323
|
+
var _this$levelLastLoaded;
|
|
9324
|
+
this.resetStartWhenNotLoaded((_this$levelLastLoaded = this.levelLastLoaded) != null ? _this$levelLastLoaded : frag.level);
|
|
9327
9325
|
const delay = getRetryDelay(retryConfig, retryCount);
|
|
9328
9326
|
this.warn(`Fragment ${frag.sn} of ${filterType} ${frag.level} errored with ${data.details}, retrying loading ${retryCount + 1}/${retryConfig.maxNumRetry} in ${delay}ms`);
|
|
9329
9327
|
errorAction.resolved = true;
|
|
@@ -9423,9 +9421,10 @@ class BaseStreamController extends TaskLoop {
|
|
|
9423
9421
|
}
|
|
9424
9422
|
}
|
|
9425
9423
|
resetWhenMissingContext(chunkMeta) {
|
|
9424
|
+
var _this$levelLastLoaded2;
|
|
9426
9425
|
this.warn(`The loading context changed while buffering fragment ${chunkMeta.sn} of level ${chunkMeta.level}. This chunk will not be buffered.`);
|
|
9427
9426
|
this.removeUnbufferedFrags();
|
|
9428
|
-
this.resetStartWhenNotLoaded(chunkMeta.level);
|
|
9427
|
+
this.resetStartWhenNotLoaded((_this$levelLastLoaded2 = this.levelLastLoaded) != null ? _this$levelLastLoaded2 : chunkMeta.level);
|
|
9429
9428
|
this.resetLoadingState();
|
|
9430
9429
|
}
|
|
9431
9430
|
removeUnbufferedFrags(start = 0) {
|
|
@@ -9497,7 +9496,10 @@ class BaseStreamController extends TaskLoop {
|
|
|
9497
9496
|
}
|
|
9498
9497
|
recoverWorkerError(data) {
|
|
9499
9498
|
if (data.event === 'demuxerWorker') {
|
|
9499
|
+
var _ref, _this$levelLastLoaded3, _this$fragCurrent3;
|
|
9500
|
+
this.fragmentTracker.removeAllFragments();
|
|
9500
9501
|
this.resetTransmuxer();
|
|
9502
|
+
this.resetStartWhenNotLoaded((_ref = (_this$levelLastLoaded3 = this.levelLastLoaded) != null ? _this$levelLastLoaded3 : (_this$fragCurrent3 = this.fragCurrent) == null ? void 0 : _this$fragCurrent3.level) != null ? _ref : 0);
|
|
9501
9503
|
this.resetLoadingState();
|
|
9502
9504
|
}
|
|
9503
9505
|
}
|
|
@@ -15697,6 +15699,7 @@ class StreamController extends BaseStreamController {
|
|
|
15697
15699
|
}
|
|
15698
15700
|
|
|
15699
15701
|
// Avoid buffering if backtracking this fragment
|
|
15702
|
+
const notFirstFragment = frag.sn !== (details == null ? void 0 : details.startSN);
|
|
15700
15703
|
if (video && remuxResult.independent !== false) {
|
|
15701
15704
|
if (details) {
|
|
15702
15705
|
const {
|
|
@@ -15722,7 +15725,7 @@ class StreamController extends BaseStreamController {
|
|
|
15722
15725
|
const bufferInfo = this.getMainFwdBufferInfo();
|
|
15723
15726
|
const targetBufferTime = (bufferInfo ? bufferInfo.end : this.getLoadPosition()) + this.config.maxBufferHole;
|
|
15724
15727
|
const startTime = video.firstKeyFramePTS ? video.firstKeyFramePTS : startPTS;
|
|
15725
|
-
if (targetBufferTime < startTime - this.config.maxBufferHole) {
|
|
15728
|
+
if (notFirstFragment && targetBufferTime < startTime - this.config.maxBufferHole) {
|
|
15726
15729
|
this.backtrack(frag);
|
|
15727
15730
|
return;
|
|
15728
15731
|
}
|
|
@@ -15736,7 +15739,7 @@ class StreamController extends BaseStreamController {
|
|
|
15736
15739
|
}
|
|
15737
15740
|
this.bufferFragmentData(video, frag, part, chunkMeta);
|
|
15738
15741
|
}
|
|
15739
|
-
} else if (remuxResult.independent === false) {
|
|
15742
|
+
} else if (notFirstFragment && remuxResult.independent === false) {
|
|
15740
15743
|
this.backtrack(frag);
|
|
15741
15744
|
return;
|
|
15742
15745
|
}
|
|
@@ -24996,7 +24999,7 @@ class Hls {
|
|
|
24996
24999
|
* Get the video-dev/hls.js package version.
|
|
24997
25000
|
*/
|
|
24998
25001
|
static get version() {
|
|
24999
|
-
return "1.4.
|
|
25002
|
+
return "1.4.8";
|
|
25000
25003
|
}
|
|
25001
25004
|
|
|
25002
25005
|
/**
|