wvxvw
12-25-2006, 07:47 PM
Hi all!
I'm using Flash Media Server2, and I'm a completely novice to it. So, please, be patient considering my nearly total ignorance. =)
Here's the task I'm trying to cope with:
I need a single camera connected to the server to broadcast the video it records to the multiple clients real-time like.
Here's the way, I'was trying to deal with the task:
I've created 1 SWF which catches the video from the camera an publishes it to the server (until this point it goes all right).
Than I've created another SWF intended to recieve the data from server. Here is what it looks like:
var my_video:Video;
var client_nc = new NetConnection();
// function I use to trace variables passed from server
client_nc.msgFromSrvr = function(msg) {
trace(msg);
};
// this function is called from the server-side script
// after connection establishes
//
// msg - the string containing the name of the video-stream recorded
client_nc.r_play = function(msg) {
var in_ns = new NetStream(this);
_root.my_video.attachVideo(in_ns);
in_ns.play(msg);
trace(msg);
};
client_nc.connect("rtmp:/record/room_01", "user");
The problem is that when I test this SWF from within Flash it plays the video, but if i try to view it from IE/standalong player it stops playing at the firs frame of the recieved picture.
Any help will be greatly apprecated!
I'm using Flash Media Server2, and I'm a completely novice to it. So, please, be patient considering my nearly total ignorance. =)
Here's the task I'm trying to cope with:
I need a single camera connected to the server to broadcast the video it records to the multiple clients real-time like.
Here's the way, I'was trying to deal with the task:
I've created 1 SWF which catches the video from the camera an publishes it to the server (until this point it goes all right).
Than I've created another SWF intended to recieve the data from server. Here is what it looks like:
var my_video:Video;
var client_nc = new NetConnection();
// function I use to trace variables passed from server
client_nc.msgFromSrvr = function(msg) {
trace(msg);
};
// this function is called from the server-side script
// after connection establishes
//
// msg - the string containing the name of the video-stream recorded
client_nc.r_play = function(msg) {
var in_ns = new NetStream(this);
_root.my_video.attachVideo(in_ns);
in_ns.play(msg);
trace(msg);
};
client_nc.connect("rtmp:/record/room_01", "user");
The problem is that when I test this SWF from within Flash it plays the video, but if i try to view it from IE/standalong player it stops playing at the firs frame of the recieved picture.
Any help will be greatly apprecated!