Skip to content

Commit

Permalink
fix(ios): nil video quality should resolve to default and not 0
Browse files Browse the repository at this point in the history
  • Loading branch information
ath0mas committed Mar 31, 2021
1 parent b51c8ec commit 87df9f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ios/CDVCapture.m
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ - (void)captureVideo:(CDVInvokedUrlCommand*)command
// iOS 4.0
if ([pickerController respondsToSelector:@selector(cameraCaptureMode)]) {
pickerController.cameraCaptureMode = UIImagePickerControllerCameraCaptureModeVideo;
switch ((int) ([quality doubleValue] * 10)) {
switch ((int) (quality ? [quality doubleValue] * 10 : -1)) {
case 0:
pickerController.videoQuality = UIImagePickerControllerQualityTypeLow;
break;
Expand Down

0 comments on commit 87df9f3

Please sign in to comment.