FMS multipoint publish, howto unPublish the streams?
Hi there and thanks for looking, I thinks it's something simple and I seem to not get it ![]()
I have FMLE source streaming to FMS #1, and FMS #1 is multipoint publishing to FMS #2. It works great, but when I stop FMLE source, the multipoint publishing from FMS #1 to FMS #2 doesn't stop (unpublish), and continues to stream empty (blank black) stream between the FMS servers.
So how do I ubpublish the multipoint publishing streams on the FMS #1 ? Thanks.
Here is my code in application live on FMS #1:
// called when the client publishes
application.onPublish = function(client, myStream) {
trace(myStream.name + " is publishing into application " + application.name);
if (myStream.name == "aaaaaaa"){
trace("Republishing the stream into anotherInstance");
nc = new NetConnection();
nc.connect( "rtmp://xxxxxxxx" );
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( "sdfsdf11", "live" ); //sdfsdf11
}
}
application.onUnpublish = function(client, stream) {
trace("OnUnpublish triggered for: "+stream.name);
// i think here needs to be more of some code ???
}
