How to play FLV video sequence smoothly (in AS2)?

What's the best way to play a sequence of FLV video files in Flash (using ActionScript)? My goal is to make the transitions as smooth as possible.

I am currently using the netStream class and capturing onStatus events to play the next video when the current video has reached its finite duration. While this approach works great, there is still a small gap between the end of the current video and the start of the next. Any ideas on how to optimize this method?

Thank you in advance:)

+1


source to share


2 answers


I can't answer this correctly because I only know how3, but you haven't had any other answers yet.



I am guessing this is happening because you are starting a new video to begin with and a portion of the movie needs to be loaded and pinned first before it starts playing it hence the delay. Can you start the next movie earlier in another component and pause it on the first frame and somehow swap and cancel it when the previous one is finished so that it is already ready to play?

+1


source


My thoughts are for sure! Exactly the way I approached the concept, the only thing that there is a gap between the end of the current video and the start of the next video is still.



My solution: try to catch the video metadata (especially the duration) and use setInterval to check if the second being played in the video is somewhere near the end of the video file. When it comes to an end, I delete the video file and start playing the next video. This approach works fine locally, but on the network I still run into some problems. I will let you know when I find a suitable solution.

+1


source







All Articles