Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

uvc

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uvc

Library for USB Video Class (UVC) devices. Used to write software for webcams, camcorders, etcetera.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Node.js library for USB Video Class (UVC) devices (node-uvc)

Node.js library for USB Video Class (UVC) devices. Used to write software for webcams, camcorders, etcetera.

UVC-compliant devices include webcams, digital camcorders, transcoders, analog video converters and still-image cameras.

Installation

npm install --save uvc

Features

Functional:

  • Locate UVC devices on the system and retrieve out device details.
  • Change camera controls, such as image contrast, zoom, and toggling automatic settings.
  • Stream video and individual image frames.
  • Transform image data using standard Node.js streams.

Technical:

  • Thin translation layer built for Javascript developer convenience.
  • Javascript class implementation.
    • Asynchronous async/await class methods.
    • Resource management using .initialize()/.uninitialize() methods.

Installation

Requires Node.js (node and npm commands). Published on npm as uvc.

npm install --save uvc

Usage

See ./examples/ for ready-to-run code.

const { Context, Device, DeviceHandle, LibUvc } = require("uvc");

const libuvc = new LibUvc();
await libuvc.initialize();

const context = new Context(libuvc);
await context.initialize();

const device = await context.findDevice();
await device.initialize();

const deviceHandle = await device.open();
await deviceHandle.initialize();

// NOTE: use the UVC device here, for example using the Controls and FrameStreamer classes.

await deviceHandle.uninitialize();
await device.uninitialize();
await context.uninitialize();
await libuvc.uninitialize();

Development

  • Requires a UVC device, such as a compatible webcam.
  • Get the source code from the node-uvc repository.
  • Follow git-flow and use git-flow-avh.
  • Make sure that all example code works by testing them manually.
# Make sure git-flow is initialized.
git flow init -d

npm run --silent test

See also

node-uvc Copyright © 2020, 2021 Joel Purra. Released under GNU Lesser General Public License version 3.0 (LGPL-3.0). Your donations are appreciated!

Keywords

usb

FAQs

Package last updated on 09 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts