1. 程式人生 > >解決Not allowed to load local resource

解決Not allowed to load local resource

cti asd hang win bject data creat java change

在做視頻上傳的時候,發現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