node-red-contrib-hik-media-buffer 1.1.5 → 1.1.6
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 +3 -3
- package/package.json +1 -1
package/hik-media-buffer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const axiosDigest = require('axios-digest');
|
|
2
2
|
const fs = require('fs');
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const { exec } = require('child_process');
|
|
@@ -33,7 +33,7 @@ module.exports = function(RED) {
|
|
|
33
33
|
if (!fs.existsSync(vidDir)) fs.mkdirSync(vidDir, { recursive: true });
|
|
34
34
|
|
|
35
35
|
// Client Digest per NVR e Camere
|
|
36
|
-
const nvrAuth =
|
|
36
|
+
const nvrAuth = axiosDigest(node.user, node.pass);
|
|
37
37
|
|
|
38
38
|
node.status({fill:"grey", shape:"ring", text:"Inizializzazione..."});
|
|
39
39
|
|
|
@@ -106,7 +106,7 @@ module.exports = function(RED) {
|
|
|
106
106
|
const startTime = toHikDate(new Date(referenceTime.getTime() - (10 * 1000)));
|
|
107
107
|
const endTime = toHikDate(new Date(referenceTime.getTime() + (10 * 1000)));
|
|
108
108
|
|
|
109
|
-
const camAuth =
|
|
109
|
+
const camAuth = axiosDigest(node.user, node.camPass);
|
|
110
110
|
const baseUrl = `${node.protocol}://${camera.ip}:${node.port}/ISAPI/ContentMgmt`;
|
|
111
111
|
|
|
112
112
|
node.status({fill:"yellow", shape:"dot", text:`Download Cam ${channelID}...`});
|