Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Is there any way to capture the image with front camera? #19

Open
lightning331 opened this issue Feb 12, 2020 · 8 comments · May be fixed by #21
Open

Is there any way to capture the image with front camera? #19

lightning331 opened this issue Feb 12, 2020 · 8 comments · May be fixed by #21
Labels
enhancement New feature or request

Comments

@lightning331
Copy link

No description provided.

@lightning331 lightning331 changed the title Is there any way to capture the front camera? Is there any way to capture the image with front camera? Feb 12, 2020
@humphreyja
Copy link
Member

@lightning331 This is something that can be added pretty easily at some point. I have to ask though, what is your use case for something like this?

@lightning331
Copy link
Author

I am developing an app scanning ID Card at the moment.
It has to take the feature of the front camera.
Can you do it?

@humphreyja
Copy link
Member

Ahh ok that makes sense. I've always wondered why this would exist which is why I didn't include it as a feature. Ok yeah I can add this. I'm thinking it might be beneficial for some more configuration on selecting the camera here (so you can choose the super wide angle lens on iPhone 11 instead of the generic camera). I'll see if I can get something working for you in the next week.

@humphreyja humphreyja added the enhancement New feature or request label Feb 13, 2020
@humphreyja humphreyja linked a pull request Feb 17, 2020 that will close this issue
@humphreyja
Copy link
Member

@lightning331 Could you try out PR #21? It adds support for different camera types.
For your case, you should just be able to set cameraId={2} to get the front facing camera.

Just a note, Android is a bit finicky. Maybe it's an issue with the older camera api but I couldn't figure out how to change the camera after it has already been loaded. Basically what this means is that if you wanted to change the camera from front to back after it has already started, you need to unmount and remount it.

@lightning331
Copy link
Author

Ok, I will check.
Thanks @humphreyja

@Gricardov
Copy link

Ahh ok that makes sense. I've always wondered why this would exist which is why I didn't include it as a feature. Ok yeah I can add this. I'm thinking it might be beneficial for some more configuration on selecting the camera here (so you can choose the super wide angle lens on iPhone 11 instead of the generic camera). I'll see if I can get something working for you in the next week.

Chamo, cuándo lo tendrás listo? Muchas gracias

@humphreyja
Copy link
Member

@Gricardov Have you tried PR #21? I will probably merge this in this week.

@viceheo4
Copy link

viceheo4 commented Aug 9, 2024

react-native-rectangle-scanner+1.0.10.patch

If you need it, Pls, refer to the patch file attached below that I am using.

You can apply the attached patch file using the patch-package library.
https://www.npmjs.com/package/patch-package

*Below is my test project structure
patch_directory1

*Below is the scanner operator with the front camera
front_source

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants