hls.js 1.5.12-0.canary.10397 → 1.5.12-0.canary.10398
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 -3
- package/dist/hls.js.d.ts +1 -0
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +12 -3
- 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 -3
- 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 -3
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/package.json +1 -1
- package/src/controller/latency-controller.ts +8 -0
- package/src/hls.ts +4 -0
package/dist/hls.js
CHANGED
@@ -522,7 +522,7 @@
|
|
522
522
|
// Some browsers don't allow to use bind on console object anyway
|
523
523
|
// fallback to default if needed
|
524
524
|
try {
|
525
|
-
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.12-0.canary.
|
525
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.12-0.canary.10398");
|
526
526
|
} catch (e) {
|
527
527
|
/* log fn threw an exception. All logger methods are no-ops. */
|
528
528
|
return createLogger();
|
@@ -5339,6 +5339,7 @@
|
|
5339
5339
|
this.currentTime = 0;
|
5340
5340
|
this.stallCount = 0;
|
5341
5341
|
this._latency = null;
|
5342
|
+
this._targetLatencyUpdated = false;
|
5342
5343
|
this.onTimeupdate = function () {
|
5343
5344
|
var media = _this.media,
|
5344
5345
|
levelDetails = _this.levelDetails;
|
@@ -5483,11 +5484,16 @@
|
|
5483
5484
|
lowLatencyMode = _this$config2.lowLatencyMode;
|
5484
5485
|
var userConfig = this.hls.userConfig;
|
5485
5486
|
var targetLatency = lowLatencyMode ? partHoldBack || holdBack : holdBack;
|
5486
|
-
if (userConfig.liveSyncDuration || userConfig.liveSyncDurationCount || targetLatency === 0) {
|
5487
|
+
if (this._targetLatencyUpdated || userConfig.liveSyncDuration || userConfig.liveSyncDurationCount || targetLatency === 0) {
|
5487
5488
|
targetLatency = liveSyncDuration !== undefined ? liveSyncDuration : liveSyncDurationCount * targetduration;
|
5488
5489
|
}
|
5489
5490
|
var maxLiveSyncOnStallIncrease = targetduration;
|
5490
5491
|
return targetLatency + Math.min(this.stallCount * this.config.liveSyncOnStallIncrease, maxLiveSyncOnStallIncrease);
|
5492
|
+
},
|
5493
|
+
set: function set(latency) {
|
5494
|
+
this.stallCount = 0;
|
5495
|
+
this.config.liveSyncDuration = latency;
|
5496
|
+
this._targetLatencyUpdated = true;
|
5491
5497
|
}
|
5492
5498
|
}, {
|
5493
5499
|
key: "liveSyncPosition",
|
@@ -30740,6 +30746,9 @@
|
|
30740
30746
|
key: "targetLatency",
|
30741
30747
|
get: function get() {
|
30742
30748
|
return this.latencyController.targetLatency;
|
30749
|
+
},
|
30750
|
+
set: function set(latency) {
|
30751
|
+
this.latencyController.targetLatency = latency;
|
30743
30752
|
}
|
30744
30753
|
|
30745
30754
|
/**
|
@@ -30778,7 +30787,7 @@
|
|
30778
30787
|
* Get the video-dev/hls.js package version.
|
30779
30788
|
*/
|
30780
30789
|
function get() {
|
30781
|
-
return "1.5.12-0.canary.
|
30790
|
+
return "1.5.12-0.canary.10398";
|
30782
30791
|
}
|
30783
30792
|
}, {
|
30784
30793
|
key: "Events",
|
package/dist/hls.js.d.ts
CHANGED
@@ -1673,6 +1673,7 @@ declare class Hls implements HlsEventEmitter {
|
|
1673
1673
|
* target distance from the edge as calculated by the latency controller
|
1674
1674
|
*/
|
1675
1675
|
get targetLatency(): number | null;
|
1676
|
+
set targetLatency(latency: number);
|
1676
1677
|
/**
|
1677
1678
|
* the rate at which the edge of the current live playlist is advancing or 1 if there is none
|
1678
1679
|
*/
|