hls.js 1.5.14-0.canary.10674 → 1.5.14-0.canary.10676

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
@@ -513,7 +513,7 @@
513
513
  // Some browsers don't allow to use bind on console object anyway
514
514
  // fallback to default if needed
515
515
  try {
516
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.14-0.canary.10674");
516
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.14-0.canary.10676");
517
517
  } catch (e) {
518
518
  /* log fn threw an exception. All logger methods are no-ops. */
519
519
  return createLogger();
@@ -15631,7 +15631,7 @@
15631
15631
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
15632
15632
  }
15633
15633
 
15634
- var version = "1.5.14-0.canary.10674";
15634
+ var version = "1.5.14-0.canary.10676";
15635
15635
 
15636
15636
  // ensure the worker ends up in the bundle
15637
15637
  // If the worker should not be included this gets aliased to empty.js
@@ -16901,6 +16901,10 @@
16901
16901
  return;
16902
16902
  }
16903
16903
  var currentLevel = levels[frag.level];
16904
+ if (!currentLevel) {
16905
+ this.warn("Level " + frag.level + " not found on progress");
16906
+ return;
16907
+ }
16904
16908
  var details = currentLevel.details;
16905
16909
  if (!details) {
16906
16910
  this.warn("Dropping fragment " + frag.sn + " of level " + frag.level + " after level details were reset");
@@ -21315,7 +21319,7 @@
21315
21319
  }
21316
21320
  var BYTERANGE = /(\d+)-(\d+)\/(\d+)/;
21317
21321
  var FetchLoader = /*#__PURE__*/function () {
21318
- function FetchLoader(config /* HlsConfig */) {
21322
+ function FetchLoader(config) {
21319
21323
  this.fetchSetup = void 0;
21320
21324
  this.requestTimeout = void 0;
21321
21325
  this.request = null;
@@ -21375,7 +21379,8 @@
21375
21379
  _this.abortInternal();
21376
21380
  callbacks.onTimeout(stats, context, _this.response);
21377
21381
  }, config.timeout);
21378
- self.fetch(this.request).then(function (response) {
21382
+ var fetchPromise = isPromise(this.request) ? this.request.then(self.fetch) : self.fetch(this.request);
21383
+ fetchPromise.then(function (response) {
21379
21384
  _this.response = _this.loader = response;
21380
21385
  var first = Math.max(self.performance.now(), stats.loading.start);
21381
21386
  self.clearTimeout(_this.requestTimeout);