New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

simple-web-cam

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-web-cam

Javascript library for easily (and responsively) taking photos on the web.

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Simple-web-cam

Javascript library for easily (and responsively) taking photos on the web.

Installation

Use NPM

npm install simple-web-cam

Usage

1. Import package:

import camera from 'simple-web-cam';

2. Init the camera:

await camera.init();

3. style (optional)

const style = {
border:'2px solid black',
clipPath:'circle(40%)',
}
camera.set_video_style(style)

4. Snap: you got three options

1. snap and download file:  await camera.snap_download(fileName);

2. snap and get file back:  const file = await camera.snap_get_file(type /*png etc'*/);

3. snap and get base64 string:  camera.snap_get_base64();

5. Stop Webcam

camera.stop();

Keywords

camera

FAQs

Package last updated on 01 Mar 2022

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