Hello I have created a simple p2p conference tool, but I have 1 major problem. I can send the stream, I know I receive the stream( I can hear the sound) but the Video will not play. I don't know why. Below is the code related to the video
private function initconnect():void{
//test with UiElement
myvideo = new Video(320,240);
myvideo.x = 10;
myvideo.y = 50;
var uic:UIComponent = new UIComponent();
uic.addChild(myvideo);
addElement(uic);
othervideo = new Video(320,240);
othervideo.x = 10;
othervideo.y = 310;
var uic2:UIComponent = new UIComponent();
uic2.addChild(myvideo);
addElement(uic2);
myvideo can be seen on the screen. But when I go to receive the video I get nothing.
public function receive():void{
recvid = new NetStream(netconn,farpeerid);
recvid.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler);
recvid.play("cam");
othervideo.attachNetStream(recvid);
}
Try
uic2.addChild(othervideo);
Notice the argument.