You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Flash plugin: Controlbar The most important Flowplayer plugin

Set me on fire!

(Version 3.1.5)

Features

  • The controlbar plugin is just like any other Flowplayer plugin. It can be moved, resized, faded and animated. You can also dynamically load it during playback.
  • Every aspect of the controlbar plugin can be configured. Each button and widget can be shown or hidden. The background color and gradient settings can be changed even at runtime.
  • You can have many controlbars on the same page at the same time. One might be positioned in an upper corner showing only a play/pause button while another may show the timeline, volume control and fullscreen button.
  • The controlbar can be completely disabled and there is no need to download it at all.
  • If you really want a unique look for your controlbar plugin, you can make your own. That way you can achieve a truly different look for your controlbar combined with the powerful features of Flowplayer.

You can alternatively use our HTML-based controlbar that can be customized with normal web skills and graphics.

In this section:


Controlbar configuration

The controlbar plugin is the only plugin that is automatically loaded without an explicit configuration. By default it is loaded from the same directory where the flowplayer.swf file is located.

The url property is a path to the controlbar file. If you do not supply this property, the player attempts to load a file named flowplayer.controls-3.1.5.swf from the same location where the player was loaded from. If you want to use an alternative controlbar such as flowplayer.controls-tube-3.1.5.swf, then this property must be specified. Here is a demo about changing the skin of the controlbar.

Flowplayer internally uses the default plugin name 'controls' for the controlbar if you do not specify another name for it in the configuration. If you do not supply the url for the plugin, or if you disable the controlbar althogether in the configuration with controls:null, then you must use this name.

Here is an example configuration which will place the controlbar at the top of the player, showing only the play/pause button and scrubber (the timeline):

// The controlbar plugin is loaded by specifying it in the plugins section of the configuration.
plugins: {

	// The controlbar is called "controls". By tweaking this, you can modify its look and feel
	controls: {

		// location of the controlbar plugin
		url: 'flowplayer.controls-3.1.5.swf',

		// display properties such as size, location and opacity
		top: 20,
		left: 20,
		bottom: 0,
		opacity: 0.95,

		// styling properties (will be applied to all plugins)
		background: '#114455 url(/my/custom/controls.png) no-repeat 3px 6px',
		backgroundGradient: 'low',

		// controlbar specific settings
		timeColor: '#980118',
		all: false,
		play: true,
		scrubber: true,

		// tooltips (since 3.1)
		tooltips: {
			buttons: true,
			fullscreen: 'Enter fullscreen mode'
		}
	}
}

No controlbar

You can set the controlbar to null and it will not be downloaded at all. This is how you do it:

plugins {
	controls: null
}

Standard properties and methods

The controlbar plugin is diplayable and stylable and consequently has the standard display properties and styling properties that can be used to tweak the look and feel of the controlbar to your needs.

As with all visible plugins, you can use the standard animate and css methods. See the example under Scripting at the end of this page.

You can find more information about these and other standard Plugin properties and methods under the JavaScript API documentation.

The remainder of this page describes the custom properties of the controlbar plugin.

Coloring properties

Colors are specified as a string starting with a '#' sign and followed by six hexadecimal digits (0-9, A-F or a-f). Each two hexadecimal digits specify one color, in the order of Red, Blue, Green (RGB). The higher the value, the more of the color will be mixed in. So '#01DAFF' means "a little red, some blue and all of green".

property default value description
timeColor '#01DAFF' Value for the font color in the time field. This is the running time.
durationColor '#ffffff' Value for the font color in the time field that specifies the total duration of the clip or "total time".
progressColor '#015B7A' Color of the progress bar. This is the bar in the timeline from zero time to the point where playback is at a given time.
progressGradient 'medium' Gradient setting for the progress bar. See below for its valid values.
bufferColor '#6c9cbc' Color of the buffer. The buffer is the bar that indicates how much video data has been read into the player's memory.
bufferGradient 'none' Gradient setting for the buffer. See below for its valid values.
sliderColor '#000000' Background color for the timeline before the buffer bar fills it. The same background color is also used for the volume slider.
sliderGradient 'none' Gradient setting for the sliders. See below for valid values.
buttonColor '#889AA4' Color of the player buttons: stop, play, pause and fullscreen.
buttonOverColor '#92B2BD' Button color when the mouse is positioned over them
volumeSliderColor '#000000' Background color for the volume slider (since 3.1)
volumeSliderGradient 'none' Volume slider background color gradient (since 3.1). See below for its valid values.
timeBgColor '#555555' Background color for the time/duration display (since 3.1). You can set timeBgColor: null here and the time area background area is not drawn at all.

