Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript API for IOS Iphone 3G for camera access

Is there a way to access the iPhone 3G camera via JavaScript to capture a photo and then utilize this photo in an HTML POST? I came across an API called PhoneGap but from a search on here it only mentioned for the IPhone 4. I was hoping to find something that would work on the 3G and 3GS models.

like image 505
Bestfoodnearme.com Avatar asked Mar 03 '26 12:03

Bestfoodnearme.com


2 Answers

Phonegap is an easy solution, and it support camera access for all iPhones.

Supported features: http://www.phonegap.com/features

like image 82
Sindre Sorhus Avatar answered Mar 06 '26 02:03

Sindre Sorhus


Although this is an old question, I wanted to add that this feature is coming to The Web and is already implemented in some browsers.

navigator.getMedia = (
    navigator.getUserMedia ||
    navigator.webkitGetUserMedia ||
    navigator.mozGetUserMedia ||
    navigator.msGetUserMedia);

There is a W3C Specification for getUserMedia.

Although this actually gets you video, you can then take a still image from that video stream.

There are lots of APIs coming to the browser - so good times ahead!

like image 42
Fenton Avatar answered Mar 06 '26 01:03

Fenton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!