ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
fl.video 

INCManager  - AS3 Flash

Packagefl.video
Interfacepublic interface INCManager
Implementors NCManager, NCManagerNative

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

The INCManager is the interface for classes that create the flash.net.NetConnection for the VideoPlayer class. The default INCManager implementation is the NCManager class. Use the NCManagerNative class when streaming from a Flash Media Server (FMS). You can also create a custom class that implements the INCManager interface and then have the VideoPlayer class use that class to create the NetConnection.

Use the following code to register a custom class as the INCManager implementation used by the VideoPlayer object. Replace fl.video.NCManagerNative with your custom class.

fl.video.VideoPlayer.iNCManagerClass = fl.video.NCManagerNative;

Related API Elements



Public Properties
 PropertyDefined By
  bitrate : Number
The bandwidth, in bits per second, used to switch between multiple streams.
INCManager
  isRTMP : Boolean
[read-only] Whether the URL is for RTMP streaming from a Flash Media Server (FMS) or a progressive download.
INCManager
  netConnection : NetConnection
[read-only] Reference to the NetConnection object.
INCManager
  streamHeight : int
[read-only] Height of the stream, in pixels.
INCManager
  streamLength : Number
[read-only] Length of the stream, in seconds.
INCManager
  streamName : String
[read-only] The stream name passed into the NetStream.play() method.
INCManager
  streamWidth : int
[read-only] Width of the stream, in pixels.
INCManager
  timeout : uint
The time in milliseconds after which attempts to make a connection stop.
INCManager
  videoPlayer : VideoPlayer
The VideoPlayer object that owns this object.
INCManager
Public Methods
 MethodDefined By
  
Closes the NetConnection.
INCManager
  
Called by the VideoPlayer object if the connection is successfully made but the stream is not found.
INCManager
  
Called by the VideoPlayer object to ask for a connection to the URL.
INCManager
  
getProperty(propertyName:String):*
Gets values of arbitrary properties supported by the class implementing INCManager.
INCManager
  
helperDone(helper:Object, success:Boolean):void
Called by any helper object doing a task for the NCManager object to signal it has completed and whether it was successful.
INCManager
  
Called by the VideoPlayer object to ask for reconnection after the connection is lost.
INCManager
  
setProperty(propertyName:String, value:*):void
Sets values of arbitrary properties supported by the class implementing INCManager.
INCManager
Property Detail

bitrate

property
bitrate:Number

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

The bandwidth, in bits per second, used to switch between multiple streams.



Implementation
    public function get bitrate():Number
    public function set bitrate(value:Number):void

isRTMP

property 
isRTMP:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Whether the URL is for RTMP streaming from a Flash Media Server (FMS) or a progressive download. If the stream is an RTMP stream from an FMS, then true. If the stream is a progressive download of an HTTP, local or other file, then false.



Implementation
    public function get isRTMP():Boolean

netConnection

property 
netConnection:NetConnection  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Reference to the NetConnection object.



Implementation
    public function get netConnection():NetConnection

streamHeight

property 
streamHeight:int  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Height of the stream, in pixels. After the VideoPlayer.ncConnected() method is called, if the streamHeight property is less than 0, that indicates to the VideoPlayer object that there is no stream height information. If the VideoPlayer object has the scaleMode property set to VideoScaleMode.MAINTAIN_ASPECT_RATIO or VideoScaleMode.NO_SCALE, then this value will be used and the resizing will happen instantly, rather than waiting.



Implementation
    public function get streamHeight():int

Related API Elements

streamLength

property 
streamLength:Number  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Length of the stream, in seconds. After the VideoPlayer.ncConnected() method is called, if it returns undefined, null or less than 0, then the VideoPlayer object knows that there is no stream length information. If stream length information is returned, it overrides any existing steam length information including information set by the totalTime parameter of the VideoPlayer.play() method or the VideoPlayer.load() method or information received from the FLV file's metadata.



Implementation
    public function get streamLength():Number

Related API Elements

streamName

property 
streamName:String  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

The stream name passed into the NetStream.play() method.



Implementation
    public function get streamName():String

streamWidth

property 
streamWidth:int  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Width of the stream, in pixels. After the VideoPlayer.ncConnected() method is called, if the streamWidth property is less than 0, that indicates to the VideoPlayer object that there is no stream width information. If the VideoPlayer object has the scaleMode property set to VideoScaleMode.MAINTAIN_ASPECT_RATIO or VideoScaleMode.NO_SCALE, then this value is used and the resizing happens instantly, rather than waiting.



Implementation
    public function get streamWidth():int

Related API Elements

timeout

property 
timeout:uint

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

The time in milliseconds after which attempts to make a connection stop.



Implementation
    public function get timeout():uint
    public function set timeout(value:uint):void

videoPlayer

property 
videoPlayer:VideoPlayer

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

The VideoPlayer object that owns this object.



Implementation
    public function get videoPlayer():VideoPlayer
    public function set videoPlayer(value:VideoPlayer):void
Method Detail

close

()method
public function close():void

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Closes the NetConnection.

connectAgain

()method 
public function connectAgain():Boolean

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Called by the VideoPlayer object if the connection is successfully made but the stream is not found. If multiple alternate interpretations of the RTMP URL are possible, it tries to connect to the server with a different URL and hand back a different stream name.

This can be necessary in cases where the URL is something like rtmp://servername/path1/path2/path3. When passing in an application name and an instance name, open the NetConnection object with rtmp://servername/path1/path2, or use the default instance so the stream is opened with path2/path3. In general, this is possible whenever there are more than two parts to the path but not possible if there are only two (there should never be only one).

Returns
Boolean — If an attempt is made to make another connection, then true. If an attempt has already been made or no additional attempts are merited, then false.

Related API Elements

connectToURL

()method 
public function connectToURL(url:String):Boolean

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Called by the VideoPlayer object to ask for a connection to the URL. Once a connection is successful or failed, then call the VideoPlayer.ncConnected() method. If the connection has failed, then set nc = null before calling.

Parameters

url:String — The URL to which the VideoPlayer object requests connection.

Returns
Boolean — If a connection is made synchronously, true. If an attempt is made asynchronously so caller should expect a "connected" event coming, false.

Related API Elements

getProperty

()method 
public function getProperty(propertyName:String):*

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Gets values of arbitrary properties supported by the class implementing INCManager. See the specific implementing class for list of supported properties. Calling this method on an unsupported property throws a VideoError object with code VideoError.UNSUPPORTED_PROPERTY=1011.

Parameters

propertyName:String — The name of the property that the getProperty method is calling.

Returns
* — The values of the properties.

helperDone

()method 
public function helperDone(helper:Object, success:Boolean):void

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Called by any helper object doing a task for the NCManager object to signal it has completed and whether it was successful. The NCManager object uses this with SMILManager.

Parameters

helper:Object — The helper object.
 
success:Boolean — A setting to signal when a task is completed. If success is true, then the task was completed successfully; otherwise false.

reconnect

()method 
public function reconnect():void

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Called by the VideoPlayer object to ask for reconnection after the connection is lost. Once the connection is either successful or failed, call the VideoPlayer.ncReconnected() method. If the connection failed, set nc = null before calling.

Related API Elements

setProperty

()method 
public function setProperty(propertyName:String, value:*):void

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Sets values of arbitrary properties supported by the class implementing INCManager. See the specific implementing class for list of supported properties. Calling this method on an unsupported property throws a VideoError object with code VideoError.UNSUPPORTED_PROPERTY=1011.

Parameters

propertyName:String — The name of the property that the setProperty method is calling.
 
value:* — The property value.