createCapture() produces getUserMedia error on iOS Chrome even on HTTPS

I have noticed that a sketch I’m working on, which uses createCapture() to access the webcam, hasn’t been working on Chrome on my iPhone (version 83.0,4103.88). I noticed this issue on GitHub that addresses the problem. The solution notes that, as per a new Chrome specification, code that uses getUserMedia must be run on an HTTPS server. I notice that the problem persists, however, even if the code is run on HTTPS.

I was able to reproduce this problem using this example on the p5.js website, which indeed runs off of HTTPS. On Chrome on iOS, the webcam fails to open, and the javascript console shows this error:

LOG Error: getUserMedia is not implemented in this browser

Curiously, this error doesn’t occur at all on the desktop version of Chrome. For what it’s worth, it works fine in iOS Safari as well.

If anyone out there could at least confirm that this error is happening on their mobile Chrome browser, that would be great. Better yet, if anyone has any ideas for how to get around this, it would be much appreciated. Thank you.

Hello @crafah,

This is a known problem. Apple does not give third-party browsers on iOS access to the webcam via MediaDevices.getUserMedia(). There are no workarounds, other than to use Safari. This is something Apple has to fix.

Here’s the open bugs in Chromium and WebKit if you want to track the development.

Thanks! That saves me some time trying to troubleshoot it for myself. I assume Chrome in Android would work just fine, then.

Yes, it should work on Android since Chrome version 52, according to this page. I can confirm the example you linked to worked fine for me, at least.

1 Like