Cordoba Camera is locked only in portrait

I am developing a hybrid ipad application (ionic infrastructure) that uses a Cordova camera, I manage to start the camera and return the image, but the problem is that the camera always locks with portrait mode, regardless of how the iPad rotates, below are my codes

navigator.camera.getPicture(function(data){

}, function(error){

}, {
    quality : 75, 
    destinationType : Camera.DestinationType.DATA_URL, 
    sourceType : Camera.PictureSourceType.CAMERA, 
    allowEdit : true,
    encodingType: Camera.EncodingType.JPEG,
    targetWidth: 512,
    targetHeight: 384,
    popoverOptions: CameraPopoverOptions,
    saveToPhotoAlbum: false,
    correctOrientation: true
});

I also set "Landscape Left" and "Landscape Right" in the Xcode project

I also set the portrait only in the config.xml file for the ion project, below are the codes,

<preference name="orientation" value="landscape" />

Hope someone help me fix this issue. thanks in advance

+4
source share

Source: https://habr.com/ru/post/1648645/


All Articles