tapic
09-05-2007, 07:31 AM
my scenario is basic: a flvblayback component plays a list of flvs.
when one flv is finished, it plays the next flv.
there is nothing special in code:
private var _player:FLVPlayback;
.
.
_player.addEventListener(VideoEvent.COMPLETE,clipC ompleteListener);
.
.
private function clipCompleteListener(e:Event):void
{
playNext();
}
private function playNext();
{
.
.
}
the problem is that the complete event does not fire always and sometimes the screen ends up blank since the player keeps sitting at the end of the flv.
the weird thing is that the same FLV does not always hang up at the end.
For a very long time I could not find good solution for that. My solution in AS2 was to set an interval and check playHead regularly if its position is changed. If its position is not changed for a second or some time, that means that the movie is hanged up at the and, by not firing the complete event. So I 'virtually' call my completeEventListener method at this point.
In AS3 I hoped that the FLVPB component will not have such a bug (I really think that this is a bug:) but the same thing continues.
An argument I discovered was: this can be because of poor flv encoding and metadata.
Any ideas? What is the best way to encode movies into 'complete event friendly' flvs?
thanks in advance
when one flv is finished, it plays the next flv.
there is nothing special in code:
private var _player:FLVPlayback;
.
.
_player.addEventListener(VideoEvent.COMPLETE,clipC ompleteListener);
.
.
private function clipCompleteListener(e:Event):void
{
playNext();
}
private function playNext();
{
.
.
}
the problem is that the complete event does not fire always and sometimes the screen ends up blank since the player keeps sitting at the end of the flv.
the weird thing is that the same FLV does not always hang up at the end.
For a very long time I could not find good solution for that. My solution in AS2 was to set an interval and check playHead regularly if its position is changed. If its position is not changed for a second or some time, that means that the movie is hanged up at the and, by not firing the complete event. So I 'virtually' call my completeEventListener method at this point.
In AS3 I hoped that the FLVPB component will not have such a bug (I really think that this is a bug:) but the same thing continues.
An argument I discovered was: this can be because of poor flv encoding and metadata.
Any ideas? What is the best way to encode movies into 'complete event friendly' flvs?
thanks in advance