<rtmpconnection>
Allows connections to RTMP servers

JavaScript: lz.rtmpconnection
extends <view> » <node> » lz.Eventable »

<rtmpconnection> allows applications to connect to RTMP servers, like http://osflash.org/red5 or http://www.wowzamedia.com/. Note that you'll need a server running with the appropriate URLs set up for this example to work.

<canvas>
                    <rtmpconnection src="rtmp://localhost:1935/simplevideostreaming/" autoconnect="true"/>
                    <videoplayer url="Extremists.flv" type="rtmp" autoplay="true" width="320" height="240"/>
                </canvas>

Attributes

Name (CSS property) Type (tag) Type (js) Default Category
altsrc string String   read/write
  Alternate application url, used if the connection for src fails for example : "rtmp:/appname" or "rtmp://myserver.com/myapp/".
autoconnect boolean Boolean true read/write
  Connect automatically during init. If false, you need to explicitly call connect().
connectionparams expression Expression null read/write
  Connection parameters that will be sent to the server when NetConnection.connect() is called
connectiontimeout number Number 3000 read/write
  Number of milliseconds to wait for connection at src before using altsrc URL
debug expression Boolean false read/write
  Turn on for verbose debugger output.
objectencoding number Number 0 initialize-only
  The AMF object encoding to use for this connection, either 0 or 3.
stage number Number 0 read/write
  Number to indicate what stage of connection we're in: 0: disconnected, 1: connecting, 2: connected.
status string string disconnected read/write
  String to indicate connection status.

Methods

callMethod()
rtmpconnection.callMethod(func, obj, params);
Parameter Name Type Description
func    
obj    
params    

connect()
rtmpconnection.connect();
Connect to the rtmp server.

init()
rtmpconnection.init();

_onSecurityError()
rtmpconnection._onSecurityError(error);
Parameter Name Type Description
error    

_onStatus()
rtmpconnection._onStatus(evt);
Parameter Name Type Description
evt    

Methods inherited from lz.Eventable

destroy, setAttribute

Events

Name Description
onconnect Event sent when connection established.

Events inherited from <node>

onconstruct, ondata, oninit

Events inherited from lz.Eventable

ondestroy