Question
Chaining streams between 2 media server
Hi i'm trying to setup a stream chaining between 2 flash
media servers.
Basically I have an swf that streams my camera to FS Server 1. In FS Server 1, i have the following code in the main.asc
application.onConnect = function(client, username){
gFrameworkFC.getClientGlobals(client).username = username;
application.acceptConnection(client);
}
application.onConnectAccept = function(client, username){
application.myRemoteConn.connect("rtmp://10.0.0.23/myapp"); // Connect to FS2
application.myRemoteConn.onStatus = function(info){
if (info.code == "NetConnection.Connect.Success" && application.myRemoteConn.isConnected){
application.myStream = Stream.get("foo");
if (application.myStream) {
application.myStream.play("me_live", 0, -1, true, application.myRemoteConn);
}
}
}
}
The stream is created in FS1, and I can view it if I connect to it with an SWF client. On the FS2 server (the server FS1 does a NetConnection to), I can see a client connection in the Clients tab but thats about it. If I try to connect to the FS2 server, there is no stream displaying on the SWF client. (The SWF client just contains a Video object which connects to the FS stream.)
Any ideas please? This may sound like a silly question, but I'm fairly new to server side action script.
Does any one have any sample code? Is there an alternate method of chaining a stream? I've thoroughly searched the docos but no luck.
Thanks again.
Basically I have an swf that streams my camera to FS Server 1. In FS Server 1, i have the following code in the main.asc
application.onConnect = function(client, username){
gFrameworkFC.getClientGlobals(client).username = username;
application.acceptConnection(client);
}
application.onConnectAccept = function(client, username){
application.myRemoteConn.connect("rtmp://10.0.0.23/myapp"); // Connect to FS2
application.myRemoteConn.onStatus = function(info){
if (info.code == "NetConnection.Connect.Success" && application.myRemoteConn.isConnected){
application.myStream = Stream.get("foo");
if (application.myStream) {
application.myStream.play("me_live", 0, -1, true, application.myRemoteConn);
}
}
}
}
The stream is created in FS1, and I can view it if I connect to it with an SWF client. On the FS2 server (the server FS1 does a NetConnection to), I can see a client connection in the Clients tab but thats about it. If I try to connect to the FS2 server, there is no stream displaying on the SWF client. (The SWF client just contains a Video object which connects to the FS stream.)
Any ideas please? This may sound like a silly question, but I'm fairly new to server side action script.
Does any one have any sample code? Is there an alternate method of chaining a stream? I've thoroughly searched the docos but no luck.
Thanks again.
