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.light.js CHANGED
@@ -493,7 +493,7 @@
493
493
  // Some browsers don't allow to use bind on console object anyway
494
494
  // fallback to default if needed
495
495
  try {
496
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.12-0.canary.10397");
496
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.12-0.canary.10398");
497
497
  } catch (e) {
498
498
  /* log fn threw an exception. All logger methods are no-ops. */
499
499
  return createLogger();
@@ -4751,6 +4751,7 @@
4751
4751
  this.currentTime = 0;
4752
4752
  this.stallCount = 0;
4753
4753
  this._latency = null;
4754
+ this._targetLatencyUpdated = false;
4754
4755
  this.onTimeupdate = function () {
4755
4756
  var media = _this.media,
4756
4757
  levelDetails = _this.levelDetails;
@@ -4895,11 +4896,16 @@
4895
4896
  lowLatencyMode = _this$config2.lowLatencyMode;
4896
4897
  var userConfig = this.hls.userConfig;
4897
4898
  var targetLatency = lowLatencyMode ? partHoldBack || holdBack : holdBack;
4898
- if (userConfig.liveSyncDuration || userConfig.liveSyncDurationCount || targetLatency === 0) {
4899
+ if (this._targetLatencyUpdated || userConfig.liveSyncDuration || userConfig.liveSyncDurationCount || targetLatency === 0) {
4899
4900
  targetLatency = liveSyncDuration !== undefined ? liveSyncDuration : liveSyncDurationCount * targetduration;
4900
4901
  }
4901
4902
  var maxLiveSyncOnStallIncrease = targetduration;
4902
4903
  return targetLatency + Math.min(this.stallCount * this.config.liveSyncOnStallIncrease, maxLiveSyncOnStallIncrease);
4904
+ },
4905
+ set: function set(latency) {
4906
+ this.stallCount = 0;
4907
+ this.config.liveSyncDuration = latency;
4908
+ this._targetLatencyUpdated = true;
4903
4909
  }
4904
4910
  }, {
4905
4911
  key: "liveSyncPosition",
@@ -21952,6 +21958,9 @@
21952
21958
  key: "targetLatency",
21953
21959
  get: function get() {
21954
21960
  return this.latencyController.targetLatency;
21961
+ },
21962
+ set: function set(latency) {
21963
+ this.latencyController.targetLatency = latency;
21955
21964
  }
21956
21965
 
21957
21966
  /**
@@ -21990,7 +21999,7 @@
21990
21999
  * Get the video-dev/hls.js package version.
21991
22000
  */
21992
22001
  function get() {
21993
- return "1.5.12-0.canary.10397";
22002
+ return "1.5.12-0.canary.10398";
21994
22003
  }
21995
22004
  }, {
21996
22005
  key: "Events",