标签:catch 视频上传 object 解决 pre div resource VID 绑定
在做视频上传的时候,发现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)); } } },
解决Not allowed to load local resource
标签:catch 视频上传 object 解决 pre div resource VID 绑定
原文地址:https://www.cnblogs.com/biao-123/p/10244111.html