mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-21 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
@@ -0,0 +1,49 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class AudioEvent extends Event
|
||||
{
|
||||
|
||||
public static const VOLUME_CHANGE:String = "volumeChange";
|
||||
|
||||
public static const MUTED_CHANGE:String = "mutedChange";
|
||||
|
||||
public static const PAN_CHANGE:String = "panChange";
|
||||
|
||||
private var _muted:Boolean;
|
||||
|
||||
private var _volume:Number;
|
||||
|
||||
private var _pan:Number;
|
||||
|
||||
public function AudioEvent(param1:String, param2:Boolean, param3:Boolean, param4:Boolean = false, param5:Number = NaN, param6:Number = NaN)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._muted = param4;
|
||||
this._volume = param5;
|
||||
this._pan = param6;
|
||||
}
|
||||
|
||||
public function get muted() : Boolean
|
||||
{
|
||||
return this._muted;
|
||||
}
|
||||
|
||||
public function get volume() : Number
|
||||
{
|
||||
return this._volume;
|
||||
}
|
||||
|
||||
public function get pan() : Number
|
||||
{
|
||||
return this._pan;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new AudioEvent(type,bubbles,cancelable,this._muted,this._volume,this._pan);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class BufferEvent extends Event
|
||||
{
|
||||
|
||||
public static const BUFFERING_CHANGE:String = "bufferingChange";
|
||||
|
||||
public static const BUFFER_TIME_CHANGE:String = "bufferTimeChange";
|
||||
|
||||
public static const BUFFER_LENGTH_CHANGE:String = "bufferLengthChange";
|
||||
|
||||
private var _buffering:Boolean;
|
||||
|
||||
private var _bufferTime:Number;
|
||||
|
||||
private var _bufferLength:Number;
|
||||
|
||||
public function BufferEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:Boolean = false, param5:Number = NaN, param6:Number = NaN)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._buffering = param4;
|
||||
this._bufferTime = param5;
|
||||
this._bufferLength = param6;
|
||||
}
|
||||
|
||||
public function get buffering() : Boolean
|
||||
{
|
||||
return this._buffering;
|
||||
}
|
||||
|
||||
public function get bufferTime() : Number
|
||||
{
|
||||
return this._bufferTime;
|
||||
}
|
||||
|
||||
public function get bufferLength() : Number
|
||||
{
|
||||
return this._bufferLength;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new BufferEvent(type,bubbles,cancelable,this._buffering,this._bufferTime,this._bufferLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
import org.osmf.containers.IMediaContainer;
|
||||
|
||||
public class ContainerChangeEvent extends Event
|
||||
{
|
||||
|
||||
public static const CONTAINER_CHANGE:String = "containerChange";
|
||||
|
||||
private var _oldContainer:IMediaContainer;
|
||||
|
||||
private var _newContainer:IMediaContainer;
|
||||
|
||||
public function ContainerChangeEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:IMediaContainer = null, param5:IMediaContainer = null)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._oldContainer = param4;
|
||||
this._newContainer = param5;
|
||||
}
|
||||
|
||||
public function get oldContainer() : IMediaContainer
|
||||
{
|
||||
return this._oldContainer;
|
||||
}
|
||||
|
||||
public function get newContainer() : IMediaContainer
|
||||
{
|
||||
return this._newContainer;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new ContainerChangeEvent(type,bubbles,cancelable,this._oldContainer,this._newContainer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class DRMEvent extends Event
|
||||
{
|
||||
|
||||
public static const DRM_STATE_CHANGE:String = "drmStateChange";
|
||||
|
||||
private var _drmState:String;
|
||||
|
||||
private var _startDate:Date;
|
||||
|
||||
private var _endDate:Date;
|
||||
|
||||
private var _period:Number;
|
||||
|
||||
private var _serverURL:String;
|
||||
|
||||
private var _token:Object;
|
||||
|
||||
private var _mediaError:MediaError;
|
||||
|
||||
public function DRMEvent(param1:String, param2:String, param3:Boolean = false, param4:Boolean = false, param5:Date = null, param6:Date = null, param7:Number = 0, param8:String = null, param9:Object = null, param10:MediaError = null)
|
||||
{
|
||||
super(param1,param3,param4);
|
||||
this._drmState = param2;
|
||||
this._token = param9;
|
||||
this._mediaError = param10;
|
||||
this._startDate = param5;
|
||||
this._endDate = param6;
|
||||
this._period = param7;
|
||||
this._serverURL = param8;
|
||||
}
|
||||
|
||||
public function get token() : Object
|
||||
{
|
||||
return this._token;
|
||||
}
|
||||
|
||||
public function get mediaError() : MediaError
|
||||
{
|
||||
return this._mediaError;
|
||||
}
|
||||
|
||||
public function get startDate() : Date
|
||||
{
|
||||
return this._startDate;
|
||||
}
|
||||
|
||||
public function get endDate() : Date
|
||||
{
|
||||
return this._endDate;
|
||||
}
|
||||
|
||||
public function get period() : Number
|
||||
{
|
||||
return this._period;
|
||||
}
|
||||
|
||||
public function get drmState() : String
|
||||
{
|
||||
return this._drmState;
|
||||
}
|
||||
|
||||
public function get serverURL() : String
|
||||
{
|
||||
return this._serverURL;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new DRMEvent(type,this._drmState,bubbles,cancelable,this._startDate,this._endDate,this._period,this._serverURL,this._token,this._mediaError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class DVREvent extends Event
|
||||
{
|
||||
|
||||
public static const IS_RECORDING_CHANGE:String = "isRecordingChange";
|
||||
|
||||
public function DVREvent(param1:String, param2:Boolean = false, param3:Boolean = false)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new DVREvent(type,bubbles,cancelable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class DVRStreamInfoEvent extends Event
|
||||
{
|
||||
|
||||
public static const DVRSTREAMINFO:String = "DVRStreamInfo";
|
||||
|
||||
private var _info:Object;
|
||||
|
||||
public function DVRStreamInfoEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:Object = null)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._info = param4;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new DVRStreamInfoEvent(type,bubbles,cancelable,this.info);
|
||||
}
|
||||
|
||||
public function get info() : Object
|
||||
{
|
||||
return this._info;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.display.DisplayObject;
|
||||
import flash.events.Event;
|
||||
|
||||
public class DisplayObjectEvent extends Event
|
||||
{
|
||||
|
||||
public static const DISPLAY_OBJECT_CHANGE:String = "displayObjectChange";
|
||||
|
||||
public static const MEDIA_SIZE_CHANGE:String = "mediaSizeChange";
|
||||
|
||||
private var _oldDisplayObject:DisplayObject;
|
||||
|
||||
private var _newDisplayObject:DisplayObject;
|
||||
|
||||
private var _oldWidth:Number;
|
||||
|
||||
private var _oldHeight:Number;
|
||||
|
||||
private var _newWidth:Number;
|
||||
|
||||
private var _newHeight:Number;
|
||||
|
||||
public function DisplayObjectEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:DisplayObject = null, param5:DisplayObject = null, param6:Number = NaN, param7:Number = NaN, param8:Number = NaN, param9:Number = NaN)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._oldDisplayObject = param4;
|
||||
this._newDisplayObject = param5;
|
||||
this._oldWidth = param6;
|
||||
this._oldHeight = param7;
|
||||
this._newWidth = param8;
|
||||
this._newHeight = param9;
|
||||
}
|
||||
|
||||
public function get oldDisplayObject() : DisplayObject
|
||||
{
|
||||
return this._oldDisplayObject;
|
||||
}
|
||||
|
||||
public function get newDisplayObject() : DisplayObject
|
||||
{
|
||||
return this._newDisplayObject;
|
||||
}
|
||||
|
||||
public function get oldWidth() : Number
|
||||
{
|
||||
return this._oldWidth;
|
||||
}
|
||||
|
||||
public function get oldHeight() : Number
|
||||
{
|
||||
return this._oldHeight;
|
||||
}
|
||||
|
||||
public function get newWidth() : Number
|
||||
{
|
||||
return this._newWidth;
|
||||
}
|
||||
|
||||
public function get newHeight() : Number
|
||||
{
|
||||
return this._newHeight;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new DisplayObjectEvent(type,bubbles,cancelable,this._oldDisplayObject,this._newDisplayObject,this._oldWidth,this._oldHeight,this._newWidth,this._newHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class DynamicStreamEvent extends Event
|
||||
{
|
||||
|
||||
public static const SWITCHING_CHANGE:String = "switchingChange";
|
||||
|
||||
public static const NUM_DYNAMIC_STREAMS_CHANGE:String = "numDynamicStreamsChange";
|
||||
|
||||
public static const AUTO_SWITCH_CHANGE:String = "autoSwitchChange";
|
||||
|
||||
private var _switching:Boolean;
|
||||
|
||||
private var _autoSwitch:Boolean;
|
||||
|
||||
public function DynamicStreamEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:Boolean = false, param5:Boolean = false)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._switching = param4;
|
||||
this._autoSwitch = param5;
|
||||
}
|
||||
|
||||
public function get switching() : Boolean
|
||||
{
|
||||
return this._switching;
|
||||
}
|
||||
|
||||
public function get autoSwitch() : Boolean
|
||||
{
|
||||
return this._autoSwitch;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new DynamicStreamEvent(type,bubbles,cancelable,this._switching,this._autoSwitch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
import org.osmf.net.httpstreaming.f4f.AdobeBootstrapBox;
|
||||
import org.osmf.net.httpstreaming.flv.FLVTagScriptDataObject;
|
||||
|
||||
public class HTTPStreamingFileHandlerEvent extends Event
|
||||
{
|
||||
|
||||
public static const NOTIFY_SEGMENT_DURATION:String = "notifySegmentDuration";
|
||||
|
||||
public static const NOTIFY_SCRIPT_DATA:String = "notifyScriptData";
|
||||
|
||||
public static const NOTIFY_BOOTSTRAP_BOX:String = "notifyBootstrapBox";
|
||||
|
||||
public static const NOTIFY_ERROR:String = "notifyError";
|
||||
|
||||
private var _segmentDuration:Number;
|
||||
|
||||
private var _scriptDataObject:FLVTagScriptDataObject;
|
||||
|
||||
private var _scriptDataFirst:Boolean;
|
||||
|
||||
private var _scriptDataImmediate:Boolean;
|
||||
|
||||
private var _abst:AdobeBootstrapBox;
|
||||
|
||||
private var _error:Boolean;
|
||||
|
||||
public function HTTPStreamingFileHandlerEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:Number = 0, param5:FLVTagScriptDataObject = null, param6:Boolean = false, param7:Boolean = false, param8:AdobeBootstrapBox = null, param9:Boolean = false)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._segmentDuration = param4;
|
||||
this._scriptDataObject = param5;
|
||||
this._scriptDataFirst = param6;
|
||||
this._scriptDataImmediate = param7;
|
||||
this._abst = param8;
|
||||
this._error = param9;
|
||||
}
|
||||
|
||||
public function get segmentDuration() : Number
|
||||
{
|
||||
return this._segmentDuration;
|
||||
}
|
||||
|
||||
public function get scriptDataObject() : FLVTagScriptDataObject
|
||||
{
|
||||
return this._scriptDataObject;
|
||||
}
|
||||
|
||||
public function get scriptDataFirst() : Boolean
|
||||
{
|
||||
return this._scriptDataFirst;
|
||||
}
|
||||
|
||||
public function get scriptDataImmediate() : Boolean
|
||||
{
|
||||
return this._scriptDataImmediate;
|
||||
}
|
||||
|
||||
public function get bootstrapBox() : AdobeBootstrapBox
|
||||
{
|
||||
return this._abst;
|
||||
}
|
||||
|
||||
public function get error() : Boolean
|
||||
{
|
||||
return this._error;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new HTTPStreamingFileHandlerEvent(type,bubbles,cancelable,this.segmentDuration,this.scriptDataObject,this.scriptDataFirst,this.scriptDataImmediate,this.bootstrapBox,this.error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
import flash.net.URLRequest;
|
||||
import org.osmf.net.httpstreaming.flv.FLVTagScriptDataObject;
|
||||
|
||||
public class HTTPStreamingIndexHandlerEvent extends Event
|
||||
{
|
||||
|
||||
public static const NOTIFY_INDEX_READY:String = "notifyIndexReady";
|
||||
|
||||
public static const NOTIFY_RATES:String = "notifyRates";
|
||||
|
||||
public static const REQUEST_LOAD_INDEX:String = "requestLoadIndex";
|
||||
|
||||
public static const NOTIFY_ERROR:String = "notifyError";
|
||||
|
||||
public static const NOTIFY_SEGMENT_DURATION:String = "notifySegmentDuration";
|
||||
|
||||
public static const NOTIFY_SCRIPT_DATA:String = "notifyScriptData";
|
||||
|
||||
private var _streamNames:Array;
|
||||
|
||||
private var _rates:Array;
|
||||
|
||||
private var _request:URLRequest;
|
||||
|
||||
private var _requestContext:Object;
|
||||
|
||||
private var _binaryData:Boolean;
|
||||
|
||||
private var _segmentDuration:Number;
|
||||
|
||||
private var _scriptDataObject:FLVTagScriptDataObject;
|
||||
|
||||
private var _scriptDataFirst:Boolean;
|
||||
|
||||
private var _scriptDataImmediate:Boolean;
|
||||
|
||||
private var _live:Boolean;
|
||||
|
||||
private var _offset:Number;
|
||||
|
||||
public function HTTPStreamingIndexHandlerEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:Boolean = false, param5:Number = NaN, param6:Array = null, param7:Array = null, param8:URLRequest = null, param9:Object = null, param10:Boolean = true, param11:Number = 0, param12:FLVTagScriptDataObject = null, param13:Boolean = false, param14:Boolean = false)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._live = param4;
|
||||
this._offset = param5;
|
||||
this._streamNames = param6;
|
||||
this._rates = param7;
|
||||
this._request = param8;
|
||||
this._requestContext = param9;
|
||||
this._binaryData = param10;
|
||||
this._segmentDuration = param11;
|
||||
this._scriptDataObject = param12;
|
||||
this._scriptDataFirst = param13;
|
||||
this._scriptDataImmediate = param14;
|
||||
}
|
||||
|
||||
public function get live() : Boolean
|
||||
{
|
||||
return this._live;
|
||||
}
|
||||
|
||||
public function get offset() : Number
|
||||
{
|
||||
return this._offset;
|
||||
}
|
||||
|
||||
public function get streamNames() : Array
|
||||
{
|
||||
return this._streamNames;
|
||||
}
|
||||
|
||||
public function get rates() : Array
|
||||
{
|
||||
return this._rates;
|
||||
}
|
||||
|
||||
public function get request() : URLRequest
|
||||
{
|
||||
return this._request;
|
||||
}
|
||||
|
||||
public function get requestContext() : Object
|
||||
{
|
||||
return this._requestContext;
|
||||
}
|
||||
|
||||
public function get binaryData() : Boolean
|
||||
{
|
||||
return this._binaryData;
|
||||
}
|
||||
|
||||
public function get segmentDuration() : Number
|
||||
{
|
||||
return this._segmentDuration;
|
||||
}
|
||||
|
||||
public function get scriptDataObject() : FLVTagScriptDataObject
|
||||
{
|
||||
return this._scriptDataObject;
|
||||
}
|
||||
|
||||
public function get scriptDataFirst() : Boolean
|
||||
{
|
||||
return this._scriptDataFirst;
|
||||
}
|
||||
|
||||
public function get scriptDataImmediate() : Boolean
|
||||
{
|
||||
return this._scriptDataImmediate;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new HTTPStreamingIndexHandlerEvent(type,bubbles,cancelable,this.live,this.offset,this.streamNames,this.rates,this.request,this.requestContext,this.binaryData,this.segmentDuration,this.scriptDataObject,this.scriptDataFirst,this.scriptDataImmediate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class LoadEvent extends Event
|
||||
{
|
||||
|
||||
public static const LOAD_STATE_CHANGE:String = "loadStateChange";
|
||||
|
||||
public static const BYTES_LOADED_CHANGE:String = "bytesLoadedChange";
|
||||
|
||||
public static const BYTES_TOTAL_CHANGE:String = "bytesTotalChange";
|
||||
|
||||
private var _loadState:String;
|
||||
|
||||
private var _bytes:Number;
|
||||
|
||||
public function LoadEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:String = null, param5:Number = NaN)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._loadState = param4;
|
||||
this._bytes = param5;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new LoadEvent(type,bubbles,cancelable,this.loadState,this.bytes);
|
||||
}
|
||||
|
||||
public function get loadState() : String
|
||||
{
|
||||
return this._loadState;
|
||||
}
|
||||
|
||||
public function get bytes() : Number
|
||||
{
|
||||
return this._bytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
import org.osmf.traits.LoadTrait;
|
||||
import org.osmf.traits.LoaderBase;
|
||||
|
||||
public class LoaderEvent extends Event
|
||||
{
|
||||
|
||||
public static const LOAD_STATE_CHANGE:String = "loadStateChange";
|
||||
|
||||
private var _loader:LoaderBase;
|
||||
|
||||
private var _loadTrait:LoadTrait;
|
||||
|
||||
private var _oldState:String;
|
||||
|
||||
private var _newState:String;
|
||||
|
||||
public function LoaderEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:LoaderBase = null, param5:LoadTrait = null, param6:String = null, param7:String = null)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._loader = param4;
|
||||
this._loadTrait = param5;
|
||||
this._oldState = param6;
|
||||
this._newState = param7;
|
||||
}
|
||||
|
||||
public function get loader() : LoaderBase
|
||||
{
|
||||
return this._loader;
|
||||
}
|
||||
|
||||
public function get loadTrait() : LoadTrait
|
||||
{
|
||||
return this._loadTrait;
|
||||
}
|
||||
|
||||
public function get oldState() : String
|
||||
{
|
||||
return this._oldState;
|
||||
}
|
||||
|
||||
public function get newState() : String
|
||||
{
|
||||
return this._newState;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new LoaderEvent(type,bubbles,cancelable,this.loader,this.loadTrait,this.oldState,this.newState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class MediaElementChangeEvent extends Event
|
||||
{
|
||||
|
||||
public static const MEDIA_ELEMENT_CHANGE:String = "mediaElementChange";
|
||||
|
||||
public function MediaElementChangeEvent(param1:String, param2:Boolean = false, param3:Boolean = false)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new MediaElementChangeEvent(type,bubbles,cancelable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
import org.osmf.metadata.Metadata;
|
||||
|
||||
public class MediaElementEvent extends Event
|
||||
{
|
||||
|
||||
public static const TRAIT_ADD:String = "traitAdd";
|
||||
|
||||
public static const TRAIT_REMOVE:String = "traitRemove";
|
||||
|
||||
public static const METADATA_ADD:String = "metadataAdd";
|
||||
|
||||
public static const METADATA_REMOVE:String = "metadataRemove";
|
||||
|
||||
private var _traitType:String;
|
||||
|
||||
private var _namespaceURL:String;
|
||||
|
||||
private var _metadata:Metadata;
|
||||
|
||||
public function MediaElementEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:String = null, param5:String = null, param6:Metadata = null)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._traitType = param4;
|
||||
this._namespaceURL = param5;
|
||||
this._metadata = param6;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new MediaElementEvent(type,bubbles,cancelable,this.traitType,this.namespaceURL,this.metadata);
|
||||
}
|
||||
|
||||
public function get traitType() : String
|
||||
{
|
||||
return this._traitType;
|
||||
}
|
||||
|
||||
public function get namespaceURL() : String
|
||||
{
|
||||
return this._namespaceURL;
|
||||
}
|
||||
|
||||
public function get metadata() : Metadata
|
||||
{
|
||||
return this._metadata;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
public class MediaError extends Error
|
||||
{
|
||||
|
||||
private var _detail:String;
|
||||
|
||||
public function MediaError(param1:int, param2:String = null)
|
||||
{
|
||||
super(this.getMessageForErrorID(param1),param1);
|
||||
this._detail = param2;
|
||||
}
|
||||
|
||||
public function get detail() : String
|
||||
{
|
||||
return this._detail;
|
||||
}
|
||||
|
||||
protected function getMessageForErrorID(param1:int) : String
|
||||
{
|
||||
return MediaErrorCodes.getMessageForErrorID(param1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import org.osmf.utils.OSMFStrings;
|
||||
|
||||
public final class MediaErrorCodes
|
||||
{
|
||||
|
||||
public static const IO_ERROR:int = 1;
|
||||
|
||||
public static const SECURITY_ERROR:int = 2;
|
||||
|
||||
public static const ASYNC_ERROR:int = 3;
|
||||
|
||||
public static const ARGUMENT_ERROR:int = 4;
|
||||
|
||||
public static const URL_SCHEME_INVALID:int = 5;
|
||||
|
||||
public static const HTTP_GET_FAILED:int = 6;
|
||||
|
||||
public static const MEDIA_LOAD_FAILED:int = 7;
|
||||
|
||||
public static const PLUGIN_VERSION_INVALID:int = 8;
|
||||
|
||||
public static const PLUGIN_IMPLEMENTATION_INVALID:int = 9;
|
||||
|
||||
public static const SOUND_PLAY_FAILED:int = 10;
|
||||
|
||||
public static const NETCONNECTION_REJECTED:int = 11;
|
||||
|
||||
public static const NETCONNECTION_APPLICATION_INVALID:int = 12;
|
||||
|
||||
public static const NETCONNECTION_FAILED:int = 13;
|
||||
|
||||
public static const NETCONNECTION_TIMEOUT:int = 14;
|
||||
|
||||
public static const NETSTREAM_PLAY_FAILED:int = 15;
|
||||
|
||||
public static const NETSTREAM_STREAM_NOT_FOUND:int = 16;
|
||||
|
||||
public static const NETSTREAM_FILE_STRUCTURE_INVALID:int = 17;
|
||||
|
||||
public static const NETSTREAM_NO_SUPPORTED_TRACK_FOUND:int = 18;
|
||||
|
||||
public static const DRM_SYSTEM_UPDATE_ERROR:int = 19;
|
||||
|
||||
public static const DVRCAST_SUBSCRIBE_FAILED:int = 20;
|
||||
|
||||
public static const DVRCAST_CONTENT_OFFLINE:int = 21;
|
||||
|
||||
public static const DVRCAST_STREAM_INFO_RETRIEVAL_FAILED:int = 22;
|
||||
|
||||
public static const F4M_FILE_INVALID:int = 23;
|
||||
|
||||
private static const errorMap:Array = [{
|
||||
"errorID":IO_ERROR,
|
||||
"message":OSMFStrings.IO_ERROR
|
||||
},{
|
||||
"errorID":SECURITY_ERROR,
|
||||
"message":OSMFStrings.SECURITY_ERROR
|
||||
},{
|
||||
"errorID":ASYNC_ERROR,
|
||||
"message":OSMFStrings.ASYNC_ERROR
|
||||
},{
|
||||
"errorID":ARGUMENT_ERROR,
|
||||
"message":OSMFStrings.ARGUMENT_ERROR
|
||||
},{
|
||||
"errorID":URL_SCHEME_INVALID,
|
||||
"message":OSMFStrings.URL_SCHEME_INVALID
|
||||
},{
|
||||
"errorID":HTTP_GET_FAILED,
|
||||
"message":OSMFStrings.HTTP_GET_FAILED
|
||||
},{
|
||||
"errorID":MEDIA_LOAD_FAILED,
|
||||
"message":OSMFStrings.MEDIA_LOAD_FAILED
|
||||
},{
|
||||
"errorID":PLUGIN_VERSION_INVALID,
|
||||
"message":OSMFStrings.PLUGIN_VERSION_INVALID
|
||||
},{
|
||||
"errorID":PLUGIN_IMPLEMENTATION_INVALID,
|
||||
"message":OSMFStrings.PLUGIN_IMPLEMENTATION_INVALID
|
||||
},{
|
||||
"errorID":SOUND_PLAY_FAILED,
|
||||
"message":OSMFStrings.SOUND_PLAY_FAILED
|
||||
},{
|
||||
"errorID":NETCONNECTION_REJECTED,
|
||||
"message":OSMFStrings.NETCONNECTION_REJECTED
|
||||
},{
|
||||
"errorID":NETCONNECTION_APPLICATION_INVALID,
|
||||
"message":OSMFStrings.NETCONNECTION_APPLICATION_INVALID
|
||||
},{
|
||||
"errorID":NETCONNECTION_FAILED,
|
||||
"message":OSMFStrings.NETCONNECTION_FAILED
|
||||
},{
|
||||
"errorID":NETCONNECTION_TIMEOUT,
|
||||
"message":OSMFStrings.NETCONNECTION_TIMEOUT
|
||||
},{
|
||||
"errorID":NETSTREAM_PLAY_FAILED,
|
||||
"message":OSMFStrings.NETSTREAM_PLAY_FAILED
|
||||
},{
|
||||
"errorID":NETSTREAM_STREAM_NOT_FOUND,
|
||||
"message":OSMFStrings.NETSTREAM_STREAM_NOT_FOUND
|
||||
},{
|
||||
"errorID":NETSTREAM_FILE_STRUCTURE_INVALID,
|
||||
"message":OSMFStrings.NETSTREAM_FILE_STRUCTURE_INVALID
|
||||
},{
|
||||
"errorID":NETSTREAM_NO_SUPPORTED_TRACK_FOUND,
|
||||
"message":OSMFStrings.NETSTREAM_NO_SUPPORTED_TRACK_FOUND
|
||||
},{
|
||||
"errorID":DRM_SYSTEM_UPDATE_ERROR,
|
||||
"message":OSMFStrings.DRM_SYSTEM_UPDATE_ERROR
|
||||
},{
|
||||
"errorID":DVRCAST_SUBSCRIBE_FAILED,
|
||||
"message":OSMFStrings.DVRCAST_SUBSCRIBE_FAILED
|
||||
},{
|
||||
"errorID":DVRCAST_CONTENT_OFFLINE,
|
||||
"message":OSMFStrings.DVRCAST_CONTENT_OFFLINE
|
||||
},{
|
||||
"errorID":DVRCAST_STREAM_INFO_RETRIEVAL_FAILED,
|
||||
"message":OSMFStrings.DVRCAST_STREAM_INFO_RETRIEVAL_FAILED
|
||||
},{
|
||||
"errorID":F4M_FILE_INVALID,
|
||||
"message":OSMFStrings.F4M_FILE_INVALID
|
||||
}];
|
||||
|
||||
public function MediaErrorCodes()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
internal static function getMessageForErrorID(param1:int) : String
|
||||
{
|
||||
var _loc2_:String = "";
|
||||
var _loc3_:int = 0;
|
||||
while(_loc3_ < errorMap.length)
|
||||
{
|
||||
if(errorMap[_loc3_].errorID == param1)
|
||||
{
|
||||
_loc2_ = OSMFStrings.getString(errorMap[_loc3_].message);
|
||||
break;
|
||||
}
|
||||
_loc3_++;
|
||||
}
|
||||
return _loc2_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class MediaErrorEvent extends Event
|
||||
{
|
||||
|
||||
public static const MEDIA_ERROR:String = "mediaError";
|
||||
|
||||
private var _error:MediaError;
|
||||
|
||||
public function MediaErrorEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:MediaError = null)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._error = param4;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new MediaErrorEvent(type,bubbles,cancelable,this.error);
|
||||
}
|
||||
|
||||
public function get error() : MediaError
|
||||
{
|
||||
return this._error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
import org.osmf.media.MediaElement;
|
||||
import org.osmf.media.MediaResourceBase;
|
||||
|
||||
public class MediaFactoryEvent extends Event
|
||||
{
|
||||
|
||||
public static const PLUGIN_LOAD:String = "pluginLoad";
|
||||
|
||||
public static const PLUGIN_LOAD_ERROR:String = "pluginLoadError";
|
||||
|
||||
public static const MEDIA_ELEMENT_CREATE:String = "mediaElementCreate";
|
||||
|
||||
private var _resource:MediaResourceBase;
|
||||
|
||||
private var _mediaElement:MediaElement;
|
||||
|
||||
public function MediaFactoryEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:MediaResourceBase = null, param5:MediaElement = null)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._resource = param4;
|
||||
this._mediaElement = param5;
|
||||
}
|
||||
|
||||
public function get resource() : MediaResourceBase
|
||||
{
|
||||
return this._resource;
|
||||
}
|
||||
|
||||
public function get mediaElement() : MediaElement
|
||||
{
|
||||
return this._mediaElement;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new MediaFactoryEvent(type,bubbles,cancelable,this._resource,this._mediaElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class MediaPlayerCapabilityChangeEvent extends Event
|
||||
{
|
||||
|
||||
public static const CAN_PLAY_CHANGE:String = "canPlayChange";
|
||||
|
||||
public static const CAN_SEEK_CHANGE:String = "canSeekChange";
|
||||
|
||||
public static const TEMPORAL_CHANGE:String = "temporalChange";
|
||||
|
||||
public static const HAS_AUDIO_CHANGE:String = "hasAudioChange";
|
||||
|
||||
public static const IS_DYNAMIC_STREAM_CHANGE:String = "isDynamicStreamChange";
|
||||
|
||||
public static const CAN_LOAD_CHANGE:String = "canLoadChange";
|
||||
|
||||
public static const CAN_BUFFER_CHANGE:String = "canBufferChange";
|
||||
|
||||
public static const HAS_DRM_CHANGE:String = "hasDRMChange";
|
||||
|
||||
public static const HAS_DISPLAY_OBJECT_CHANGE:String = "hasDisplayObjectChange";
|
||||
|
||||
private var _enabled:Boolean;
|
||||
|
||||
public function MediaPlayerCapabilityChangeEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:Boolean = false)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._enabled = param4;
|
||||
}
|
||||
|
||||
public function get enabled() : Boolean
|
||||
{
|
||||
return this._enabled;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new MediaPlayerCapabilityChangeEvent(type,bubbles,cancelable,this._enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class MediaPlayerStateChangeEvent extends Event
|
||||
{
|
||||
|
||||
public static const MEDIA_PLAYER_STATE_CHANGE:String = "mediaPlayerStateChange";
|
||||
|
||||
private var _state:String;
|
||||
|
||||
public function MediaPlayerStateChangeEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:String = null)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._state = param4;
|
||||
}
|
||||
|
||||
public function get state() : String
|
||||
{
|
||||
return this._state;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new MediaPlayerStateChangeEvent(type,bubbles,cancelable,this._state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class MetadataEvent extends Event
|
||||
{
|
||||
|
||||
public static const VALUE_ADD:String = "valueAdd";
|
||||
|
||||
public static const VALUE_REMOVE:String = "valueRemove";
|
||||
|
||||
public static const VALUE_CHANGE:String = "valueChange";
|
||||
|
||||
private var _key:String;
|
||||
|
||||
private var _value:*;
|
||||
|
||||
private var _oldValue:*;
|
||||
|
||||
public function MetadataEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:String = null, param5:* = null, param6:* = null)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._key = param4;
|
||||
this._value = param5;
|
||||
this._oldValue = param6;
|
||||
}
|
||||
|
||||
public function get key() : String
|
||||
{
|
||||
return this._key;
|
||||
}
|
||||
|
||||
public function get value() : *
|
||||
{
|
||||
return this._value;
|
||||
}
|
||||
|
||||
public function get oldValue() : *
|
||||
{
|
||||
return this._oldValue;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new MetadataEvent(type,bubbles,cancelable,this._key,this._value,this._oldValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
import flash.net.NetConnection;
|
||||
import org.osmf.media.URLResource;
|
||||
|
||||
public class NetConnectionFactoryEvent extends Event
|
||||
{
|
||||
|
||||
public static const CREATION_COMPLETE:String = "creationComplete";
|
||||
|
||||
public static const CREATION_ERROR:String = "creationError";
|
||||
|
||||
private var _netConnection:NetConnection;
|
||||
|
||||
private var _resource:URLResource;
|
||||
|
||||
private var _mediaError:MediaError;
|
||||
|
||||
public function NetConnectionFactoryEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:NetConnection = null, param5:URLResource = null, param6:MediaError = null)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._netConnection = param4;
|
||||
this._resource = param5;
|
||||
this._mediaError = param6;
|
||||
}
|
||||
|
||||
public function get netConnection() : NetConnection
|
||||
{
|
||||
return this._netConnection;
|
||||
}
|
||||
|
||||
public function get resource() : URLResource
|
||||
{
|
||||
return this._resource;
|
||||
}
|
||||
|
||||
public function get mediaError() : MediaError
|
||||
{
|
||||
return this._mediaError;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new NetConnectionFactoryEvent(type,bubbles,cancelable,this._netConnection,this._resource,this._mediaError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class PlayEvent extends Event
|
||||
{
|
||||
|
||||
public static const CAN_PAUSE_CHANGE:String = "canPauseChange";
|
||||
|
||||
public static const PLAY_STATE_CHANGE:String = "playStateChange";
|
||||
|
||||
private var _playState:String;
|
||||
|
||||
private var _canPause:Boolean;
|
||||
|
||||
public function PlayEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:String = null, param5:Boolean = false)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._playState = param4;
|
||||
this._canPause = param5;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new PlayEvent(type,bubbles,cancelable,this.playState,this.canPause);
|
||||
}
|
||||
|
||||
public function get playState() : String
|
||||
{
|
||||
return this._playState;
|
||||
}
|
||||
|
||||
public function get canPause() : Boolean
|
||||
{
|
||||
return this._canPause;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
import org.osmf.media.MediaResourceBase;
|
||||
|
||||
public class PluginManagerEvent extends Event
|
||||
{
|
||||
|
||||
public static const PLUGIN_LOAD:String = "pluginLoad";
|
||||
|
||||
public static const PLUGIN_LOAD_ERROR:String = "pluginLoadError";
|
||||
|
||||
private var _resource:MediaResourceBase;
|
||||
|
||||
public function PluginManagerEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:MediaResourceBase = null)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._resource = param4;
|
||||
}
|
||||
|
||||
public function get resource() : MediaResourceBase
|
||||
{
|
||||
return this._resource;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new PluginManagerEvent(type,bubbles,cancelable,this._resource);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class SeekEvent extends Event
|
||||
{
|
||||
|
||||
public static const SEEKING_CHANGE:String = "seekingChange";
|
||||
|
||||
private var _seeking:Boolean = false;
|
||||
|
||||
private var _time:Number;
|
||||
|
||||
public function SeekEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:Boolean = false, param5:Number = NaN)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._seeking = param4;
|
||||
this._time = param5;
|
||||
}
|
||||
|
||||
public function get seeking() : Boolean
|
||||
{
|
||||
return this._seeking;
|
||||
}
|
||||
|
||||
public function get time() : Number
|
||||
{
|
||||
return this._time;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new SeekEvent(type,bubbles,cancelable,this._seeking,this._time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class TimeEvent extends Event
|
||||
{
|
||||
|
||||
public static const CURRENT_TIME_CHANGE:String = "currentTimeChange";
|
||||
|
||||
public static const DURATION_CHANGE:String = "durationChange";
|
||||
|
||||
public static const COMPLETE:String = "complete";
|
||||
|
||||
private var _time:Number;
|
||||
|
||||
public function TimeEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:Number = NaN)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
this._time = param4;
|
||||
}
|
||||
|
||||
public function get time() : Number
|
||||
{
|
||||
return this._time;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new TimeEvent(type,bubbles,cancelable,this.time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.osmf.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
import org.osmf.metadata.TimelineMarker;
|
||||
|
||||
public class TimelineMetadataEvent extends MetadataEvent
|
||||
{
|
||||
|
||||
public static const MARKER_TIME_REACHED:String = "markerTimeReached";
|
||||
|
||||
public static const MARKER_DURATION_REACHED:String = "markerDurationReached";
|
||||
|
||||
public static const MARKER_ADD:String = "markerAdd";
|
||||
|
||||
public static const MARKER_REMOVE:String = "markerRemove";
|
||||
|
||||
private var _marker:TimelineMarker;
|
||||
|
||||
public function TimelineMetadataEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:TimelineMarker = null)
|
||||
{
|
||||
super(param1,param2,param3,"" + param4.time,param4);
|
||||
this._marker = param4;
|
||||
}
|
||||
|
||||
public function get marker() : TimelineMarker
|
||||
{
|
||||
return this._marker;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new TimelineMetadataEvent(type,bubbles,cancelable,this._marker);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user