@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
|
@@ -24126,6 +24126,17 @@ async function discoverReolinkDevices(options = {}) {
|
|
|
24126
24126
|
}
|
|
24127
24127
|
|
|
24128
24128
|
// src/reolink/autodetect.ts
|
|
24129
|
+
var ALL_UDP_DISCOVERY_METHODS = [
|
|
24130
|
+
"local-direct",
|
|
24131
|
+
"local-broadcast",
|
|
24132
|
+
"remote",
|
|
24133
|
+
"relay",
|
|
24134
|
+
"map"
|
|
24135
|
+
];
|
|
24136
|
+
function selectViableUdpMethods(hasUid, methods = ALL_UDP_DISCOVERY_METHODS) {
|
|
24137
|
+
if (hasUid) return [...methods];
|
|
24138
|
+
return methods.filter((m) => m === "local-direct");
|
|
24139
|
+
}
|
|
24129
24140
|
function normalizeUid(uid) {
|
|
24130
24141
|
const v = uid?.trim();
|
|
24131
24142
|
return v ? v : void 0;
|
|
@@ -24617,7 +24628,7 @@ async function autoDetectDeviceType(inputs) {
|
|
|
24617
24628
|
}
|
|
24618
24629
|
if (!normalizedUid) {
|
|
24619
24630
|
logger?.log?.(
|
|
24620
|
-
`[AutoDetect] UID discovery failed;
|
|
24631
|
+
`[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.`
|
|
24621
24632
|
);
|
|
24622
24633
|
}
|
|
24623
24634
|
}
|
|
@@ -24670,8 +24681,7 @@ async function autoDetectDeviceType(inputs) {
|
|
|
24670
24681
|
api: udpApi
|
|
24671
24682
|
};
|
|
24672
24683
|
};
|
|
24673
|
-
const
|
|
24674
|
-
const viableMethods = normalizedUid ? methodsToTry : methodsToTry.filter((m) => m === "local-direct" || m === "local-broadcast");
|
|
24684
|
+
const viableMethods = selectViableUdpMethods(Boolean(normalizedUid));
|
|
24675
24685
|
return await runUdpMethodsParallel(
|
|
24676
24686
|
viableMethods,
|
|
24677
24687
|
async (m, isAborted) => {
|
|
@@ -24777,9 +24787,11 @@ export {
|
|
|
24777
24787
|
discoverViaTcpPortScan,
|
|
24778
24788
|
discoverViaOnvif,
|
|
24779
24789
|
discoverReolinkDevices,
|
|
24790
|
+
ALL_UDP_DISCOVERY_METHODS,
|
|
24791
|
+
selectViableUdpMethods,
|
|
24780
24792
|
normalizeUid,
|
|
24781
24793
|
maskUid,
|
|
24782
24794
|
isTcpFailureThatShouldFallbackToUdp,
|
|
24783
24795
|
autoDetectDeviceType
|
|
24784
24796
|
};
|
|
24785
|
-
//# sourceMappingURL=chunk-
|
|
24797
|
+
//# sourceMappingURL=chunk-OJ5RWPGY.js.map
|