# lifecycle of vod stream

**URL:** <https://community.wowza.com/t/lifecycle-of-vod-stream/42545>\
**Category:** Wowza Streaming Engine\
**Created:** [March 26, 2014, 6:16pm UTC](https://community.wowza.com/t/lifecycle-of-vod-stream/42545 "2014-03-26T18:16:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jee\_Vang](https://avatars.discourse-cdn.com/v4/letter/j/b77776/32.png) [@Jee\_Vang](https://community.wowza.com/u/Jee_Vang)\
**Post date:** [March 26, 2014, 6:16pm UTC](https://community.wowza.com/t/lifecycle-of-vod-stream/42545/1 "2014-03-26T18:16:32Z")

</div>

currently, i’m using flowplayer to interact with wowza. i’ve also extended ModuleBase and enabled logging in all the overridden methods. i’ve noticed that the lifecycle for a VOD follows this pattern.

- onConnect

- onConnectAccept

- onStreamCreate

- onStreamDestroy

- onDisconnect

- when a user stops (not pause) playing the stream

- when a stream finishes (e.g. when a movie finishes playing)

---

<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:** [April 7, 2014, 8:39pm UTC](https://community.wowza.com/t/lifecycle-of-vod-stream/42545/2 "2014-04-07T20:39:03Z")

</div>

onDisconnect happens server-side when an RTMP client disconnect the NetConnection. In RTMP there is a NetStream that uses the NetConnection. The NetStream corresponds with onStreamCreate. Many pre-built players will disconnect the NetConnection when a stream end is detected, but not necessarily, it depends on the player and kind of streaming (vod or live) you are doing.

For more hooks into RTMP client/Wowza interaction, take a look at the [IMediaStreamActionNotify3](https://www.wowza.com/docs/how-to-use-imediastreamactionnotify3-interface-to-listen-for-rtmp-stream-events-includes-codec-info%28includes-codec-info%29)

Richard
