A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: flvplayback.state

  1. #1
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849

    flvplayback.state

    I'm putting together a video player and using the FLVPlayback component. We're using the Flash Media Server to stream the video, so it's possible someone on a slow connection might have to rebuffer during playback.

    To let them know something is happening, when the player starts buffering, I show a pinwheel, which gets removed when playback resumes. I track whether it's buffering by reading the FLVPlayback.state. This works great under normal circumstances, but if for some reason the player is disconnected and the user clicks play, playback will resume, but the state will get stuck at "buffering", meaning it ends end up showing the pinwheel over the playing video!

    Normally, the state reads out like this:

    State: loading
    State: buffering
    State: playing

    But if it gets disconnected and you click play, you get this:

    State: disconnected
    State: loading
    State: buffering (video starts playing, no other state changes)

    So the question is, how do I handle this? Do I need to completely reconnect to the FMS to play the video after a disconnect, or...?

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    Well I think I found the solution to my own problem. By seeking to the current playheadTime, it gives FLVPlayback the kick in the pants it needs to change the states again correctly.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center