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.mjs CHANGED
@@ -440,7 +440,7 @@ function enableLogs(debugConfig, context, id) {
440
440
  // Some browsers don't allow to use bind on console object anyway
441
441
  // fallback to default if needed
442
442
  try {
443
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.14-0.canary.10674"}`);
443
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.14-0.canary.10676"}`);
444
444
  } catch (e) {
445
445
  /* log fn threw an exception. All logger methods are no-ops. */
446
446
  return createLogger();
@@ -10813,7 +10813,7 @@ function changeTypeSupported() {
10813
10813
  return typeof (sourceBuffer == null ? void 0 : (_sourceBuffer$prototy = sourceBuffer.prototype) == null ? void 0 : _sourceBuffer$prototy.changeType) === 'function';
10814
10814
  }
10815
10815
 
10816
- const version = "1.5.14-0.canary.10674";
10816
+ const version = "1.5.14-0.canary.10676";
10817
10817
 
10818
10818
  // ensure the worker ends up in the bundle
10819
10819
  // If the worker should not be included this gets aliased to empty.js
@@ -17806,6 +17806,10 @@ class StreamController extends BaseStreamController {
17806
17806
  return;
17807
17807
  }
17808
17808
  const currentLevel = levels[frag.level];
17809
+ if (!currentLevel) {
17810
+ this.warn(`Level ${frag.level} not found on progress`);
17811
+ return;
17812
+ }
17809
17813
  const details = currentLevel.details;
17810
17814
  if (!details) {
17811
17815
  this.warn(`Dropping fragment ${frag.sn} of level ${frag.level} after level details were reset`);
@@ -32131,7 +32135,7 @@ function fetchSupported() {
32131
32135
  }
32132
32136
  const BYTERANGE = /(\d+)-(\d+)\/(\d+)/;
32133
32137
  class FetchLoader {
32134
- constructor(config /* HlsConfig */) {
32138
+ constructor(config) {
32135
32139
  this.fetchSetup = void 0;
32136
32140
  this.requestTimeout = void 0;
32137
32141
  this.request = null;
@@ -32190,7 +32194,8 @@ class FetchLoader {
32190
32194
  this.abortInternal();
32191
32195
  callbacks.onTimeout(stats, context, this.response);
32192
32196
  }, config.timeout);
32193
- self.fetch(this.request).then(response => {
32197
+ const fetchPromise = isPromise(this.request) ? this.request.then(self.fetch) : self.fetch(this.request);
32198
+ fetchPromise.then(response => {
32194
32199
  this.response = this.loader = response;
32195
32200
  const first = Math.max(self.performance.now(), stats.loading.start);
32196
32201
  self.clearTimeout(this.requestTimeout);