hls.js 1.6.0-beta.4.0.canary.11034 → 1.6.0-beta.4.0.canary.11036
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 +1 -1
- package/dist/hls.d.ts +1 -1
- package/dist/hls.js +2 -2
- package/dist/hls.js.d.ts +1 -1
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/package.json +7 -7
- package/src/demux/chunk-cache.ts +6 -6
- package/src/loader/level-key.ts +1 -1
- package/src/utils/fetch-loader.ts +1 -1
- package/src/utils/keysystem-util.ts +5 -3
- package/src/utils/numeric-encoding-utils.ts +3 -1
package/src/loader/level-key.ts
CHANGED
@@ -29,7 +29,7 @@ export class LevelKey implements DecryptData {
|
|
29
29
|
public iv: Uint8Array | null = null;
|
30
30
|
public key: Uint8Array | null = null;
|
31
31
|
public keyId: Uint8Array | null = null;
|
32
|
-
public pssh: Uint8Array | null = null;
|
32
|
+
public pssh: Uint8Array<ArrayBuffer> | null = null;
|
33
33
|
|
34
34
|
static clearKeyUriToKeyIdMap() {
|
35
35
|
keyUriToKeyIdMap = {};
|
@@ -246,7 +246,7 @@ class FetchLoader implements Loader<LoaderContext> {
|
|
246
246
|
|
247
247
|
return Promise.resolve(new ArrayBuffer(0));
|
248
248
|
}
|
249
|
-
const chunk: Uint8Array = data.value;
|
249
|
+
const chunk: Uint8Array<ArrayBuffer> = data.value;
|
250
250
|
const len = chunk.length;
|
251
251
|
stats.loaded += len;
|
252
252
|
if (len < highWaterMark || chunkCache.dataLength) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { base64Decode } from './numeric-encoding-utils';
|
2
2
|
import { strToUtf8array } from './utf8-utils';
|
3
3
|
|
4
|
-
function getKeyIdBytes(str: string): Uint8Array {
|
4
|
+
function getKeyIdBytes(str: string): Uint8Array<ArrayBuffer> {
|
5
5
|
const keyIdbytes = strToUtf8array(str).subarray(0, 16);
|
6
6
|
const paddedkeyIdbytes = new Uint8Array(16);
|
7
7
|
paddedkeyIdbytes.set(keyIdbytes, 16 - keyIdbytes.length);
|
@@ -21,10 +21,12 @@ export function changeEndianness(keyId: Uint8Array) {
|
|
21
21
|
swap(keyId, 6, 7);
|
22
22
|
}
|
23
23
|
|
24
|
-
export function convertDataUriToArrayBytes(
|
24
|
+
export function convertDataUriToArrayBytes(
|
25
|
+
uri: string,
|
26
|
+
): Uint8Array<ArrayBuffer> | null {
|
25
27
|
// data:[<media type][;attribute=value][;base64],<data>
|
26
28
|
const colonsplit = uri.split(':');
|
27
|
-
let keydata: Uint8Array | null = null;
|
29
|
+
let keydata: Uint8Array<ArrayBuffer> | null = null;
|
28
30
|
if (colonsplit[0] === 'data' && colonsplit.length === 2) {
|
29
31
|
const semicolonsplit = colonsplit[1].split(';');
|
30
32
|
const commasplit = semicolonsplit[semicolonsplit.length - 1].split(',');
|
@@ -21,6 +21,8 @@ export function base64UrlEncode(input: Uint8Array): string {
|
|
21
21
|
return base64ToBase64Url(base64Encode(input));
|
22
22
|
}
|
23
23
|
|
24
|
-
export function base64Decode(
|
24
|
+
export function base64Decode(
|
25
|
+
base64encodedStr: string,
|
26
|
+
): Uint8Array<ArrayBuffer> {
|
25
27
|
return Uint8Array.from(atob(base64encodedStr), (c) => c.charCodeAt(0));
|
26
28
|
}
|