views:

16

answers:

1

Hi folks,

I have a client who is insisting on having a 65Mb FLV on her home page. I talked her down off of the auto-play ledge but I am concerned about wasting bandwidth on a movie that one in 30 visitors might play.

In looking at the docs for the FLVPlayback component here the only buffer related parameter I found was

bufferTime 
Number of seconds to buffer before beginning playback. The default value is 0.

The only solution I have come up with is to load a jpeg still of the player and replace it onclick with the SWF.

Anyone have a cleaner solution to prevent wasted bandwidth?

Thanks,

JG

+1  A: 

I (literally) just sorted out the same issue (was looking for easy answers when I found your question)

My solution was to use a bit of Actionscript to not give the name of the flv file to the FlvPlayback until the first time the play button was clicked. Snippet of Actionscript 3 code below ( myVideo is the instance name I used for the FlvPlayback component and BigButton is the name of the Play button I display).

var firstplay=true;

var moviefile = "nameofmovie";

function playMovie(event:MouseEvent):void {

if (firstplay) {

   myVideo.source = moviefile +".flv";
       firstplay = false;
}
myVideo.play();

}

BigButton.addEventListener(MouseEvent.CLICK, playMovie);

Tim
Thanks Tim. I ended up going with my idea of having a jpeg still representing the SWF and replacing it onclick with the swf.
jerrygarciuh