Releases for sf 1.2
| Version |
License |
API |
Released |
|
0.1.3beta
|
MIT license |
0.1.3beta
|
06/11/2009 |
|
0.1.2beta
|
MIT license |
0.1.2beta
|
06/11/2009 |
|
0.1.1beta
|
MIT license |
0.1.1beta
|
05/11/2009 |
|
0.1.0beta
|
MIT license |
0.1.0beta
|
28/05/2009 |
Changelog for release 0.1.3 - 06/11/2009
- the folder helperapps wasn't added to the package even it was in the package.xml (because it was empty). Had to add a readme file in it.
Other releases
Release 0.1.3 - 06/11/2009
- the folder helperapps wasn't added to the package even it was in the package.xml (because it was empty). Had to add a readme file in it.
Release 0.1.2 - 06/11/2009
- added the helperapps folder in the lib because it was generating an error on windows
Release 0.1.1 - 05/11/2009
- Catch an error in the web debug toolbar if the incov() is not supported for php
- changed function split(), eregi() and set_magic_quotes_runtime() to support php 5.3 and backward compatible with php 5.2
- updated the READ ME documentation
- updated flowplayer library to 3.1.5
Release 0.1.0 - 28/05/2009
First release of the plugin
lcFlowPlayerPlugin plugin
The lcFlowPlayerPlugin is a symfony plugin that allows users to embed video and audio streams into your webpage.
This plugin is developed by LetsCod.
Third parties
The following libraries are embedded in this plugin:
- FlowPlayer Open Source (GPL 3) video player for the Web
- getID3 The php media parser
Server Requirements (for the getID3 )
- iconv() support for php
- turn off magic_quotes_runtime
Installation
Install the plugin
$ symfony plugin:install --stability=beta lcFlowPlayerPlugin
Publish the plugin assets (css and js):
$ symfony plugin:publish-assets
Clear you cache
$ symfony cc
Configuring your plugin
Video Usage
Supported format: flv
Embed a local video under the web directory
[php]
$path = "/uploads/flowplayer.flv"; // the path is relative to the web directory
echo load_video($path);
By default, an image is displayed to prevent the auto loading of the video, for a faster page loading,
and the size of the video container is the original flv video dimensions (retreived by the getId3 libraries).
Therefore the load_video() function can take an array as a second optional parameter to override
the default settings
Overriding video options
[php]
$path = "/uploads/flowplayer.flv"; // the path is relative to the web directory
$options = array (
"resize" => "800x600",
"image_relative_path" => "/images/media/default.png",
"image_alt" => "Play my video",
"id" => "videoplayer"
);
echo load_video($path, $options);
resize: resize the video to 800x600 and keeps the ratio (the format shoud be width x height or it won't parse it)
image_relative_path: the relative path to the image displayed before playing the video
image_alt: the alt attribute of the <img> tag, for w3c strict validation
id: the script generates an id for the <a> that loads the video, it can be overriden for a better visual debug.
!! When loading many videos in the same page and overriding the id option, make sure that each one is unique
Embed an external video
[php]
$path = "http://e1h13.simplecdn.net/flowplayer/flowplayer.flv";
$options = array ( "resize" => "800x600");
echo load_video($path, $options);
When loading an external video, the resize option of the second parameter is required, for the only reason, that
the original width and height of the external flv cannot be grabbed by the getId3 libraries, therefore, it should be
set manually.
As for the other options, they work exactly the same as the example above.
Audio Usage
Supported format: mp3
Embed a local audio mp3 under the web directory
[php]
$path = "/uploads/eyes.mp3"; // the path is relative to the web directory
echo load_mp3($path);
By default, a mini player is displayed with default width "255px" and default height "30px".
Therefore the load_mp3() function can also take an array as a second optional parameter to override
the default settings:
Overriding audio options
[php]
$path = "/uploads/eyes.mp3"; // the path is relative to the web directory
$options = array (
"width" => "400px",
"height" => "50px",
"id" => "audioplayer"
);
echo load_mp3($path, $options);
height: sets the new height (the value shoud be in px)
width: sets the new width (the value shoud be in px)
id: the script generates an id for the <a> that loads the video, it can be overriden for a better visual debug.
!! When loading many audios in the same page and overriding the id option, make sure that each one is unique
Embed an external audio file
[php]
$path = "http://e1h13.simplecdn.net/flowplayer/eyes.mp3";
echo load_mp3($path);
Loading an external audio file is done in the same way as a local one, with the same options
Debugging
In case of errors, errors will be thrown in the sf_web_debug toolbar, highlighted in red
I use it
If you do like the plugin, and think it helps the community, do not hesitate to click I use it , so it could be more trusted
and spreaded fast.
Feedback
Feel free to send your feedbacks, bug reports or suggestions to Elie Andraos at symfony-plugins@letscod.com
TODO
- Implement default image for mp3
- Video converter to support other formats (avi, mpeg, wmv etc ...)
- Integrate content plugin, caption plugin, and playlist of the flowplayer project
- Youtube skin