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

**URL:** <https://community.wowza.com/t/is-it-possible-to-identify-how-a-live-stream-is-unpublished/42577>\
**Category:** Wowza Streaming Engine\
**Created:** [December 9, 2015, 5:36pm UTC](https://community.wowza.com/t/is-it-possible-to-identify-how-a-live-stream-is-unpublished/42577 "2015-12-09T17:36:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hugo\_Mercado](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@Hugo\_Mercado](https://community.wowza.com/u/Hugo_Mercado)\
**Post date:** [December 9, 2015, 5:36pm UTC](https://community.wowza.com/t/is-it-possible-to-identify-how-a-live-stream-is-unpublished/42577/1 "2015-12-09T17:36:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [January 8, 2016, 9:27am UTC](https://community.wowza.com/t/is-it-possible-to-identify-how-a-live-stream-is-unpublished/42577/2 "2016-01-08T09:27:44Z")

</div>

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
