在做视频上传的时候,发现Not allowed to load local resource,也弄了很久,怕自己忘记了所以记下来
bind: function() {
SelectVideo.on("change", function () { me.BindVedio(this); });
}
//视频绑定
BindVedio: function (thisFile) {
var me = this;
var files = thisFile.files;
var video = $("video");
for (var i = 0; i < files.length; i++) {
var node = files[i];
try {
imgURL = node.getAsDataURL();
} catch (e) {
video.attr("src",window.URL.createObjectURL(node));
}
}
},
