hls.js 1.6.0-beta.4.0.canary.11049 → 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.
- 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.d.mts
CHANGED
@@ -851,10 +851,10 @@ export declare interface DecryptData {
|
|
851
851
|
method: string;
|
852
852
|
keyFormat: string;
|
853
853
|
keyFormatVersions: number[];
|
854
|
-
iv: Uint8Array | null;
|
855
|
-
key: Uint8Array | null;
|
856
|
-
keyId: Uint8Array | null;
|
857
|
-
pssh: Uint8Array | null;
|
854
|
+
iv: Uint8Array<ArrayBuffer> | null;
|
855
|
+
key: Uint8Array<ArrayBuffer> | null;
|
856
|
+
keyId: Uint8Array<ArrayBuffer> | null;
|
857
|
+
pssh: Uint8Array<ArrayBuffer> | null;
|
858
858
|
encrypted: boolean;
|
859
859
|
isCommonEncryption: boolean;
|
860
860
|
}
|
@@ -876,11 +876,11 @@ export declare class Decrypter {
|
|
876
876
|
});
|
877
877
|
destroy(): void;
|
878
878
|
isSync(): boolean;
|
879
|
-
flush(): Uint8Array | null;
|
879
|
+
flush(): Uint8Array<ArrayBuffer> | null;
|
880
880
|
reset(): void;
|
881
881
|
decrypt(data: Uint8Array | ArrayBuffer, key: ArrayBuffer, iv: ArrayBuffer, aesMode: DecrypterAesMode): Promise<ArrayBuffer>;
|
882
882
|
softwareDecrypt(data: Uint8Array, key: ArrayBuffer, iv: ArrayBuffer, aesMode: DecrypterAesMode): ArrayBuffer | null;
|
883
|
-
webCryptoDecrypt(data: Uint8Array
|
883
|
+
webCryptoDecrypt(data: Uint8Array<ArrayBuffer>, key: ArrayBuffer, iv: ArrayBuffer, aesMode: DecrypterAesMode): Promise<ArrayBuffer>;
|
884
884
|
private onWebCryptoError;
|
885
885
|
private getValidChunk;
|
886
886
|
private logOnce;
|
@@ -2681,12 +2681,12 @@ export declare class LevelKey implements DecryptData {
|
|
2681
2681
|
readonly keyFormatVersions: number[];
|
2682
2682
|
readonly encrypted: boolean;
|
2683
2683
|
readonly isCommonEncryption: boolean;
|
2684
|
-
iv: Uint8Array | null;
|
2685
|
-
key: Uint8Array | null;
|
2686
|
-
keyId: Uint8Array | null;
|
2684
|
+
iv: Uint8Array<ArrayBuffer> | null;
|
2685
|
+
key: Uint8Array<ArrayBuffer> | null;
|
2686
|
+
keyId: Uint8Array<ArrayBuffer> | null;
|
2687
2687
|
pssh: Uint8Array<ArrayBuffer> | null;
|
2688
2688
|
static clearKeyUriToKeyIdMap(): void;
|
2689
|
-
constructor(method: string, uri: string, format: string, formatversions?: number[], iv?: Uint8Array | null);
|
2689
|
+
constructor(method: string, uri: string, format: string, formatversions?: number[], iv?: Uint8Array<ArrayBuffer> | null);
|
2690
2690
|
isSupported(): boolean;
|
2691
2691
|
getDecryptData(sn: number | 'initSegment'): LevelKey | null;
|
2692
2692
|
}
|
package/dist/hls.d.ts
CHANGED
@@ -851,10 +851,10 @@ export declare interface DecryptData {
|
|
851
851
|
method: string;
|
852
852
|
keyFormat: string;
|
853
853
|
keyFormatVersions: number[];
|
854
|
-
iv: Uint8Array | null;
|
855
|
-
key: Uint8Array | null;
|
856
|
-
keyId: Uint8Array | null;
|
857
|
-
pssh: Uint8Array | null;
|
854
|
+
iv: Uint8Array<ArrayBuffer> | null;
|
855
|
+
key: Uint8Array<ArrayBuffer> | null;
|
856
|
+
keyId: Uint8Array<ArrayBuffer> | null;
|
857
|
+
pssh: Uint8Array<ArrayBuffer> | null;
|
858
858
|
encrypted: boolean;
|
859
859
|
isCommonEncryption: boolean;
|
860
860
|
}
|
@@ -876,11 +876,11 @@ export declare class Decrypter {
|
|
876
876
|
});
|
877
877
|
destroy(): void;
|
878
878
|
isSync(): boolean;
|
879
|
-
flush(): Uint8Array | null;
|
879
|
+
flush(): Uint8Array<ArrayBuffer> | null;
|
880
880
|
reset(): void;
|
881
881
|
decrypt(data: Uint8Array | ArrayBuffer, key: ArrayBuffer, iv: ArrayBuffer, aesMode: DecrypterAesMode): Promise<ArrayBuffer>;
|
882
882
|
softwareDecrypt(data: Uint8Array, key: ArrayBuffer, iv: ArrayBuffer, aesMode: DecrypterAesMode): ArrayBuffer | null;
|
883
|
-
webCryptoDecrypt(data: Uint8Array
|
883
|
+
webCryptoDecrypt(data: Uint8Array<ArrayBuffer>, key: ArrayBuffer, iv: ArrayBuffer, aesMode: DecrypterAesMode): Promise<ArrayBuffer>;
|
884
884
|
private onWebCryptoError;
|
885
885
|
private getValidChunk;
|
886
886
|
private logOnce;
|
@@ -2681,12 +2681,12 @@ export declare class LevelKey implements DecryptData {
|
|
2681
2681
|
readonly keyFormatVersions: number[];
|
2682
2682
|
readonly encrypted: boolean;
|
2683
2683
|
readonly isCommonEncryption: boolean;
|
2684
|
-
iv: Uint8Array | null;
|
2685
|
-
key: Uint8Array | null;
|
2686
|
-
keyId: Uint8Array | null;
|
2684
|
+
iv: Uint8Array<ArrayBuffer> | null;
|
2685
|
+
key: Uint8Array<ArrayBuffer> | null;
|
2686
|
+
keyId: Uint8Array<ArrayBuffer> | null;
|
2687
2687
|
pssh: Uint8Array<ArrayBuffer> | null;
|
2688
2688
|
static clearKeyUriToKeyIdMap(): void;
|
2689
|
-
constructor(method: string, uri: string, format: string, formatversions?: number[], iv?: Uint8Array | null);
|
2689
|
+
constructor(method: string, uri: string, format: string, formatversions?: number[], iv?: Uint8Array<ArrayBuffer> | null);
|
2690
2690
|
isSupported(): boolean;
|
2691
2691
|
getDecryptData(sn: number | 'initSegment'): LevelKey | null;
|
2692
2692
|
}
|
package/dist/hls.js
CHANGED
@@ -1073,7 +1073,7 @@
|
|
1073
1073
|
// Some browsers don't allow to use bind on console object anyway
|
1074
1074
|
// fallback to default if needed
|
1075
1075
|
try {
|
1076
|
-
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.4.0.canary.
|
1076
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.4.0.canary.11054");
|
1077
1077
|
} catch (e) {
|
1078
1078
|
/* log fn threw an exception. All logger methods are no-ops. */
|
1079
1079
|
return createLogger();
|
@@ -1207,12 +1207,6 @@
|
|
1207
1207
|
}
|
1208
1208
|
};
|
1209
1209
|
|
1210
|
-
function sliceUint8(array, start, end) {
|
1211
|
-
// @ts-expect-error This polyfills IE11 usage of Uint8Array slice.
|
1212
|
-
// It always exists in the TypeScript definition so fails, but it fails at runtime on IE11.
|
1213
|
-
return Uint8Array.prototype.slice ? array.slice(start, end) : new Uint8Array(Array.prototype.slice.call(array, start, end));
|
1214
|
-
}
|
1215
|
-
|
1216
1210
|
var LoadStats = function LoadStats() {
|
1217
1211
|
this.aborted = false;
|
1218
1212
|
this.loaded = 0;
|
@@ -2344,8 +2338,8 @@
|
|
2344
2338
|
}
|
2345
2339
|
var last = moofs[moofs.length - 1];
|
2346
2340
|
// Offset by 8 bytes; findBox offsets the start by as much
|
2347
|
-
segmentedRange.valid =
|
2348
|
-
segmentedRange.remainder =
|
2341
|
+
segmentedRange.valid = data.slice(0, last.byteOffset - 8);
|
2342
|
+
segmentedRange.remainder = data.slice(last.byteOffset - 8);
|
2349
2343
|
return segmentedRange;
|
2350
2344
|
}
|
2351
2345
|
function appendUint8Array(data1, data2) {
|
@@ -5636,7 +5630,7 @@
|
|
5636
5630
|
var outputBytes = array.byteLength;
|
5637
5631
|
var paddingBytes = outputBytes && new DataView(array.buffer).getUint8(outputBytes - 1);
|
5638
5632
|
if (paddingBytes) {
|
5639
|
-
return
|
5633
|
+
return array.slice(0, outputBytes - paddingBytes);
|
5640
5634
|
}
|
5641
5635
|
return array;
|
5642
5636
|
}
|
@@ -6016,7 +6010,7 @@
|
|
6016
6010
|
softwareDecrypter.expandKey(key);
|
6017
6011
|
var result = currentResult;
|
6018
6012
|
this.currentResult = softwareDecrypter.decrypt(currentChunk.buffer, 0, iv);
|
6019
|
-
this.currentIV =
|
6013
|
+
this.currentIV = currentChunk.slice(-16).buffer;
|
6020
6014
|
if (!result) {
|
6021
6015
|
return null;
|
6022
6016
|
}
|
@@ -6061,8 +6055,8 @@
|
|
6061
6055
|
var currentChunk = data;
|
6062
6056
|
var splitPoint = data.length - data.length % CHUNK_SIZE;
|
6063
6057
|
if (splitPoint !== data.length) {
|
6064
|
-
currentChunk =
|
6065
|
-
this.remainderData =
|
6058
|
+
currentChunk = data.slice(0, splitPoint);
|
6059
|
+
this.remainderData = data.slice(splitPoint);
|
6066
6060
|
}
|
6067
6061
|
return currentChunk;
|
6068
6062
|
};
|
@@ -9010,10 +9004,7 @@
|
|
9010
9004
|
_proto.doTick = function doTick() {
|
9011
9005
|
this.onTickEnd();
|
9012
9006
|
};
|
9013
|
-
_proto.onTickEnd = function onTickEnd() {}
|
9014
|
-
|
9015
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
9016
|
-
;
|
9007
|
+
_proto.onTickEnd = function onTickEnd() {};
|
9017
9008
|
_proto.startLoad = function startLoad(startPosition) {};
|
9018
9009
|
_proto.stopLoad = function stopLoad() {
|
9019
9010
|
if (this.state === State.STOPPED) {
|
@@ -9372,10 +9363,7 @@
|
|
9372
9363
|
});
|
9373
9364
|
var chunkMeta = new ChunkMetadata(frag.level, frag.sn, frag.stats.chunkCount + 1, 0, part ? part.index : -1, !complete);
|
9374
9365
|
transmuxer.flush(chunkMeta);
|
9375
|
-
}
|
9376
|
-
|
9377
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
9378
|
-
;
|
9366
|
+
};
|
9379
9367
|
_proto._handleFragmentLoadProgress = function _handleFragmentLoadProgress(frag) {};
|
9380
9368
|
_proto._doFragLoad = function _doFragLoad(frag, level, targetBufferTime, progressCallback) {
|
9381
9369
|
var _frag$decryptdata,
|
@@ -11271,7 +11259,7 @@
|
|
11271
11259
|
offset++;
|
11272
11260
|
}
|
11273
11261
|
if (offset === length && lastDataIndex !== length) {
|
11274
|
-
var partialData =
|
11262
|
+
var partialData = data.slice(lastDataIndex);
|
11275
11263
|
if (this.cachedData) {
|
11276
11264
|
this.cachedData = appendUint8Array(this.cachedData, partialData);
|
11277
11265
|
} else {
|
@@ -16450,7 +16438,7 @@
|
|
16450
16438
|
return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
|
16451
16439
|
}
|
16452
16440
|
|
16453
|
-
var version = "1.6.0-beta.4.0.canary.
|
16441
|
+
var version = "1.6.0-beta.4.0.canary.11054";
|
16454
16442
|
|
16455
16443
|
// ensure the worker ends up in the bundle
|
16456
16444
|
// If the worker should not be included this gets aliased to empty.js
|
@@ -21935,7 +21923,7 @@
|
|
21935
21923
|
if (!tenc) {
|
21936
21924
|
throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");
|
21937
21925
|
}
|
21938
|
-
keyId = tenc.subarray(8, 24);
|
21926
|
+
keyId = new Uint8Array(tenc.subarray(8, 24));
|
21939
21927
|
keySystemDomain = KeySystems.FAIRPLAY;
|
21940
21928
|
} catch (error) {
|
21941
21929
|
_this.warn(logMessage + " Failed to parse sinf: " + error);
|
@@ -21971,7 +21959,7 @@
|
|
21971
21959
|
if (psshInfo.version === 0 && psshInfo.data) {
|
21972
21960
|
if (keySystemDomain === KeySystems.WIDEVINE) {
|
21973
21961
|
var offset = psshInfo.data.length - 22;
|
21974
|
-
keyId = psshInfo.data.subarray(offset, offset + 16);
|
21962
|
+
keyId = new Uint8Array(psshInfo.data.subarray(offset, offset + 16));
|
21975
21963
|
} else if (keySystemDomain === KeySystems.PLAYREADY) {
|
21976
21964
|
keyId = parsePlayReadyWRM(psshInfo.data);
|
21977
21965
|
}
|
@@ -28479,7 +28467,6 @@
|
|
28479
28467
|
var StringDecoder = /*#__PURE__*/function () {
|
28480
28468
|
function StringDecoder() {}
|
28481
28469
|
var _proto = StringDecoder.prototype;
|
28482
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
28483
28470
|
_proto.decode = function decode(data, options) {
|
28484
28471
|
if (!data) {
|
28485
28472
|
return '';
|
package/dist/hls.js.d.ts
CHANGED
@@ -851,10 +851,10 @@ export declare interface DecryptData {
|
|
851
851
|
method: string;
|
852
852
|
keyFormat: string;
|
853
853
|
keyFormatVersions: number[];
|
854
|
-
iv: Uint8Array | null;
|
855
|
-
key: Uint8Array | null;
|
856
|
-
keyId: Uint8Array | null;
|
857
|
-
pssh: Uint8Array | null;
|
854
|
+
iv: Uint8Array<ArrayBuffer> | null;
|
855
|
+
key: Uint8Array<ArrayBuffer> | null;
|
856
|
+
keyId: Uint8Array<ArrayBuffer> | null;
|
857
|
+
pssh: Uint8Array<ArrayBuffer> | null;
|
858
858
|
encrypted: boolean;
|
859
859
|
isCommonEncryption: boolean;
|
860
860
|
}
|
@@ -876,11 +876,11 @@ export declare class Decrypter {
|
|
876
876
|
});
|
877
877
|
destroy(): void;
|
878
878
|
isSync(): boolean;
|
879
|
-
flush(): Uint8Array | null;
|
879
|
+
flush(): Uint8Array<ArrayBuffer> | null;
|
880
880
|
reset(): void;
|
881
881
|
decrypt(data: Uint8Array | ArrayBuffer, key: ArrayBuffer, iv: ArrayBuffer, aesMode: DecrypterAesMode): Promise<ArrayBuffer>;
|
882
882
|
softwareDecrypt(data: Uint8Array, key: ArrayBuffer, iv: ArrayBuffer, aesMode: DecrypterAesMode): ArrayBuffer | null;
|
883
|
-
webCryptoDecrypt(data: Uint8Array
|
883
|
+
webCryptoDecrypt(data: Uint8Array<ArrayBuffer>, key: ArrayBuffer, iv: ArrayBuffer, aesMode: DecrypterAesMode): Promise<ArrayBuffer>;
|
884
884
|
private onWebCryptoError;
|
885
885
|
private getValidChunk;
|
886
886
|
private logOnce;
|
@@ -2681,12 +2681,12 @@ export declare class LevelKey implements DecryptData {
|
|
2681
2681
|
readonly keyFormatVersions: number[];
|
2682
2682
|
readonly encrypted: boolean;
|
2683
2683
|
readonly isCommonEncryption: boolean;
|
2684
|
-
iv: Uint8Array | null;
|
2685
|
-
key: Uint8Array | null;
|
2686
|
-
keyId: Uint8Array | null;
|
2684
|
+
iv: Uint8Array<ArrayBuffer> | null;
|
2685
|
+
key: Uint8Array<ArrayBuffer> | null;
|
2686
|
+
keyId: Uint8Array<ArrayBuffer> | null;
|
2687
2687
|
pssh: Uint8Array<ArrayBuffer> | null;
|
2688
2688
|
static clearKeyUriToKeyIdMap(): void;
|
2689
|
-
constructor(method: string, uri: string, format: string, formatversions?: number[], iv?: Uint8Array | null);
|
2689
|
+
constructor(method: string, uri: string, format: string, formatversions?: number[], iv?: Uint8Array<ArrayBuffer> | null);
|
2690
2690
|
isSupported(): boolean;
|
2691
2691
|
getDecryptData(sn: number | 'initSegment'): LevelKey | null;
|
2692
2692
|
}
|