cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ISSUE: navigator.mediaDevices undefined

I'm putting together a webapp that utilizes the user's audio inputs via the WebAudio/WebRTC APIs. I get the following error: 

 

    Uncaught TypeError: Cannot read property 'enumerateDevices' of undefined

 

'enumeratedDevices' (for those who don't know) is a method of the navigator.mediaDevices property. So I checked and sure enough, the navigator object does not contain the mediaDevices property. This property is only missing when I load the page from my domain. If I load it locally, the navigator.mediaDevices property is there, and everything works fine.

 

I've only tested this in Chrome so far, but my browser configured to allow the WebRTC API, and I don't see how the browser would make a difference anyway, as I'm using the same one to run both from my domain and locally. Is this is an issue with GoDaddy? Is there something I need to configure differently in my account?

2 REPLIES 2
Rockstar I Rockstar I
Rockstar I

Re: ISSUE: navigator.mediaDevices undefined

Hi @wcsguitar ,

 

What hosting platform are you using?  There are quite a few functions on cPanel installations that are not active by default in your php modules.  You may want to start by checking the setup there if you are using cPanel.

 

Hope this helps,

James

Not Just Pretty Sites, Pretty Doggone Smart Sites

Re: ISSUE: navigator.mediaDevices undefined

Thanks, James!

 

I dug a little deeper into the API, and it turns out the browser only makes the object available over a secure connection, particularly with Chrome. So, I need to either upgrade to https, or instruct anyone using it to do so over Firefox.

 

Otherwise, I'm currently using the economy Linux hosting with cPanel. I could definitely stand to learn more about what functionality this makes available to me.