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

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
@@ -1044,7 +1044,7 @@
1044
1044
  // Some browsers don't allow to use bind on console object anyway
1045
1045
  // fallback to default if needed
1046
1046
  try {
1047
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.4.0.canary.11051");
1047
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.4.0.canary.11056");
1048
1048
  } catch (e) {
1049
1049
  /* log fn threw an exception. All logger methods are no-ops. */
1050
1050
  return createLogger();
@@ -1171,12 +1171,6 @@
1171
1171
  }
1172
1172
  };
1173
1173
 
1174
- function sliceUint8(array, start, end) {
1175
- // @ts-expect-error This polyfills IE11 usage of Uint8Array slice.
1176
- // It always exists in the TypeScript definition so fails, but it fails at runtime on IE11.
1177
- return Uint8Array.prototype.slice ? array.slice(start, end) : new Uint8Array(Array.prototype.slice.call(array, start, end));
1178
- }
1179
-
1180
1174
  var LoadStats = function LoadStats() {
1181
1175
  this.aborted = false;
1182
1176
  this.loaded = 0;
@@ -2308,8 +2302,8 @@
2308
2302
  }
2309
2303
  var last = moofs[moofs.length - 1];
2310
2304
  // Offset by 8 bytes; findBox offsets the start by as much
2311
- segmentedRange.valid = sliceUint8(data, 0, last.byteOffset - 8);
2312
- segmentedRange.remainder = sliceUint8(data, last.byteOffset - 8);
2305
+ segmentedRange.valid = data.slice(0, last.byteOffset - 8);
2306
+ segmentedRange.remainder = data.slice(last.byteOffset - 8);
2313
2307
  return segmentedRange;
2314
2308
  }
2315
2309
  function appendUint8Array(data1, data2) {
@@ -9814,7 +9808,7 @@
9814
9808
  offset++;
9815
9809
  }
9816
9810
  if (offset === length && lastDataIndex !== length) {
9817
- var partialData = sliceUint8(data, lastDataIndex);
9811
+ var partialData = data.slice(lastDataIndex);
9818
9812
  if (this.cachedData) {
9819
9813
  this.cachedData = appendUint8Array(this.cachedData, partialData);
9820
9814
  } else {
@@ -10195,7 +10189,7 @@
10195
10189
  var outputBytes = array.byteLength;
10196
10190
  var paddingBytes = outputBytes && new DataView(array.buffer).getUint8(outputBytes - 1);
10197
10191
  if (paddingBytes) {
10198
- return sliceUint8(array, 0, outputBytes - paddingBytes);
10192
+ return array.slice(0, outputBytes - paddingBytes);
10199
10193
  }
10200
10194
  return array;
10201
10195
  }
@@ -10575,7 +10569,7 @@
10575
10569
  softwareDecrypter.expandKey(key);
10576
10570
  var result = currentResult;
10577
10571
  this.currentResult = softwareDecrypter.decrypt(currentChunk.buffer, 0, iv);
10578
- this.currentIV = sliceUint8(currentChunk, -16).buffer;
10572
+ this.currentIV = currentChunk.slice(-16).buffer;
10579
10573
  if (!result) {
10580
10574
  return null;
10581
10575
  }
@@ -10620,8 +10614,8 @@
10620
10614
  var currentChunk = data;
10621
10615
  var splitPoint = data.length - data.length % CHUNK_SIZE;
10622
10616
  if (splitPoint !== data.length) {
10623
- currentChunk = sliceUint8(data, 0, splitPoint);
10624
- this.remainderData = sliceUint8(data, splitPoint);
10617
+ currentChunk = data.slice(0, splitPoint);
10618
+ this.remainderData = data.slice(splitPoint);
10625
10619
  }
10626
10620
  return currentChunk;
10627
10621
  };
@@ -16526,10 +16520,7 @@
16526
16520
  _proto.doTick = function doTick() {
16527
16521
  this.onTickEnd();
16528
16522
  };
16529
- _proto.onTickEnd = function onTickEnd() {}
16530
-
16531
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
16532
- ;
16523
+ _proto.onTickEnd = function onTickEnd() {};
16533
16524
  _proto.startLoad = function startLoad(startPosition) {};
16534
16525
  _proto.stopLoad = function stopLoad() {
16535
16526
  if (this.state === State.STOPPED) {
@@ -16888,10 +16879,7 @@
16888
16879
  });
16889
16880
  var chunkMeta = new ChunkMetadata(frag.level, frag.sn, frag.stats.chunkCount + 1, 0, part ? part.index : -1, !complete);
16890
16881
  transmuxer.flush(chunkMeta);
16891
- }
16892
-
16893
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
16894
- ;
16882
+ };
16895
16883
  _proto._handleFragmentLoadProgress = function _handleFragmentLoadProgress(frag) {};
16896
16884
  _proto._doFragLoad = function _doFragLoad(frag, level, targetBufferTime, progressCallback) {
16897
16885
  var _frag$decryptdata,
@@ -20093,7 +20081,7 @@
20093
20081
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
20094
20082
  }
20095
20083
 
20096
- var version = "1.6.0-beta.4.0.canary.11051";
20084
+ var version = "1.6.0-beta.4.0.canary.11056";
20097
20085
 
20098
20086
  // ensure the worker ends up in the bundle
20099
20087
  // If the worker should not be included this gets aliased to empty.js