Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ios/CDVCamera.m
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ - (void)displayPopover:(NSDictionary*)options
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
if([navigationController isKindOfClass:[UIImagePickerController class]]){

// If popoverWidth and popoverHeight are specified and are greater than 0, then set popover size, else use apple's default popoverSize
NSDictionary* options = self.pickerController.pictureOptions.popoverOptions;
if(options) {
Expand All @@ -290,8 +289,6 @@ - (void)navigationController:(UINavigationController *)navigationController will
[viewController setPreferredContentSize:CGSizeMake(popoverWidth,popoverHeight)];
}
}


UIImagePickerController* cameraPicker = (UIImagePickerController*)navigationController;

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

return cameraPicker;
}
Expand Down