Closed bennokress closed 1 year ago
I honestly don't know if a public extension on AVCaptureDevice
is the best way to solve this, but I decided to use it in order to be able to provide the "best" camera as a default parameter that is compatible with the current implementation. Let me know if you would like me to implement it differently.
@NathanFallet - This fix caused a bug with iPhone 12 Pro and 13 Pro. We faced issue that the camera cannot focus the code-128 on a device. I had to change videCaptureDevice to AVCaptureDevice.default(for: .video) in order to work as expected.
@emog Okay, that's a problem, but changing it back to AVCaptureDevice.default(for: .video)
will just bring back the original issue of #89. It would be best to find a solution inside the new AVCaptureDevice. bestForVideo
that fixes your problem and also works for iPhone 14 Pro and future devices.
I'm reopening #89 until we find an appropriate solution then.
Autofocus on devices that are equipped with an Ultra Wide Camera seems to be off using the default Camera. This is why we select the Ultra Wide Camera per default now.
Fixes #89