Webcam access for image upload

I tried to attach an image from the camera by capturing instead of browse from the computer.
I can able to capture image from iOS and Android but I need to capture from browser also.

iOS image capture preview.

How to capture image from webcam…