publishing stream to remote FMS
Hello,
I have followed this link to republish my local stream to other local application instance : http://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d56e-7ffb.html
i have used this script code into main.asc and it is working :
// Called when the client publishes
application.onPublish = function(client, myStream) {
trace(myStream.name + " is publishing into application " + application.name);
// This is an example of using the multi-point publish feature to republish
// streams to another application instance on the local server.
if (application.name == "live/_definst_"){
trace("Republishing the stream into remote app/anotherinstance");
nc = new NetConnection();
nc.connect( "rtmp://localhost/live" );
ns = new NetStream(nc);
// called when the server NetStream object has a status
ns.onStatus = function(info) {
trace("Stream Status: " + info.code)
if (info.code == "NetStream.Publish.Start") {
trace("The stream is now publishing");
}
}
ns.setBufferTime(2);
ns.attach(myStream);
ns.publish( myStream.name, "live" );
}
}
i have replaced this code : nc.connect( "rtmp://localhost/live" ); by this one to publish to remote FMS : nc.connect( "rtmp://myremoteserver/live" ); but streaming isn't working on remote FMS
How can make it working remotely ?
Regards,
Morsi
