is it possible to identify how a live stream is unpublished?

Hello guys,

In order to handle the unpublish event for a live stream i created a class that implements the IMediaStreamActionNotify2 interface and override the onUnPublish method.

This method is called in many scenarios one of them is when a user click on “stop” broadcaster (i.e FMLE) button, another case is when a machine used to send stream just lost connection to network, i see the wowza logs and it shows something like:

“INFO session comment 953574090 client connectionClosed [953574090] pingtimeout”

So, my question is, can we programatically identify when the stream is unpublished on any of these scenarios? when user click on stop button or when there are network problems.

There is no way really, that I know of, to distinguish what exactly happened before that onUnPublish event fires.

If I misunderstood your question I apologize.

Best,

Salvadore