I am trying to build a simple p2p video chat application using Stratus. I have successfully managed to create a NetGroup and can use the 'post' function to transfer text chat between clients.
However, I encounter a problem with playing streaming video/audio between peers in the NetGroup.
I have simplied my problem so that I have just two clients in my NetGroup, A and B.
A can publish to the NetGroup and B can connect to A's NetStream, firing a "NetStream.Connect.Success" event on B, but B can not play A's stream using the 'play' method.
I get a "NetStream.Play.Failed" error on B. After looking at the documentation, it seems to be a security issue, but I can't find any other way of finding out more about the error.
Does anyone know what's going wrong? or how I can get a more descriptive error message?
Does anyone know of a good p2p video chat tutorial using Stratus 2?
Here is my NetGroup definition:
var groupSpecifier = new GroupSpecifier("TEST" + randomNumberString);
groupSpecifier.postingEnabled = true;
groupSpecifier.serverChannelEnabled = true;
groupSpecifier.multicastEnabled = true;
groupSpecifier.routingEnabled = true;
netGroup = new NetGroup(stratus, groupSpecifier.groupspecWithoutAuthorizations());
Here's a sample of the NetStatusEvent Handler on B:
private function stratusHandler(event:NetStatusEvent):void
event.info.stream.play("A_stream"); //play stream from A.
you don't list the parts where you create the NetStreams on either the publisher (A) or subscriber (B) side. are you creating the NetStreams with exactly the same groupspec with which you created the NetGroups?
i posted the materials from my MAX2009 lab where we built a P2P multicast video app with text chat in another thread. you can get the materials, including the lab handout, slides, and source code here: