I have created a very minimal web app where in on click of button, the mobile camera should open up. In the component, I have checked for whether the browser supports webRTC and then camera should be invoked. Based on the documentation which I went through on Google developer site I found that putting:
<input type="file" accept="image/*">
Should work with a capture attribute which decides which camera to open up. The documentation also states that in browser a file selection option would come for the same input tag. Stating all that for me the input tag never works either on browser or mobile. There is not much available on the net and was wondering if someone can help me here. With the video tag the camera does work but that comes embedded inside the webpage. I want the device camera should open up on click of button so that I have all the capabilities which is normally there with the camera.
So, seems like I was making a very silly mistake because of which the input tag was not working. The input tag to work with the camera required three attributes:
<input id="accessCamera" type="file" accept="image/*" capture="user">