Merge pull request #1523 from fagerbua/ios-288p-video

Support CIF (288p) video quality on iOS
This commit is contained in:
João Guilherme Fidelis
2018-04-26 11:27:04 -03:00
committed by GitHub
4 changed files with 7 additions and 0 deletions
+3
View File
@@ -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:
+1
View File
@@ -44,6 +44,7 @@ typedef NS_ENUM(NSInteger, RNCameraVideoResolution) {
RNCameraVideo1080p = 1,
RNCameraVideo720p = 2,
RNCameraVideo4x3 = 3,
RNCameraVideo288p = 4,
};
@interface RNCameraManager : RCTViewManager <RCTBridgeModule>
+1
View File
@@ -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],
+2
View File
@@ -87,6 +87,8 @@
return AVCaptureSessionPreset1280x720;
case RNCameraVideo4x3:
return AVCaptureSessionPreset640x480;
case RNCameraVideo288p:
return AVCaptureSessionPreset352x288;
default:
return AVCaptureSessionPresetHigh;
}