In one of my module, I need to browse video from input[type=\'file\'], after that I need to show selected video before starting upload.
I am using basic HTML tag to
This is example on VUE JS: preview PICTURE
Example SOURCE CODE - DRAG-DROP _part
Example with RENDERing & createObjectURL() using VIDEO.js
p.s. i just want to improve "Pragya Sriharsh" solution:
const = isVideo = filename =>'m4v,avi,mpg,mov,mpg,mpeg'
.split(',')
.includes( getExtension(filename).toLowerCase() )
And .. please don't use JQuery, it's now 2k19:-);
-> So:
const getExtension = filename => {
const parts = filename.split('.');
return parts[parts.length - 1];
}
... And let the rest of the work will be done by Webpack 4!