How can I access iPhone or Android cameras using HTML5?

I am trying to create a web application that will be created in HTML5 for an iPhone or Android browser. How can I access the camera on both instances so that I can capture the image and upload it to a web application?

+3
source share
5 answers

I do not think that's possible. At least in the current state, HTML5 cannot access the camera (or other peripherals). An alternative would be to create a PhoneGap application where you can develop an application in HTML5 (which will be included in your own application), with additional libraries (JS) that will allow you to access them.

PhoneGap: http://phonegap.com/start api PhoneGap: http://docs.phonegap.com/en/1.0.0/phonegap_camera_camera.md.html

+3

. W3C getUserMedia AP , , . (Opera Mobile , - ).

+2

?

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

+2

You can access the camera! Example http://davidwalsh.name/demo/camera.php . I tested it on my Nexus 4

0
source

All Articles