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.d.mts +10 -10
- package/dist/hls.d.ts +10 -10
- package/dist/hls.js +13 -26
- package/dist/hls.js.d.ts +10 -10
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +11 -23
- package/dist/hls.light.js.map +1 -1
- package/dist/hls.light.min.js +1 -1
- package/dist/hls.light.min.js.map +1 -1
- package/dist/hls.light.mjs +9 -19
- package/dist/hls.light.mjs.map +1 -1
- package/dist/hls.min.js +1 -1
- package/dist/hls.min.js.map +1 -1
- package/dist/hls.mjs +11 -22
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/dist/hls.worker.js.map +1 -1
- package/package.json +2 -2
- package/src/controller/base-stream-controller.ts +0 -2
- package/src/controller/eme-controller.ts +4 -4
- package/src/crypt/aes-decryptor.ts +7 -5
- package/src/crypt/decrypter.ts +6 -7
- package/src/demux/audio/base-audio-demuxer.ts +1 -2
- package/src/demux/sample-aes.ts +10 -15
- package/src/demux/transmuxer.ts +1 -1
- package/src/demux/tsdemuxer.ts +13 -9
- package/src/loader/level-key.ts +10 -10
- package/src/types/demuxer.ts +11 -2
- package/src/utils/chunker.ts +2 -3
- package/src/utils/mediakeys-helper.ts +1 -1
- package/src/utils/mp4-tools.ts +3 -8
- package/src/utils/numeric-encoding-utils.ts +1 -3
- package/src/utils/vttparser.ts +0 -1
- package/src/utils/typed-array.ts +0 -11
package/dist/hls.light.mjs
CHANGED
@@ -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.
|
405
|
+
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.4.0.canary.11056"}`);
|
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 =
|
1809
|
-
segmentedRange.remainder =
|
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
|
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 =
|
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 =
|
6831
|
-
this.remainderData =
|
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 =
|
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.
|
19467
|
+
const version = "1.6.0-beta.4.0.canary.11056";
|
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
|