@apocaliss92/nodelink-js 0.4.28 → 0.4.30
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/README.md +20 -13
- package/dist/{chunk-NQ7D5TLR.js → chunk-AZZKLRJV.js} +11 -1
- package/dist/chunk-AZZKLRJV.js.map +1 -0
- package/dist/cli/rtsp-server.cjs +10 -0
- package/dist/cli/rtsp-server.cjs.map +1 -1
- package/dist/cli/rtsp-server.js +1 -1
- package/dist/index.cjs +75 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +66 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-NQ7D5TLR.js.map +0 -1
package/dist/cli/rtsp-server.cjs
CHANGED
|
@@ -20908,6 +20908,7 @@ var ReolinkBaichuanApi = class _ReolinkBaichuanApi {
|
|
|
20908
20908
|
*/
|
|
20909
20909
|
subscribeEmailPushEvents(params) {
|
|
20910
20910
|
const channel = params.channel ?? 0;
|
|
20911
|
+
const onEvent = params.onEvent;
|
|
20911
20912
|
const matches = "match" in params ? params.match : (event) => event.cameraId === params.cameraId;
|
|
20912
20913
|
const off = onEmailPushEvent((event) => {
|
|
20913
20914
|
if (!matches(event)) return;
|
|
@@ -20923,6 +20924,15 @@ var ReolinkBaichuanApi = class _ReolinkBaichuanApi {
|
|
|
20923
20924
|
timestamp: event.receivedAtMs
|
|
20924
20925
|
});
|
|
20925
20926
|
}
|
|
20927
|
+
if (onEvent) {
|
|
20928
|
+
try {
|
|
20929
|
+
onEvent(event);
|
|
20930
|
+
} catch (err) {
|
|
20931
|
+
this.logger.warn?.(
|
|
20932
|
+
`[ReolinkBaichuanApi] subscribeEmailPushEvents onEvent threw: ${err instanceof Error ? err.message : err}`
|
|
20933
|
+
);
|
|
20934
|
+
}
|
|
20935
|
+
}
|
|
20926
20936
|
});
|
|
20927
20937
|
return off;
|
|
20928
20938
|
}
|