Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-record-webcam

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-record-webcam

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.7K
increased by7.87%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status TypeScript

Webcam video and audio recording component for React. Uses classes so all React versions are supported. Works in all latest browser versions, although Safari requires MediaRecorder to be enabled in the experimental features.

How to

Install

yarn add react-record-webcam

Use

import Webcam from 'react-record-webcam'

...

<Webcam />

Styling

You can use the below default class names or pass your own namespace to replace the default react-record-webcam.

className
react-record-webcam__wrapper
react-record-webcam__status
react-record-webcam__video
react-record-webcam__controls
react-record-webcam__controls-button

Props

PropExample
cssNamespace: stringSet a namespace for the component CSS classes
downloadFileName: stringFilename for video download
getStatusCallback to get webcam status
recordingLength: numberSet max recording length in seconds
namespace: stringPass own CSS namespace
options: objectOptions for recording video
`type: video
`mimeType: video/mp4
video: { minWidth, minHeight, maxWidth, maxHeight, minAspectRatio }
statusMessages: objectPass own status messages to recorder
{ INIT, CLOSED, OPEN, RECORDING, PREVIEW, ERROR }
controlLabels: objectPass custom labels to control buttons
{ CLOSE, DOWNLOAD, OPEN, RETAKE, START, STOP }
renderRender prop that passes status and controls
isWebcamOn
isRecording
isPreview
openCamera
closeCamera
start
stop
retake
download
status

FAQs

Package last updated on 10 May 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc