Skip to content

Commit 1a40478

Browse files
author
Silvan Adrian
committed
fix: video quality on ios
1 parent 5b82637 commit 1a40478

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/ios/CDVCamera.m

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

297297
if(![cameraPicker.mediaTypes containsObject:(NSString*)kUTTypeImage]){
@@ -743,6 +743,9 @@ + (instancetype) createFromPictureOptions:(CDVPictureOptions*)pictureOptions;
743743
NSArray* mediaArray = @[(NSString*)(pictureOptions.mediaType == MediaTypeVideo ? kUTTypeMovie : kUTTypeImage)];
744744
cameraPicker.mediaTypes = mediaArray;
745745
}
746+
if (@available(iOS 11.0, *)) {
747+
cameraPicker.videoExportPreset = AVAssetExportPreset1920x1080; //full hd
748+
}
746749

747750
return cameraPicker;
748751
}

0 commit comments

Comments
 (0)