[ https://issues.apache.org/jira/browse/CB-6135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13922099#comment-13922099 ]
Ralph S Theart commented on CB-6135: ------------------------------------ since update to 3.4 everything the load time is normal. > Camera api takes long time to return uri when using > Camera.DestinationType.FILE_URI > ----------------------------------------------------------------------------------- > > Key: CB-6135 > URL: https://issues.apache.org/jira/browse/CB-6135 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Camera > Affects Versions: 3.3.0 > Reporter: Ralph S Theart > Labels: camera, ios > Fix For: 3.4.0 > > > For some reason there is a slight pause(it's very noticeable, almost seems > like app is about to crash) when choosing an image from the photo library > when use FILE_URI...if I use NATIVE_URL when I choose a picture there is no > such pause. > Here is some code: > captureImage: function(){ > > var onPhotoFail = function(message){ > //console.log(message); > } > > var pictureSource; // picture source > var destinationType; // sets the format of returned value > > var onPhotoConfirm = function(buttonIndex){ > > destinationType = Camera.DestinationType.NATIVE_URI; > > switch(buttonIndex) > { > case 1: > pictureSource= > Camera.PictureSourceType.CAMERA; > break; > case 2: > pictureSource= > Camera.PictureSourceType.PHOTOLIBRARY; > break; > } > if(buttonIndex == 1 || buttonIndex == 2){ > > navigator.camera.getPicture(Messaging.createFileEntry, onPhotoFail, { > destinationType: 1, > sourceType: pictureSource, > mediaType : Camera.MediaType.ALLMEDIA, > /* encodingType: Camera.EncodingType.JPEG, > */ > allowEdit : false, > saveToPhotoAlbum: false, > quality: 50 > }); > } > } > urapp.notify.confirm('Image Capture','What would you like to > do?',["Take Photo","Choose Existing", 'Cancel'],onPhotoConfirm); > }, -- This message was sent by Atlassian JIRA (v6.2#6252)