Added pause/resume preview functions to RNCamera (#1622)

This commit is contained in:
jtweaver 2018-06-08 15:40:58 -05:00 committed by Sibelius Seraphini
parent 119719237d
commit 747bcf9030

View File

@ -291,6 +291,14 @@ export default class Camera extends React.Component<PropsType, StateType> {
CameraManager.stopRecording(this._cameraHandle);
}
pausePreview() {
CameraManager.pausePreview(this._cameraHandle);
}
resumePreview() {
CameraManager.resumePreview(this._cameraHandle);
}
_onMountError = ({ nativeEvent }: EventCallbackArgumentsType) => {
if (this.props.onMountError) {
this.props.onMountError(nativeEvent);