node-red-contrib-hik-media-buffer 1.1.128 → 1.1.129
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 +9 -6
- package/package.json +1 -1
package/hik-media-buffer.js
CHANGED
|
@@ -150,10 +150,13 @@ module.exports = function(RED) {
|
|
|
150
150
|
const inizioFinestra = new Date(referenceTime.getTime() - (2 * 60 * 1000));
|
|
151
151
|
const fineFinestra = new Date(referenceTime.getTime() + (2 * 60 * 1000));
|
|
152
152
|
|
|
153
|
-
const
|
|
154
|
-
const
|
|
153
|
+
const startVideoSearch = toHikSearchDate(inizioFinestra);
|
|
154
|
+
const endVideoSearch = toHikSearchDate(fineFinestra);
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
const startFotoSearch = inizioFinestra.toISOString().split('.')[0] + "Z";
|
|
157
|
+
const endFotoSearch = fineFinestra.toISOString().split('.')[0] + "Z";
|
|
158
|
+
|
|
159
|
+
node.warn(`[DEBUG HIK] Avvio ricerca video. Canale: ${channelID}. Cerco da: ${startVideoSearch} a: ${endVideoSearch}`);
|
|
157
160
|
|
|
158
161
|
let output = {
|
|
159
162
|
tipo_messaggio: "evento",
|
|
@@ -177,7 +180,7 @@ module.exports = function(RED) {
|
|
|
177
180
|
"searchID": "C5AFEE35-B1E0-4C01-83F8-47FD77892E4A",
|
|
178
181
|
"searchResultPosition": 0,
|
|
179
182
|
"maxResults": 1,
|
|
180
|
-
"timeSpanList": [{ "startTime":
|
|
183
|
+
"timeSpanList": [{ "startTime": startFotoSearch, "endTime": endFotoSearch }],
|
|
181
184
|
"type": "all",
|
|
182
185
|
"channels": [parseInt(channelID)],
|
|
183
186
|
"eventType": "behavior",
|
|
@@ -216,8 +219,8 @@ module.exports = function(RED) {
|
|
|
216
219
|
<trackList><trackID>${videoTrackID}</trackID></trackList>
|
|
217
220
|
<timeSpanList>
|
|
218
221
|
<timeSpan>
|
|
219
|
-
<startTime>${
|
|
220
|
-
<endTime>${
|
|
222
|
+
<startTime>${startVideoSearch}</startTime>
|
|
223
|
+
<endTime>${endVideoSearch}</endTime>
|
|
221
224
|
</timeSpan>
|
|
222
225
|
</timeSpanList>
|
|
223
226
|
<maxResults>1</maxResults>
|