hls.js 1.6.0-beta.4.0.canary.11051 → 1.6.0-beta.4.0.canary.11054

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.
@@ -402,7 +402,7 @@ function enableLogs(debugConfig, context, id) {
402
402
  // Some browsers don't allow to use bind on console object anyway
403
403
  // fallback to default if needed
404
404
  try {
405
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.4.0.canary.11051"}`);
405
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.4.0.canary.11054"}`);
406
406
  } catch (e) {
407
407
  /* log fn threw an exception. All logger methods are no-ops. */
408
408
  return createLogger();
@@ -532,12 +532,6 @@ const Hex = {
532
532
  }
533
533
  };
534
534
 
535
- function sliceUint8(array, start, end) {
536
- // @ts-expect-error This polyfills IE11 usage of Uint8Array slice.
537
- // It always exists in the TypeScript definition so fails, but it fails at runtime on IE11.
538
- return Uint8Array.prototype.slice ? array.slice(start, end) : new Uint8Array(Array.prototype.slice.call(array, start, end));
539
- }
540
-
541
535
  var urlToolkit = {exports: {}};
542
536
 
543
537
  var hasRequiredUrlToolkit;
@@ -1805,8 +1799,8 @@ function segmentValidRange(data) {
1805
1799
  }
1806
1800
  const last = moofs[moofs.length - 1];
1807
1801
  // Offset by 8 bytes; findBox offsets the start by as much
1808
- segmentedRange.valid = sliceUint8(data, 0, last.byteOffset - 8);
1809
- segmentedRange.remainder = sliceUint8(data, last.byteOffset - 8);
1802
+ segmentedRange.valid = data.slice(0, last.byteOffset - 8);
1803
+ segmentedRange.remainder = data.slice(last.byteOffset - 8);
1810
1804
  return segmentedRange;
1811
1805
  }
1812
1806
  function appendUint8Array(data1, data2) {
@@ -6407,7 +6401,7 @@ function removePadding(array) {
6407
6401
  const outputBytes = array.byteLength;
6408
6402
  const paddingBytes = outputBytes && new DataView(array.buffer).getUint8(outputBytes - 1);
6409
6403
  if (paddingBytes) {
6410
- return sliceUint8(array, 0, outputBytes - paddingBytes);
6404
+ return array.slice(0, outputBytes - paddingBytes);
6411
6405
  }
6412
6406
  return array;
6413
6407
  }
@@ -6783,7 +6777,7 @@ class Decrypter {
6783
6777
  softwareDecrypter.expandKey(key);
6784
6778
  const result = currentResult;
6785
6779
  this.currentResult = softwareDecrypter.decrypt(currentChunk.buffer, 0, iv);
6786
- this.currentIV = sliceUint8(currentChunk, -16).buffer;
6780
+ this.currentIV = currentChunk.slice(-16).buffer;
6787
6781
  if (!result) {
6788
6782
  return null;
6789
6783
  }
@@ -6827,8 +6821,8 @@ class Decrypter {
6827
6821
  let currentChunk = data;
6828
6822
  const splitPoint = data.length - data.length % CHUNK_SIZE;
6829
6823
  if (splitPoint !== data.length) {
6830
- currentChunk = sliceUint8(data, 0, splitPoint);
6831
- this.remainderData = sliceUint8(data, splitPoint);
6824
+ currentChunk = data.slice(0, splitPoint);
6825
+ this.remainderData = data.slice(splitPoint);
6832
6826
  }
6833
6827
  return currentChunk;
6834
6828
  }
@@ -7740,8 +7734,6 @@ class BaseStreamController extends TaskLoop {
7740
7734
  this.onTickEnd();
7741
7735
  }
7742
7736
  onTickEnd() {}
7743
-
7744
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
7745
7737
  startLoad(startPosition) {}
7746
7738
  stopLoad() {
7747
7739
  if (this.state === State.STOPPED) {
@@ -8125,8 +8117,6 @@ class BaseStreamController extends TaskLoop {
8125
8117
  const chunkMeta = new ChunkMetadata(frag.level, frag.sn, frag.stats.chunkCount + 1, 0, part ? part.index : -1, !complete);
8126
8118
  transmuxer.flush(chunkMeta);
8127
8119
  }
8128
-
8129
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
8130
8120
  _handleFragmentLoadProgress(frag) {}
8131
8121
  _doFragLoad(frag, level, targetBufferTime = null, progressCallback) {
8132
8122
  var _frag$decryptdata;
@@ -12647,7 +12637,7 @@ class BaseAudioDemuxer {
12647
12637
  offset++;
12648
12638
  }
12649
12639
  if (offset === length && lastDataIndex !== length) {
12650
- const partialData = sliceUint8(data, lastDataIndex);
12640
+ const partialData = data.slice(lastDataIndex);
12651
12641
  if (this.cachedData) {
12652
12642
  this.cachedData = appendUint8Array(this.cachedData, partialData);
12653
12643
  } else {
@@ -19474,7 +19464,7 @@ function assignTrackIdsByGroup(tracks) {
19474
19464
  });
19475
19465
  }
19476
19466
 
19477
- const version = "1.6.0-beta.4.0.canary.11051";
19467
+ const version = "1.6.0-beta.4.0.canary.11054";
19478
19468
 
19479
19469
  // ensure the worker ends up in the bundle
19480
19470
  // If the worker should not be included this gets aliased to empty.js