Results 1 to 2 of 2

Thread: lifecycle of vod stream

  1. #1
    Join Date
    Mar 2014
    Posts
    6

    Default lifecycle of vod stream

    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.

    1. onConnect
    2. onConnectAccept
    3. onStreamCreate
    4. onStreamDestroy
    5. onDisconnect


    each time a user selects a movie to play, these steps are repeated with a new client id (e.g. IClient.getClientId()). what i've notice is that when the movie ends playing, onStreamDestroy and onDisconnect are not called immediately. it takes about a 2-3 minutes before these methods, corresponding to the client id, are called.

    how come onStreamDestroy and onDisconnect are not called immediately after a movie finishes playing? shouldn't wowza know that the end of the stream has finished and make these callbacks?

    are there other callback methods that i may override to listen for the following events?
    1. when a user stops (not pause) playing the stream
    2. when a stream finishes (e.g. when a movie finishes playing)


    it seems when a user stops playing the stream, that's a client side event, so i don't really expect wowza to detect that. however, i would expect that wowza would detect when the end of a file is reached (when the file is finished streaming), since this is a server side event.

    any help is appreciated.

  2. #2
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    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

    Richard

Similar Threads

  1. [VOD Streaming] Create a time frame for VOD stream
    By anhdung in forum Live Streaming and Encoders
    Replies: 2
    Last Post: 05-27-2014, 04:33 AM
  2. HTTPProvider's LifeCycle
    By josnidhin in forum Server-side Modules and Code Samples Discussion
    Replies: 2
    Last Post: 12-14-2011, 11:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •