hls.js 1.5.9-0.canary.10273 → 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.js CHANGED
@@ -637,7 +637,7 @@
637
637
  // Some browsers don't allow to use bind on console object anyway
638
638
  // fallback to default if needed
639
639
  try {
640
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.9-0.canary.10273");
640
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.9-0.canary.10276");
641
641
  } catch (e) {
642
642
  /* log fn threw an exception. All logger methods are no-ops. */
643
643
  return createLogger();
@@ -9589,7 +9589,7 @@
9589
9589
  /* no-op */
9590
9590
  }
9591
9591
  }
9592
- this.useSoftware = this.subtle === null;
9592
+ this.useSoftware = !this.subtle;
9593
9593
  }
9594
9594
  var _proto = Decrypter.prototype;
9595
9595
  _proto.destroy = function destroy() {
@@ -9687,18 +9687,20 @@
9687
9687
  };
9688
9688
  _proto.webCryptoDecrypt = function webCryptoDecrypt(data, key, iv, aesMode) {
9689
9689
  var _this2 = this;
9690
- var subtle = this.subtle;
9691
9690
  if (this.key !== key || !this.fastAesKey) {
9691
+ if (!this.subtle) {
9692
+ return Promise.resolve(this.onWebCryptoError(data, key, iv, aesMode));
9693
+ }
9692
9694
  this.key = key;
9693
- this.fastAesKey = new FastAESKey(subtle, key, aesMode);
9695
+ this.fastAesKey = new FastAESKey(this.subtle, key, aesMode);
9694
9696
  }
9695
9697
  return this.fastAesKey.expandKey().then(function (aesKey) {
9696
9698
  // decrypt using web crypto
9697
- if (!subtle) {
9699
+ if (!_this2.subtle) {
9698
9700
  return Promise.reject(new Error('web crypto not initialized'));
9699
9701
  }
9700
9702
  _this2.logOnce('WebCrypto AES decrypt');
9701
- var crypto = new AESCrypto(subtle, new Uint8Array(iv), aesMode);
9703
+ var crypto = new AESCrypto(_this2.subtle, new Uint8Array(iv), aesMode);
9702
9704
  return crypto.decrypt(data.buffer, aesKey);
9703
9705
  }).catch(function (err) {
9704
9706
  logger.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, " + err.name + ": " + err.message);
@@ -30528,7 +30530,7 @@
30528
30530
  * Get the video-dev/hls.js package version.
30529
30531
  */
30530
30532
  function get() {
30531
- return "1.5.9-0.canary.10273";
30533
+ return "1.5.9-0.canary.10276";
30532
30534
  }
30533
30535
  }, {
30534
30536
  key: "Events",