mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 09:37:50 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
@@ -0,0 +1,81 @@
|
||||
package org.osmf.media.pluginClasses
|
||||
{
|
||||
import flash.display.DisplayObject;
|
||||
import org.osmf.elements.SWFLoader;
|
||||
import org.osmf.elements.loaderClasses.LoaderLoadTrait;
|
||||
import org.osmf.events.LoaderEvent;
|
||||
import org.osmf.events.MediaErrorEvent;
|
||||
import org.osmf.media.MediaFactory;
|
||||
import org.osmf.media.MediaResourceBase;
|
||||
import org.osmf.media.PluginInfo;
|
||||
import org.osmf.traits.LoadTrait;
|
||||
|
||||
internal class DynamicPluginLoader extends PluginLoader
|
||||
{
|
||||
|
||||
private static const PLUGININFO_PROPERTY_NAME:String = "pluginInfo";
|
||||
|
||||
public function DynamicPluginLoader(param1:MediaFactory, param2:String)
|
||||
{
|
||||
super(param1,param2);
|
||||
}
|
||||
|
||||
override public function canHandleResource(param1:MediaResourceBase) : Boolean
|
||||
{
|
||||
return new SWFLoader().canHandleResource(param1);
|
||||
}
|
||||
|
||||
override protected function executeLoad(param1:LoadTrait) : void
|
||||
{
|
||||
var swfLoader:SWFLoader;
|
||||
var loaderLoadTrait:LoaderLoadTrait;
|
||||
var loadTrait:LoadTrait = param1;
|
||||
var onSWFLoaderStateChange:* = function(param1:LoaderEvent):void
|
||||
{
|
||||
var _loc2_:DisplayObject = null;
|
||||
var _loc3_:PluginInfo = null;
|
||||
if(param1.newState == "ready")
|
||||
{
|
||||
swfLoader.removeEventListener("loadStateChange",onSWFLoaderStateChange);
|
||||
loaderLoadTrait.removeEventListener("mediaError",onLoadError);
|
||||
_loc2_ = loaderLoadTrait.loader.content;
|
||||
_loc3_ = _loc2_["pluginInfo"] as PluginInfo;
|
||||
loadFromPluginInfo(loadTrait,_loc3_,loaderLoadTrait.loader);
|
||||
}
|
||||
else if(param1.newState == "loadError")
|
||||
{
|
||||
swfLoader.removeEventListener("loadStateChange",onSWFLoaderStateChange);
|
||||
updateLoadTrait(loadTrait,param1.newState);
|
||||
}
|
||||
};
|
||||
var onLoadError:* = function(param1:MediaErrorEvent):void
|
||||
{
|
||||
loaderLoadTrait.removeEventListener("mediaError",onLoadError);
|
||||
loadTrait.dispatchEvent(param1.clone());
|
||||
};
|
||||
updateLoadTrait(loadTrait,"loading");
|
||||
swfLoader = new SWFLoader(true);
|
||||
swfLoader.validateLoadedContentFunction = validateLoadedContent;
|
||||
swfLoader.addEventListener("loadStateChange",onSWFLoaderStateChange);
|
||||
loaderLoadTrait = new LoaderLoadTrait(swfLoader,loadTrait.resource);
|
||||
loaderLoadTrait.addEventListener("mediaError",onLoadError);
|
||||
swfLoader.load(loaderLoadTrait);
|
||||
}
|
||||
|
||||
override protected function executeUnload(param1:LoadTrait) : void
|
||||
{
|
||||
updateLoadTrait(param1,"unloading");
|
||||
var _loc2_:PluginLoadTrait = param1 as PluginLoadTrait;
|
||||
unloadFromPluginInfo(_loc2_.pluginInfo);
|
||||
_loc2_.loader.unloadAndStop();
|
||||
updateLoadTrait(param1,"uninitialized");
|
||||
}
|
||||
|
||||
private function validateLoadedContent(param1:DisplayObject) : Boolean
|
||||
{
|
||||
var _loc2_:Object = param1.hasOwnProperty("pluginInfo") ? param1["pluginInfo"] : null;
|
||||
return _loc2_ != null ? isPluginCompatible(_loc2_) : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.osmf.media.pluginClasses
|
||||
{
|
||||
import org.osmf.media.LoadableElementBase;
|
||||
import org.osmf.media.MediaResourceBase;
|
||||
import org.osmf.traits.LoadTrait;
|
||||
import org.osmf.traits.LoaderBase;
|
||||
|
||||
internal class PluginElement extends LoadableElementBase
|
||||
{
|
||||
|
||||
public function PluginElement(param1:PluginLoader, param2:MediaResourceBase = null)
|
||||
{
|
||||
super(param2,param1);
|
||||
}
|
||||
|
||||
override protected function createLoadTrait(param1:MediaResourceBase, param2:LoaderBase) : LoadTrait
|
||||
{
|
||||
return new PluginLoadTrait(param2,param1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package org.osmf.media.pluginClasses
|
||||
{
|
||||
import org.osmf.media.MediaElement;
|
||||
|
||||
internal class PluginEntry
|
||||
{
|
||||
|
||||
private var _pluginElement:MediaElement;
|
||||
|
||||
private var _state:PluginLoadingState;
|
||||
|
||||
public function PluginEntry(param1:MediaElement, param2:PluginLoadingState)
|
||||
{
|
||||
super();
|
||||
_pluginElement = param1;
|
||||
_state = param2;
|
||||
}
|
||||
|
||||
public function get pluginElement() : MediaElement
|
||||
{
|
||||
return _pluginElement;
|
||||
}
|
||||
|
||||
public function get state() : PluginLoadingState
|
||||
{
|
||||
return _state;
|
||||
}
|
||||
|
||||
public function set state(param1:PluginLoadingState) : void
|
||||
{
|
||||
_state = param1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package org.osmf.media.pluginClasses
|
||||
{
|
||||
import flash.display.Loader;
|
||||
import org.osmf.media.MediaResourceBase;
|
||||
import org.osmf.media.PluginInfo;
|
||||
import org.osmf.traits.LoadTrait;
|
||||
import org.osmf.traits.LoaderBase;
|
||||
|
||||
internal class PluginLoadTrait extends LoadTrait
|
||||
{
|
||||
|
||||
private var _pluginInfo:PluginInfo;
|
||||
|
||||
private var _loader:Loader;
|
||||
|
||||
public function PluginLoadTrait(param1:LoaderBase, param2:MediaResourceBase)
|
||||
{
|
||||
super(param1,param2);
|
||||
}
|
||||
|
||||
public function get pluginInfo() : PluginInfo
|
||||
{
|
||||
return _pluginInfo;
|
||||
}
|
||||
|
||||
public function set pluginInfo(param1:PluginInfo) : void
|
||||
{
|
||||
_pluginInfo = param1;
|
||||
}
|
||||
|
||||
public function get loader() : Loader
|
||||
{
|
||||
return _loader;
|
||||
}
|
||||
|
||||
public function set loader(param1:Loader) : void
|
||||
{
|
||||
_loader = param1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
package org.osmf.media.pluginClasses
|
||||
{
|
||||
import flash.display.Loader;
|
||||
import org.osmf.events.MediaError;
|
||||
import org.osmf.events.MediaErrorEvent;
|
||||
import org.osmf.media.MediaFactory;
|
||||
import org.osmf.media.MediaFactoryItem;
|
||||
import org.osmf.media.PluginInfo;
|
||||
import org.osmf.traits.LoadTrait;
|
||||
import org.osmf.traits.LoaderBase;
|
||||
import org.osmf.utils.Version;
|
||||
|
||||
internal class PluginLoader extends LoaderBase
|
||||
{
|
||||
|
||||
private static const FRAMEWORK_VERSION_PROPERTY_NAME:String = "frameworkVersion";
|
||||
|
||||
private static const IS_FRAMEWORK_VERSION_SUPPORTED_PROPERTY_NAME:String = "isFrameworkVersionSupported";
|
||||
|
||||
private var minimumSupportedFrameworkVersion:String;
|
||||
|
||||
private var mediaFactory:MediaFactory;
|
||||
|
||||
public function PluginLoader(param1:MediaFactory, param2:String)
|
||||
{
|
||||
super();
|
||||
this.mediaFactory = param1;
|
||||
this.minimumSupportedFrameworkVersion = param2;
|
||||
}
|
||||
|
||||
protected function unloadFromPluginInfo(param1:PluginInfo) : void
|
||||
{
|
||||
var _loc4_:int = 0;
|
||||
var _loc2_:MediaFactoryItem = null;
|
||||
var _loc3_:MediaFactoryItem = null;
|
||||
if(param1 != null)
|
||||
{
|
||||
_loc4_ = 0;
|
||||
while(_loc4_ < param1.numMediaFactoryItems)
|
||||
{
|
||||
_loc2_ = param1.getMediaFactoryItemAt(_loc4_);
|
||||
_loc3_ = mediaFactory.getItemById(_loc2_.id);
|
||||
if(_loc3_ != null)
|
||||
{
|
||||
mediaFactory.removeItem(_loc3_);
|
||||
}
|
||||
_loc4_++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function loadFromPluginInfo(param1:LoadTrait, param2:PluginInfo, param3:Loader = null) : void
|
||||
{
|
||||
var _loc4_:MediaFactory = null;
|
||||
var _loc7_:int = 0;
|
||||
var _loc5_:MediaFactoryItem = null;
|
||||
var _loc6_:PluginLoadTrait = null;
|
||||
var _loc8_:Boolean = false;
|
||||
if(param2 != null)
|
||||
{
|
||||
if(isPluginCompatible(param2))
|
||||
{
|
||||
try
|
||||
{
|
||||
_loc4_ = param1.resource.getMetadataValue("http://www.osmf.org/plugin/mediaFactory/1.0") as MediaFactory;
|
||||
if(_loc4_ == null)
|
||||
{
|
||||
param1.resource.addMetadataValue("http://www.osmf.org/plugin/mediaFactory/1.0",mediaFactory);
|
||||
}
|
||||
param2.initializePlugin(param1.resource);
|
||||
_loc7_ = 0;
|
||||
while(_loc7_ < param2.numMediaFactoryItems)
|
||||
{
|
||||
_loc5_ = param2.getMediaFactoryItemAt(_loc7_);
|
||||
if(_loc5_ == null)
|
||||
{
|
||||
throw new RangeError();
|
||||
}
|
||||
mediaFactory.addItem(_loc5_);
|
||||
_loc7_++;
|
||||
}
|
||||
_loc6_ = param1 as PluginLoadTrait;
|
||||
_loc6_.pluginInfo = param2;
|
||||
_loc6_.loader = param3;
|
||||
updateLoadTrait(_loc6_,"ready");
|
||||
}
|
||||
catch(error:RangeError)
|
||||
{
|
||||
_loc8_ = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
updateLoadTrait(param1,"loadError");
|
||||
param1.dispatchEvent(new MediaErrorEvent("mediaError",false,false,new MediaError(8)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc8_ = true;
|
||||
}
|
||||
if(_loc8_)
|
||||
{
|
||||
updateLoadTrait(param1,"loadError");
|
||||
param1.dispatchEvent(new MediaErrorEvent("mediaError",false,false,new MediaError(9)));
|
||||
}
|
||||
}
|
||||
|
||||
protected function isPluginCompatible(param1:Object) : Boolean
|
||||
{
|
||||
var _loc2_:Function = null;
|
||||
var _loc5_:Boolean = false;
|
||||
var _loc4_:String = param1.hasOwnProperty("frameworkVersion") ? param1["frameworkVersion"] : null;
|
||||
var _loc3_:Boolean = isPluginVersionSupported(_loc4_);
|
||||
if(_loc3_)
|
||||
{
|
||||
_loc2_ = param1.hasOwnProperty("isFrameworkVersionSupported") ? param1["isFrameworkVersionSupported"] as Function : null;
|
||||
if(_loc2_ != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
_loc5_ = _loc2_(Version.version);
|
||||
}
|
||||
catch(error:Error)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
return _loc5_;
|
||||
}
|
||||
|
||||
private function isPluginVersionSupported(param1:String) : Boolean
|
||||
{
|
||||
if(param1 == null || param1.length == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var _loc2_:Object = VersionUtils.parseVersionString(minimumSupportedFrameworkVersion);
|
||||
var _loc3_:Object = VersionUtils.parseVersionString(param1);
|
||||
return _loc3_.major > _loc2_.major || _loc3_.major == _loc2_.major && _loc3_.minor >= _loc2_.minor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.osmf.media.pluginClasses
|
||||
{
|
||||
internal class PluginLoadingState
|
||||
{
|
||||
|
||||
public static const LOADING:PluginLoadingState = new PluginLoadingState("Loading");
|
||||
|
||||
public static const LOADED:PluginLoadingState = new PluginLoadingState("Loaded");
|
||||
|
||||
private var _state:String;
|
||||
|
||||
public function PluginLoadingState(param1:String)
|
||||
{
|
||||
super();
|
||||
_state = param1;
|
||||
}
|
||||
|
||||
public function get state() : String
|
||||
{
|
||||
return _state;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
package org.osmf.media.pluginClasses
|
||||
{
|
||||
import flash.events.EventDispatcher;
|
||||
import flash.utils.Dictionary;
|
||||
import org.osmf.events.LoadEvent;
|
||||
import org.osmf.events.MediaErrorEvent;
|
||||
import org.osmf.events.MediaFactoryEvent;
|
||||
import org.osmf.events.PluginManagerEvent;
|
||||
import org.osmf.media.MediaElement;
|
||||
import org.osmf.media.MediaFactory;
|
||||
import org.osmf.media.MediaFactoryItem;
|
||||
import org.osmf.media.MediaResourceBase;
|
||||
import org.osmf.media.PluginInfoResource;
|
||||
import org.osmf.media.URLResource;
|
||||
import org.osmf.traits.LoadTrait;
|
||||
import org.osmf.utils.OSMFStrings;
|
||||
import org.osmf.utils.Version;
|
||||
|
||||
public class PluginManager extends EventDispatcher
|
||||
{
|
||||
|
||||
private static const STATIC_PLUGIN_MEDIA_INFO_ID:String = "org.osmf.plugins.StaticPluginLoader";
|
||||
|
||||
private static const DYNAMIC_PLUGIN_MEDIA_INFO_ID:String = "org.osmf.plugins.DynamicPluginLoader";
|
||||
|
||||
private var _mediaFactory:MediaFactory;
|
||||
|
||||
private var _pluginFactory:MediaFactory;
|
||||
|
||||
private var _pluginMap:Dictionary;
|
||||
|
||||
private var _pluginList:Vector.<PluginEntry>;
|
||||
|
||||
private var notificationFunctions:Vector.<Function>;
|
||||
|
||||
private var createdElements:Dictionary;
|
||||
|
||||
private var minimumSupportedFrameworkVersion:String;
|
||||
|
||||
private var staticPluginLoader:StaticPluginLoader;
|
||||
|
||||
private var dynamicPluginLoader:DynamicPluginLoader;
|
||||
|
||||
public function PluginManager(param1:MediaFactory)
|
||||
{
|
||||
super();
|
||||
_mediaFactory = param1;
|
||||
_mediaFactory.addEventListener("mediaElementCreate",onMediaElementCreate);
|
||||
minimumSupportedFrameworkVersion = Version.lastAPICompatibleVersion;
|
||||
initPluginFactory();
|
||||
_pluginMap = new Dictionary();
|
||||
_pluginList = new Vector.<PluginEntry>();
|
||||
}
|
||||
|
||||
public function loadPlugin(param1:MediaResourceBase) : void
|
||||
{
|
||||
var identifier:Object;
|
||||
var pluginEntry:PluginEntry;
|
||||
var pluginElement:MediaElement;
|
||||
var loadTrait:LoadTrait;
|
||||
var resource:MediaResourceBase = param1;
|
||||
var onLoadStateChange:* = function(param1:LoadEvent):void
|
||||
{
|
||||
var _loc2_:PluginLoadTrait = null;
|
||||
if(param1.loadState == "ready")
|
||||
{
|
||||
pluginEntry.state = PluginLoadingState.LOADED;
|
||||
_pluginList.push(pluginEntry);
|
||||
_loc2_ = pluginElement.getTrait("load") as PluginLoadTrait;
|
||||
if(_loc2_.pluginInfo.mediaElementCreationNotificationFunction != null)
|
||||
{
|
||||
invokeMediaElementCreationNotificationForCreatedMediaElements(_loc2_.pluginInfo.mediaElementCreationNotificationFunction);
|
||||
if(notificationFunctions == null)
|
||||
{
|
||||
notificationFunctions = new Vector.<Function>();
|
||||
}
|
||||
notificationFunctions.push(_loc2_.pluginInfo.mediaElementCreationNotificationFunction);
|
||||
}
|
||||
dispatchEvent(new PluginManagerEvent("pluginLoad",false,false,resource));
|
||||
}
|
||||
else if(param1.loadState == "loadError")
|
||||
{
|
||||
delete _pluginMap[identifier];
|
||||
dispatchEvent(new PluginManagerEvent("pluginLoadError",false,false,resource));
|
||||
}
|
||||
};
|
||||
var onMediaError:* = function(param1:MediaErrorEvent):void
|
||||
{
|
||||
dispatchEvent(param1.clone());
|
||||
};
|
||||
if(resource == null)
|
||||
{
|
||||
throw new ArgumentError(OSMFStrings.getString("invalidParam"));
|
||||
}
|
||||
identifier = getPluginIdentifier(resource);
|
||||
pluginEntry = _pluginMap[identifier] as PluginEntry;
|
||||
if(pluginEntry != null)
|
||||
{
|
||||
dispatchEvent(new PluginManagerEvent("pluginLoad",false,false,resource));
|
||||
}
|
||||
else
|
||||
{
|
||||
pluginElement = _pluginFactory.createMediaElement(resource);
|
||||
if(pluginElement != null)
|
||||
{
|
||||
pluginEntry = new PluginEntry(pluginElement,PluginLoadingState.LOADING);
|
||||
_pluginMap[identifier] = pluginEntry;
|
||||
loadTrait = pluginElement.getTrait("load") as LoadTrait;
|
||||
if(loadTrait != null)
|
||||
{
|
||||
loadTrait.addEventListener("loadStateChange",onLoadStateChange);
|
||||
loadTrait.addEventListener("mediaError",onMediaError);
|
||||
loadTrait.load();
|
||||
}
|
||||
else
|
||||
{
|
||||
dispatchEvent(new PluginManagerEvent("pluginLoadError",false,false,resource));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dispatchEvent(new PluginManagerEvent("pluginLoadError",false,false,resource));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function get mediaFactory() : MediaFactory
|
||||
{
|
||||
return _mediaFactory;
|
||||
}
|
||||
|
||||
private function getPluginIdentifier(param1:MediaResourceBase) : Object
|
||||
{
|
||||
var _loc2_:Object = null;
|
||||
if(param1 is URLResource)
|
||||
{
|
||||
_loc2_ = (param1 as URLResource).url;
|
||||
}
|
||||
else if(param1 is PluginInfoResource)
|
||||
{
|
||||
_loc2_ = (param1 as PluginInfoResource).pluginInfo;
|
||||
}
|
||||
return _loc2_;
|
||||
}
|
||||
|
||||
private function initPluginFactory() : void
|
||||
{
|
||||
_pluginFactory = new MediaFactory();
|
||||
staticPluginLoader = new StaticPluginLoader(mediaFactory,minimumSupportedFrameworkVersion);
|
||||
dynamicPluginLoader = new DynamicPluginLoader(mediaFactory,minimumSupportedFrameworkVersion);
|
||||
var _loc1_:MediaFactoryItem = new MediaFactoryItem("org.osmf.plugins.StaticPluginLoader",staticPluginLoader.canHandleResource,createStaticPluginElement);
|
||||
_pluginFactory.addItem(_loc1_);
|
||||
var _loc2_:MediaFactoryItem = new MediaFactoryItem("org.osmf.plugins.DynamicPluginLoader",dynamicPluginLoader.canHandleResource,createDynamicPluginElement);
|
||||
_pluginFactory.addItem(_loc2_);
|
||||
}
|
||||
|
||||
private function createStaticPluginElement() : MediaElement
|
||||
{
|
||||
return new PluginElement(staticPluginLoader);
|
||||
}
|
||||
|
||||
private function createDynamicPluginElement() : MediaElement
|
||||
{
|
||||
return new PluginElement(dynamicPluginLoader);
|
||||
}
|
||||
|
||||
private function onMediaElementCreate(param1:MediaFactoryEvent) : void
|
||||
{
|
||||
invokeMediaElementCreationNotifications(param1.mediaElement);
|
||||
if(createdElements == null)
|
||||
{
|
||||
createdElements = new Dictionary(true);
|
||||
}
|
||||
createdElements[param1.mediaElement] = true;
|
||||
}
|
||||
|
||||
private function invokeMediaElementCreationNotifications(param1:MediaElement) : void
|
||||
{
|
||||
for each(var _loc2_:Function in notificationFunctions)
|
||||
{
|
||||
invokeMediaElementCreationNotificationFunction(_loc2_,param1);
|
||||
}
|
||||
}
|
||||
|
||||
private function invokeMediaElementCreationNotificationFunction(param1:Function, param2:MediaElement) : void
|
||||
{
|
||||
try
|
||||
{
|
||||
param1.call(null,param2);
|
||||
}
|
||||
catch(error:Error)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private function invokeMediaElementCreationNotificationForCreatedMediaElements(param1:Function) : void
|
||||
{
|
||||
for(var _loc2_:Object in createdElements)
|
||||
{
|
||||
invokeMediaElementCreationNotificationFunction(param1,_loc2_ as MediaElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.osmf.media.pluginClasses
|
||||
{
|
||||
import org.osmf.media.MediaFactory;
|
||||
import org.osmf.media.MediaResourceBase;
|
||||
import org.osmf.media.PluginInfo;
|
||||
import org.osmf.media.PluginInfoResource;
|
||||
import org.osmf.traits.LoadTrait;
|
||||
|
||||
internal class StaticPluginLoader extends PluginLoader
|
||||
{
|
||||
|
||||
public function StaticPluginLoader(param1:MediaFactory, param2:String)
|
||||
{
|
||||
super(param1,param2);
|
||||
}
|
||||
|
||||
override public function canHandleResource(param1:MediaResourceBase) : Boolean
|
||||
{
|
||||
return param1 is PluginInfoResource;
|
||||
}
|
||||
|
||||
override protected function executeLoad(param1:LoadTrait) : void
|
||||
{
|
||||
updateLoadTrait(param1,"loading");
|
||||
var _loc2_:PluginInfoResource = param1.resource as PluginInfoResource;
|
||||
var _loc3_:PluginInfo = _loc2_.pluginInfo;
|
||||
loadFromPluginInfo(param1,_loc3_);
|
||||
}
|
||||
|
||||
override protected function executeUnload(param1:LoadTrait) : void
|
||||
{
|
||||
var _loc2_:PluginLoadTrait = param1 as PluginLoadTrait;
|
||||
var _loc3_:PluginInfo = _loc2_.pluginInfo;
|
||||
updateLoadTrait(param1,"unloading");
|
||||
unloadFromPluginInfo(_loc3_);
|
||||
updateLoadTrait(param1,"uninitialized");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package org.osmf.media.pluginClasses
|
||||
{
|
||||
public class VersionUtils
|
||||
{
|
||||
|
||||
public function VersionUtils()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function parseVersionString(param1:String) : Object
|
||||
{
|
||||
var _loc4_:Array = param1.split(".");
|
||||
var _loc2_:int = 0;
|
||||
var _loc3_:int = 0;
|
||||
if(_loc4_.length >= 1)
|
||||
{
|
||||
_loc2_ = parseInt(_loc4_[0]);
|
||||
}
|
||||
if(_loc4_.length >= 2)
|
||||
{
|
||||
_loc3_ = parseInt(_loc4_[1]);
|
||||
if(_loc3_ < 10)
|
||||
{
|
||||
_loc3_ *= 10;
|
||||
}
|
||||
}
|
||||
return {
|
||||
"major":_loc2_,
|
||||
"minor":_loc3_
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user