🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

motion-detect

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

motion-detect - npm Package Compare versions

Comparing version

to
0.2.4

7

example/motionstream-example.js

@@ -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