Can you access the iPhone camera from Mobile Safari? [closed]
开发者_运维知识库
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this questionIs there a JavaScript API for accessing the the iPhone's camera from Mobile Safari?
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.
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.
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/
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.
精彩评论