I am trying to get a very basic example of live video chat to work with Flash Media Server, but no matter how hard I try, it's just not working for me.
I am using the tutorial and code from this web page: http://www.derekentringer.com/blog/fms-video-chat/
I have two servers: a web server, and media server. On the media server, I have FMS installed and I made sure that port 1935 was opened up to communicate between the web and media server.
I think my issue is how to set up my FMS instance. In the tutorial, he's using a hosted FMS solution with Influxis.com. I am using my own media server with FMS installed. Does anyone know how to set up my FMS instance so I can get this to work?
On the web server, I have two different folders (user1 and user2) each with an html file and a swf file to connect to the web cam, and then connect the web cam's stream to the media server over rtmp.
Here's the code I have on the SWF files.
//setup the camera and mic for streaming
mycam = Camera.get();
mycam_audio = Microphone.get();
//control the cameras mode and quality
mycam.setMode(320,240,30);
mycam.setQuality(10000,100);
//attach a live preview of the camera to the
//video object that is setup on the stage
cam_feed.attachVideo(mycam);
cam_feed.attachAudio(mycam_audio);
//connect to the Flash Media Server
client_nc = new NetConnection();
client_nc.connect("rtmp://corpwebdevmedia1/test"); // I've tried server name and IP
cam_ns = new NetStream(client_nc);
//attach our camera video and audio to the net stream
cam_ns.attachVideo(mycam);
cam_ns.attachAudio(mycam_audio);
//publish to our Flash Media Server as a
//live stream called user_2
cam_ns.publish("user_2", "live");
// user_1 for the other one
//bring in user_1's video/audio
in_ns = new NetStream(client_nc);
in_ns.play("user_1");
// user_2 for the other one
//attach user_1's published audio and video
//so we can see them in the larger chat window
live_feed.attachVideo(in_ns);
live_feed.attachAudio(in_ns);
After all that's done, I go to my local machine and navigate my browser to the html files on the web server. The page connects to my camera on each page, but they never connect together.
Any suggestions?
Thanks.