This is a message.

Multiple Players on one page

How to use multiple players in a single web page

standalone demo

Have you ever opened a page with many simultaneous Flash video players being loaded? It is slow and frustrating. There is a reason why YouTube shows only one video per page. Flowplayer does not have those restrictions. This page has four players and the page is loading normally.

Click on above splash images on a the time. You can see automatic loading and unloading taking place.

You can install unlimited amount of players on a page and each one is activated (loaded) after being clicked. Previously loaded player is automatically unloaded. Flowplayer takes care of this on your behalf.

Its important to note that you have the ability to supply full configuration for the player before Flash is loaded. You can have different setups for each player on the page - be it plugins, skins, events or branding. Each player can be fully initialized before player loads. This technique allows you to make highly functional web pages with videos.

Player Containers

Here we have four player containers and each one is set up with a background-image CSS property and a nested image (the play button).

<a class="myPlayer"
<img src="/media/img/player/btn/play_large.png" alt="Demo video 1"/>
<a class="myPlayer"
<img src="/media/img/player/btn/play_large.png" alt="Demo video 2"/>
<a class="myPlayer"
<img src="/media/img/player/btn/play_large.png" alt="Demo video 3"/>
<a class="myPlayer"
<img src="/media/img/player/btn/play_large.png" alt="Demo video 4"/>
<br clear="all" />


Styling the players

You can see that each container above is assigned with a class name "myPlayer". The styles for the myPlayer class is below. Note that you can assign different classes to your players and style them differently.

section.blurb .box{
/ styling of the container. /
a.myPlayer {
width: 320px;
border:1px solid #999;
/ play button /
a.myPlayer img {
/ when container is hovered we alter the border color /
a.myPlayer:hover {
border:1px solid #000;


Flowplayer Installation

Here you can see another example of simplicity and power of Flowplayer. The process of installing the players is as simple as this JavaScript one-liner.

flowplayer("a.myPlayer", "", {
// this is the player configuration. You'll learn on upcoming demos.
plugins: {
controls: {
volume: false


How Does it work?

The first argument takes a format tagName.className which will select multiple elements from the page using the specified CSS class name. This is the only special selector provided natively by Flowplayer API. If you want to make more complex selections from the page you should look at the Flowplayer jQuery support from Flowplayer JavaScript API.

Generating Splash Images

The splash images on the page were generated with the FFMPEG tool using the following command line where 80 is the example seek position in seconds of the frame used as splash image.

ffmpeg -ss 80 -an -i my_movie.flv -f image2 -pix_fmt yuvj420p -vframes 1 -s 320x240 my_image.jpg


The above incantation may vary depending on the version of ffmpeg you have installed on your system.