| Package | com.akamai.net |
| Class | public class AkamaiNetStream |
| Inheritance | AkamaiNetStream OvpNetStream flash.net.NetStream |
| Subclasses | AkamaiEnhancedNetStream |
| Property | Defined By | ||
|---|---|---|---|
![]() | bufferPercentage : Number [read-only]
The buffer percentage currently reported by the stream. | OvpNetStream | |
![]() | bufferTimeout : Number | OvpNetStream | |
![]() | client : Object [override] [write-only]
Sets the client object for this class, to enable integration into existing players which
like to receive onMetaData, onPlayStatus etc via callback events. | OvpNetStream | |
![]() | createProgressivePauseEvents : Boolean
Since the Flash player does not dispatch pause and resume events for progressive download files,
setting this property to true, will cause this class to dispatch the proper events when pause or
resume is called. | OvpNetStream | |
![]() | fastStartMinBufferLength : Number
Added by Will for suppport player
| OvpNetStream | |
![]() | isBuffering : Boolean [read-only]
Returns the buffering status of the stream. | OvpNetStream | |
![]() | isLive : Boolean
The isLive flag is a convenience property. | OvpNetStream | |
![]() | isProgressive : Boolean [read-only]
Informs whether the current connection is progressive or not. | OvpNetStream | |
| liveRetryInterval : Number
Defines the live stream retry interval in seconds
| AkamaiNetStream | ||
| liveStreamAuthParams : String
The name-value pairs required for invoking stream-level authorization services against
live streams on the Akamai network. | AkamaiNetStream | ||
| liveStreamMasterTimeout : Number
The maximum number of seconds the class should wait before timing out while trying to locate a live stream
on the network. | AkamaiNetStream | ||
![]() | maxBufferLength : Number
The desired buffer length set for the NetStream, in seconds. | OvpNetStream | |
![]() | netConnection : NetConnection [read-only]
Get the NetConnection object this class is using. | OvpNetStream | |
![]() | panning : Number
The panning of the current NetStream. | OvpNetStream | |
![]() | progressInterval : Number
The interval in milliseconds at which the OvpEvent.PROGRESS event is dispatched. | OvpNetStream | |
| retryLiveStreamsIfUnavailable : Boolean
If this property is true, then if a live stream is playing and becomes unpublished due
to both the primary and backup encoders ceasing to publish, the class will automatically
enter into a retry cycle, where it will attempt to play the streams again. | AkamaiNetStream | ||
![]() | streamLength : Number [read-only]
The stream length for a progressive download. | OvpNetStream | |
![]() | streamTimeout : Number
The maximum number of seconds the class should wait before timing out while trying to locate a stream
on the network. | OvpNetStream | |
![]() | timeAsTimeCode : String [read-only]
Returns the current time of the stream, as timecode HH:MM:SS. | OvpNetStream | |
![]() | useFastStartBuffer : Boolean
Dictates whether a fast start (dual buffer) strategy should be used. | OvpNetStream | |
![]() | volume : Number
The volume of the NetStream. | OvpNetStream | |
| Property | Defined By | ||
|---|---|---|---|
| _akamaiConnection : AkamaiConnection | AkamaiNetStream | ||
| _liveRetryInterval : Number | AkamaiNetStream | ||
| _liveStreamAuthParams : String | AkamaiNetStream | ||
| _liveStreamMasterTimeout : Number | AkamaiNetStream | ||
| _liveStreamRetryTimer : Timer | AkamaiNetStream | ||
| _liveStreamTimeoutTimer : Timer | AkamaiNetStream | ||
| _pendingLiveStreamName : String | AkamaiNetStream | ||
| _playingLiveStream : Boolean | AkamaiNetStream | ||
| _playReissueRequired : Boolean | AkamaiNetStream | ||
| _retryLiveStreamsIfUnavailable : Boolean | AkamaiNetStream | ||
| _successfullySubscribed : Boolean | AkamaiNetStream | ||
| Method | Defined By | ||
|---|---|---|---|
AkamaiNetStream(connection:Object)
Constructor
| AkamaiNetStream | ||
close():void [override]
Closes the stream. | AkamaiNetStream | ||
![]() | getMp3Id3Info(filename:String):Boolean
Initiates the process of extracting the ID3 information from an MP3 file. | OvpNetStream | |
![]() | pause():void [override] | OvpNetStream | |
play(... arguments):void [override]
This method supports both streaming and progressive playback. | AkamaiNetStream | ||
![]() | resume():void [override] | OvpNetStream | |
unsubscribe():Boolean
Initiates the process of unsubscribing from the active live NetStream. | AkamaiNetStream | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
![]() | Dispatched if the class receives an AsyncErrorEvent.ASYNC_ERROR event. | OvpNetStream | ||
![]() | Dispatched when a stream from a server is complete. | OvpNetStream | ||
![]() | Dispatched when an embedded cue point is reached while playing a video. | OvpNetStream | ||
![]() | Dispatched when the class has detected, by analyzing the NetStream.netStatus events, the end of the stream. | OvpNetStream | ||
![]() | Dispatched when an OVP error condition has occurred. | OvpNetStream | ||
![]() | Dispatched when the class receives information about ID3 data embedded in an MP3 file. | OvpNetStream | ||
![]() | Dispatched when the class receives an image embedded in a H.264 file. | OvpNetStream | ||
![]() | Dispatched when the class receives descriptive information embedded in the video file being played. | OvpNetStream | ||
![]() | Dispatched if the class' onFI callback is called. | OvpNetStream | ||
![]() | Dispatched when the class has completely played a stream or switches to a different stream in a server-side playlist. | OvpNetStream | ||
![]() | Dispatched repeatedly at the progressInterval once the class begins playing a stream. | OvpNetStream | ||
![]() | Dispatched if metadata matching the name "duration" is received while playing a progressive stream. | OvpNetStream | ||
| Dispatched when the class is making a new attempt to subscribe to a live stream. | AkamaiNetStream | |||
| Dispatched when the class has successfully subscribed to a live stream. | AkamaiNetStream | |||
![]() | Dispatched when the class receives text data embedded in a H.264 file. | OvpNetStream | ||
![]() | Dispatched if the trick timer event onTrickMotion callback is called. | OvpNetStream | ||
| Dispatched when the class has unsubscribed from a live stream, or when the live stream it was previously subscribed to has ceased publication. | AkamaiNetStream | |||
| Constant | Defined By | ||
|---|---|---|---|
| LIVE_RETRY_INTERVAL : Number = 15000 | AkamaiNetStream | ||
| LIVE_RETRY_TIMEOUT : Number = 1200000 | AkamaiNetStream | ||
| _akamaiConnection | property |
protected var _akamaiConnection:AkamaiConnection| _liveRetryInterval | property |
protected var _liveRetryInterval:Number| _liveStreamAuthParams | property |
protected var _liveStreamAuthParams:String| _liveStreamMasterTimeout | property |
protected var _liveStreamMasterTimeout:Number| _liveStreamRetryTimer | property |
protected var _liveStreamRetryTimer:Timer| _liveStreamTimeoutTimer | property |
protected var _liveStreamTimeoutTimer:Timer| _pendingLiveStreamName | property |
protected var _pendingLiveStreamName:String| _playingLiveStream | property |
protected var _playingLiveStream:Boolean| _playReissueRequired | property |
protected var _playReissueRequired:Boolean| _retryLiveStreamsIfUnavailable | property |
protected var _retryLiveStreamsIfUnavailable:Boolean| _successfullySubscribed | property |
protected var _successfullySubscribed:Boolean| liveRetryInterval | property |
liveRetryInterval:NumberDefines the live stream retry interval in seconds
The default value is 15.
public function get liveRetryInterval():Number public function set liveRetryInterval(value:Number):voidSee also
| liveStreamAuthParams | property |
liveStreamAuthParams:String public function get liveStreamAuthParams():String public function set liveStreamAuthParams(value:String):voidSee also
| liveStreamMasterTimeout | property |
liveStreamMasterTimeout:Number
The maximum number of seconds the class should wait before timing out while trying to locate a live stream
on the network. This time begins decrementing the moment a play request is made against a live
stream, or after the class receives an onUnpublish event while still playing a live stream, in which case it
attempts to automatically reconnect. After this master time out has been triggered, the class will issue
an OvpError.STREAM_NOT_FOUND event .
The default value is 1200.
public function get liveStreamMasterTimeout():Number public function set liveStreamMasterTimeout(value:Number):void| retryLiveStreamsIfUnavailable | property |
retryLiveStreamsIfUnavailable:BooleanIf this property is true, then if a live stream is playing and becomes unpublished due to both the primary and backup encoders ceasing to publish, the class will automatically enter into a retry cycle, where it will attempt to play the streams again. Similarly, if a play request is made and the live stream is not found, the class will reattempt the streams at a predefined interval. This interval is set by the liveRetryInterval. The retries will cease and timeout once the liveRetryTimeout value has elapsed without a successfull play.
The default value is true.
public function get retryLiveStreamsIfUnavailable():Boolean public function set retryLiveStreamsIfUnavailable(value:Boolean):voidSee also
| AkamaiNetStream | () | Constructor |
public function AkamaiNetStream(connection:Object)Constructor
Parametersconnection:Object — This object can be either an OvpConnection
object or a NetConnection object. If an OvpConnection
object is provided, the base class constructor will use
the NetConnection object within it.
If you are connecting to a live stream on the Akamai network,
we recommend passing in an AkamaiConnection object.
|
| close | () | method |
override public function close():voidCloses the stream.
See also
| play | () | method |
override public function play(... arguments):voidThis method supports both streaming and progressive playback.
Streaming playback: The stream name argument format will vary depending on the type of file you are streaming. The various conventions are best understood if we explain how the server processes the filename that it receives. If there is no reserved prefix at the start of the file, then FMS assumes that an FLV file is being played and will automatically append a ".flv" to the end of the stream name when retrieving the file from storage. If the stream name begins with "mp3:" then the server assumes that an .mp3 file is being played and will add a ".mp3" extension to the filename. If the stream beins with "mp4:" then the server assumes a H.264 file is being played and will add a ".mp4" extension unless it detects another extension already there. Given this server-side behavior, the following stream naming rules apply:Parameters
... arguments — name of the stream to play.
|
| unsubscribe | () | method |
public function unsubscribe():BooleanInitiates the process of unsubscribing from the active live NetStream. This method can only be called if the class is currently subscribed to a live stream. Since unsubscription is an asynchronous process, confirmation of a successful unsubscription is delivered via the OvpEvent.UNSUBSCRIBED event.
ReturnsBoolean — true if previously subscribed, otherwise false.
|
| subscribeattempt | Event |
org.openvideoplayer.events.OvpEventOvpEvent.SUBSCRIBE_ATTEMPTDispatched when the class is making a new attempt to subscribe to a live stream.
See also
| subscribed | Event |
org.openvideoplayer.events.OvpEventOvpEvent.SUBSCRIBEDDispatched when the class has successfully subscribed to a live stream.
See also
| unsubscribed | Event |
org.openvideoplayer.events.OvpEventOvpEvent.UNSUBSCRIBEDDispatched when the class has unsubscribed from a live stream, or when the live stream it was previously subscribed to has ceased publication.
See also
| LIVE_RETRY_INTERVAL | Constant |
protected const LIVE_RETRY_INTERVAL:Number = 15000| LIVE_RETRY_TIMEOUT | Constant |
protected const LIVE_RETRY_TIMEOUT:Number = 1200000