views:

649

answers:

1

Hello all,

This is my first post, but this question has racked my brain and Google's servers all night, so I thought I would pose the question here.

Let me get started on the preliminaries of my problem so I can elaborate the issue. I know FLVPlayback is buggy but this seems like either a version problem or I might be in need of an update.

I currently monitor the VideoEvent.STATE_CHANGE event. When I first play a video with FLVPlayback by setting its .source property the VideoEvent.STATE_CHANGE event fires in this order:

loading

buffering

playing

This is exactly what I need, however if I 'load a new video' by yet again setting the .source property the VideoEvent.STATE_CHANGE event fires in this order:

loading

paused

buffering

playing

paused

buffering

Which, incidentally, throws my event system out of wack, due to the video successfully playing while the last event fired is buffering. This causes my event tracking to be in an incorrect state.

I do handle the VideoEvent.READY event to run these methods on the FLVPlayback object:

video.pause();

video.playWhenEnoughDownloaded();

Am I doing something wrong in the order that I am calling the methods, or am I omitting a step in closing (which I've tired by getting the VideoPlayer.close() method) or disposing of something in the FLVPlayback object?

Any help or tips/direction pointing would be greatly appreciated! Thank you!

A: 

You've probably found out by now : )

However I guess the best is to listen to the more explicit events such as :

  • BUFFERING_STATE_ENTERED
  • PLAYING_STATE_ENTERED
  • PAUSED_STATE_ENTERED
Theo.T
Yup, that was it. I'm not sure why the STATE_CHANGE would be useful anymore. Thank you for advice!
Fox Diller