in general, for P2P communication, you need an RTMFP server of some sort for peer introduction.
Flash Player can't publish a stream with IP multicast. however, it can use IP multicast to discover peers for a P2P multicast without using a server, but that only works on a single LAN (IP ttl/hlim=1). only Flash Media Server (FMIS or FMES) can publish an IP multicast stream.
the codename Cirrus service or Flash Media Enterprise Server can provide P2P introduction services.
thanks for the quick response...
but I don*t understand completely yet.
Practically spoken if I am in a single lan, can I establish a video chat between two or more Flash Players without any server help?
If yes do you have a code snippet how to start that?
Thanks a lot
on a LAN, you can use RTMFP Groups in "serverless" mode by connecting to the RTMFP URI "rtmfp:". in this mode, you must use LAN IP multicast to join peers together into a group. you can then use group modes, like P2P multicast and posting, to stream data between the peers and do text chat and stuff.
examples of using serverless mode can be found in my MAX 2010 lab materials:
so far i understood how to connect to a netgroup in serverless mode.
I looked through the examples but I don't see any way to publish my webcam to the netgroup.
I just can find an example for posting text. Am I missing something?
Here is a snippet from what I tried:
var groupspec:GroupSpecifier = new GroupSpecifier("myGroup/groupOne");
groupspec.postingEnabled = true;
groupspec.ipMulticastMemberUpdatesEnabled = true;
groupspec.multicastEnabled = true;
group = new NetGroup(nc,groupspec.groupspecWithAuthorizations());
stream = new NetStream(nc, groupspec.groupspecWithAuthorizations());
var cam:Camera = Camera.getCamera();
but with stream.attachCamera(cam);
I get an error...
1 person found this helpful
you must wait for the NetStream.Connect.Success event (sent to the NetConnection's event listener) before doing anything with a Group NetStream, for example attaching a camera to it.
more examples, including publishing and subscribing to a P2P multicast and building a chat app, can be found in the materials i used for MAX 2009 and posted in this forum back then:
between the materials for MAX 2009 and 2010, that should be enough to get you pointed in the right direction. please read the lab materials (presentations and handouts) as well as the source code.
Thanks a million, things run like they should now!