fixe for air
This commit is contained in:
@@ -30,7 +30,7 @@ class BaseLoader<T> implements ILoader<T> {
|
||||
this.data = data;
|
||||
callback = new Callback<T>();
|
||||
var url:String = this.url;
|
||||
L.d(TAG, "Request: " + prepareUrl(url));
|
||||
//L.d(TAG, "Request: " + prepareUrl(url));
|
||||
internalRequest(prepareUrl(url));
|
||||
return callback;
|
||||
}
|
||||
|
||||
@@ -23,13 +23,17 @@ class BaseMediaLoader<T> extends BaseLoader<T> {
|
||||
|
||||
override private function internalFromBytes(data:ByteArray):Void {
|
||||
loader = buildLoader();
|
||||
loader.loadBytes(data);
|
||||
loader.loadBytes(data, buildLoaderContext());
|
||||
}
|
||||
|
||||
private function buildLoaderContext():LoaderContext {
|
||||
return switch (Security.sandboxType) {
|
||||
case Security.REMOTE:
|
||||
new LoaderContext(true, ApplicationDomain.currentDomain, SecurityDomain.currentDomain);
|
||||
case Security.APPLICATION:
|
||||
var loaderContext:LoaderContext = new LoaderContext();
|
||||
loaderContext.allowLoadBytesCodeExecution = true;
|
||||
loaderContext;
|
||||
default:
|
||||
null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user