hls.js 1.5.9-0.canary.10275 → 1.5.9-0.canary.10276
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.js +9 -7
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +9 -7
- 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 -7
- 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 +9 -7
- 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 +1 -1
- package/src/crypt/decrypter.ts +13 -6
- package/src/crypt/fast-aes-key.ts +2 -2
package/dist/hls.mjs
CHANGED
@@ -512,7 +512,7 @@ function enableLogs(debugConfig, context, id) {
|
|
512
512
|
// Some browsers don't allow to use bind on console object anyway
|
513
513
|
// fallback to default if needed
|
514
514
|
try {
|
515
|
-
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.9-0.canary.
|
515
|
+
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.9-0.canary.10276"}`);
|
516
516
|
} catch (e) {
|
517
517
|
/* log fn threw an exception. All logger methods are no-ops. */
|
518
518
|
return createLogger();
|
@@ -9233,7 +9233,7 @@ class Decrypter {
|
|
9233
9233
|
/* no-op */
|
9234
9234
|
}
|
9235
9235
|
}
|
9236
|
-
this.useSoftware = this.subtle
|
9236
|
+
this.useSoftware = !this.subtle;
|
9237
9237
|
}
|
9238
9238
|
destroy() {
|
9239
9239
|
this.subtle = null;
|
@@ -9331,18 +9331,20 @@ class Decrypter {
|
|
9331
9331
|
return result;
|
9332
9332
|
}
|
9333
9333
|
webCryptoDecrypt(data, key, iv, aesMode) {
|
9334
|
-
const subtle = this.subtle;
|
9335
9334
|
if (this.key !== key || !this.fastAesKey) {
|
9335
|
+
if (!this.subtle) {
|
9336
|
+
return Promise.resolve(this.onWebCryptoError(data, key, iv, aesMode));
|
9337
|
+
}
|
9336
9338
|
this.key = key;
|
9337
|
-
this.fastAesKey = new FastAESKey(subtle, key, aesMode);
|
9339
|
+
this.fastAesKey = new FastAESKey(this.subtle, key, aesMode);
|
9338
9340
|
}
|
9339
9341
|
return this.fastAesKey.expandKey().then(aesKey => {
|
9340
9342
|
// decrypt using web crypto
|
9341
|
-
if (!subtle) {
|
9343
|
+
if (!this.subtle) {
|
9342
9344
|
return Promise.reject(new Error('web crypto not initialized'));
|
9343
9345
|
}
|
9344
9346
|
this.logOnce('WebCrypto AES decrypt');
|
9345
|
-
const crypto = new AESCrypto(subtle, new Uint8Array(iv), aesMode);
|
9347
|
+
const crypto = new AESCrypto(this.subtle, new Uint8Array(iv), aesMode);
|
9346
9348
|
return crypto.decrypt(data.buffer, aesKey);
|
9347
9349
|
}).catch(err => {
|
9348
9350
|
logger.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${err.name}: ${err.message}`);
|
@@ -29014,7 +29016,7 @@ class Hls {
|
|
29014
29016
|
* Get the video-dev/hls.js package version.
|
29015
29017
|
*/
|
29016
29018
|
static get version() {
|
29017
|
-
return "1.5.9-0.canary.
|
29019
|
+
return "1.5.9-0.canary.10276";
|
29018
29020
|
}
|
29019
29021
|
|
29020
29022
|
/**
|