twostraws / CodeScanner

A SwiftUI view that is able to scan barcodes, QR codes, and more, and send back what was found.
MIT License
1.01k stars 286 forks source link

Front camera option #54

Closed maikelsgit closed 2 years ago

maikelsgit commented 2 years ago

I would like to use the codescanner on my iPad and use the front facing camera. Can you please add the option to select the front facing camera.

Thanks!!

cymr0 commented 2 years ago

I think a recent update means you can already do this with the videoCaptureDevice parameter:

videoCaptureDevice: AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .front),

I think this gives you what you need? Hope this helps.

daver234 commented 2 years ago

This worked for me. Thanks.

nathanfallet commented 2 years ago

Checked, it as been added as a parameter in the initializer.