| Package | com.akamai.net |
| Class | public class AkamaiNetLoader |
| Inheritance | AkamaiNetLoader flash.events.EventDispatcher |
AkamaiStreamController class.
| Property | Defined By | ||
|---|---|---|---|
| HDPrimaryToken : String
Primary token used to connect to Akamai HD 1.0 Streams. | AkamaiNetLoader | ||
| mediaType : String [read-only]
Returns the media type of the resource
| AkamaiNetLoader | ||
| MEDIA_TYPE_NOT_ACCEPTED : String = This class is for use with HDN 1.0 and RTMP stream types only. For HDS, you should use AkamaiStreamController class [static] | AkamaiNetLoader | ||
| netStream : NetStream [read-only]
Returns the NetStream instance established by the class
| AkamaiNetLoader | ||
| ovpConnection : OvpConnection [read-only]
Returns the OvpConnection instance established by the class. | AkamaiNetLoader | ||
| ready : Boolean [read-only]
Since type inspection is an asynchronous operaiton, the ready flag turns true once the inspection process is complete. | AkamaiNetLoader | ||
| rtmpConnectionAuth : String
The connection level auth token for playing secure RTMP VOD streams over Akamai. | AkamaiNetLoader | ||
| rtmpStreamAuth : String
The stream level auth token for playing secure RTMP live streams over Akamai. | AkamaiNetLoader | ||
| streamName : Object [read-only]
Returns the the stream name associated with the resource. | AkamaiNetLoader | ||
| version : String [read-only]
Returns the current version of the library
| AkamaiNetLoader | ||
| Method | Defined By | ||
|---|---|---|---|
AkamaiNetLoader(target:IEventDispatcher = null)
Constructor
| AkamaiNetLoader | ||
initialize(resource:String):void
initialize is called to initiate the process of inspecting the resource type and establishing the appropriate
NetConneciton and NetStreams. | AkamaiNetLoader | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when the class has completed initializing the relevant NetConnection and NetStream objects for the resource. | AkamaiNetLoader | |||
| Dispatched when the class has a debug message to send. | AkamaiNetLoader | |||
| Dispatched when the class encounters an error. | AkamaiNetLoader | |||
| HDPrimaryToken | property |
HDPrimaryToken:StringPrimary token used to connect to Akamai HD 1.0 Streams.
public function get HDPrimaryToken():String public function set HDPrimaryToken(value:String):void| MEDIA_TYPE_NOT_ACCEPTED | property |
public static var MEDIA_TYPE_NOT_ACCEPTED:String = This class is for use with HDN 1.0 and RTMP stream types only. For HDS, you should use AkamaiStreamController class| mediaType | property |
mediaType:String [read-only] Returns the media type of the resource
public function get mediaType():StringSee also
| netStream | property |
netStream:NetStream [read-only] Returns the NetStream instance established by the class
public function get netStream():NetStream| ovpConnection | property |
ovpConnection:OvpConnection [read-only] Returns the OvpConnection instance established by the class. To reach the NetConnection itself, use ovpConnection.netConnection.
public function get ovpConnection():OvpConnectionSee also
| ready | property |
ready:Boolean [read-only] Since type inspection is an asynchronous operaiton, the ready flag turns true once the inspection process is complete. Once the class is ready, the mediaType, netStream, streamname and ovpConneciton properties can be read.
public function get ready():BooleanSee also
| rtmpConnectionAuth | property |
rtmpConnectionAuth:StringThe connection level auth token for playing secure RTMP VOD streams over Akamai.
public function get rtmpConnectionAuth():String public function set rtmpConnectionAuth(value:String):void| rtmpStreamAuth | property |
rtmpStreamAuth:StringThe stream level auth token for playing secure RTMP live streams over Akamai.
public function get rtmpStreamAuth():String public function set rtmpStreamAuth(value:String):void| streamName | property |
streamName:Object [read-only] Returns the the stream name associated with the resource. This stream name can be a String, com.akamai.hd.IMBRObject or a org.openvideoplayer.net.dynamicstream.DynamicStreamItem.
public function get streamName():ObjectSee also
| version | property |
version:String [read-only] Returns the current version of the library
public function get version():String| AkamaiNetLoader | () | Constructor |
public function AkamaiNetLoader(target:IEventDispatcher = null)Constructor
Parameterstarget:IEventDispatcher (default = null) |
| initialize | () | method |
public function initialize(resource:String):voidinitialize is called to initiate the process of inspecting the resource type and establishing the appropriate NetConneciton and NetStreams.
Parameters
resource:String — a string representing a path to any Akamai media asset, including AMD SBR, HDN SBR and SMIL files for
both AMD and HDN.
|
IllegalOperationError — if the resource is an HDS (HTTP Dynamic Streaming) resource.
|
| complete | Event |
org.openvideoplayer.events.OvpEventDispatched when the class has completed initializing the relevant NetConnection and NetStream objects for the resource.
| debug | Event |
org.openvideoplayer.events.OvpEventDispatched when the class has a debug message to send.
| error | Event |
org.openvideoplayer.events.OvpEventDispatched when the class encounters an error. The data property in this case will contain an error string.
var loader:AkamaiNetLoader = new AkamaiNetLoader();
loader.addEventListener(OvpEvent.COMPLETE, onNetLoaderComplete);
loader.addEventListener(OvpEvent.ERROR, onError);
loader.addEventListener(OvpEvent.DEBUG, onDebug);
loader.initialize(MEDIA);
private function onNetLoaderComplete(event:OvpEvent):void
{
video.attachNetStream(netLoader.netStream);
netLoader.netStream.play(netLoader.streamName);
}
private function onError(event:OvpEvent):void
{
trace("The netloader encountered an error: " + (event.data as String));
}
private function onDebug(event:OvpEvent):void
{
trace(event.data as String);
}