jgradim / react-webcam

Webcam component

Home Page:https://cezary.github.io/react-webcam/examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  • audio: boolean | Set to enable/disable audio. Default is true.
  • height: number | Height of video element. Default is 480.
  • width: number | Width of video element. Default is 640.
  • screenshotFormat: 'string' | Format of screenshot. Default is 'image/webp'.
  • onUserMedia: function | Callback when component receives a media stream.
  • className: 'string' | CSS class of video element. Default is empty.

License

MIT

About

Webcam component

https://cezary.github.io/react-webcam/examples


Languages

Language:JavaScript 100.0%