How can I display video before uploading to a server with vanilla JavaScript?
<input type="file" onchange="loadFile(event)">
<video width="320" height="240" controls>
<source id="output" type="video/mp4">
Your browser does not support the video tag.
</video>
JavaScript:
function loadFile(){
// Display chosen file in id "output"
}