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.
@@ -512,7 +512,7 @@ function enableLogs(debugConfig, context, id) {
512
512
  // Some browsers don't allow to use bind on console object anyway
513
513
  // fallback to default if needed
514
514
  try {
515
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.9-0.canary.10275"}`);
515
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.9-0.canary.10277"}`);
516
516
  } catch (e) {
517
517
  /* log fn threw an exception. All logger methods are no-ops. */
518
518
  return createLogger();
@@ -12037,7 +12037,7 @@ class Decrypter {
12037
12037
  /* no-op */
12038
12038
  }
12039
12039
  }
12040
- this.useSoftware = this.subtle === null;
12040
+ this.useSoftware = !this.subtle;
12041
12041
  }
12042
12042
  destroy() {
12043
12043
  this.subtle = null;
@@ -12135,18 +12135,20 @@ class Decrypter {
12135
12135
  return result;
12136
12136
  }
12137
12137
  webCryptoDecrypt(data, key, iv, aesMode) {
12138
- const subtle = this.subtle;
12139
12138
  if (this.key !== key || !this.fastAesKey) {
12139
+ if (!this.subtle) {
12140
+ return Promise.resolve(this.onWebCryptoError(data, key, iv, aesMode));
12141
+ }
12140
12142
  this.key = key;
12141
- this.fastAesKey = new FastAESKey(subtle, key, aesMode);
12143
+ this.fastAesKey = new FastAESKey(this.subtle, key, aesMode);
12142
12144
  }
12143
12145
  return this.fastAesKey.expandKey().then(aesKey => {
12144
12146
  // decrypt using web crypto
12145
- if (!subtle) {
12147
+ if (!this.subtle) {
12146
12148
  return Promise.reject(new Error('web crypto not initialized'));
12147
12149
  }
12148
12150
  this.logOnce('WebCrypto AES decrypt');
12149
- const crypto = new AESCrypto(subtle, new Uint8Array(iv), aesMode);
12151
+ const crypto = new AESCrypto(this.subtle, new Uint8Array(iv), aesMode);
12150
12152
  return crypto.decrypt(data.buffer, aesKey);
12151
12153
  }).catch(err => {
12152
12154
  logger.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${err.name}: ${err.message}`);
@@ -15868,14 +15870,12 @@ function parsePMT(data, offset, typeSupported, isSampleAes) {
15868
15870
  case 0xc2: // SAMPLE-AES EC3
15869
15871
  /* falls through */
15870
15872
  case 0x87:
15871
- logger.warn('Unsupported EC-3 in M2TS found');
15872
- break;
15873
+ throw new Error('Unsupported EC-3 in M2TS found');
15873
15874
  case 0x24:
15874
15875
  // ITU-T Rec. H.265 and ISO/IEC 23008-2 (HEVC)
15875
15876
  {
15876
- logger.warn('Unsupported HEVC in M2TS found');
15877
+ throw new Error('Unsupported HEVC in M2TS found');
15877
15878
  }
15878
- break;
15879
15879
  }
15880
15880
  // move to the next table entry
15881
15881
  // skip past the elementary stream descriptors, if present
@@ -18807,6 +18807,7 @@ class TransmuxerInterface {
18807
18807
  type: ErrorTypes.MEDIA_ERROR,
18808
18808
  details: ErrorDetails.FRAG_PARSING_ERROR,
18809
18809
  chunkMeta,
18810
+ frag: this.frag || undefined,
18810
18811
  fatal: false,
18811
18812
  error,
18812
18813
  err: error,
@@ -20380,7 +20381,7 @@ class Hls {
20380
20381
  * Get the video-dev/hls.js package version.
20381
20382
  */
20382
20383
  static get version() {
20383
- return "1.5.9-0.canary.10275";
20384
+ return "1.5.9-0.canary.10277";
20384
20385
  }
20385
20386
 
20386
20387
  /**