2

I want to customize the default ionic camera option. I would like to do the following changes to it.

  1. Remove the preview, which shows the captured photo, along with 'Use Photo' or 'Retake' buttons.
  2. add a custom overlay on the top of camera, indicating the capture region, so that the user can keep the target with in that region
  3. If possible, auto capture the image, after few seconds(after user aligns the target with in the capture region), instead of user having to click on Capture button.

Can someone guide me on how to achieve this?

Pls let me know if you need more details.

Thanks.

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
csharpnewbie
  • 789
  • 2
  • 12
  • 33

2 Answers2

1

I was able to implement #1 and #2, for ios. I used the details from the github post https://github.com/performanceactive/phonegap-custom-camera-plugin. Thanks to the github author.
Am still not able to achieve #3 successfully. I have an object, which needs to be placed with in the square markers, post which I need to auto focus and capture the image automatically, without having to click Capture. I tried using the observor for 'adjustingFocus' but what it does is that, it automatically captures from the camera in few seconds, and does not matter if the object is placed with in the markers or not. Can someone guide me on the same?

csharpnewbie
  • 789
  • 2
  • 12
  • 33
0

I have used this forked github project for camera overview. take a look to take picture function of it. you can call it manually or periodically.

CameraPreview.takePicture(function(base64PictureData){
  /* code here */
});

https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview

coenni
  • 437
  • 4
  • 14
  • I think this is just adding a preview and not customizing the camera view. As I mentioned, I used the details from the github post https://github.com/performanceactive/phonegap-custom-camera-plugin, but it automatically captures from the camera in few seconds, and does not matter if the object is placed with in the markers or not. Can you pls guide me on this? – csharpnewbie Mar 28 '17 at 13:52