From 1365b57dd141f4015a9d367557d567e7eba0eb72 Mon Sep 17 00:00:00 2001 From: Guoshaorui Date: Sat, 13 Jun 2015 15:54:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9base64=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 比如上传预览的图片,src是一个base64的字符串,需要增加这个支持 --- src/egret/display/Texture.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egret/display/Texture.ts b/src/egret/display/Texture.ts index 3254382b28..7c8f19fabb 100644 --- a/src/egret/display/Texture.ts +++ b/src/egret/display/Texture.ts @@ -273,7 +273,7 @@ module egret { var winURL = window["URL"] || window["webkitURL"]; if (Texture._bitmapCallbackMap[url] == null) {//非正在加载中 Texture._addToCallbackList(url, callback); - if (url.indexOf("http:") != 0 && url.indexOf("https:") != 0 && (Browser.getInstance().isIOS() && parseInt(Browser.getInstance().getIOSVersion().charAt(0)) >= 7) && winURL) { + if (url.indexOf("data:") != 0 && url.indexOf("http:") != 0 && url.indexOf("https:") != 0 && (Browser.getInstance().isIOS() && parseInt(Browser.getInstance().getIOSVersion().charAt(0)) >= 7) && winURL) { var xhr = new XMLHttpRequest(); xhr.open("get", url, true); xhr.responseType = "blob"; @@ -411,4 +411,4 @@ declare module egret_native { function removeTexture(filePath:string):void; } -} \ No newline at end of file +}