npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

pixecho

v1.1.0

Published

module for browser webcam/mic

Readme

Film

A webcam module with a few features.

NOTE: this module will handle the getUserMedia stream, and apply it to your video element. See:

##Usage

var film = require('film');

var camera = film(videoElement, canvasElement)

The constructor returns an event emitter with methods

##Methods and Events

All events return canvas Image Data objects, or in the case of record, a set of Image Data objects.

camera.snapshot()
camera.record()
camera.expose(params)

camera.on('snapshot', fn(data){})
camera.on('record', fn(data){})
camera.on('expose', fn(data){})

###camera.snapshot() Call this method to capture a snapshot from the source (the video element) listen for the 'snapshot' event to get the frame.

###camera.record() This method starts and ends the capturing of canvas frames. call record() again to stop listen for the 'record' event to get an array of all frames recorded, in order of course

##camera.expose([params]) This method is like snapshot, except that it takes some optional camera-like parameters.
Here they are, with their defaults and descriptions:

var params = {
  shutterSpeed: 1000 / 24, // how long to hold exposure open on the capture, in milliseconds.  The default here is for 1 frame @ 24fps.
  filmSpeed: 5, // the larger this number, the "slower" the film, see further description below
  r: 0, // the "film" defaults to black, and exposes to light. 
  g: 0, // but by setting these rgb[a] values, you can set the starting color
  b: 0, // which will boost that color value in the exposure
  a: 255 // values must be between 0-255
}

###filmSpeed

This parameter mimics film speed, which is sort of a density/resistance value. Faster film speed saturates quicker. With actual film, the higher the number, the faster the film. This module builds up an exposure over time, dividing rgb values by the filmSpeed value. Ergo, with this parameter, the lower the value, the faster the film.

The filmSpeed can be an object with rgb values, which sets the "resistance" for each color separately.

var params = {
  shutterSpeed: 1000 / 60, // how long to hold exposure open on the capture, in milliseconds
  filmSpeed: {
    r: 5,
    g: 10,
    b: 5
  }
 }

##Example

to run this example Edit entry.js to fuddle with methods and params

git clone this repo
npm install -g watchify opa
cd this repo
~$ opa