解決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