hls.js 1.6.0-rc.1.0.canary.11078 → 1.6.0-rc.1.0.canary.11079

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.
@@ -402,7 +402,7 @@ function enableLogs(debugConfig, context, 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
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-rc.1.0.canary.11078"}`);
405
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-rc.1.0.canary.11079"}`);
406
406
  } catch (e) {
407
407
  /* log fn threw an exception. All logger methods are no-ops. */
408
408
  return createLogger();
@@ -18861,9 +18861,10 @@ class LatencyController {
18861
18861
  if (inLiveRange && distanceFromTarget > 0.05 && this.forwardBufferLength > 1) {
18862
18862
  const max = Math.min(2, Math.max(1.0, maxLiveSyncPlaybackRate));
18863
18863
  const rate = Math.round(2 / (1 + Math.exp(-0.75 * distanceFromTarget - this.edgeStalled)) * 20) / 20;
18864
- media.playbackRate = Math.min(max, Math.max(1, rate));
18864
+ const playbackRate = Math.min(max, Math.max(1, rate));
18865
+ this.changeMediaPlaybackRate(media, playbackRate);
18865
18866
  } else if (media.playbackRate !== 1 && media.playbackRate !== 0) {
18866
- media.playbackRate = 1;
18867
+ this.changeMediaPlaybackRate(media, 1);
18867
18868
  }
18868
18869
  };
18869
18870
  this.hls = hls;
@@ -19022,6 +19023,14 @@ class LatencyController {
19022
19023
  this.hls.logger.warn('[latency-controller]: Stall detected, adjusting target latency');
19023
19024
  }
19024
19025
  }
19026
+ changeMediaPlaybackRate(media, playbackRate) {
19027
+ var _this$hls2, _this$targetLatency;
19028
+ if (media.playbackRate === playbackRate) {
19029
+ return;
19030
+ }
19031
+ (_this$hls2 = this.hls) == null ? void 0 : _this$hls2.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(_this$targetLatency = this.targetLatency) == null ? void 0 : _this$targetLatency.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${media.playbackRate} to ${playbackRate}`);
19032
+ media.playbackRate = playbackRate;
19033
+ }
19025
19034
  estimateLiveEdge() {
19026
19035
  const levelDetails = this.levelDetails;
19027
19036
  if (levelDetails === null) {
@@ -19637,7 +19646,7 @@ function assignTrackIdsByGroup(tracks) {
19637
19646
  });
19638
19647
  }
19639
19648
 
19640
- const version = "1.6.0-rc.1.0.canary.11078";
19649
+ const version = "1.6.0-rc.1.0.canary.11079";
19641
19650
 
19642
19651
  // ensure the worker ends up in the bundle
19643
19652
  // If the worker should not be included this gets aliased to empty.js