Access from the Browser to Camera
try the following:
<html><body><form><input type="file" accept="image/*;capture=camera"/><input type="submit"/></form></body></html>
I did using the input, as they said here, and worked really good on iOs. I could get a picture from camera or photo album and set an img element.
Here is the code: http://jsfiddle.net/2wZgv/
The js:
<script> oFReader = new FileReader(); oFReader.onload = function (oFREvent) { document.getElementById("fotoImg").src = oFREvent.target.result; document.getElementById("fotoImg").style.visibility = "visible"; var screenHeight = screen.availHeight; screenHeight = screenHeight - 220; document.getElementById("fotoImg").style.height = screenHeight; }; $(function() { $("input:file").change(function (){ var input = document.querySelector('input[type=file]'); var oFile = input.files[0]; oFReader.readAsDataURL(oFile); }); });</script>
This is the w3c draft
After reading it the input tag should be
<input type="file" accept="image/*" capture="camera" id="capture">