Ask a Question related to Macromedia Flash Flashcom, Design and Development.
-
ninjateapartyover #1
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.
ninjateapartyover Guest
-
Flash Media Server 2 - Protecting RTMP Streams...
Hello, I'm working on a project involving Flash Media Server 2 and streaming videos using RTMP. At first I thought I could just use the... -
I?ve got a problem writing files on the server side withFlash Media Server 2.0.2 and 2.0.3.
Hello, I?ve got a problem writing files on the server side with Flash Media Server 2.0.2 and 2.0.3. The same code was working fine with an older... -
Media Streams thru one NetConnection or more?
Hello buddies, In a rather heavy media communication app (with about 500 concurrent users), is it better to use more than one NetConnection for... -
Can you detail How create an application use StreamingMedia Server (Flash Media Server) for me?
Can you detail the way to create an application use Streaming Media Server (Flash Media Server) for me? I installed Flash Media Server 2,... -
Need to create a multi-threaded component that streams file from remote server to asp.net
I'm a dotnet newbie and have been developing some web applications in asp.net. I have a requirement to load files from a remote file cache server... -
JayCharles #2
Re: Chaining streams between 2 media server
What you want to do is have FC2 subscribe to the stream on FC1. Let's have a look at your SSAS for the app on FC2.
JayCharles Guest
-
ninjateapartyover #3
Re: Chaining streams between 2 media server
hi jay,
Thanks for your prompt reply. Yes I was actually trying that method aswell,
obviously incorrectly. My AS code on the FS2 was this:
application.onAppStart = function(){
trace("application start called. create server side connection");
application.remConn = new NetConnection();
application.remConn.connect("rtmp://10.0.0.77/myapp"); // this connects to
the FS1 server where a stream
// called me_live is
being published
application.remConn.onStatus = function (info) {
trace("info is "+info.code);
}
application.myStream = Stream.get("me_live"); // this stream is being
streamed by the SWF client with a camera.
// the stream is correctly being published. i
could view this with
// another SWF client that just retrieves the video
if (application.myStream){
trace("playing stream");
application.myStream.play("me_live", -1, -1, false, application.remConn);
}
}
I know that theres quite a number of errors on the above code. I would've
figured though that the the Stream class has a method to retrieve a remote
stream, or even in the NetConnection object (something like
application.remConn.Stream.get("streamname")) - but of course it can't be that
easy!! Is there way of doing this? Thanks again for your help.
ninjateapartyover Guest



Reply With Quote

