AS3 chromeless player hangs if state = ENDED and playVideo() invoked

This problem is occurring in my application but I have not been able to reproduce it on the API Demo page (although the chromeless player on the demo page does occasionally hesitate for several seconds when the player state is ENDED and you press the play button). I do, however, have a very short Flex Builder 3 / AS3 application (below) that reproduces the problem consistently.

To see the problem, compile the app in Flex Builder 3 and run it. A very short video (2 or 3 seconds) will play immediately when the app opens. When the video stops, hit the “play” button in the upper left- hand corner. Sometimes, the video will play but, generally, within 5 attempts to replay the video, the player will become unresponsive. Once it enters that state, you can’t do anything with it (including trying to reload the video – won’t work). As far as I can tell, the player is not generating any errors.

Any ideas? Thank you.

Related Posts

  1. vince says:

    For anyone who cares, the work around for this is to simply NOT play the video (playVideo()) when requested by the user (or other application logic) if player state = ENDED. Invoke loadVideoById starting at 0 instead. The video reloads and starts playing automatically. I’ve found I can do that as many times as I want with no freezing.

  1. There are no trackbacks for this post yet.

Leave a Reply