OpenRTMFP / Cumulus

CumulusServer is a complete open source and cross-platform RTMFP server extensible by way of scripting
http://groups.google.com/group/openrtmfp-cumulus
GNU General Public License v3.0
593 stars 222 forks source link

Method 'relay' not found #22

Closed jangnezda closed 13 years ago

jangnezda commented 13 years ago

I am trying to set-up cirrus video chat example that is available here: http://labs.adobe.com/technologies/cirrus/samples

Connect works ok, clients are assigned id as expected, but calling doesn't work. The example makes use of a custom Object called relay, which is passed around methods that are invoked on netconnection object. So my guess is that there's a problem with sending complex objects. Any idea how to make this example work?

CumulusService log output:


DEBUG RTMFPServer[129] Sender : 192.168.56.1:54338 DEBUG RTMFPServer[63] Session d'identification '1' DEBUG RTMFPServer[129] Sender : 192.168.56.1:57921 DEBUG RTMFPServer[58] Handshaking DEBUG RTMFPServer[129] Sender : 192.168.56.1:57921 DEBUG RTMFPServer[58] Handshaking NOTE Sessions[51] Session 2 created DEBUG RTMFPServer[129] Sender : 192.168.56.1:57921 DEBUG RTMFPServer[63] Session d'identification '2' DEBUG RTMFPServer[129] Sender : 192.168.56.1:57921 DEBUG RTMFPServer[63] Session d'identification '2' DEBUG RTMFPServer[129] Sender : 192.168.56.1:57921 DEBUG RTMFPServer[63] Session d'identification '2' DEBUG RTMFPServer[129] Sender : 192.168.56.1:57921 DEBUG RTMFPServer[63] Session d'identification '2'

DEBUG RTMFPServer[129] Sender : 192.168.56.1:54338 DEBUG RTMFPServer[63] Session d'identification '1' DEBUG RTMFPServer[129] Sender : 192.168.56.1:57921 DEBUG RTMFPServer[63] Session d'identification '2' DEBUG RTMFPServer[129] Sender : 192.168.56.1:54338 DEBUG RTMFPServer[63] Session d'identification '1' DEBUG RTMFPServer[129] Sender : 192.168.56.1:57921 DEBUG RTMFPServer[63] Session d'identification '2' WARN Flow[365] 'NetConnection.Relay.Failed' response error : Method 'relay' not found


jangnezda commented 13 years ago

After spending some time with flash/flex sources I've found out that the example can be rewritten without custom server interaction (there are various messages relayed between peers via server) and it works ok.

zastava commented 12 years ago

hi, I'm encountering the same problem, and wondering if you could teach me a bit more concretely on how to avoid that issue?

jangnezda commented 12 years ago

If I remember correctly the problem was that tutorial on adobe.com page makes use of custom events which are passed via server. That is not needed at all, because custom messages can be passed between peers themselves (once they are connected).

mohghaderi commented 10 years ago

That sample is a waste of time. Consider this one: http://www.adobe.com/devnet/adobe-media-server/articles/real-time-collaboration.html

mohghaderi commented 10 years ago

If you are using FMS (or newly Adobe Media Server) simply add a main.asc file to the application folder (on the server-side FMS\applications\yourappname) with this function:

Client.prototype.relay = function( id, command, data ) { var i; for( i = 0; i < application.clients.length; i++ ) { if( application.clients[i].farID == id ) { application.clients[i].call( "onRelay", null, this.farID, command, data ); }else{ trace( "User not found: " + id ); } } }

It will fix the problem for that sample. (If you don't know what main.asc is, read about SSAS on FMS). Anyway, I still suggest to spend time read the other article that I suggested. (I am sorry if my answers are not related to Cumulus project. Unfortunately, Google directs everybody to this page!)