capacitor-community / capacitor-community/camera-preview
Android - Gap between camera preview and capture base64
- Dominant language
- Java
- Stars
- 227
- Forks
- 185
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
Actually, i've 2 issues concerning capture() function and the live camera :
- On a first android mobile (Asus x00td / Android 8.1.0) that have only one back Camera, their is a gap between the live camera preview and the base64 capture.
Example (doesn't matter of the content)
At left: screenshot of my application
At right: the base64 image captured (The blue area = the gap that appear only in the capture)

- On the second android mobile with 2 back camera (Samsung A70 / Android 9), the live camera preview is the first back camera, and capture function is shot with the 2nd back camera.
At left: screenshot of my application
At right: the base64 image captured

Here is my configuration:
```
CameraPreview.start({
parent: "cameraPreview",
position: "rear",
camera: "rear"
});
```
I've tried to add x:0, y:0 or width=window.screen.width and height=window.screen.height but that change only on the web browser.
Regards,
Alban
Contributor guide
Assessment
This issue has not been assessed yet.