Using <WithThumbnailsBox /> HOC |
Simple <CameraView /> |
---|---|
Embedded to dialog | |
npm install --save react-photogram
import CameraView,{WithThumbnailsBox} from 'react-photogram'
Name | type | Description |
---|---|---|
cameraWidth | int | device resolution,translates into video width = cameraWidth,video height = cameraWidth * 0.75 |
livePreview | bool | fires onLinePreview(imageURL) |
noLocalStorage | bool | saves the crop box to local storage |
snapKeys | array of strings | maps a specefied keys to make a snaphot,like as KeyboadEvent.code like ['Space','Enter'] |
button:{ vAlign:"val", hAlign:"val" } |
object{string,string} | Snap button alignment,can be of middle,top,left,right,bottom for vAlign and hAlign |
mute | bool | Disables the shutter sound |
outputSize:{ width:num, height:num } |
object{int,int} | translates actual cropping size into that width and height |
Name | Description |
---|---|
onImage(imageObj) | fires on button clicked/hotkey pressed |
onLivePreview(dataURL) | streaming cropped picture for preview |
Extends <
CameraView
/> props with folowwing props:
Name | type | Description |
---|---|---|
thumbnailSize:{ width:num height:num thumbsPerLine:num } |
object(int,int,int) | Sets thumbnails dimension,and thumbs per line on thumbnails box view |