Ar.js: WebRTC Issue - Navigator.MediaDevice is not presented in your device.

Created on 4 Feb 2019  路  19Comments  路  Source: jeromeetienne/AR.js

When I'm trying to load the example I see the error:
WebRTC Issue-!
navigator.mediaDevice not present in your browser.

I had no this error 2 weeks ago.

img_4990

  • OS: iOS 12.0.1 (16A404)
  • Brower: Safari

Most helpful comment

Just in case it's helpful to anyone I was getting this same error when trying to run an example from my phone (Chrome) from my IP. I was getting this error and there was no prompt to give camera permissions.
Apparently, Chrome won't ask for permissions when running a site from http so I solved this problem by running my example from ngrok using https. Works now.

All 19 comments

maybe you have denied the app the access to your camera when it prompted you ?

Would there be a way to undo that @nicolocarpignoli, in the Settings app for example?

I have an older iPad here where I get the same error message. It is running iOS 9.3.5 with Safari 9.0 - can this also be caused by older iOS and Safari versions?

Hi @janpio , searching a little bit on the web, I found that mediaDevices is fully supported on iOS from 11+.

So, if iOS is 11+, Safari (instead of Chrome that not asks every time for camera permissions) will ask the user for camera usage at EVERY refresh of the app. If not, try to clear Safari cache.
That error, anyway, could mean two things: mediadevices is not supported or you have previously denied accesso to that website for your camera. :)

+1 thanks @nicolocarpignoli good call. Safari prompts for authorization whereas Chrome does not.

Weird I am pretty sure that Safari did promt for camera...
But it is different from Safari and IOS versions I guess.

This is the same issue as #476.

From your screenshot, I see the back button in the top left corner, which means that the page is open in an embedded WKWebView inside of another app, and is not actually full Safari. You'll need to open the page with the regular Safari app.

For a full explanation see this comment.

Just in case it's helpful to anyone I was getting this same error when trying to run an example from my phone (Chrome) from my IP. I was getting this error and there was no prompt to give camera permissions.
Apparently, Chrome won't ask for permissions when running a site from http so I solved this problem by running my example from ngrok using https. Works now.

@keyserfaty that was exactly my problem. Thanks!

Just in case it's helpful to anyone I was getting this same error when trying to run an example from my phone (Chrome) from my IP. I was getting this error and there was no prompt to give camera permissions.
Apparently, Chrome won't ask for permissions when running a site from http so I solved this problem by running my example from ngrok using https. Works now.

That solved my problem, thanks @keyserfaty !

Change the file protocol to https:// or something secure. This is because of the new updates from google chrome. I found this to work for me. Just basically adding https:// to the beginning of my link

same here, adding https solved the issue.

After new update, Safari again shows same error on iOS. Https does not help. Any solution?

I'm having the same issue on Chrome on the latest generation of iPhones.

Works on Pixel 3 (Android 10) and older iPhones and iPads on both pre and post iOS13 versions.

Running the demo over https but get WebRTC issue-! on new iPhones. Could this be hardware related?

Screenshot 2020-02-10 at 15 57 26

Would it be worth a PR to check for https before displaying the navigator.mediaDevices not present message?

Change the file protocol to https:// or something secure. This is because of the new updates from google chrome. I found this to work for me. Just basically adding https:// to the beginning of my link

Worked for me too.

Chrome on ios does not support camera access. Chrome problem. PLease use safari on iphones and ipads

Firefox on iOS is having this problem too!

Any browser on iOS that is not Safari will NOT work.

In addition to @andreyrd's answer, the reason why all browsers other than Safari have this problem is because all of them (have to) use WebKit. Now WebKit has a bug where gutUserMedia fails. So this AR.js issue cannot be fixed until the WebKit problem is solved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shigenobu-kondo picture shigenobu-kondo  路  6Comments

nicolocarpignoli picture nicolocarpignoli  路  3Comments

quistuipater picture quistuipater  路  7Comments

Suresh3d picture Suresh3d  路  7Comments

Rawphs picture Rawphs  路  6Comments