This repository was archived by the owner on Jun 16, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 43
43
@property (nonatomic , assign ) BOOL canReadText;
44
44
@property (assign , nonatomic ) AVVideoCodecType videoCodecType;
45
45
@property (assign , nonatomic ) AVCaptureVideoStabilizationMode videoStabilizationMode;
46
- @property (assign , nonatomic ) NSInteger defaultVideoQuality;
46
+ @property (assign , nonatomic , nullable ) NSNumber * defaultVideoQuality;
47
47
48
48
- (id )initWithBridge : (RCTBridge *)bridge ;
49
49
- (void )updateType ;
Original file line number Diff line number Diff line change @@ -605,7 +605,9 @@ - (void)startSession
605
605
return ;
606
606
}
607
607
608
- AVCaptureSessionPreset preset = [RNCameraUtils captureSessionPresetForVideoResolution: [self defaultVideoQuality ]];
608
+ // Default video quality AVCaptureSessionPresetHigh if non is provided
609
+ AVCaptureSessionPreset preset = ([self defaultVideoQuality ]) ? [RNCameraUtils captureSessionPresetForVideoResolution: [[self defaultVideoQuality ] integerValue ]] : AVCaptureSessionPresetHigh;
610
+
609
611
self.session .sessionPreset = preset == AVCaptureSessionPresetHigh ? AVCaptureSessionPresetPhoto: preset;
610
612
611
613
AVCaptureStillImageOutput *stillImageOutput = [[AVCaptureStillImageOutput alloc ] init ];
Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ + (NSDictionary *)faceDetectorConstants
246
246
247
247
RCT_CUSTOM_VIEW_PROPERTY (defaultVideoQuality, NSInteger , RNCamera)
248
248
{
249
- [view setDefaultVideoQuality: ( NSInteger ) [ RCTConvert NSInteger: json]];
249
+ [view setDefaultVideoQuality: [ NSNumber numberWithInteger: [ RCTConvert NSInteger: json] ]];
250
250
}
251
251
252
252
RCT_REMAP_METHOD (takePicture,
You can’t perform that action at this time.
0 commit comments