You need to upgrade your Flash Player This is replaced by the Flash content. Place your alternate content here and users without the Flash plugin or with Javascript turned off will see this. Content here allows you to leave out noscript tags. Include a link to bypass the detection if you wish.


flvPlayer v1.0b - 11 kb - Flash 8

A youtube style flv player with a simple gui and few features. Some examples follows below, all examples are embedded using swfObject.

Example 1 - Scaling example with scaleMode=none.

Example 2 - None scaling example with hiddenGui=true and showScaleModes=false and autoStart=false and a startImage.

Example 3 - Example with playlist, the playlist can be viewed here.

Download beta swf here (11 792 bytes)

Input parameters
flvToPlay - url to *.flv file to load and play OR url to playlist xml, read more about playlists further down.

Optional
hiddenGui - true or false. Default is false. Makes the gui hide when no mouseMove event has occured for 1500ms.

buffer - int. Default is 5. Number of seconds the flv should buffer.

autoStart - true or false. Default is true. If the flv should start loading/playing directly(true). Or if the the user has to interact before it starts to load/play.

startImage - url to image(jpg,gif,png,swf). If autoStart is set to false, an image can be loaded, like a preview of the movie. This has no effect if autoStart is set to true.

scaleMode - none,double or full. Default is full. Determines how the video scales, none means it will not scale beyond it's orginal width and height, that are read from the metadata of the flv. double, means it will scale up to twice of it's original size. full, means it will scale up as much as it's possible. But it will always keep the correct aspect ratio. If there isn't enough room to scale to for example the double size, it will scale as much as possible, but it will keep the correct aspect ratio.

loop - true or false. Default is false. If the movie or playlist should loop or not.

jsCallback - true or false. Default is false. Is used to make the flvPlayer do javascript calls when the movie starts and ends. When the movie starts it will call "flvStart('width_in_pixels','height_in_pixels')". When the movie ends it will call "flvEnd()". If it's playing back a playlist it will make the "flvStart('w','h')" call every time a new movie is loaded. But it will only make the "flvEnd()" call when the last movie in the playlist has ended.

defaultVolume - int, 0-100. Default is 100. The volume in %, the player will have when it loads. 0 beeing mute and 100 being full volume.

startTime - int, seconds. Default is 0. At which second the movie should start. For example 5 makes it start 5 seconds in to the movie, 67 makes it start at 1 minute and 7 seconds in to the movie. Note, since it loads the flv:s progressively it will still have to load/buffer everything up to the starting point.

smoothVideo - true or false. Default is false. If the movie should be smoothed(interpolated). Can make scaled up videos look less pixelated.

showScaleModes - true or false. Default is true. If the (+) button should be visible or not. It's the menu where the user can change scaleMode and smoothVideo.

Playlist
Instead of loading a single flv, you can load a playlist with several flv:s.
A playlist should be in this format, saved as utf-8.

<?xml version="1.0" encoding="UTF-8"?>
<playlist>
	<item name="Name of Movie 0" length="00:38" thumbnail="42x32.jpg" url="test0.flv" starttime="5"/>
	<item name="Name of Movie 1" length="02:47" thumbnail="42x32.gif" url="test1.flv"/>
	<item name="Name of Movie 2" length="02:47" url="test2.flv"/>
	<item name="Name of Movie 3" length="02:47" thumbnail="42x32.png" url="test3.flv"/>
	<item name="Name of Movie 4" length="02:47" url="test4.flv"/>
	<item name="Name of Movie 5" url="test5.flv"/>
	<item name="Name of Movie 6" length="02:47" url="test6.flv" starttime="15"/>
</playlist>

Each tag should at least contain 'name' and 'url'.

As optional attributes we have 'length', which should be the length of the movie like: mm:ss. If it's omitted it will look like --:-- in the playlist.

Then we have 'thumbnail', should be a url to a image(jpg,gif,png,swf), size should be 42x32 pixels. If omitted a small default icon will appear instead, in the playlist.

And last, 'starttime' has the same effect as 'startTime' in the flashVars, only when using a playlist the 'startTime' in the flashVars will be omitted.

Another thing, a right-click choice called "Toggle Fullscreen" is available and functional for people using Flash Player 9,0,18,60 or later. It allows the video to playback in chromeless fullscreen. But you must enable it in the embed code, like: so.addParam("allowFullScreen", "true");

Suggestions and Bug reports
If you have any good suggestions, like features etc. Or if you found some bug, feel free to email me at klas[dot]kroon[at]telia[dot]com. If youīre reporting a bug, please provide useful information.

License (update: 2010-11-11)
I get a few questions about what kind of license this player is released under. I donīt know, really.
You can do pretty much whatever the hell you want with it as far as Iīm concerned ;) So use it for whatever, redistribute it, etc.
As long as you donīt try to profit from/sell it in any way, itīs probably fine. If you are unsure, just drop me a quick email.



(C) OutsideOfSociety 2006.