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

react-webcam-onfido

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-webcam-onfido

React webcam component

1.0.0
latest
Source
npm
Version published
Weekly downloads
194
-4.43%
Maintainers
1
Weekly downloads
 
Created
Source

react-webcam

Webcam component for React. See this for browser compatibility.

Installation

npm install react-webcam

Demo

https://cezary.github.io/react-webcam/examples (if demo doesn't work, check browser compatibility and verify browser is using https)

Usage

import React from 'react';
import Webcam from 'react-webcam';

class Component extends React.Component {
  render() {
    return <Webcam/>;
  }
}

Props

proptypedefaultnotes
classNamestring''CSS class of video element
audiobooleanfalseenable/disable audio
heightnumber480height of video element
widthnumber640width of video element
facingModestring''Facing mode of the camera. It can be user or environment
screenshotFormatstring'image/webp'format of screenshot
onUserMediafunctionnoopcallback when component receives a media stream
onFailurefunctionnoopCallback in case an error happens, no getUserMedia for example

Global functions

functionnotes
getScreenshotreturns one frame of the stream
getCanvasreturns a canvas with the same size as the video element
startRecordingstarts the recording
stopRecordingstops the recording
getVideoBlobreturns the video blob for the recorded video

License

MIT

Keywords

react

FAQs

Package last updated on 04 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