Specifying gradients

Many of the elements have a gradient setting. It specifies how the background is faded in and out vertically. You can specify the gradient with the predefined values "none", "low", "medium" or "high".

You can also supply an array of values, with each value representing how much transparency is supplied at any given vertical position. For example, array [0.2, 1.0] means that the background will be 80% visible at the top edge and 0% visible at the bottom edge and there will be a linear gradient of transparency between these two edges. You can supply any number of gradient points in your array and they will all be placed so that there is equal distance between each point. For example, array [0.4, 0.6, 1.0] will place points at the top, center and bottom of the gradient, respectively.

Controlling the scrubber and volume bar heights

Ratios are values between 0.0 (none) and 1.0 (full).

property default value description
scrubberHeightRatio 0.4 How much the scrubber handle should take of the controlbar total height. A value of 1.0 means that the scrubber handle takes the entire available height in the controlbar plugin (since 3.1).
scrubberBarHeightRatio 1 The ratio between the scrubber bar and the scrubber handle. A value of 1.0 means that the scrubber bar's height is the same as the handle's height (since 3.1).
volumeSliderHeightRatio 0.4 How much the volume slider handle should take of the controlbar total height (since 3.1).
volumeBarHeightRatio 1 The ratio between the volume bar and the voume slider handle. A value of 1.0 means that the bar's height is the same as the handle's height (since 3.1).
timeBgHeightRatio 0.7 How much the time/duration display should take of the controlbar total height. A value of 1.0 means that it takes the entire available height of the controlbar plugin (since 3.1).

Visibility properties and Buttons

These properties determine the visibility of controlbar elements and buttons.

property default value description
autoHide 'fullscreen' Specifies whether the controlbar should be hidden when the user is not actively using the player. Allowed values are never, always and fullscreen. Here is a controlbar auto-hide demo.
hideDelay 4000 The delay in milliseconds before the controlbar is automatically hidden. The timer starts over again when the user stops moving the mouse or moves the mouse out of the player. Specifying 0 here causes the controlbar to hide immediately. The default is 4000 (4 seconds).
all A shorthand convenience property that you can use to hide or show all elements of the controlbar. This is convenient if you want to show only some of the controlbar elements so you first hide them all with all: false and then show only a few. This technique is used in the above Configuration example.
play true Should the play/pause button be visible?
volume true Should the volume control be visible?
mute true Should the mute button be visible?
time true Should the time display be visible?
stop false Should the stop button be visible?
playlist false Should the playlist buttons be visible? The playlist buttons allow navigation through the playlist entries of the current playlist. These buttons are always hidden if there are less than two entries in the playlist.
fullscreen true Should the fullscreen button be visible?
scrubber true Should the scrubber be visible? 'Scrubber' is a well known nickname for the timeline/playhead combination.

Scripting

The controlbar plugin has the following custom methods that can be used at runtime:

method example description
enable(object) enable({play: false}) Enables and/or disables the controlbar widgets. Disabled widgets are greyed out. For example, this can be useful when you want to force the user to watch a video in the case of an advertisement. A value of all can be used to enable/disable all widgets at the same time. For example, enable({all: false}) will disable all widgets.
widgets(object) widgets({scrubber: false}) Shows/hides the controlbar widgets. all can be used to enable/disable all widgets at the same time, for example, widgets({all: false}).
tooltips(object) tooltips({buttons:true, play: 'Go'}) Enables/disables tooltips. Use buttons:true or buttons:false to enable or disable all buttons at the same time, respectively. Specifying the value null disables the tooltip. Since 3.1: If you want to enable the buttons remember to add the buttons: true property as one parameter.

These methods return the controlbar plugin instance so these methods can be "chained". For example:

// disable all but the play button and hide the fullscreen button
$f().getControls().enable({all: false, play: true}).widgets({fullscreen: false})

As with all visible plugins, you can use the standard animate and css methods. Here are some examples:

// first get access to the plugin using the getPlugin call
var plugin = $f().getPlugin("controls");

