hls.js 1.6.0-beta.1.0.canary.10808 → 1.6.0-beta.1.0.canary.10809

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.
@@ -400,7 +400,7 @@ function enableLogs(debugConfig, context, id) {
400
400
  // Some browsers don't allow to use bind on console object anyway
401
401
  // fallback to default if needed
402
402
  try {
403
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.1.0.canary.10808"}`);
403
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.1.0.canary.10809"}`);
404
404
  } catch (e) {
405
405
  /* log fn threw an exception. All logger methods are no-ops. */
406
406
  return createLogger();
@@ -6653,7 +6653,8 @@ class Decrypter {
6653
6653
  decrypt(data, key, iv, aesMode) {
6654
6654
  if (this.useSoftware) {
6655
6655
  return new Promise((resolve, reject) => {
6656
- this.softwareDecrypt(new Uint8Array(data), key, iv, aesMode);
6656
+ const dataView = ArrayBuffer.isView(data) ? data : new Uint8Array(data);
6657
+ this.softwareDecrypt(dataView, key, iv, aesMode);
6657
6658
  const decryptResult = this.flush();
6658
6659
  if (decryptResult) {
6659
6660
  resolve(decryptResult.buffer);
@@ -16390,7 +16391,8 @@ class Transmuxer {
16390
16391
  // For Low-Latency HLS Parts, decrypt in place, since part parsing is expected on push progress
16391
16392
  const loadingParts = chunkMeta.part > -1;
16392
16393
  if (loadingParts) {
16393
- decryptedData = decrypter.flush();
16394
+ const _data = decrypter.flush();
16395
+ decryptedData = _data ? _data.buffer : _data;
16394
16396
  }
16395
16397
  if (!decryptedData) {
16396
16398
  stats.executeEnd = now();
@@ -16472,7 +16474,7 @@ class Transmuxer {
16472
16474
  const decryptedData = decrypter.flush();
16473
16475
  if (decryptedData) {
16474
16476
  // Push always returns a TransmuxerResult if decryptdata is null
16475
- transmuxResults.push(this.push(decryptedData, null, chunkMeta));
16477
+ transmuxResults.push(this.push(decryptedData.buffer, null, chunkMeta));
16476
16478
  }
16477
16479
  }
16478
16480
  const {
@@ -16841,7 +16843,7 @@ class FetchLoader {
16841
16843
  return reader.read().then(data => {
16842
16844
  if (data.done) {
16843
16845
  if (chunkCache.dataLength) {
16844
- onProgress(stats, context, chunkCache.flush(), response);
16846
+ onProgress(stats, context, chunkCache.flush().buffer, response);
16845
16847
  }
16846
16848
  return Promise.resolve(new ArrayBuffer(0));
16847
16849
  }
@@ -16854,12 +16856,12 @@ class FetchLoader {
16854
16856
  chunkCache.push(chunk);
16855
16857
  if (chunkCache.dataLength >= highWaterMark) {
16856
16858
  // flush in order to join the typed arrays
16857
- onProgress(stats, context, chunkCache.flush(), response);
16859
+ onProgress(stats, context, chunkCache.flush().buffer, response);
16858
16860
  }
16859
16861
  } else {
16860
16862
  // If there's nothing cached already, and the chache is large enough
16861
16863
  // just emit the progress event
16862
- onProgress(stats, context, chunk, response);
16864
+ onProgress(stats, context, chunk.buffer, response);
16863
16865
  }
16864
16866
  return pump();
16865
16867
  }).catch(() => {
@@ -19136,7 +19138,7 @@ class GapController extends Logger {
19136
19138
  }
19137
19139
  }
19138
19140
 
19139
- const version = "1.6.0-beta.1.0.canary.10808";
19141
+ const version = "1.6.0-beta.1.0.canary.10809";
19140
19142
 
19141
19143
  // ensure the worker ends up in the bundle
19142
19144
  // If the worker should not be included this gets aliased to empty.js