@apocaliss92/nodelink-js 0.4.33 → 0.4.34
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/{chunk-OZL6C2YJ.js → chunk-OJ5RWPGY.js} +16 -4
- package/dist/chunk-OJ5RWPGY.js.map +1 -0
- package/dist/cli/rtsp-server.cjs +13 -3
- package/dist/cli/rtsp-server.cjs.map +1 -1
- package/dist/cli/rtsp-server.js +1 -1
- package/dist/index.cjs +17 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -4
- package/dist/index.d.ts +28 -3
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-OZL6C2YJ.js.map +0 -1
package/dist/cli/rtsp-server.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -8163,6 +8163,7 @@ var init_ReolinkCgiApi = __esm({
|
|
|
8163
8163
|
// src/index.ts
|
|
8164
8164
|
var index_exports = {};
|
|
8165
8165
|
__export(index_exports, {
|
|
8166
|
+
ALL_UDP_DISCOVERY_METHODS: () => ALL_UDP_DISCOVERY_METHODS,
|
|
8166
8167
|
AesStreamDecryptor: () => AesStreamDecryptor,
|
|
8167
8168
|
AutodiscoveryClient: () => AutodiscoveryClient,
|
|
8168
8169
|
BC_AES_IV: () => BC_AES_IV,
|
|
@@ -8473,6 +8474,7 @@ __export(index_exports, {
|
|
|
8473
8474
|
runMultifocalDiagnosticsConsecutively: () => runMultifocalDiagnosticsConsecutively,
|
|
8474
8475
|
sampleStreams: () => sampleStreams,
|
|
8475
8476
|
sanitizeFixtureData: () => sanitizeFixtureData,
|
|
8477
|
+
selectViableUdpMethods: () => selectViableUdpMethods,
|
|
8476
8478
|
setEmailPushCameraResolver: () => setEmailPushCameraResolver,
|
|
8477
8479
|
setGlobalLogger: () => setGlobalLogger,
|
|
8478
8480
|
splitAnnexBToNalPayloads: () => splitAnnexBToNalPayloads,
|
|
@@ -40237,6 +40239,17 @@ init_zip();
|
|
|
40237
40239
|
|
|
40238
40240
|
// src/reolink/autodetect.ts
|
|
40239
40241
|
init_constants();
|
|
40242
|
+
var ALL_UDP_DISCOVERY_METHODS = [
|
|
40243
|
+
"local-direct",
|
|
40244
|
+
"local-broadcast",
|
|
40245
|
+
"remote",
|
|
40246
|
+
"relay",
|
|
40247
|
+
"map"
|
|
40248
|
+
];
|
|
40249
|
+
function selectViableUdpMethods(hasUid, methods = ALL_UDP_DISCOVERY_METHODS) {
|
|
40250
|
+
if (hasUid) return [...methods];
|
|
40251
|
+
return methods.filter((m) => m === "local-direct");
|
|
40252
|
+
}
|
|
40240
40253
|
function normalizeUid(uid) {
|
|
40241
40254
|
const v = uid?.trim();
|
|
40242
40255
|
return v ? v : void 0;
|
|
@@ -40728,7 +40741,7 @@ async function autoDetectDeviceType(inputs) {
|
|
|
40728
40741
|
}
|
|
40729
40742
|
if (!normalizedUid) {
|
|
40730
40743
|
logger?.log?.(
|
|
40731
|
-
`[AutoDetect] UID discovery failed;
|
|
40744
|
+
`[AutoDetect] UID discovery failed; only local-direct can run without a UID. If the camera is sleeping or on a different subnet, supply its UID to enable BCUDP P2P fallback (remote/relay/map) which can wake it via Reolink's servers.`
|
|
40732
40745
|
);
|
|
40733
40746
|
}
|
|
40734
40747
|
}
|
|
@@ -40781,8 +40794,7 @@ async function autoDetectDeviceType(inputs) {
|
|
|
40781
40794
|
api: udpApi
|
|
40782
40795
|
};
|
|
40783
40796
|
};
|
|
40784
|
-
const
|
|
40785
|
-
const viableMethods = normalizedUid ? methodsToTry : methodsToTry.filter((m) => m === "local-direct" || m === "local-broadcast");
|
|
40797
|
+
const viableMethods = selectViableUdpMethods(Boolean(normalizedUid));
|
|
40786
40798
|
return await runUdpMethodsParallel(
|
|
40787
40799
|
viableMethods,
|
|
40788
40800
|
async (m, isAborted) => {
|
|
@@ -41439,6 +41451,7 @@ function buildInitialStatus(config) {
|
|
|
41439
41451
|
}
|
|
41440
41452
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41441
41453
|
0 && (module.exports = {
|
|
41454
|
+
ALL_UDP_DISCOVERY_METHODS,
|
|
41442
41455
|
AesStreamDecryptor,
|
|
41443
41456
|
AutodiscoveryClient,
|
|
41444
41457
|
BC_AES_IV,
|
|
@@ -41749,6 +41762,7 @@ function buildInitialStatus(config) {
|
|
|
41749
41762
|
runMultifocalDiagnosticsConsecutively,
|
|
41750
41763
|
sampleStreams,
|
|
41751
41764
|
sanitizeFixtureData,
|
|
41765
|
+
selectViableUdpMethods,
|
|
41752
41766
|
setEmailPushCameraResolver,
|
|
41753
41767
|
setGlobalLogger,
|
|
41754
41768
|
splitAnnexBToNalPayloads,
|