Name

rtmpconnection

Synopsis

LZX: rtmpconnection
JavaScript: lz.rtmpconnection
Type: Class
Access: public
Topic: Extensions.Audio-Video
Declared in: lps/components/extensions/av/rtmpconnection.lzx

Description

RTMP connection.

Superclass Chain

node (LzNode) » rtmpconnection

Known Subclasses

Details

Properties (6)

autoconnect
<attribute name="autoconnect" type="boolean" value="true" />
public var autoconnect : boolean;
Connect automatically during init. If false, you need to explicitly call connect(). Default is true.
debug
<attribute name="debug" value="false" />
public var debug;
Turn on for verbose debugger output.
_nc
<attribute name="_nc" value="null" />
private var _nc;
A reference to the Flash NetConnection object.
src
<attribute name="src" type="string" value="" />
public var src : String;
Application url, for example : "rtmp:/appname" or "rtmp://myserver.com/myapp/".
stage
<attribute name="stage" type="number" value="0" />
public var stage : Number;
Number to indicate what stage of connection we're in: 0: disconnected, 1: connecting, 2: connected.
status
<attribute name="status" type="string" value="disconnected" />
public var status : String;
String to indicate connection status.

Methods (4)

call()
<method name="call" args="func, obj, params" />
public function call(func, obj, params);
Make a remote call to the rtmp server. TODO: We probably don't want to expost the Flash callback object.
connect()
<method name="connect" />
public function connect();
Connect to the rtmp server.
init()
<method name="init" />
private function init();
Initialize the rtmpconnection.
_onStatus()
<method name="_onStatus" args="info" />
private function _onStatus(info);
Handle the onStatus callback from the Flash NetConnection object.

Events (1)

onconnect
<attribute name="onconnect" />
private event onconnect;
Event sent when connection established.

LZX Synopsis

<class name="lz.rtmpconnection" extends=" LzNode ">
  <attribute name=" autoconnect " type="boolean" value="true" />
  <attribute name=" debug " value="false" />
  <attribute name=" _nc " value="null" />
  <attribute name=" src " type="string" value="" />
  <attribute name=" stage " type="number" value="0" />
  <attribute name=" status " type="string" value="disconnected" />
  <method name=" call " args="func, obj, params" />
  <method name=" connect " />
  <method name=" init " />
  <event name=" onconnect " />
  <method name=" _onStatus " args="info" />
</class>

JavaScript Synopsis

public lz.rtmpconnection extends  LzNode  {
  public var autoconnect  : boolean;
  public var debug ;
  private var _nc ;
  public var src  : String;
  public var stage  : Number;
  public var status  : String;
  prototype public function call (func, obj, params);
  prototype public function connect ();
  prototype private function init ();
  prototype private event onconnect ;
  prototype private function _onStatus (info);
}