
Ask HN: Why do mobile browsers no longer support native camera input? - AndrewKemendo
It used to be the case that the W3 standard getusermedia API worked on mobile browsers. Since roughly a year or so ago this support was largely dropped, and there is no cross platform way to access the native camera inside a mobile browser with HTML5.<p>Does anyone know why this is not supported? Is it strictly that handset makers want to drive users to native apps that utilize camera functions?
======
niftich
The 'rapid iteration' of the web platform strikes again. In this case,
getUserMedia has been replaced (edit: I should be precise, "is being
replaced") [1] by MediaDevices, which provides a promises-based method for
MediaDevices.getUserMedia() [2] to get similar functionality.

[1] [https://developer.mozilla.org/en-
US/docs/Web/API/Navigator/g...](https://developer.mozilla.org/en-
US/docs/Web/API/Navigator/getUserMedia) [2] [https://developer.mozilla.org/en-
US/docs/Web/API/MediaDevice...](https://developer.mozilla.org/en-
US/docs/Web/API/MediaDevices/getUserMedia)

~~~
AndrewKemendo
Thanks for the comment, I'll check this out, though my guess is that it's only
FF that supports it.

~~~
pmontra
According to [https://developer.mozilla.org/en-
US/docs/Web/API/MediaDevice...](https://developer.mozilla.org/en-
US/docs/Web/API/MediaDevices/getUserMedia) it's supported also by Chrome 53.
No iOS though.

------
pmontra
I went to [http://html5demos.com/](http://html5demos.com/) with Firefox
Android and my phone's camera worked.

~~~
AndrewKemendo
Doesn't work on iOS anywhere (safari, chrome, ff). I'm more wondering why it's
the case, rather than does it work.

[http://caniuse.com/#feat=stream](http://caniuse.com/#feat=stream) indicates
where it will and won't work but even then seems a bit outdated.

~~~
pmontra
All the browsers are the same on iOS because Apple says they must be Safari
inside and won't let them into the store if they don't. The differences
between browsers are limited to the UI skin around Apple's browser. Safari iOS
doesn't support getusermedia, so no way to access camera from the browser on
that OS.

~~~
AndrewKemendo
Great info, that makes a lot of sense.

