Merge pull request #1608 from react-native-community/fix/pictureSize

fix(picture-size): export method and change default value
This commit is contained in:
João Guilherme Fidelis 2018-06-04 14:06:23 -03:00 committed by GitHub
commit 9cddb2a721
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -230,7 +230,7 @@ export default class Camera extends React.Component<PropsType, StateType> {
captureAudio: false,
useCamera2Api: false,
playSoundOnCapture: false,
pictureSize: 'Photo',
pictureSize: '1920x1080',
};
_cameraRef: ?Object;
@ -269,6 +269,10 @@ export default class Camera extends React.Component<PropsType, StateType> {
}
}
getAvailablePictureSizes = async (): string[] => {
return await CameraManager.getAvailablePictureSizes(this.props.ratio, this._cameraHandle);
};
async recordAsync(options?: RecordingOptions) {
if (!options || typeof options !== 'object') {
options = {};