capacitor-community / capacitor-community/camera-preview
Change resizeAspectFill to a configuration property
Open
- Dominant language
- Java
- Stars
- 227
- Forks
- 185
- PR merge metrics
- No merged PRs in 30d
Description
CameraController file function displayPreview
There is a line
`self.previewLayer?.videoGravity = AVLayerVideoGravity.resizeAspectFill`
This looks good, but it means that the viewfinder doesn't accurately represent the picture being taken. There is more to the left and right of the image than the viewfinder shows.
For my project, I needed to change it to
`self.previewLayer?.videoGravity = AVLayerVideoGravity.resizeAspect`
This fixes my issue, but it would be good if this was a property.
This may also help with some of the zoom issues people are having.
Contributor guide
Assessment
This issue has not been assessed yet.