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

getUserMedia threw exception :TypeError: navigator.getUserMedia is not a function #34

Closed
pauljuneau opened this issue Aug 13, 2020 · 2 comments

Comments

@pauljuneau
Copy link

Hello. Your app is really cool. It was working for me on my Windows 10 PC the other day via Chrome, and now it no longer works. I received the error provided in the title when I when to your app site, http://webaudiodemos.appspot.com/pitchdetect/, and clicked on the 'use live input' button. I tried using Microsoft Edge and the issue still occurred there as well.

@karx
Copy link

karx commented Oct 4, 2020

Hi @pauljuneau. I looked into why was this happening, and the thing is:

Chrome is requiring secure origins (HTTPS) for getUserMedia.

Starting with Chrome 47, getUserMedia() requests are only allowed from secure origins: HTTPS or localhost.

https://developers.google.com/web/updates/2015/10/chrome-47-webrtc?hl=en
I found many discussions regarding the same including here: WebDevSimplified/Face-Detection-JavaScript#9

If you simply use https instead of http for the site, it should work like a charm.
In the repo I see that the README links to https version of the site, however the url provided for project in GitHub sidebar is http version. Maybe the maintainers can update it to https

@pauljuneau
Copy link
Author

Thanks @karx ! That resolved the issue!

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

2 participants