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

Your preferred username that is used when logging in.

Flash plugin: Content Place HTML over or beside the video screen

Demo

Download (Version 3.1.0)

Features

In short: the content plugin is a general purpose tool to make different kinds of video applications.

Usage examples

You may want to use this plugin in the following scenarios:

You may find it useful to combine the content plugin with cuepoints so that you can show HTML content at various points of time during video playback.

Configuration

Here is a example configuration for the content plugin:

plugins: {

	// "myContent" is the name of our plugin
	myContent: {

		// location of the plugin
		url: 'flowplayer.content-3.1.0.swf',

		// display properties
		top: 20,
		width: 300,

		// styling properties
		borderRadius: 10,
		backgroundImage: 'url(pattern.png)',

		// linked stylesheet
		stylesheet: 'content-plugin.css',

		// "inline" styling (overrides external stylesheet rules),
		style: {
			'.title' {
				fontSize: 16,
				fontFamily: 'verdana,arial,helvetica'
			}
		}

		/*
			initial HTML content. content can also be fetched from the HTML document
			like we did in the example above. see the source code for that.
		*/
		html: '<img src="hello-world.png" align="left" /><p class="title">My title</p>',

		// clicking on the plugin hides it (but you can do anything)
		onClick: function() {
			this.hide();
		}
	}
}

The content plugin supports both display properties and styling properties like any other styleable plugin. Please follow the links to find out more information about them.

Here is a list of all content plugin specific configuration variables:

property description
html Specifies the initial HTML content for the plugin. Here is a list of supported HTML tags.
textDecoration A value 'outline' causes a black outline to be used in the text font. This is useful when the background color of the content plugin is transparent and we want to make the text more visible on a light colored background. Especially useful when used with our captions plugin.
stylesheet Path to the stylesheet file which specifies how each tag in the content is styled. You can find more information about styling here.
style A styling object that is specified directly in the configuration. If an external stylesheet is in use, these settings override those external settings. You can find more information about styling here.
closeButton true displays a closing button at the top right corner of the plugin. The default is false
closeImage A URL pointing to the image that is used as the closing button. Example: closeImage: url('close.png'). By default an X-like image is shown.
onClick A javascript function that is called when the content plugin is clicked. The this variable points to the current Plugin instance and its only argument is a pointer to the current Player instance.
onMouseOver A javascript function that is called when the mouse is positioned over the plugin. The this variable points to the current Plugin instance and its only argument is a pointer to the current Player instance.
onMouseOut A javascript function that is called when the mouse moves outside of the plugin. The this variable points to the current Plugin instance and its only argument is a pointer to the current Player instance.

Look here for the JavaScript API documentation for more information about Plugin and Player instances.

Scripting

Here are some scripting examples:

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

// after that you can use the standard plugin's methods
plugin.animate({top:30, width:'40%'});

// and you can use content plugin specific methods
plugin.append("<p>Some more HTML content</p>");

You can find the list of standard Plugin methods such as animate and css here. Here is a list of the content plugin specific methods:

method returns description
setHtml(html) Plugin Set the plugin's HTML content to the given string. These HTML tags are supported. The current Plugin instance is returned.
append(html) Plugin Append more HTML content to the end of the existing HTML.
getHtml() String Returns the current HTML content.

Supported HTML

The HTML that is supported by the content plugin is far less flexible and feature rich than the HTML supported by browsers. However, it is flexible enough for placing different types of content over video. The a, img, p and span HTML tags will be those mostly used with the content plugin. By combining those tags with class names and CSS styling you have a lot of different design possibilities.

Anchor tag <a>

Creates a hypertext link. Examples:

<!-- a link pointing to a specific url -->
<a href="http://acme.org">Acme website</a>

<!-- trigger JavaScript. huge possibilities!  -->
<a href="javascript:getEmbedCode()">Get embed code</a>

<!-- open the page in a new browser window or tab -->
<a href="help.html" target="_blank">Player help</a>

You can also define a:link, a:hover, and a:active styles for the anchor tags. See the styling section later.

Image tag <img>

