* Add video/audio authorization check for Android
This only checks for the permission and no request is made. `PermissionAndroid` in recent React Native or manually asking it from native code can still be used.
* Add checkDeviceAuthorizationStatus
The API already exposes specific methods for checking camera and microphone access individually. These should be documented. Especially since calling `checkDeviceAuthorizationStatus` requests the microphone permission, which is undesirable in photo-only use cases.
* Add 1080p, 720p, and 480p capture qualities.
* Minor improvements for picture/video sizing.
- Minor refactoring for getting supported sizes (DRY).
- Add explicit pictureSize setting for 480p/720p/1080p in still/picture mode.
* Use util.Size objects for 480p/720p/1080p sizing.
- Note using Camera.Size objects would require a camera instance prior to creating the
size objects, which would be manageable but not too clean.
* Remove 480p for iOS; 16:9/HD aspect ratio for Android 480p
- iOS only has a 640x480 480p-like AVCaptureSessionPreset, which is not the typical 16:9/HD aspect ratio
desired. Removing this option as a result of this.
- Android 480p updated to use 16:9/HD aspect ratio.
* Add notes for (in)exact sizing for 1080p/720p/480p
* Re-add 480p on iOS, more notes on resolutions.
- Add notes on non-HD-aspect-ratio for iOS 480p.
- Add more explanation of variable resolution/sizes, especially for 480p on Android.
* Use custom Resolution class to hold 480p/720p/1080p resolution sizes
- Mistakenly used util.Size class before, which was not added until Android API level 21 (current
min is 16).
* 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
Android MediaRecorder:
- Most importantly, call Camera.unlock() before setting the camera on the
MediaRecorder instance, and release() not just reset() when releasing the MediaRecorder
instance!
- Add comments and notes for preparing and releasing MediaRecorder instance.
- Add onError callback for errors during recording session.
RCTCameraViewManager, RCTCamera, RCTCameraViewFinder, RCTCameraView:
- Implement setCaptureMode, preparing camera based on captureMode. Currently, the only step that
needs to be taken here is setting the recording hint for videos.
- Handle setting _captureMode instance variable where applicable.
Sizing
- Determine ViewFinder supported sizes based on actual captureMode (i.e., get supported picture
sizes when in still capture mode, and get supported video sizes when in video capture mode).
Output files:
- Get appropriate external storage public directory based on media type (image or video).
- Minor variable renaming to indicate that both images or videos can be saved.
README:
- Update captureTarget to indicate that cameraRoll is the actual default for both systems.
- Small clarification for output data type for deprecated memory captureTarget output.