1
votes

I'm building a narrative click-through kiosk app in Flash/AS3. Currently, there are several (10+) locally loaded .flv files that I'm loading into an FLVPlayback component on the timeline. I am experiencing loading delays and am wondering what the best practice / best case scenario for this case. These are all using the "Load external video with playback component" option for Video importing.

So far I've tried implementing it two ways:

  1. One frame, one FLVPlayback playback on the stage named "video_player", and upon the click through / user action to switch the video, I do the following:

    var new_flv:String = "next_flv.flv";
    
    video_player.stop();
    
    video_player.source("_flvs/"+new_flv);
    
    video_player.seek(0);
    
    video_player.play();
    

    This results in delays anywhere from a few seconds to 10 seconds.

  2. This is unconventional to me, but I used multiple frames on the timeline. Each frame had an FLVPlayback instance on the stage, each with a different relative path placed in the 'source' property in the component parameters (see http://www.ashleylovespizza.org/stuff/flv_example.png ). The code is switching between frames based on frame label and then hitting play (autoplay is off in the component parameters as well).

    var new_flv_frame_name:String = "next_frame";
    
    this.gotoAndStop(new_flv_frame_name);
    
    this.video_player.play();
    

The issue, again, is that loading is taking a long time. What could prevent this behavior? One long flv that I seek() to different moments of time on the playhead? Can I preload in a separate FLVPlayback instance, similar to double buffering?

Any tips or best practices are appreciated.

1

1 Answers

0
votes

Although you have not told me where the flv files are being loaded from (locally or remote), and as you have said you are building a kiosk style app, I am going to go out on a limb here and say that you should almost certainly use Adobe AIR for a kiosk app.

There is no reason for creating more than one FLVPlayback instance, its capable of playing multiple videos using getVideoPlayer(index), its up to you to manage the streams by calling close() on them.

If you are loading files remotely, then using Adobe AIR you can download each video to a local folder using the FileStream class. This will speed up the process of playing back these files.