1 Reply Latest reply on Oct 20, 2011 4:05 PM by David_RealEyes

    Handling early call of NetStream.Play.Complete

    steveperr124


      Hi there

       

      I am experiencing an issue with playback on RTMPE streams using a DynamicStreamingResource

       

      The order of Status messages is as follows:

      Thu Oct 20 2011 04:15:17 PM :: NetStream.Play.Start : status

      Thu Oct 20 2011 04:32:40 PM :: NetStream.Play.Stop : status

      Thu Oct 20 2011 04:32:40 PM :: NetStream.Buffer.Flush : status

      Thu Oct 20 2011 04:32:58 PM :: NetStream.Buffer.Empty : status

      Thu Oct 20 2011 04:32:58 PM :: onPlayStatus : NetStream.Play.Complete

       

      As you can see roughly 17mins into playback...although the stream is 1 hour 24mins long. I have tested this numerous times, and each time it is at a different point in the stream.

       

      in the MediaPlayer Class, when entering buffering mode, the internal onBuferring() function handles if the  media canPlay && paused or playing... but doesnt handle separately if it has stopped...so put the player into 'ready state'

       

      private function onBuffering(event:BufferEvent):void

                          {

                                    if (event.buffering)

                                    {

                                              setState(MediaPlayerState.BUFFERING);

                                    }

        else

                                    {

                                              if (canPlay && playing)

                                              {

                                                        setState(MediaPlayerState.PLAYING);

                                              }

                                              else if (canPlay && paused)

                                              {

                                                        setState(MediaPlayerState.PAUSED);

                                              }

                                              else

                                              {

                                                        setState(MediaPlayerState.READY);

                                              }

                                    }

                          }

       

      any advice on why these messages would be firing early, or how to handle them would be greatly appreciated!

       

       

      I am using a player built on OSMF 1.5.

       

      Thanks

       

      Steve