Trouble connecting to live streams
Hi,
I've been using FMS for a few weeks, and feel relatively comfortable with it, but am currently having some trouble connecting to a live stream in a a video conferencing-type application.
I suspect I'm leaving some small step out, but am having trouble seeing what that step is.
I have one client application open the video camera, connect to the FMS, and publish it's live camera stream to the server. Something like this:
Connect to the FMS
nc.connect("rtmp://<ip addr>9/chat_test/");
In my connection (success) handler:
cam = Camera.getCamera();
cam.addEventListener(StatusEvent.STATUS, statusHandler);
...
ns = new NetStream(nc);
ns.client = new CustomClient();
ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
ns.attachCamera(cam);
ns.attachAudio(mic);
ns.publish("user1");
This should publish the live stream named "user1" on my FMS instance. Indeed, using the administration console shows that this connection has been established, and a "Live" stream exists with name "user1".
My problem is when I try to open to this stream with a second client:
nc.connect("rtmp://<ip addr>9/chat_test/");
remoteStream = new NetStream(nc);
remoteStream.client = new CustomClient();
remoteStream.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
remoteStream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
vidPlayer = new Video(cam.width, cam.height);
vidPlayer.attachNetStream(remoteStream);
remoteStream.play("user1", 0);
addChild(vidPlayer);
However, I keep getting "NetStream.Play.StreamNotFound" errors. This seems relatively straightforward, but I'm clearly missing a small step somewhere. Maybe a second pair of eyes can help me find my problem?
Thanks.
