Search code examples
javascripthtmliosiphoneios-camera

How can I access a iPhone's camera from a web page?


I created a web page for mobiles. I do not want to take a picture and upload it, just open a web page and instantly open iPhone's camera.

I try to this code below but I still need to take a picture and upload images.

<input type="file" accept="image/*" capture="camera">

Please give me any suitable suggestions.


Solution

  • Currently, there is no way to directly access the phone's camera from a web page from within html5 as only native applications are given access to a device's camera. The closest you would be able to get would be to use something like Cordova to create a native application which would have access to the camera.