Preview Image:
Note: this is just a preview page, if you select multiple images, it might or might not show the gallery previews (or may show a broken image) but all files can be processed once form is submitted. This is just a small jQuery snippet used here guys, you can make better.
Video Capture:
Note: No preview will be displayed here, as the captured video will be in 3GPP (.3gp) format, which is not playable in an HTML5 <video> tag. 3GPP is used as it is the most universally supported by different phone manufacturers, but you will need to process it yourself if you want to display it in a <video> tag.