Our team has created a camera component that can be used in any react-native project by simply integrating the class named MediaCapture in your project and navigate to that it. You will find this component inside the media-capture.js class.
Since this component is eloped using a core camera component designed by react-native teams hence it does not require any third party node module o be installed in your project. Once you have called the component you will receive a media response in the following format.
{ key: '6c16e16b-ed90-8893-84bc-ae25a8e0badc',
type: 'local',
fileType: 'image',
path: 'file:///data/user/0/com.technologies33.RNCustomCamera/cache/1599485502327.JPEG',
width: 450,
height: 600,
fileName: '1599485502327.JPEG',
size: 23168
}
That then can be used in the system or for uploading to the server. This component provides:
- Image capture,
- Image selection
- Long press to capture timed video
Complete Source Code with an example project. https://github.com/rptwsthi/RPTRNCamera.