The <img> tag lets you embed external JPG, GIF and PNG files and even SWF files. Text automatically flows around images you embed in text fields or components. Supported attributes are: align, width, height, hspace and vspace. Examples:

<!-- place an image -->
<img src="my-image.png" />

<!-- align image to the right edge of the content plugin -->
<img src="my-image.png" align="right" />

<!-- remove image's default margins -->
<img src="my-image.png" vspace="0" hspace="0" />

Paragraph tag <p>

Creates a paragraph. Supported attributes are align with values "left", "right" or "center" and class that specifies a CSS style class.

<!-- make a title. styled with CSS -->
<p class="title">This is a title</p>

<p align="right">right aligned paragraph</p>

Span tag <span>

This tag is usually used inside the p tag to highlight text with different CSS attributes. It is usually accompanied with a class attribute. Examples:

<!-- span.highlight is styled with CSS -->
<p>
	This is an <span class="highlight">interesting</span> paragraph
</p>

Other tags

These tags are not so commonly used, but are fully supported:

Tag Description
<b> Renders text as bold.
<br> Creates a line break.
<font> Specifies a font or list of fonts to display the text in. Supported attributes are color and face. It is recommended to use CSS for styling your text.
<br> Creates a line break.
<i> Displays the tagged text in italics. An italic typeface must be available for the font used.
<li> Places a bullet in front of the text that it encloses. Ordered list <ol> and unordered list <ul> tags are not supported.

Styling with CSS

The content plugin supports a subset of the CSS standard for styling HTML tags. All principles are identical to common CSS coding practices. If you are not familiar with CSS you can find lots of good turorials on the net.

There are two ways of styling HTML tags: by specifying styling directly in the configuration (inline) or supplying an external CSS file. When specifying CSS directly in the configuration you must use the so-called camel case naming convention when defining CSS properties as well as quoting all string values. Notice how the CSS property font-size becomes fontSize (without quotes) in the inline configuration below. See the table below for a complete list of CSS properties and their camel case equivialents. Here is an example of inline styling:

style {

	// "p.title" is not supported. you just have to write ".title"
	'.title': {
		fontSize: 16,
		fontFamily: 'verdana'
	},

	'.highlight': {
		color: '#339999',
		fontWeight: 'bold'
	}
}

And here is the corresponding styling in the external stylesheet. The syntax is the same as CSS files used in other web pages.

.title {
	font-size: 16;
	font-family: verdana;
}

span.highlight {
	color: #339999;
	font-weight: bold;
}

When specifying numeric values only the numeric part of the value is used. The units (px, pt) can be given but they are not parsed; pixels and points are equivalent. em is not supported.

Supported CSS properties

CSS property Camel case Usage and supported values
color color Only hexadecimal color values are supported. Named colors (such as blue) are not supported. Colors are written in the following format: #FF0000.
display display Supported values are inline, block, and none.
font-family fontFamily A comma-separated list of fonts to use, in descending order of desirability. Any font family name can be used. If you specify a generic font name, it is converted to an appropriate device font. Example: 'Georgia, "Trebuchet MS", "Times New Roman", serif'.
font-size fontSize Sets the size of a font.
font-style fontStyle Supported values are normal and italic.
font-weight fontWeight Supported values are normal and bold.
leading leading The amount of space that is uniformly distributed between lines. The value specifies the number of pixels that are added after each line. A negative value condenses the space between lines.
letter-spacing letterSpacing The amount of space that is uniformly distributed between characters. The value specifies the number of pixels that are added after each character. A negative value condenses the space between characters.
margin-left marginLeft Controls the size of the left margin of an element.
margin-right marginRight Controls the size of the right margin of an element.
text-align textAlign Supported values are left, center, right, and justify.
text-decoration textDecoration Supported values are none and underline.
text-indent textIndent Indents the first line of text in an element.

Download

Get the latest version of Flowplayer content plugin.

flowplayer.content-3.1.0.swf 4.3 Kb just the working Flash file to get you going
flowplayer.content-3.1.0.zip 5.8 Kb working Flash file (swf) + README.txt and LICENCE.txt
flowplayer.content-3.1.0-src.zip 15.8 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.