@codenkay/video-nsgplayer-core 3.0.2 → 3.0.4
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/CHANGELOG.md +13 -0
- package/dist/index.cjs +12 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -6
- package/dist/index.d.ts +59 -6
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/package.json +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Preserve "use client" in React/UI builds, forward analytics, intermittent watermark, Angular Ivy packaging, and packaging metadata.
|
|
8
|
+
|
|
9
|
+
## 3.0.3
|
|
10
|
+
|
|
11
|
+
- Browser-direct AES keys: after signed-query CORS/network failure, retry once
|
|
12
|
+
with `getKeyAccessToken` Bearer before XHR (needed when AUTH_MODE=browser and
|
|
13
|
+
Appextech enables CORS + Authorization on `enc.key`).
|
|
14
|
+
- Clearer KEY_LOAD_ERROR message distinguishing BFF vs browser-direct CORS.
|
|
15
|
+
|
|
3
16
|
## 3.0.2
|
|
4
17
|
|
|
5
18
|
- Fix pack/build regression on AES `enc.key`: do **not** statically import
|
package/dist/index.cjs
CHANGED
|
@@ -213,7 +213,7 @@ var AuthManager = class {
|
|
|
213
213
|
|
|
214
214
|
// src/config/defaults.ts
|
|
215
215
|
var PLAYBACK_RATES = [0.5, 0.75, 1, 1.25, 1.5, 2];
|
|
216
|
-
var PACKAGE_VERSION = "3.0.
|
|
216
|
+
var PACKAGE_VERSION = "3.0.3";
|
|
217
217
|
var DEFAULT_PLAYER_BEHAVIOR = {
|
|
218
218
|
autoplay: true,
|
|
219
219
|
startMuted: true,
|
|
@@ -237,7 +237,8 @@ var DEFAULT_CONTROLS = {
|
|
|
237
237
|
showSkip: true,
|
|
238
238
|
showLive: true,
|
|
239
239
|
seekCueDurationMs: 720,
|
|
240
|
-
keyboardShortcuts: true
|
|
240
|
+
keyboardShortcuts: true,
|
|
241
|
+
persistQualityPreference: false
|
|
241
242
|
};
|
|
242
243
|
var DEFAULT_THEME = {
|
|
243
244
|
playIconPreset: "triangle",
|
|
@@ -859,7 +860,8 @@ function rememberBuiltin(HlsClass, loader) {
|
|
|
859
860
|
function getStashedBuiltinLoader(loader) {
|
|
860
861
|
return loader[BUILTIN_LOADER_REF];
|
|
861
862
|
}
|
|
862
|
-
function resolveBuiltinHlsLoader(
|
|
863
|
+
function resolveBuiltinHlsLoader(HlsModule) {
|
|
864
|
+
const HlsClass = HlsModule;
|
|
863
865
|
const cached = builtinLoaderByHls.get(HlsClass);
|
|
864
866
|
if (cached) return cached;
|
|
865
867
|
const start = HlsClass.DefaultConfig.loader;
|
|
@@ -1090,7 +1092,9 @@ async function loadEncryptionKeyEnterprise(context, callbacks, plan, signal, sta
|
|
|
1090
1092
|
);
|
|
1091
1093
|
return "ok";
|
|
1092
1094
|
}
|
|
1093
|
-
const needsBearer = Boolean(plan.accessToken) && (queryResult.status === 401 || queryResult.status === 403
|
|
1095
|
+
const needsBearer = Boolean(plan.accessToken) && (queryResult.status === 401 || queryResult.status === 403 || // Browser-direct: opaque CORS/network on unsigned GET — try Bearer once
|
|
1096
|
+
// Appextech allows ACAO + Authorization (AUTH_MODE=browser, no BFF).
|
|
1097
|
+
queryResult.cors || queryResult.status === 0);
|
|
1094
1098
|
if (needsBearer && plan.accessToken) {
|
|
1095
1099
|
const bearerResult = await fetchEncryptionKeyBytes(
|
|
1096
1100
|
plan.signedKeyUrl,
|
|
@@ -1105,7 +1109,7 @@ async function loadEncryptionKeyEnterprise(context, callbacks, plan, signal, sta
|
|
|
1105
1109
|
);
|
|
1106
1110
|
return "ok";
|
|
1107
1111
|
}
|
|
1108
|
-
if (bearerResult.cors) {
|
|
1112
|
+
if (bearerResult.cors || bearerResult.status === 0) {
|
|
1109
1113
|
return "try_xhr";
|
|
1110
1114
|
}
|
|
1111
1115
|
callbacks.onError(
|
|
@@ -1133,7 +1137,8 @@ async function loadEncryptionKeyEnterprise(context, callbacks, plan, signal, sta
|
|
|
1133
1137
|
);
|
|
1134
1138
|
return "ok";
|
|
1135
1139
|
}
|
|
1136
|
-
function createAuthParamsLoader(
|
|
1140
|
+
function createAuthParamsLoader(HlsModule, store, options = {}) {
|
|
1141
|
+
const HlsClass = HlsModule;
|
|
1137
1142
|
const BaseLoader = resolveBuiltinHlsLoader(HlsClass);
|
|
1138
1143
|
rememberBuiltin(HlsClass, BaseLoader);
|
|
1139
1144
|
const maxProxyFailures = typeof options.keyProxyMaxFailures === "number" && options.keyProxyMaxFailures >= 0 ? options.keyProxyMaxFailures : KEY_PROXY_MAX_FAILURES;
|
|
@@ -1343,7 +1348,7 @@ var HlsEngine = class {
|
|
|
1343
1348
|
if (!data.fatal) return;
|
|
1344
1349
|
} else if (!data.fatal) {
|
|
1345
1350
|
callbacks.onFatalError?.(
|
|
1346
|
-
status ? `Encryption key load failed (HTTP ${status}).` : "Encryption key load failed (network/CORS).
|
|
1351
|
+
status ? `Encryption key load failed (HTTP ${status}).` : "Encryption key load failed (network/CORS). For browser-direct mode the key host must allow CORS (and Authorization if Bearer is required). Otherwise use keyProxyUrlBuilder (same-origin BFF) when the server IP can reach Appextech."
|
|
1347
1352
|
);
|
|
1348
1353
|
return;
|
|
1349
1354
|
}
|