sfVideoPlugin ============= The `sfVideoPlugin` is a symfony plugin providing easy interface for flash video player to embed in symfony projects. Installation ============ 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. Usage ===== 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: [php] enabled_modules: [sfVideo ]( ...,) Run the following URL in your browser: http://your-site/video 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: [php] include_partial('sfVideo/video', array('file' => '01.flv')); Each flv file is fetched from __web/sfVideoPlugin/flv__ directory. Multi-video =========== 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: [php] $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 <a> 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: [php] 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: http://your-site/multi-video Widget ====== You may use a video widget (__sfVideoWidget__ class) inside your form, e.g. in an upload form. [php] $form->setOption('url', '/sfVideoPlugin/flv/01.flv'); Configuration ============= The file __config/app.yml__ contains basic flowplayer configuration: width: 520px height: 320px autoplay: true autobuffering: true Example configuration reading: [php] sfConfig::get('app_video_autoplay') Online demo =========== http://symfony.rox.pl/video http://symfony.rox.pl/multi-video Documentation ============= The offcial documentation of the flowplayer can be found [here](http://flowplayer.org/documentation/). Credits ======= Example flv files have been downloaded from [college](media)(http://www.mediacollege.com/adobe/flash/video/tutorial/example-flv.html)