Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I access iPhone or Android camera using HTML5?

I am trying to create a web application to be built on HTML5 for iPhone or Android browser. How will I be able to access the camera on both instance for me to capture an image and upload it to the web application?

like image 551
Dexter Cato Avatar asked Jan 19 '26 21:01

Dexter Cato


1 Answers

I don't think this is 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 the app in HTML5 (which will be wrapped into a native application), with additional libraries (JS) which let you access these.

More info on PhoneGap: http://phonegap.com/start Camera api on PhoneGap: http://docs.phonegap.com/en/1.0.0/phonegap_camera_camera.md.html

like image 200
sparkymat Avatar answered Jan 21 '26 10:01

sparkymat