detect upload bandwidth to fms
Hello,
I am trying to get the "bwcheck" application to work on FMS 4 on Amazon EC2, in order to detect my upload speed to the server and provide the best quality stream for my upload speed.
The tutorial I follow is this:
or
Both are almost identical. However when I compile the .fla to .swf (having changed the URL for my server and application), and after I load the server-side code, I get the following error in my server-side log:
Method not found (recData)
I understand that apparently it is not finding the method, but I tried getting it off the function in the global scope, tried attaching it to the client, etc. but nothing worked. The original code of the server-side script is:
for ( i = 0; i < 1000; i++ ) {
data += "S->C";
}
Client.prototype.recData = function(data)
{
this.ping();
var v = this.getStats();
this.call("ack", 0, v.ping_rtt);
}
Client.prototype.echoData = function()
{
this.call("onEcho", 0, data);
};
Client.prototype.getBWInfo = function()
{
return this.getStats();
};
Client.prototype.onConnTimeout = function()
{
clearInterval( this.connTimeout );
this.connTimeout = null;
application.disconnect(this);
}
application.onConnect = function(client, id)
{
trace("connect: ");
// Establish the connection
application.acceptConnection(client);
}
