diff --git a/docs/RNCamera.md b/docs/RNCamera.md index 7147e3f..9c8a3c8 100644 --- a/docs/RNCamera.md +++ b/docs/RNCamera.md @@ -386,6 +386,9 @@ The promise will be fulfilled with an object with some of the following properti - `RNCamera.Constants.VideoQuality.4:3`. - `ios` Specifies capture settings suitable for VGA quality (640x480 pixel) video output. (Same as RNCamera.Constants.VideoQuality.480p). - `android` Quality level corresponding to the 480p (720 x 480) resolution but with video frame width set to 640. + - `RNCamera.Constants.VideoQuality.288p`. + - `ios` Specifies capture settings suitable for CIF quality (352x288 pixel) video output. + - `android` Not supported. If nothing is passed the device's highest camera quality will be used as default. - `iOS` `codec`. This option specifies the codec of the output video. Setting the codec is only supported on `iOS >= 10`. The possible values are: diff --git a/ios/RN/RNCameraManager.h b/ios/RN/RNCameraManager.h index 52bc556..f900f3f 100644 --- a/ios/RN/RNCameraManager.h +++ b/ios/RN/RNCameraManager.h @@ -44,6 +44,7 @@ typedef NS_ENUM(NSInteger, RNCameraVideoResolution) { RNCameraVideo1080p = 1, RNCameraVideo720p = 2, RNCameraVideo4x3 = 3, + RNCameraVideo288p = 4, }; @interface RNCameraManager : RCTViewManager diff --git a/ios/RN/RNCameraManager.m b/ios/RN/RNCameraManager.m index fc4b7f0..0e067c0 100644 --- a/ios/RN/RNCameraManager.m +++ b/ios/RN/RNCameraManager.m @@ -54,6 +54,7 @@ RCT_EXPORT_VIEW_PROPERTY(onFacesDetected, RCTDirectEventBlock); @"720p": @(RNCameraVideo720p), @"480p": @(RNCameraVideo4x3), @"4:3": @(RNCameraVideo4x3), + @"288p": @(RNCameraVideo288p), }, @"VideoCodec": [[self class] validCodecTypes], @"BarCodeType" : [[self class] validBarCodeTypes], diff --git a/ios/RN/RNCameraUtils.m b/ios/RN/RNCameraUtils.m index 6457313..157c048 100644 --- a/ios/RN/RNCameraUtils.m +++ b/ios/RN/RNCameraUtils.m @@ -87,6 +87,8 @@ return AVCaptureSessionPreset1280x720; case RNCameraVideo4x3: return AVCaptureSessionPreset640x480; + case RNCameraVideo288p: + return AVCaptureSessionPreset352x288; default: return AVCaptureSessionPresetHigh; }