Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use front camera #4

Closed
seth35us opened this issue Jun 11, 2021 · 5 comments · May be fixed by #51
Closed

Unable to use front camera #4

seth35us opened this issue Jun 11, 2021 · 5 comments · May be fixed by #51

Comments

@seth35us
Copy link

First thanks for such a great plugin.

I am trying to figure out how to get the front camera to work. I tried setting the CameraPosition.front, but it doesn't seem to work. I have included the relevant code below. Any ideas how to fix this?

`return BarcodeCamera(
types: barcodeTypes,

  resolution: Resolution.hd720,
  framerate: Framerate.fps30,
  position: CameraPosition.front,

...
);`

@allanwolski
Copy link

I have the same problem here.

@jhoogstraat
Copy link
Owner

Hi, great to hear that you like it!

You cannot use the front camera on Android, because I didn't implement it, yet. On iOS it should work.

I am not an Android developer, so it is always quite a bit of research required to develop the plugin further. I will look into it, with CameraX it might me easier that with Camera2.

@jhoogstraat
Copy link
Owner

I pushed a new version (1.1.1) which should fix this.

Please confirm, so I can close this issue.

@seth35us
Copy link
Author

Your change works great! Thank you very much. Only issue is that the CameraController.instance.changeCamera(cameraPosition) did not work. I was able to work around it with a ValueNotifier.

@jhoogstraat
Copy link
Owner

Oh well that method is not implemented yet on the native side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants