Skip to main content
April 19, 2010
Question

Live stream reconnect/disconnect best practice

  • April 19, 2010
  • 1 reply
  • 1643 views

Hi,

When streaming a live event through FMS 3.5, is there a list of guidelines or best practices to handle the situation when the stream disconnects and should reconnect.  Basically, what I do now is wait 20 seconds after the initial disconnect, then close the stream and ask the user to ty to reconnect to the stream again.  I am not sure if this is the industry standard for this situation.  Thanks.

Rashaan Griffith

Software Developer

Endavo Media and Communications Inc.

rashaan.griffith@endavomedia.com

    This topic has been closed for replies.

    1 reply

    Janaki Lakshmikanthan
    Adobe Employee
    Adobe Employee
    April 20, 2010

    If you are in FMS 3.5.3 + Flash Player 10.1, you can have seemless stream play even if the client disconnects. You can still have NetStream active even after your client disconnects from the server. You make a quick connection again to the available server and attach the NetConnection object to the existing NetStream object. Until you attach the new netConnection, the stream will play the content which are buffered at the client side.

    In other case, you need not wait for 20 seconds to reconnect. you can issue the connect soon after your connection is closed. 20 seconds delay will end up in bad user experience. Why do you want to wait for 20 secs, is there any specific reason.

    Regards,

    Janaki L

    April 20, 2010

    Thanks for the response Janaki.  I wanted to have a message displayed to the user when the stream dropped, but I didn't want it to happen every time the stream dropped in case it was a bad connection.  So I added a delay of 20 seconds to make sure the stream is really gone.  After that, I close the stream and ask the user to click play again to start the connection process again.  We are probably going to change this process, and in doing so, my superiors thought there may be some type of standard to go by regarding reconnecting to a dropped stream.  Thanks for your help.

    Rashaan Griffith

    Software Developer

    Endavo Media and Communications, Inc.

    rashaan.griffith@endavomedia.com

    Janaki Lakshmikanthan
    Adobe Employee
    Adobe Employee
    April 21, 2010

    You could display the message to the users immediately to click play when you receive "NetStream.Play.Stop" soon after "NetConnection.Connect.Success" (If you are in FMS 3.5.3 + FP 10.1). If you are in older set of FMS + FP, may be you can make the netconnection silently and start playing the stream by writing good logic in your code.

    Regards,

    Janaki L