hls.js 1.5.9-0.canary.10275 → 1.5.9-0.canary.10276

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
@@ -606,7 +606,7 @@
606
606
  // Some browsers don't allow to use bind on console object anyway
607
607
  // fallback to default if needed
608
608
  try {
609
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.9-0.canary.10275");
609
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.9-0.canary.10276");
610
610
  } catch (e) {
611
611
  /* log fn threw an exception. All logger methods are no-ops. */
612
612
  return createLogger();
@@ -12369,7 +12369,7 @@
12369
12369
  /* no-op */
12370
12370
  }
12371
12371
  }
12372
- this.useSoftware = this.subtle === null;
12372
+ this.useSoftware = !this.subtle;
12373
12373
  }
12374
12374
  var _proto = Decrypter.prototype;
12375
12375
  _proto.destroy = function destroy() {
@@ -12467,18 +12467,20 @@
12467
12467
  };
12468
12468
  _proto.webCryptoDecrypt = function webCryptoDecrypt(data, key, iv, aesMode) {
12469
12469
  var _this2 = this;
12470
- var subtle = this.subtle;
12471
12470
  if (this.key !== key || !this.fastAesKey) {
12471
+ if (!this.subtle) {
12472
+ return Promise.resolve(this.onWebCryptoError(data, key, iv, aesMode));
12473
+ }
12472
12474
  this.key = key;
12473
- this.fastAesKey = new FastAESKey(subtle, key, aesMode);
12475
+ this.fastAesKey = new FastAESKey(this.subtle, key, aesMode);
12474
12476
  }
12475
12477
  return this.fastAesKey.expandKey().then(function (aesKey) {
12476
12478
  // decrypt using web crypto
12477
- if (!subtle) {
12479
+ if (!_this2.subtle) {
12478
12480
  return Promise.reject(new Error('web crypto not initialized'));
12479
12481
  }
12480
12482
  _this2.logOnce('WebCrypto AES decrypt');
12481
- var crypto = new AESCrypto(subtle, new Uint8Array(iv), aesMode);
12483
+ var crypto = new AESCrypto(_this2.subtle, new Uint8Array(iv), aesMode);
12482
12484
  return crypto.decrypt(data.buffer, aesKey);
12483
12485
  }).catch(function (err) {
12484
12486
  logger.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, " + err.name + ": " + err.message);
@@ -21719,7 +21721,7 @@
21719
21721
  * Get the video-dev/hls.js package version.
21720
21722
  */
21721
21723
  function get() {
21722
- return "1.5.9-0.canary.10275";
21724
+ return "1.5.9-0.canary.10276";
21723
21725
  }
21724
21726
  }, {
21725
21727
  key: "Events",