node-red-contrib-hik-media-buffer 1.1.73 → 1.1.74
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/hik-media-buffer.js +6 -1
- package/package.json +1 -2
package/hik-media-buffer.js
CHANGED
|
@@ -156,8 +156,13 @@ module.exports = function(RED) {
|
|
|
156
156
|
const trackI = (channelID*100+3).toString();
|
|
157
157
|
const tracks = [{ id: trackV }, { id: trackI }];
|
|
158
158
|
for (let t of tracks) {
|
|
159
|
-
|
|
159
|
+
if(t.id==trackV){
|
|
160
|
+
const searchXml = `<?xml version="1.0" encoding="utf-8"?><CMSearchDescription><searchID>LAST_EVENT</searchID><trackIDList><trackID>${t.id}</trackID></trackIDList><timeSpanList><timeSpan><startTime>${startTime}</startTime><endTime>${endTime}</endTime></timeSpan></timeSpanList><maxResults>100</maxResults><metadataList><metadataDescriptor>//recordType.meta.std-cgi.com/${evento}</metadataDescriptor></metadataList></CMSearchDescription>`;
|
|
160
161
|
|
|
162
|
+
} else{
|
|
163
|
+
const searchXml = `<?xml version="1.0" encoding="utf-8"?><CMSearchDescription><searchID>LAST_EVENT</searchID><trackIDList><trackID>${t.id}</trackID></trackIDList><timeSpanList><timeSpan><startTime>${startTime}</startTime><endTime>${endTime}</endTime></timeSpan></timeSpanList><maxResults>100</maxResults><metadataList><metadataDescriptor>//recordType.meta.hikvision.com/${evento}</metadataDescriptor></metadataList></CMSearchDescription>`;
|
|
164
|
+
}
|
|
165
|
+
|
|
161
166
|
const resSearch = await camAuth.request({
|
|
162
167
|
method: 'POST', url: `${baseUrl}/search`, data: searchXml, headers: { "Content-Type": "application/xml" }
|
|
163
168
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-hik-media-buffer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.74",
|
|
4
4
|
"description": "Ottiene buffer video e immagine da camere Hikvision via ISAPI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node-red",
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@mhoc/axios-digest-auth": "^0.8.0",
|
|
24
24
|
"axios": "^1.6.0",
|
|
25
|
-
"node-red-contrib-hik-media-buffer": "^1.1.59",
|
|
26
25
|
"xml2js": "^0.6.2"
|
|
27
26
|
}
|
|
28
27
|
}
|