1.0.3 • Published 11 months ago

simple-react-webcam v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

simple-react-webcam

A simple react component to access your webcam in your React Project.

Installation

Install simple-react-webcam using NPM with the following command.

npm install simple-react-webcam

Usage

import React from 'react';
import SimpleReactWebcam from 'simple-react-webcam';

const WebcamComponent = () => {
    return (
        <SimpleReactWebcam />
    );
};

Props

Prop NameTypeDefaultNotes
classNamestringclassName for the underlying video tag
requestDeclinedCallbackfunction() => {};Callback function which is triggerred when camera permission denied

Methods

getCapturedImage - Returns a base64 encoded string of the current webcam image.

Example:

getCapturedImage();
1.0.2

11 months ago

1.0.1

11 months ago

1.0.3

11 months ago

1.0.0

1 year ago