motion-detect
Advanced tools
Comparing version
@@ -19,11 +19,8 @@ var request = require("request"); | ||
var consumer = new MjpegConsumer(); | ||
var motion = new MotionStream({ | ||
minChange: 0 | ||
}); | ||
var motion = new MotionStream(); | ||
var options = { | ||
url: 'http://204.248.124.202/mjpg/video.mjpg' | ||
// url: 'http://rax1.bsn.net/mjpg/video.mjpg?streamprofile=Balanced' | ||
url: 'http://rax1.bsn.net/mjpg/video.mjpg?streamprofile=Balanced' | ||
}; | ||
request(options).pipe(consumer).pipe(motion).pipe(writer); |
@@ -79,5 +79,3 @@ /** @const {Number} **/ | ||
} | ||
var changed = Math.round(changed / (img1.length * 0.25)); | ||
console.log('changed:', changed); | ||
return changed; | ||
return Math.round(changed / (img1.length * 0.25)); | ||
}; | ||
@@ -100,2 +98,2 @@ | ||
return (value > minValue) ? 0xFF : 0; | ||
} | ||
} |
@@ -144,2 +144,2 @@ var Motion = require('./motion'); | ||
module.exports = MotionStream; | ||
module.exports = MotionStream; |
{ | ||
"name": "motion-detect", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "A node.js motion detection library that supports node.js streams", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
12659
-1.13%271
-2.52%