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

Camera name not visible in android webview #9053

Closed
MudrekaBohra opened this issue Apr 13, 2020 · 10 comments · Fixed by #12700
Closed

Camera name not visible in android webview #9053

MudrekaBohra opened this issue Apr 13, 2020 · 10 comments · Fixed by #12700

Comments

@MudrekaBohra
Copy link

Hi everyone,
I hope you all are doing well and wish you good health.
I was able to successfully implement the BBB in android webview and it works fine and all components are also working fine but when i turn on video the select camera and video quality popup appears the error is that the camera name label are not visible, i can still switch between the front and back camera but the name of the camera in select tag is not visible screenshots attached bellow
please suggest any quick and dirty way of solving this maybe by providing generic name like camera 1 and camera 2 ......

bug1
bug2

@mjohenneken
Copy link

Hi, I'm trying exactly the same and run into the same problem. I'm not sure if this is a problem of BBB, as on other devices it works as expected. I assume BBB is using the outputs of navigator.mediaDevices.enumerateDevices() for the dialog?

@mjohenneken
Copy link

If that is the case the problem is probably caused by this bug in WebView https://bugs.chromium.org/p/chromium/issues/detail?id=669492

@mjohenneken
Copy link

From the bug report:

The enumerateDevices spec states that when the origin does not have access to the devices, enumerateDevices should return empty labels.

As empty labels could be a valid case I would suggest enumerating the choices so that the user can differ them better.

@MudrekaBohra
Copy link
Author

yes is there a way so that when an empty label is given we can assign generic value to it such as camera 1 for front and camera 2 for back

@aolee
Copy link

aolee commented Jun 11, 2020

Hi everyone, anyone manage to at least successfully set the camera label as a workaround?

@pablogeek
Copy link

Hello, I'm also having this issue. any thoughts if we can actually do anything from our side?

@mjohenneken
Copy link

Looks like a easy fix in UI code of the html5client. From the bare number of issues open in this project i would assume someone digs into code, finds where the API call to the device enumeration is, inserts a provides default labels in case of empty labels and creates a pull request for the community.

In Android you could try to check if the WebViewClient or ChromeClient has methods to intercept the construction of the native views somhow and provide default labels that way. But that's not a nice solution and doesn't help other people also having this problem.

@prlanzarin
Copy link
Member

i would assume someone digs into code, finds where the API call to the device enumeration is, inserts a provides default labels in case of empty labels and creates a pull request for the community.

Yes.
Should be a straightforward fix. If someone wants to submit a label fallback, I'd gladly review it.
See:
https://github.com/bigbluebutton/bigbluebutton/blob/v2.2.x-release/bigbluebutton-html5/imports/ui/components/video-preview/component.jsx#L525
This is where the label is rendered. It'd suffice to add a fallback method (ie generateFallbackCameraLabel) which gets a localized placeholder name (ie Camera {0}) and assigns the camera index+1 (ie Camera 1, Camera 2, Camera 3...) to the label.

@phamquocthinh
Copy link

@mjohenneken
Hello, could you please tell me where's the file i need to edit to do that trick on bbb server? I work around but still not found where the folder bbb-html5 located in.
Many thanks.

@mjohenneken
Copy link

The comment by prlanzarin should guide you in the right direction.

prlanzarin added a commit to prlanzarin/bigbluebutton-1 that referenced this issue Apr 5, 2021
In cases where fingerprinting protection is so adamant that we cant get the devices´ labels OR there´s a bug in the environment (ahem Android WebView), fall back to Camera {index} as the label

Fixes bigbluebutton#9053
@prlanzarin prlanzarin self-assigned this Apr 5, 2021
@prlanzarin prlanzarin added this to the Release 2.3 milestone Apr 5, 2021
@prlanzarin prlanzarin added this to To do in Media stack via automation May 31, 2021
prlanzarin added a commit to prlanzarin/bigbluebutton-1 that referenced this issue Jul 1, 2021
In cases where fingerprinting protection is so adamant that we can't get
the device labels

Fixes bigbluebutton#9053
prlanzarin added a commit to prlanzarin/bigbluebutton-1 that referenced this issue Jul 1, 2021
In cases where fingerprinting protection is so adamant that we are
unable to get device labels and/or IDs

Fixes bigbluebutton#9053
prlanzarin added a commit to prlanzarin/bigbluebutton-1 that referenced this issue Jul 2, 2021
In cases where fingerprinting protection is so adamant that we are
unable to get device labels

Fixes bigbluebutton#9053
prlanzarin added a commit to prlanzarin/bigbluebutton-1 that referenced this issue Jul 2, 2021
In cases where fingerprinting protection is so adamant that we are
unable to get device labels

Fixes bigbluebutton#9053
@prlanzarin prlanzarin removed this from the Release 2.3 milestone Jul 2, 2021
prlanzarin added a commit to prlanzarin/bigbluebutton-1 that referenced this issue Jul 5, 2021
In cases where fingerprinting protection is so adamant that we are
unable to get device labels

Fixes bigbluebutton#9053
Media stack automation moved this from To do to Done Jul 5, 2021
pedrobmarin added a commit that referenced this issue Jul 5, 2021
Webcams: reduce number of gUM calls, refactor in video-preview, fix #9053
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment