From adb26f452417954ce1d2e7f7cd0ed8bd515251d0 Mon Sep 17 00:00:00 2001 From: Jonathan Chen Date: Fri, 18 Nov 2016 17:35:26 -0500 Subject: [PATCH] Default captureAudio to false (#420) * Default captureAudio to false Since default captureMode is a still picture, not video. This also works around some new iOS 10 permissions requiring notifying the user with a reason for using microphone (which is not good for the user experience if they're just taking a picture). Reference: https://github.com/lwansbrough/react-native-camera/issues/386#issuecomment-249007206 If you need video and sound, then explicitly pass it through as props in your Camera component. * Update readme for default audio setting --- README.md | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 87d56d9..3224353 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ The `aspect` property allows you to define how your viewfinder renders the camer #### `iOS` `captureAudio` -Values: `true` (default), `false` (Boolean) +Values: `true` (Boolean), `false` (default) *Applies to video capture mode only.* Specifies whether or not audio should be captured with the video. diff --git a/index.js b/index.js index 51ac504..dacbabc 100644 --- a/index.js +++ b/index.js @@ -116,7 +116,7 @@ export default class Camera extends Component { aspect: CameraManager.Aspect.fill, type: CameraManager.Type.back, orientation: CameraManager.Orientation.auto, - captureAudio: true, + captureAudio: false, captureMode: CameraManager.CaptureMode.still, captureTarget: CameraManager.CaptureTarget.cameraRoll, captureQuality: CameraManager.CaptureQuality.high,