sfVideoPlugin - 1.1.0

Provides easy interface for flash video player to embed in symfony projects.

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source | Show as Markdown


The sfVideoPlugin is a symfony plugin providing easy interface for flash video player to embed in symfony projects.


Install the plugin via the subversion repository:

$ svn co http://svn.symfony-project.com/plugins/sfVideoPlugin/trunk plugins/sfVideoPlugin

from the project root directory or by using the command:

$ ./symfony plugin:install sfVideoPlugin

Right after the installation of the plugin, you should update plugin assets:

$ ./symfony plugin:publish-assets

so that the default JS and CSS files of the plugin are accessible. Everything is done properly now.


Go to the config directory of the plugin and uncomment all lines in the routing.yml file.

Enable the sfVideo module in your application's config/settings.yml enabled_modules section:

enabled_modules: [sfVideo ]( ...,)

Run the following URL in your browser:


You may choose from 3 example flv files to display. An example of linking flv file is shown in sfVideo/templates/indexSuccess.php.

Video templates

The plugin is provided with a ready-to-use partial template:

include_partial('sfVideo/video', array('file' => '01.flv'));

Each flv file is fetched from web/sfVideoPlugin/flv directory.


You can display as many players as you want on one page if you set different player parameter for each of them. Just define an array of players in action code:

$this->players = array(
  array('file' => '01.flv', 'player' => 'player01'),
  array('file' => '02.flv', 'player' => 'player02'),
  array('file' => '03.flv', 'player' => 'player03'),

JS script managing flowplayer replaces HTML tags with flash players and each tag has to have a unique id parameter (player01, player02, player03 above). Temlate code should be similar to:

foreach($players as $p)
  include_partial('sfVideo/video', $p);

The plugin is provided with multi-video action example. Run the following URL in your browser:



You may use a video widget (sfVideoWidget class) inside your form, e.g. in an upload form.

$form->setOption('url', '/sfVideoPlugin/flv/01.flv');


The file config/ap.yml contains basic flowplayer configuration:

width: 520px
height: 320px
autoplay: true
autobuffering: true

Example configuration reading:


Online demo




The offcial documentation of the flowplayer can be found here.


Example flv files have been downloaded from college(http://www.mediacollege.com/adobe/flash/video/tutorial/example-flv.html)