# MPEG-TS stream publish/unpublish notifications || play RTMP url with Wowza API

**URL:** https://community.wowza.com/t/mpeg-ts-stream-publish-unpublish-notifications-play-rtmp-url-with-wowza-api/594
**Category:** Wowza Streaming Engine
**Created:** [June 18, 2010, 5:08pm UTC](https://community.wowza.com/t/mpeg-ts-stream-publish-unpublish-notifications-play-rtmp-url-with-wowza-api/594 "2010-06-18T17:08:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)
#### Post date: [June 18, 2010, 5:08pm UTC](https://community.wowza.com/t/mpeg-ts-stream-publish-unpublish-notifications-play-rtmp-url-with-wowza-api/594/1 "2010-06-18T17:08:17Z")

</div>

Hi! Here is the situation:

a person publishes the stream with MPEG-TS to Wowza.

As you know, Wowza ignores this until someone will request to play this live event.

What I need - is to get notified on stream publish/unpublish.

So I guess, I need to request this event permanently with Wowza API, and if I’ll stop receiving data - then it is “stream unpublish”. When after multiple reconnects I will start receiving data - then it is “stream publish”.

The task is somewhat non-trivial, can you suggest what to do?

Probably there is much easier way to do what I need?

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [June 18, 2010, 9:31pm UTC](https://community.wowza.com/t/mpeg-ts-stream-publish-unpublish-notifications-play-rtmp-url-with-wowza-api/594/2 "2010-06-18T21:31:52Z")

</div>

I think you will get the onPublish and onUnPublish events of the IMediaStreamActionNotify interface in this case.

[http://community.wowza.com/t/-/242](http://community.wowza.com/t/-/242)

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [June 18, 2010, 11:53pm UTC](https://community.wowza.com/t/mpeg-ts-stream-publish-unpublish-notifications-play-rtmp-url-with-wowza-api/594/3 "2010-06-18T23:53:42Z")

</div>

To confirm, testing with rtsp stream from IP camera started with StreamManager, these events do fire when you start and stop a stream.

Richard
