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

Compatibility - Android WebView - Missing camera labels on camera selector #578

Closed
mikolajtutorum opened this issue Nov 4, 2022 · 6 comments
Assignees

Comments

@mikolajtutorum
Copy link

Describe the bug
Missing camera labels on camera selector and camera name on when selection is made within Android WebView App. Code based on Laravel PHP. No alternative display present like "Camera 1", "Camera 2" and so on if labels not found.

Describe the browser:

  • OS: Android
  • Browser: WebView

Screenshots
Actual result:
https://i.imgur.com/C0vL5Tk.png

Expected result:
https://i.imgur.com/uIZpoRU.png

@mikolajtutorum mikolajtutorum changed the title Compatibility - [OS] [Browser] - [What is not working] Compatibility - Android WebView - Missing camera labels on camera selector Nov 4, 2022
@ROBERT-MCDOWELL
Copy link

I'm not sure webview has camera/mic access anyhow....

@mikolajtutorum
Copy link
Author

I'm not sure webview has camera/mic access anyhow....

If the app asks for video/audio permissions it does work. That includes this QR Reader. Only issue is getting the labels for camera names and if they are front or back facing. It shows up in regular browser apps like Chrome, Firefox, UC Browser, Opera.

@mebjas
Copy link
Owner

mebjas commented Nov 4, 2022

I'd like to try this out. Is there a reference project on Github I could quickly debug this on?

(It might be useful to add one for everyone's reference)

@mebjas mebjas self-assigned this Nov 4, 2022
@mebjas
Copy link
Owner

mebjas commented Nov 4, 2022

I am able to reproduce this in DuckDuckGo browser.

Will try to implement something there!

Target version: V2.2.8

@mebjas
Copy link
Owner

mebjas commented Nov 4, 2022

Prototyped it will look like this

Before selection After selection
Screenshot_20221105-005544 Screenshot_20221105-005550

mebjas added a commit that referenced this issue Nov 4, 2022
#### Custom camera labels when not available.
In certain browsers as well as cases like Android Webview it looks like camera
name is not returned by the browser. In such cases the camera selection has
empty named options.

To make the UX better, the library will give custom names to the cameras.

-   Github Issue: [Issue#578](#578)

For example in Duck Duck Go browser which has this behavior, it will look like
this

| Before selection | After selection |
| --- | --- |
| ![Screenshot_20221105-005544](https://user-images.githubusercontent.com/3007365/200032567-eb50b4f0-e25f-4bdb-a233-fcbb906122aa.png) | ![Screenshot_20221105-005550](https://user-images.githubusercontent.com/3007365/200032557-21679229-3d21-4212-a22f-1f2558b6f6b6.png) |
mebjas added a commit that referenced this issue Nov 4, 2022
#### Custom camera labels when not available.
In certain browsers as well as cases like Android Webview it looks like camera
name is not returned by the browser. In such cases the camera selection has
empty named options.

To make the UX better, the library will give custom names to the cameras.

-   Github Issue: [Issue#578](#578)

For example in Duck Duck Go browser which has this behavior, it will look like
this

| Before selection | After selection |
| --- | --- |
| ![Screenshot_20221105-005544](https://user-images.githubusercontent.com/3007365/200032567-eb50b4f0-e25f-4bdb-a233-fcbb906122aa.png) | ![Screenshot_20221105-005550](https://user-images.githubusercontent.com/3007365/200032557-21679229-3d21-4212-a22f-1f2558b6f6b6.png) |
@mebjas
Copy link
Owner

mebjas commented Nov 4, 2022

Published the feature in v2.2.8

Please update the library and verify!

Closing this issue, please reopen if you see some issue.

@mebjas mebjas closed this as completed Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants