获取上传视频时长
window.URL = window.URL || window.webkitURL;
// file 为上传的视频二进制文件
let file = ele.target.file;
let video = document.createElement("video");
video.preload = "metadata";
video.src = URL.createObjectURL(file);
video.onloadedmetadata = function () {
window.URL.revokeObjectURL(video.src);
let duration = video.duration;
// duration 为上传视频的时长
};