Hello Everybody,
I'm trying to modify the class rtmpconnection to allow connection parameters.
I can't get the parameters to work. I tried to sniff the tcp
connection (I'm using rtmpt), but I can't see the parameters on the
tcp stream. I'm using red5 on the other side, and the server says that
the parameters received are 0. I think that the parameters are not
working on my SWF side.
Can you help me debug where my problem is? I ran out of ideas about
where to look. I can't look inside NetConnection (_nc).
I'm using OL 4.6.1.
On my SWF client:
var connParams = new Array();
connParams["key"] = 'KEY1234124231';
rtmp.connect(connParams);
I modified two lines (the ones that say "HERE"). Here is the extracted
code from rtmpconnection.lzx :
<!--- Connect to the rtmp server. -->
<method name="connect" args="connParams"><![CDATA[ // <-- HERE
//Debug.write("rtmpconnection.connect, stage", this.stage);
if (this.stage > 0) {
return; // already connected or connecting
}
var src = this._usealtsrc ? this.altsrc : this.src;
if (src == 'null') src = null;
if (this.debug) {
if ($debug) Debug.write("initiating connection to ", src);
}
if ($debug) {
if (src == "") {
Debug.write("no src url defined for", this);
return;
} else if (typeof(src) != "string") {
Debug.write("src", src, "must be a string in", this);
return;
}
}
this._connecturl = src;
this._createconnection();
Debug.write(connParams);
this._nc.connect(src,connParams);
/////////////////// <-- HERE
// I think the only option is to ethereal
this.setAttribute("status", "connecting");
this.setAttribute("stage", 1);
if (! this['_connectionTimeoutDel'])
this._connectionTimeoutDel = new LzDelegate(this,
'_handleConnectionTimeout');
lz.Timer.addTimer( this._connectionTimeoutDel,
this.connectiontimeout );
]]>
</method>
Thanks in advance.
Regards,
--
Lucas