Skip to content

Commit 3e3bd81

Browse files
author
Silvan Adrian
committed
fix(ios): video quality
1 parent 5b82637 commit 3e3bd81

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ios/CDVCamera.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ - (void)displayPopover:(NSDictionary*)options
279279
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
280280
{
281281
if([navigationController isKindOfClass:[UIImagePickerController class]]){
282-
283282
// If popoverWidth and popoverHeight are specified and are greater than 0, then set popover size, else use apple's default popoverSize
284283
NSDictionary* options = self.pickerController.pictureOptions.popoverOptions;
285284
if(options) {
@@ -290,8 +289,6 @@ - (void)navigationController:(UINavigationController *)navigationController will
290289
[viewController setPreferredContentSize:CGSizeMake(popoverWidth,popoverHeight)];
291290
}
292291
}
293-
294-
295292
UIImagePickerController* cameraPicker = (UIImagePickerController*)navigationController;
296293

297294
if(![cameraPicker.mediaTypes containsObject:(NSString*)kUTTypeImage]){
@@ -743,6 +740,9 @@ + (instancetype) createFromPictureOptions:(CDVPictureOptions*)pictureOptions;
743740
NSArray* mediaArray = @[(NSString*)(pictureOptions.mediaType == MediaTypeVideo ? kUTTypeMovie : kUTTypeImage)];
744741
cameraPicker.mediaTypes = mediaArray;
745742
}
743+
if (@available(iOS 11.0, *)) {
744+
cameraPicker.videoExportPreset = AVAssetExportPreset1920x1080; //full hd
745+
}
746746

747747
return cameraPicker;
748748
}

0 commit comments

Comments
 (0)