Reputation: 2614
When I execute the following:
private function setUpRecvStream():void {
writeText("Connecting to: " + theirID);
recvStream = new NetStream(netConnection, theirID);
recvStream.addEventListener(NetStatusEvent.NET_STATUS, netStreamHandler);
//play the recvStream
recvStream.play("media");
//attach the stream videoRecv
videoRecv.attachNetStream(recvStream);
}
Using a vaild string for theirID
I'm getting the following:
Connecting to: 8640d30e760528b2c88662eacef67d693527e52549eb5e29fc405355a7db147e
NetStream.Connect.Closed
I'm expecting NetStream.Connect.Success
since I'm passing in a vaild string for theirID
. Any ideas why this might be happening?
Upvotes: 1
Views: 758
Reputation: 9968
before using this you need to connect to FMS
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusEvent);
nc.connect('rtmfp://stratus.adobe.com/cbd2224f9a56771b3d4d05c3-bd9b549abca2');
private function netStatusEvent(event:NetStatusEvent):void {
trace('NetConnection status event (1): ' + event.info.code);
if (event.info.code == 'NetConnection.Connect.Success'){
}
}
Upvotes: 0
Reputation: 3073
Are you initializing your netConnection? Also, the stream you are connecting to might not be publishing "media".
The client you are connecting to must do sendStream.publish("media")
Upvotes: 1