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

navigator.mediaDevices.enumerateDevices() is undefined on Linux #25

Open
loloof64 opened this issue Feb 7, 2023 · 2 comments
Open

navigator.mediaDevices.enumerateDevices() is undefined on Linux #25

loloof64 opened this issue Feb 7, 2023 · 2 comments

Comments

@loloof64
Copy link

loloof64 commented Feb 7, 2023

Is your feature request related to a problem? Please describe.
As I plan to develop an application based on WebRTC, I've been checking the function navigator.mediaDevices.enumerateDevices(), but when testing it on Linux (Ubuntu in my case), I got an error Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'navigator.mediaDevices.enumerateDevices')

Describe the solution you'd like
When calling navigator.mediaDevices.enumerateDevices(), I should get the list of media devices available on the guest OS, like in a standard Web navigator.

For example

await navigator.mediaDevices.getUserMedia({audio: true, video: true});

Describe alternatives you've considered
I don't have any alternative.

Additional context
I don't have any additional context.

@fix
Copy link

fix commented Feb 7, 2023

I think it is plateform related.

Check here the interesting compatibility review https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices
For instance your ubuntu webview might be old dated and can be accessed using a different prefix (directly from navigator, or using webkit/moz prefix)

@progandy
Copy link

navigator.mediaDevices. works with a recent webkit2gtk (I have 2.40.5), but the webview project needs to respond to the permission requests to allow access.

webview#775

@shalithasuranga shalithasuranga transferred this issue from neutralinojs/neutralinojs May 29, 2024
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

No branches or pull requests

3 participants