Skip to content

smronju/react-webcam

 
 

Repository files navigation

react-webcam

Webcam component for React. See this for browser compatibility.

Installation

npm install git+https://github.com/smronju/react-webcam.git

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

prop type default notes
className string '' CSS class of video element
audio boolean true enable/disable audio
mirror boolean true enable/disable mirror view
height number 480 height of video element
width number 640 width of video element
screenshotFormat string 'image/webp' format of screenshot
onUserMedia function noop callback when component receives a media stream

License

MIT

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%