HTML5 capture attribute
HTML5 capture attribute can be used on the input file tag to capture and upload captured media within a file. We can capture microphone audio, webcam image and webcam video.
<!-- accept attribute is used to identify what to capture and capture attribute identifies that media needs to be captured and uploaded. Here we can capturing image. -->
<input type="file" accept="image/*" capture>
<input type="submit" value="Upload">
Similarly we can capture video and audio:
Browser first captures the media and then puts the media into a file and attaches it to the form. Now we can submit the form or can do anything that we do with a normally attached file to the form.