// or you can use the getControlbar shortcut
plugin = $f().getControls();

// after that you can use the animate() method that is common to all plugins
plugin.animate({top:30, width:'40%'});

// by using the css() method you can also dynamically tweak the styling properties
plugin.css("backgroundColor", "#123456");
plugin.css("backgroundGradient", [0.9, 0.3]);

// or you can set multiple properties at once
plugin.css({
	sliderColor:'#ff1207',
	sliderGradient:'high',
	borderRadius:10,
	backgroundImage:'url(/img/pattern.jpg)'
});

Notice that the controlbar plugin truly supports background images which is a very powerful method of customizing its appearance.

Events

Event When does it fire?
onBeforeShowed() Used when the autoHide feature is enabled. This event is fired when the controlbar is about to be visible. Currently you can only listen to this event in Flash plugins. You can prevent the controlbar from being shown by calling event.preventDefault() for the event object.
onBeforeHidden() Used when the autoHide feature is enabled. This event is fired when the controlbar is about to go hidden. Currently you can only listen to this event in Flash plugins. You can prevent the controlbar from being hidden by calling event.preventDefault() for the event object.
onShowed() Used when the autoHide feature is enabled. This event is fired when the controlbar has become again visible.
onHidden() Used when the autoHide feature is enabled. This event is fired when the controlbar has gone hidden (after the animation that makes it hidden has completed and controlbar is not visible any more).

Tooltips

Tooltips were introduced in controlbar version 3.1. By default a tooltip is shown over the scrubber and volume control, but this behaviour can be changed with the tooltips configuration. Here is an example:

controls: {
	height: 30,

	// background color for tooltips
	tooltipColor: '#456',

	// which tooltips are shown and which are not?
	tooltips:  {
		// a shortcut for enabling tooltips for buttons (English)
		buttons: true,

		// customize the pause button text
		pause: 'Continue playing',

		// disable tooltips for the volume control
		volume: null
	}
}

tooltips is an object of the controlbar plugin object. Except for color properties, which apply to all tooltips, the tooltip configuration properties come under the tooltips object. This object defines which elements have their tooltip enabled and what the tooltip says. Here is a full list of configuration options for the tooltips object:

property default value description
buttons false Specifying true here causes all buttons to have default English tooltips enabled. You can customize each button separately with the following options. Specifying null for a property value causes the tooltip for that button to be disabled.
play 'Play' Tooltip text for play button.
pause 'Pause' Tooltip text for pause button.
mute 'Mute' Tooltip text for mute button.
unmute 'Unmute' Tooltip text for unmute button.
stop 'Stop' Tooltip text for stop button.
fullscreen 'Fullscreen' Tooltip text for fullscreen button.
fullscreenExit 'Exit fullscreen' Tooltip text for fullscreenExit button.
next 'Next' Tooltip text for the Next button of the controlbar's playlist.
previous 'Previous' Tooltip text for the Previous button of the controlbar's playlist.
scrubber %- value The scrubber has no text so you can only disable this by specifying false.
volume %- value The volume control has no text so you can only disable this by specifying false.

Tooltip styling

The following properties affect the style of the tooltip. These are defined for all tooltips of the controlbar under the configuration root and can not be overridden for individual tooltips under the tooltips object.

tooltipColor #5f747c background color for tooltips
tooltipTextColor #ffffff tooltip text color

No tooltips

You can disable tooltips altogether by setting tooltips to null as follows:

controls: {
	...
	tooltips: null
}

Download

Get the latest version of the Flowplayer controlbar plugin. It is compatible with all 3.0+ releases.

flowplayer.controls-3.1.5.swf 27.0 Kb just the working Flash file to get you going
flowplayer.controls-3.1.5.zip 82.0 Kb working Flash file (swf) + README.txt and LICENCE.txt
flowplayer.controls-3.1.5-src.zip 151.1 Kb source code

Please right-click and choose "Save link as..." (or similar)

See the version history for this tool.

NOTE We are no longer providing packed scripts. Althought they may have smaller file size they offer less performance than minified scripts. See details from JavaScript Library Loading Speed.

Found a bug?

If you encounter problems in this script, please send a bug report to the bug reporting forum. If you have a problematic page, including a direct URL to that page is by far the most effective way of helping us to find a bug.