- Top
- Summary
- Constructors
- Class properties
- Instance properties
- Class methods
- Instance methods
- Event handlers
NCManager
| Kind of class: | class |
|---|---|
| Inherits from: | none |
| Implements: | |
| Classpath: | mx.video.NCManager |
| File last modified: | Tuesday, 18 December 2007, 16:08:42 |
Creates NetConnection for VideoPlayer, a
helper class for that user facing class.
NCManager supports a subset of SMIL to handle multiple streams
for multiple bandwidths. NCManager assumes any URL that does not
begin with "rtmp://", does not end with ".flv" and does not
have any parameters is a SMIL url. See SMILParser for more on SMIL
support.
- SMILParser
Summary
- version : String
- shortVersion : String
- _owner : VideoPlayer
- _contentPath : String
- _protocol : String
- _serverName : String
- _portNumber : String
- _wrappedURL : String
- _appName : String
- _streamName : String
- _streamLength : Number
- _streamWidth : Number
- _streamHeight : Number
- _streams : Array
- _isRTMP : Boolean
- _smilMgr : SMILManager
- _fpadMgr : FPADManager
- fpadZone : Number
- _bitrate : Number
- fallbackServerName : String
- _timeoutIntervalId : Number
- _timeout : Number
- DEFAULT_TIMEOUT : Number
- Default connection timeout in milliseconds.
- _payload : Number
- _autoSenseBW : Boolean
- _nc : NetConnection
- _ncUri : String
- _ncConnected : Boolean
- _tryNC : Array
- _tryNCIntervalId : Number
- _connTypeCounter : Number
- stripFrontAndBackWhiteSpace (p_str:String) : String
- initNCInfo : Void
- initOtherInfo : Void
- getTimeout : Number
- Get the timeout after which we give up on connection in
- setTimeout (t:Number) : Void
- Set the timeout after which we give up on connection in
- getBitrate : Number
- For RTMP streams, returns value calculated from autodetection,
- setBitrate (b:Number) : Void
- This value is only used with progressive download (HTTP), with
- getVideoPlayer : VideoPlayer
- setVideoPlayer (v:VideoPlayer) : Void
- getNetConnection : NetConnection
- getStreamName : String
- isRTMP : Boolean
- getStreamLength : Number
- getStreamWidth : Number
- getStreamHeight : Number
- connectToURL (url:String) : Boolean
- connectAgain : Boolean
- reconnect : Void
- close : Void
- helperDone (helper:Object, success:Boolean)
- Called by SMILManager when done.
- bitrateMatch : Void
- matches bitrate with stream
- parseURL (url:String) : Object
- canReuseOldConnection (parseResults:Object) : Boolean
- connectHTTP : Boolean
- connectRTMP : Boolean
- connectFPAD (url:String) : Boolean
- nextConnect : Void
- cleanConns
- tryFallBack : Void
- connectOnStatus (target:NetConnection, info:Object) : Void
- netStatus event listener when connecting
- reconnectOnStatus (target:NetConnection, info:Object) : Void
- netStatus event listener when reconnecting
- disconnectOnStatus (target:NetConnection, info:Object) : Void
- netStatus event listener for disconnecting extra
- getStreamLengthResult (length:Number) : Void
- Responder function to receive streamLength result from
- _onFCSConnectTimeOut : Void
Event handlers- onReconnected : Void
- dispatches reconnect event, called by
- onConnected (p_nc:NetConnection, p_bw:Number) : Void
- getBitrate : Number
- setTimeout (t:Number) : Void
Constructor
NCManager
Class properties
shortVersion
version
Instance properties
_appName
_autoSenseBW
_bitrate
_connTypeCounter
_contentPath
_fpadMgr
_isRTMP
_nc
_ncConnected
_ncUri
_owner
_payload
_portNumber
_protocol
_serverName
_smilMgr
_streamHeight
_streamLength
_streamName
_streams
_streamWidth
_timeout
_timeoutIntervalId
_tryNC
_tryNCIntervalId
_wrappedURL
DEFAULT_TIMEOUT
fallbackServerName
fallbackServerName is exposed in two ways:
User can supply second in smil and that base
attr will be taken as the fallbackServerName (note that only
the server name will be taken from this and not the application
name or anything else).
The second way is the user can directly set this by
accessing the ncMgr property in FLVPlayback or VideoPlayer and
set fallbackServerName property directly.
fpadZone
Class methods
stripFrontAndBackWhiteSpace
Instance methods
_onFCSConnectTimeOut
Called on interval to timeout all connection attempts.
For creating rtmp connections.
bitrateMatch
canReuseOldConnection
Compares connection info with previous NetConnection,
will reuse existing connection if possible.
cleanConns
Stops all intervals, closes all unneeded connections, and other
cleanup related to the connectRTMP strategy of
pipelining connection attempts to different protocols and
ports.
For creating rtmp connections.
connectAgain
- true if will attempt to make another connection,#
false if already made attempt or no additional attempts
are merited.
connectFPAD
Top level function for downloading fpad XML from FMS 2.0
server. Creates and kicks off a FPADManager instance
which does all the work.
connectHTTP
Handles creating NetConnection instance for
progressive download of FLV via http.
connectOnStatus
connectRTMP
Top level function for creating NetConnectioninstance for streaming playback of FLV via rtmp. Actually
tries to create several different connections using different
protocols and ports in a pipeline, so multiple connection
attempts may be occurring simultaneously, and will use the
first one that connects successfully.
connectToURL
- true if connection made synchronously, false attempt#
made asynchronously so caller should expect a "connected"
event coming.
disconnectOnStatus
NetConnections that were opened in parallel
getBitrate
not value set via setBitrate().
getNetConnection
getStreamHeight
getStreamLength
getStreamLengthResult
server after making rpc
getStreamName
getStreamWidth
getTimeout
milliseconds.
getVideoPlayer
helperDone
SMILManager when done. initNCInfo
initOtherInfo
nextConnect
Does work of trying to open rtmp connections. Called either
by connectRTMP or on an interval set up in
that method.
For creating rtmp connections.
parseURL
Parses URL to determine if it is http or rtmp. If it is rtmp,
breaks it into pieces to extract server URL and port, application
name and stream name. If .flv is at the end of an rtmp URL, it
will be stripped off.
reconnect
reconnectOnStatus
setBitrate
RTMP streaming uses autodetection.
setTimeout
milliseconds.
setVideoPlayer
tryFallBack
Starts another pipelined connection attempt withconnectRTMP with the fallback server.
For creating rtmp connections.
Event handlers
onConnected
Starts another pipelined connection attempt withconnectRTMP with the fallback server.
For creating rtmp connections.
onReconnected
NetConnection.onBWDone