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

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.10277");
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);
@@ -16204,14 +16206,12 @@
16204
16206
  case 0xc2: // SAMPLE-AES EC3
16205
16207
  /* falls through */
16206
16208
  case 0x87:
16207
- logger.warn('Unsupported EC-3 in M2TS found');
16208
- break;
16209
+ throw new Error('Unsupported EC-3 in M2TS found');
16209
16210
  case 0x24:
16210
16211
  // ITU-T Rec. H.265 and ISO/IEC 23008-2 (HEVC)
16211
16212
  {
16212
- logger.warn('Unsupported HEVC in M2TS found');
16213
+ throw new Error('Unsupported HEVC in M2TS found');
16213
16214
  }
16214
- break;
16215
16215
  }
16216
16216
  // move to the next table entry
16217
16217
  // skip past the elementary stream descriptors, if present
@@ -19310,6 +19310,7 @@
19310
19310
  type: ErrorTypes.MEDIA_ERROR,
19311
19311
  details: ErrorDetails.FRAG_PARSING_ERROR,
19312
19312
  chunkMeta: chunkMeta,
19313
+ frag: this.frag || undefined,
19313
19314
  fatal: false,
19314
19315
  error: error,
19315
19316
  err: error,
@@ -21719,7 +21720,7 @@
21719
21720
  * Get the video-dev/hls.js package version.
21720
21721
  */
21721
21722
  function get() {
21722
- return "1.5.9-0.canary.10275";
21723
+ return "1.5.9-0.canary.10277";
21723
21724
  }
21724
21725
  }, {
21725
21726
  key: "Events",