3.7kB Lightweight,OOP & re-skin friendly FLV player.
With flv videos becoming essentially THE video format for the web, there are many flv players, components to choose from so why bother with this one ?
It’s not your typical feature rich component, all it does is plays the flv file, you can pause/resume, mute on/off , shows you playback and loading progress and you can seek by dragging the seek button. Which I found is 95% of functionality you need anyway.
This player has originally been written for flash banners, I called it VideoPlayerLite, had no buttons and byte size was the most import criteria. This is extended version of the lite version , which has seek functionality and I added buttons. It is still pretty lightweight, code itself has 3.7 kB with buttons and bars has 4.3 kB.
My favourite thing about this player is how easy it is to re-skin. All you need to to is change graphics on 2 frames of mute and playback button, or color them if you like the shape of the default “skin”. The playback/loading progress bar are just a simple colored rectangles that are being scaled on playback.
This allows for much easier and quicker customisation / re-skining than with using components that relay on predefined shapes that are being colored via parameters in component parameters panel.
The attached zip example uses 4 classes , but the most import one is the FLVLoaderLite.as class, that has the core playback functionality. MainViewDemo.as creates FLVLoaderLite loader instance and connects the buttons and seekBar with the FLV loader class. SeekBar.as class provides seek , playback bar and drag button functionality.
FLVLoaderLite class also reports possible errors which are displayed on the textfield in the MainViewDemo.
There are several configuration options you can use for this player :
videoPlayer.loop – enables video looping
videoPlayer.autostart – determines whether video is paused at the beginning
videoPlayer.soundOnStart – determines whether audio is muted at the beginning
videoPlayer.minBufferVal – default number of seconds of playback available before playing can start
videoPlayer.maxBufferVal – increased number of seconds for buffering after minBufferVal is insufficient for continuous playback
Posted in AS2


April 14th, 2008 at 12:41 am
Cool – have you tested with RTMP?
April 14th, 2008 at 10:54 pm
No, I haven’t , but if somebody will let me know…
June 6th, 2008 at 12:11 pm
It enables the video looping and determined the audio is muted. but, the contents are not clear.
June 6th, 2008 at 11:55 pm
ad: Agria: but, “…contents are not clear.” Say what ??