Skip to content

fix(ios): video quality #760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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