3 ms·
Ask HN: Why do mobile browsers no longer support native camera input?
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.
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?
- pmontra 10y agoI went to http://html5demos.com/ http://html5demos.com/ with Firefox Android and my phone's camera worked.
- AndrewKemendo 10y agoDoesn'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 10y agoAll 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 10y agoGreat info, that makes a lot of sense.
- niftich 10y agoThe '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/getUserMedia https://developer.mozilla.org/en-US/docs/Web/API/Navigator/g... [2] https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia https://developer.mozilla.org/en-US/docs/Web/API/MediaDevice...
- AndrewKemendo 10y agoThanks for the comment, I'll check this out, though my guess is that it's only FF that supports it.
- pmontra 10y agoAccording to https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia https://developer.mozilla.org/en-US/docs/Web/API/MediaDevice... it's supported also by Chrome 53. No iOS though.