flow.playlist is a JavaScript tool that you can use to implement playlists with simple HTML based syntax.
Colorful flowers and leaves.
2:04 min
Palm trees, big building and sun
0:20 min
Sky turning gray in short time
0:03 min
Here is how our example was setup.
<!-- player is initially loaded with splash screen and play button -->
<a id="player">
<img src="img/3m.jpg" />
<div class="play"></div>
</a>
<!-- this is our playlist -->
<div id="playlist">
<a href="http://blip.tv/file/get/N8inpasadena-Flowers457.flv">
<p>Colorful flowers and leaves.</p>
<p class="time">2:04 min</p>
</a>
<a href="http://blip.tv/file/get/KimAronson-TwentySeconds59483.flv">
<p>Palm trees, big building and sun</p>
<p class="time">0:20 min</p>
</a>
<a href="http://blip.tv/file/get/Behappy-clouds106.flv">
<p>Sky turning gray in short time</p>
<p class="time">0:03 min</p>
</a>
</div>
$(function() {
$("#playlist").playlist(
// flash configuration (required)
"../video/FlowPlayerDark.swf",
// flowplayer configuration (optional)
{initialScale:'scale'},
// playlist configuration (optional)
{player:'#player', loop:true}
);
});
Here is our external CSS file. All visuals and layout is done with CSS as it should be. This allows you to have radically different "skins". CSS coding is actually the biggest work and it helps if you understand this powerfull "language".
Here are all arguments their default values that you can supply to flow.playlist
/*
Select all playlist root nodes with jQuery. Entries that are
directly under the root noe are made as playlist entries.
*/
$("jquery selector").playlist({FLASH CONFIG}, {FLOWPLAYER CONFIG}, {
// CSS class name of a playing entry
playingClass: 'playing',
// CSS class name of a paused entry
pausedClass: 'paused',
// jquery selector for the element where the player well be placed
player: '#player',
// if true then playlist starts from the beginning when it reaches the end
loop:false
});
| 1:st argument | are standard Adobe Flash parameters. If this argument is given as string it is intepreted as src parameter. This is the most common scenario. |
| 2:nd argument | is an object that you can use to configure Flowplayer with these configuration variables |
flow.playlist.js (unpacked source code 2.2 kb)
This script requires that following JavaScript tools are included into the page.
note: Working example of this tool is included into our latest build which can be downloaded here.