Is there a JavaScript API for accessing the the iPhone's camera from Mobile Safari?
问题:
回答1:
Since iOS6, you can use
<input type="file" accept="image/*" capture="camera">
<input type="file" accept="video/*" capture="camera">
It will act like a regular file upload, but instead, it will open the iPhone camera and upload a picture or a video.
Hope this help someone.
回答2:
Sorry, but there isn’t any...
UPDATE:
Now it's possible. See Simon Arnold's answer.
回答3:
You can via http://picupapp.com/
It is a Free iPhone App and JS that can convert an upload box into a button that requests the app, along with instructions to the App on where to post the image...
This thing should get an award.
Now if only we could get them to also make it work perfect with Android and Blackberry.
回答4:
There is a specification from the W3C which would allow this, although to my knowledge none has implemented it yet: http://www.w3.org/TR/2010/WD-html-media-capture-20100928/
回答5:
Chrome and Safari on iOS7 can access the Camera and the Camera Roll without any special markup and can perform both AJAX POST and synchronous form POST operations just like a desktop browser.