possible to use javascript (like PhoneGap, but not PhoneGap) to capture a photo? I realize that this post: http://www.google.com/url?sa=D&q=https://stackoverflow.com/questions/2953865/javascript-camera-api-android-froyo states that it is coming - but what about iPhone?
Image Capture on your Mac The native app macOS app that works with a lot of third-party devices is Image Capture. Not only can you use it for your iPhone or DSLR camera, but you can also use a scanner with the app. That also means you can use it to import pictures from your Android too.
The capture attribute is supported on the file input type. The capture attribute takes as its value a string that specifies which camera to use for capture of image or video data, if the accept attribute indicates that the input should be of one of those types. The user-facing camera and/or microphone should be used.
If your PC has a built-in camera or a connected webcam, you can use the Camera app to take photos and videos. To find the Camera app, select Start > Camera.
This seems to be the proposal for client side camera/microphone access (Capture API):
http://www.w3.org/TR/2010/WD-media-capture-api-20100928/
Given that it's a draft w3c standard, it's certainly possible that iOS devices will support it, probably some time in the future. I wouldn't assume that it will be available any time soon.
This is now possible!
Method 1: Use WebRTC to get video feed, 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. e.g. <input type="file" accept="image/*" capture>
Here's a very comprehensive article about media capture in mobile browsers.
Support tables at mobilehtml5.org say it's supported on Android 3.0+ and iOS 6+.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With