Reputation: 1191
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?
Upvotes: 3
Views: 16152
Reputation: 1437
You can access to camera! Example http://davidwalsh.name/demo/camera.php . I have tested it on my Nexus 4
Upvotes: 0
Reputation: 329
Is this work in your case?
<input type="file" accept="image/*" capture="camera" />
Upvotes: 2
Reputation: 33
With iOS6, Apple takes HTML5 photo upload.
http://clubsexytime.com/projects/mobileupload/
Upvotes: 2
Reputation: 10028
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
Upvotes: 3
Reputation: 18870
You can't at the moment. Once the W3C getUserMedia API is finalised and implemented by browsers this will be possible, but right now it isn't. (Opera Mobile have a version that implements it - out of interest).
Upvotes: 2