escully27 commented on issue #816:
URL: 
https://github.com/apache/cordova-plugin-camera/issues/816#issuecomment-2033363051

   This is actually possible with current cordova-plugin-camera
   
   Just have to change the following function in CDVCamera.m
   
   ```
   + (instancetype) createFromPictureOptions:(CDVPictureOptions*)pictureOptions;
   {
       CDVCameraPicker* cameraPicker = [[CDVCameraPicker alloc] init];
       cameraPicker.pictureOptions = pictureOptions;
       cameraPicker.sourceType = pictureOptions.sourceType;
       cameraPicker.allowsEditing = pictureOptions.allowsEditing;
   
       if (cameraPicker.sourceType == UIImagePickerControllerSourceTypeCamera) {
           // We only allow taking pictures (no video) in this API.
           cameraPicker.mediaTypes = [UIImagePickerController 
availableMediaTypesForSourceType:cameraPicker.sourceType];
           // We can only set the camera device if we're actually using the 
camera.
           cameraPicker.cameraDevice = pictureOptions.cameraDirection;
           cameraPicker.videoQuality = UIImagePickerControllerQualityTypeHigh;
       } else if (pictureOptions.mediaType == MediaTypeAll) {
           cameraPicker.mediaTypes = [UIImagePickerController 
availableMediaTypesForSourceType:cameraPicker.sourceType];
       } else {
           NSArray* mediaArray = @[(NSString*)(pictureOptions.mediaType == 
MediaTypeVideo ? kUTTypeMovie : kUTTypeImage)];
           cameraPicker.mediaTypes = mediaArray;
       }
   
       return cameraPicker;
   }
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to