New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

camera

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

camera - npm Package Compare versions

Comparing version

to
2.0.0

@@ -1,3 +0,3 @@

const from = require('from2')
const cv = require('opencv4nodejs')
const { Readable } = require('stream')
const cv = require('@u4/opencv4nodejs')

@@ -8,4 +8,13 @@ module.exports = {

const s = from((count, cb) => {
s.snapshot(cb)
const s = new Readable({
objectMode: true,
read() {
s.snapshot((err, data) => {
if (err) {
this.destroy(err)
return
}
this.push(data)
})
}
})

@@ -20,11 +29,11 @@

s.record = (ms, cb) => {
const vid = []
const push = (buf) => vid.push(buf)
s.record = (duration, cb) => {
const frames = []
const push = (buf) => frames.push(buf)
const clear = () => {
s.removeListener('data', push)
cb(vid)
cb(frames)
}
setTimeout(clear, ms)
setTimeout(clear, duration)
s.on('data', push)

@@ -31,0 +40,0 @@ }

{
"name": "camera",
"description": "Just a dead simple package to create readable streams from connected webcams",
"version": "1.0.0",
"version": "2.0.0",
"homepage": "http://github.com/contra/camera",

@@ -10,5 +10,7 @@ "repository": "git://github.com/contra/camera.git",

"dependencies": {
"from2": "^2.3.0",
"opencv4nodejs": "^5.6.0"
"@u4/opencv4nodejs": "^7.1.2"
},
"opencv4nodejs": {
"disableAutoBuild": "1"
},
"devDependencies": {

@@ -15,0 +17,0 @@ "mocha": "*",

@@ -23,3 +23,6 @@ ![status](https://secure.travis-ci.org/contra/camera.png?branch=master)

You may need to `export OPENCV4NODEJS_DISABLE_AUTOBUILD=1` before running `npm install`.
## Specific for macOS
Install OpenCV using brew

@@ -26,0 +29,0 @@ ```bash