hls.js 1.5.10-0.canary.10320 → 1.5.10-0.canary.10321

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.
@@ -501,7 +501,7 @@ function enableLogs(debugConfig, context, id) {
501
501
  // Some browsers don't allow to use bind on console object anyway
502
502
  // fallback to default if needed
503
503
  try {
504
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.10-0.canary.10320"}`);
504
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.10-0.canary.10321"}`);
505
505
  } catch (e) {
506
506
  /* log fn threw an exception. All logger methods are no-ops. */
507
507
  return createLogger();
@@ -9003,8 +9003,6 @@ class XhrLoader {
9003
9003
  this.config = null;
9004
9004
  this.context = null;
9005
9005
  this.xhrSetup = null;
9006
- // @ts-ignore
9007
- this.stats = null;
9008
9006
  }
9009
9007
  abortInternal() {
9010
9008
  const loader = this.loader;
@@ -9052,13 +9050,14 @@ class XhrLoader {
9052
9050
  const xhrSetup = this.xhrSetup;
9053
9051
  if (xhrSetup) {
9054
9052
  Promise.resolve().then(() => {
9055
- if (this.stats.aborted) return;
9053
+ if (this.loader !== xhr || this.stats.aborted) return;
9056
9054
  return xhrSetup(xhr, context.url);
9057
9055
  }).catch(error => {
9056
+ if (this.loader !== xhr || this.stats.aborted) return;
9058
9057
  xhr.open('GET', context.url, true);
9059
9058
  return xhrSetup(xhr, context.url);
9060
9059
  }).then(() => {
9061
- if (this.stats.aborted) return;
9060
+ if (this.loader !== xhr || this.stats.aborted) return;
9062
9061
  this.openAndSendXhr(xhr, context, config);
9063
9062
  }).catch(error => {
9064
9063
  // IE11 throws an exception on xhr.open if attempting to access an HTTP resource over HTTPS
@@ -9178,8 +9177,8 @@ class XhrLoader {
9178
9177
  }
9179
9178
  }
9180
9179
  loadtimeout() {
9181
- var _this$config;
9182
- const retryConfig = (_this$config = this.config) == null ? void 0 : _this$config.loadPolicy.timeoutRetry;
9180
+ if (!this.config) return;
9181
+ const retryConfig = this.config.loadPolicy.timeoutRetry;
9183
9182
  const retryCount = this.stats.retry;
9184
9183
  if (shouldRetry(retryConfig, retryCount, true)) {
9185
9184
  this.retry(retryConfig);
@@ -20372,7 +20371,7 @@ class Hls {
20372
20371
  * Get the video-dev/hls.js package version.
20373
20372
  */
20374
20373
  static get version() {
20375
- return "1.5.10-0.canary.10320";
20374
+ return "1.5.10-0.canary.10321";
20376
20375
  }
20377
20376
 
20378
20377
  /**