camera-preview icon indicating copy to clipboard operation
camera-preview copied to clipboard

Change resizeAspectFill to a configuration property

Open jcroucher opened this issue 3 years ago • 1 comments
trafficstars

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.

jcroucher avatar Dec 03 '21 00:12 jcroucher

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.

J-Gonzalez avatar Mar 22 '22 06:03 J-Gonzalez