Using javascript to capture photos from iPhone / Android camera

can javascript be used (e.g. PhoneGap but not PhoneGap) to take a snapshot? I understand that this post: https://stackoverflow.com/a/3126126/ ... claims it is coming - but what about the iPhone?

+4
source share
2 answers

This is apparently a suggestion for accessing the camera / microphone on the client side (Capture API):

http://www.w3.org/TR/2010/WD-media-capture-api-20100928/

Given that this is a draft w3c standard, it is certainly possible that iOS devices will support it, perhaps some time in the future. I would not have expected it to be available any time soon.

+5
source

Now it is possible!

Method 1: Use WebRTC to get a video and capture images from there. Not widely supported, but works in Chrome and webkit webview (Android 5+). Support Tables

Method 2: Use HTML Media Capture. for example <input type="file" accept="image/*" capture>

Here is a very complete article on media capture in mobile browsers .

Table support in mobilehtml5.org says it is supported on Android 3.0 and iOS 6+ .

0
source

Source: https://habr.com/ru/post/1338124/


All Articles