Can you access the iPhone camera from Mobile Safari?

kim3er picture kim3er · Apr 9, 2010 · Viewed 51.5k times · Source

Is there a JavaScript API for accessing the the iPhone's camera from Mobile Safari?

Answer

Simon Arnold picture Simon Arnold · Jan 12, 2013

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.