Skip to main content
Inspiring
March 30, 2014
Question

Close NetStream, But show streamName in FMS API

  • March 30, 2014
  • 1 reply
  • 494 views

Hello everyone,

when I stop publishing width ns.close() then publish is stop but in API when I call getLiveStreams for my application I get netstream name that I closed...!!!

 

So with this Issue I can't show to views how many stream is publishing on FMS.

This topic has been closed for replies.

1 reply

calmchessplayer
Inspiring
March 30, 2014

I think that calling ns.close() would detroy it on client but the Meida server probably isn't garbage collecting it immediately....so when you call ns.close() then have a call that calls to the server  side script and destroys the stream......you might also have to destroy it  when onDisconnect fires in case the client just closes the window and the call to the server never occurs.

m_yazdianAuthor
Inspiring
March 31, 2014

calmchessplayer thanks for replay,

FMS have a onUnpublish application, so when I call ns.close() on client side, on FMS onunpublish is called and I can trace the streamName that was closed on the client side.

But when I check the FMS API, I get list of stream on my application I can see that streamName on the list...!!!

This stream will remove after few minutes automaticly. I like to remove streamName immediately from the API when client close the netstream.

My clients can't be disconnected to close the netstream because clients may have more netstream in one connection.