make an input type=file selection video for webapp, then preview it on the page, and then upload it.
was found on the Internet. var objectURL = URL.createObjectURL(this.files[0]);
$(".previewVideo").html("<video src="" +
objectURL +
"" controls></video>");
setTimeout(function () {
var scale = 0.25,
video = $("video")[0],
canvas = document.createElement("canvas"),
canvasFill = canvas.getContext("2d");
canvas.width = video.videoWidth * scale;
canvas.height = video.videoHeight * scale;
canvasFill.drawImage(video, 0, 0, canvas.width, canvas.height);
var src = canvas.toDataURL("image/jpeg");
$(".previewImg").html("<img id="imgSmallView" src="" + src + "" alt="" />");
}, 500);
pc
is there any solution? I read on the Internet that I used html2canvas to get screenshots, but I don"t know how feasible it is.