0.1.20 • Published 2 months ago

react-camera-media-stream v0.1.20

Weekly downloads
20
License
MIT
Repository
github
Last release
2 months ago

React Camera MediaStream

NPM JavaScript Style Guide

Camera component for React.

Note: Browsers will throw an error if the page is loaded from insecure origin. I.e. Use https.

Installation

npm install --save react-camera-media-stream

Documentation

PropsTypeDefaultDetails
maxint1920max width or height picture
namePicturestring""name added on left corner picture
imageCompressionfloat0.8quality of picture (0 to 1)
isConfirmbooleanfalseconfirmation after take picture
onTakePicturefunctionclick take picture
onErrorfunctionon error
modelstring""model on first plan camera
marginModelint40margin model
isFullscreenbooleanfalseview in fullscreen (not all navigator are compatible)
onClosefunctionclick close view camera
isTextModebooleanfalsebutton text / button icon
textCancelstring"Cancel"text for button cancel
textPicturestring"Take picture"text for button take picture
textTorchstring"Enable torch"text for button enable/disable torch (not all navigator are compatible)
textAgainstring"Retake"text for button again
textConfirmstring"Confirm"text for button confirm

Getting started

Import Component and style

import { RCamera } from  'react-camera-media-stream'
import  'react-camera-media-stream/dist/index.css'

Render Component

<RCamera
  model={require('./images/model.png')}
  isConfirm={false}
  onTakePicture={(data) =>  console.log(data)}
  onError={() => {}}
  onClose={() => setTest(false)}
  isFullscreen={true}
  namePicture="test"
  isTorch={true}
/>

License

MIT © noah-lnt

0.1.20

2 months ago

0.1.19

2 months ago

0.1.18

2 months ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.15

3 years ago

0.1.12

3 years ago

0.1.13

3 years ago

0.1.14

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago