camera-preview
camera-preview copied to clipboard
Change resizeAspectFill to a configuration property
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.
Watching this issue as we do seem to get inconsistent results between IOS and Android and are unable to correctly capture an image due to the different sizes.