mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-20 17: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
+36
@@ -0,0 +1,36 @@
|
||||
package org.osmf.elements.proxyClasses
|
||||
{
|
||||
import org.osmf.events.LoadEvent;
|
||||
import org.osmf.media.MediaElement;
|
||||
import org.osmf.media.MediaResourceBase;
|
||||
import org.osmf.traits.LoadTrait;
|
||||
import org.osmf.traits.LoaderBase;
|
||||
|
||||
[ExcludeClass]
|
||||
public class LoadFromDocumentLoadTrait extends LoadTrait
|
||||
{
|
||||
|
||||
private var _mediaElement:MediaElement;
|
||||
|
||||
public function LoadFromDocumentLoadTrait(loader:LoaderBase, resource:MediaResourceBase)
|
||||
{
|
||||
super(loader,resource);
|
||||
}
|
||||
|
||||
override protected function loadStateChangeEnd() : void
|
||||
{
|
||||
dispatchEvent(new LoadEvent(LoadEvent.LOAD_STATE_CHANGE,false,false,loadState));
|
||||
}
|
||||
|
||||
public function set mediaElement(value:MediaElement) : void
|
||||
{
|
||||
this._mediaElement = value;
|
||||
}
|
||||
|
||||
public function get mediaElement() : MediaElement
|
||||
{
|
||||
return this._mediaElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package org.osmf.elements.proxyClasses
|
||||
{
|
||||
import flash.events.Event;
|
||||
import org.osmf.events.MetadataEvent;
|
||||
import org.osmf.metadata.Metadata;
|
||||
|
||||
[ExcludeClass]
|
||||
public class ProxyMetadata extends Metadata
|
||||
{
|
||||
|
||||
private var proxiedMetadata:Metadata;
|
||||
|
||||
public function ProxyMetadata()
|
||||
{
|
||||
super();
|
||||
this.proxiedMetadata = new Metadata();
|
||||
this.proxiedMetadata.addEventListener(MetadataEvent.VALUE_ADD,this.redispatchEvent);
|
||||
this.proxiedMetadata.addEventListener(MetadataEvent.VALUE_CHANGE,this.redispatchEvent);
|
||||
this.proxiedMetadata.addEventListener(MetadataEvent.VALUE_REMOVE,this.redispatchEvent);
|
||||
}
|
||||
|
||||
public function set metadata(value:Metadata) : void
|
||||
{
|
||||
var url:String = null;
|
||||
this.proxiedMetadata.removeEventListener(MetadataEvent.VALUE_ADD,this.redispatchEvent);
|
||||
this.proxiedMetadata.removeEventListener(MetadataEvent.VALUE_CHANGE,this.redispatchEvent);
|
||||
this.proxiedMetadata.removeEventListener(MetadataEvent.VALUE_REMOVE,this.redispatchEvent);
|
||||
for each(url in this.proxiedMetadata.keys)
|
||||
{
|
||||
value.addValue(url,this.proxiedMetadata.getValue(url));
|
||||
}
|
||||
this.proxiedMetadata = value;
|
||||
this.proxiedMetadata.addEventListener(MetadataEvent.VALUE_ADD,this.redispatchEvent);
|
||||
this.proxiedMetadata.addEventListener(MetadataEvent.VALUE_CHANGE,this.redispatchEvent);
|
||||
this.proxiedMetadata.addEventListener(MetadataEvent.VALUE_REMOVE,this.redispatchEvent);
|
||||
}
|
||||
|
||||
override public function getValue(key:String) : *
|
||||
{
|
||||
return this.proxiedMetadata.getValue(key);
|
||||
}
|
||||
|
||||
override public function addValue(key:String, value:Object) : void
|
||||
{
|
||||
this.proxiedMetadata.addValue(key,value);
|
||||
}
|
||||
|
||||
override public function removeValue(key:String) : *
|
||||
{
|
||||
return this.proxiedMetadata.removeValue(key);
|
||||
}
|
||||
|
||||
override public function get keys() : Vector.<String>
|
||||
{
|
||||
return this.proxiedMetadata.keys;
|
||||
}
|
||||
|
||||
private function redispatchEvent(event:Event) : void
|
||||
{
|
||||
dispatchEvent(event.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user