1.0.0 • Published 2 years ago
react-webcam-onfido v1.0.0
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
prop | type | default | notes |
---|---|---|---|
className | string | '' | CSS class of video element |
audio | boolean | false | enable/disable audio |
height | number | 480 | height of video element |
width | number | 640 | width of video element |
facingMode | string | '' | Facing mode of the camera. It can be user or environment |
screenshotFormat | string | 'image/webp' | format of screenshot |
onUserMedia | function | noop | callback when component receives a media stream |
onFailure | function | noop | Callback in case an error happens, no getUserMedia for example |
Global functions
function | notes |
---|---|
getScreenshot | returns one frame of the stream |
getCanvas | returns a canvas with the same size as the video element |
startRecording | starts the recording |
stopRecording | stops the recording |
getVideoBlob | returns the video blob for the recorded video |
License
MIT
1.0.0
2 years ago
0.1.28
2 years ago
0.1.27
2 years ago
0.1.26
3 years ago
0.1.24
3 years ago
0.1.25
3 years ago
0.1.23
4 years ago
0.1.21
4 years ago
0.1.22
4 years ago
0.1.19
4 years ago
0.1.18
4 years ago
0.1.17
4 years ago
0.1.16
4 years ago
0.1.15
4 years ago
0.1.14
4 years ago
0.1.13
4 years ago
0.1.12
5 years ago
0.1.12-rc1
5 years ago
0.1.11
5 years ago
0.1.11-rc1
5 years ago
0.1.10
6 years ago
0.1.9
6 years ago
0.1.8
6 years ago
0.1.7
6 years ago
0.1.7-rc1
6 years ago
0.1.6
6 years ago
0.1.6-rc.1
6 years ago
0.1.5
6 years ago
0.1.5-rc.1
6 years ago
0.1.4
6 years ago
0.1.4-rc.1
6 years ago
0.1.3
6 years ago
0.1.3-rc.1
6 years ago
0.1.2
6 years ago
0.1.2-rc.1
6 years ago
0.1.1
6 years ago
0.1.1-rc1
6 years ago
0.1.0
6 years ago
0.1.0-rc.1
6 years ago
0.0.20
6 years ago
0.0.19
7 years ago
0.0.18
7 years ago
0.0.17
7 years ago
0.0.1-7.R1
7 years ago
0.0.16
7 years ago
0.0.15
8 years ago