-
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...?
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|