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

No webcam/microphone Cannot read property 'enumerateDevices' and getusermedia in JS #61

Open
dotbloup opened this issue Jun 12, 2021 · 1 comment

Comments

@dotbloup
Copy link

The access to webcam and microphone aren't working. I get the following error in the console.

index.js:2 TypeError: Cannot read property 'enumerateDevices' of undefined
at index.js:2
at Generator.next ()
at index.js:2
at new Promise ()
at mn (index.js:2)
at bn (index.js:2)
at index.js:2
at Generator.next ()
at index.js:2
at new Promise ()
(anonymous) @ index.js:2
(anonymous) @ index.js:2
mn @ index.js:2
bn @ index.js:2
(anonymous) @ index.js:2
(anonymous) @ index.js:2
mn @ index.js:2
wn @ index.js:2
(anonymous) @ index.js:2
(anonymous) @ index.js:2
mn @ index.js:2
Sn @ index.js:2
(anonymous) @ index.js:2
(anonymous) @ index.js:2
mn @ index.js:2
kn @ index.js:2
mediaOn @ index.js:2
onClick @ index.js:2
Ve @ index.js:2
Ke @ index.js:2
(anonymous) @ index.js:2
Er @ index.js:2
Cr @ index.js:2
(anonymous) @ index.js:2
Le @ index.js:2
(anonymous) @ index.js:2
Nr @ index.js:2
Jt @ index.js:2
Xt @ index.js:2
t.unstable_runWithPriority @ index.js:2
Vi @ index.js:2
Me @ index.js:2
Gt @ index.js:2
Show 3 more frames
index.js:2 TypeError: Cannot read property 'getUserMedia' of undefined
at index.js:2
at Generator.next ()

image

@dotbloup
Copy link
Author

dotbloup commented Jun 12, 2021

I solved it.

I guess the problem comes from the fact that I access the server using HTTP rather than HTTPS.
For other people in my situation:

Navigate to chrome://flags/#unsafely-treat-insecure-origin-as-secure in Chrome.
Find and enable the Insecure origins treated as secure section (see below).
Add any addresses you want to ignore the secure origin policy for. Remember to include the port number too (if required).
Save and restart Chrome.

image

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

1 participant