解决Not allowed to load local resource


在做视频上传的时候,发现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));
                }
            }
        },

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM