[ 
https://issues.apache.org/jira/browse/CB-13866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16429773#comment-16429773
 ] 

ASF GitHub Bot commented on CB-13866:
-------------------------------------

jcesarmobile closed pull request #93: CB-13866(ios): fix Camera opens in 
portrait orientation on iphones
URL: https://github.com/apache/cordova-plugin-media-capture/pull/93
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/ios/CDVCapture.m b/src/ios/CDVCapture.m
index 7ab0832..f2fe258 100644
--- a/src/ios/CDVCapture.m
+++ b/src/ios/CDVCapture.m
@@ -158,7 +158,7 @@ - (void)captureImage:(CDVInvokedUrlCommand*)command
         }*/
         // CDVImagePicker specific property
         pickerController.callbackId = callbackId;
-
+        pickerController.modalPresentationStyle = 
UIModalPresentationCurrentContext;
         [self.viewController presentViewController:pickerController 
animated:YES completion:nil];
     }
 }
@@ -272,7 +272,7 @@ - (void)captureVideo:(CDVInvokedUrlCommand*)command
         }
         // CDVImagePicker specific property
         pickerController.callbackId = callbackId;
-
+        pickerController.modalPresentationStyle = 
UIModalPresentationCurrentContext;
         [self.viewController presentViewController:pickerController 
animated:YES completion:nil];
     }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Camera opens in portrait orientation on iphones
> -----------------------------------------------
>
>                 Key: CB-13866
>                 URL: https://issues.apache.org/jira/browse/CB-13866
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-ios, cordova-plugin-media-capture
>    Affects Versions: cordova-ios 4.5.0
>         Environment: Cordova 7.1.0, Cordova 8.0.0
> iOS 9, 10, 11
> cordova-ios 4.5.x
>  
>            Reporter: jcesarmobile
>            Assignee: jcesarmobile
>            Priority: Major
>
> Using app in landscape on iphone and open the camera using a plugin 
> (cordova-plugin-media-capture).  The camera opens in portrait mode.  Dialogs 
> to request permissions are therefore rotated, as is button text.
> Replicated with HelloCordova app with addition of 
> cordova-plugin-media-capture.
> Using cordova-plugin-screen-orientation, we can see that an event to change 
> the orientation to portrait-primary is fired when the camera is opened.
>  
> Does not affect ipads.
>  
>  
>    



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to