Author: tkoomzaaskz Date: 2010-01-13 22:22:17 +0100 (Wed, 13 Jan 2010) New Revision: 26583
Added: plugins/sfVideoPlugin/trunk/lib/ plugins/sfVideoPlugin/trunk/lib/helper/ plugins/sfVideoPlugin/trunk/lib/helper/VideoHelper.php plugins/sfVideoPlugin/trunk/package.xml Removed: plugins/sfVideoPlugin/trunk/modules/sfVideo/templates/showSuccess.php Modified: plugins/sfVideoPlugin/trunk/README plugins/sfVideoPlugin/trunk/config/routing.yml plugins/sfVideoPlugin/trunk/modules/sfVideo/actions/actions.class.php plugins/sfVideoPlugin/trunk/modules/sfVideo/templates/localSuccess.php plugins/sfVideoPlugin/trunk/web/css/flowplayer.css Log: [video] code for initial 1.0.0 release Modified: plugins/sfVideoPlugin/trunk/README =================================================================== --- plugins/sfVideoPlugin/trunk/README 2010-01-13 20:45:38 UTC (rev 26582) +++ plugins/sfVideoPlugin/trunk/README 2010-01-13 21:22:17 UTC (rev 26583) @@ -28,6 +28,19 @@ 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. + Documentation ============= Modified: plugins/sfVideoPlugin/trunk/config/routing.yml =================================================================== --- plugins/sfVideoPlugin/trunk/config/routing.yml 2010-01-13 20:45:38 UTC (rev 26582) +++ plugins/sfVideoPlugin/trunk/config/routing.yml 2010-01-13 21:22:17 UTC (rev 26583) @@ -1,7 +1,9 @@ +video: + url: /video + param: { module: sfVideo, action: index } + video_local: url: /video/:file param: { module: sfVideo, action: local } - -video: - url: /video - param: { module: sfVideo, action: show } + options: + segment_separators: ['/'] # disabling '.' separator Added: plugins/sfVideoPlugin/trunk/lib/helper/VideoHelper.php =================================================================== --- plugins/sfVideoPlugin/trunk/lib/helper/VideoHelper.php (rev 0) +++ plugins/sfVideoPlugin/trunk/lib/helper/VideoHelper.php 2010-01-13 21:22:17 UTC (rev 26583) @@ -0,0 +1,16 @@ +<?php + +/** + * Returns the path to a video asset. + * + * @param string $source asset name + * @param bool $absolute return absolute path ? + * + * @return string file path to the video file + */ +function video_path($source, $absolute = false) +{ + return _compute_public_path($source, sfConfig::get('sf_web_video_dir_name', 'sfVideoPlugin'), 'flv', $absolute); +} + +?> \ No newline at end of file Modified: plugins/sfVideoPlugin/trunk/modules/sfVideo/actions/actions.class.php =================================================================== --- plugins/sfVideoPlugin/trunk/modules/sfVideo/actions/actions.class.php 2010-01-13 20:45:38 UTC (rev 26582) +++ plugins/sfVideoPlugin/trunk/modules/sfVideo/actions/actions.class.php 2010-01-13 21:22:17 UTC (rev 26583) @@ -9,6 +9,7 @@ class sfVideoActions extends sfActions { + /** * Displays example links to external flv files. * @@ -19,32 +20,13 @@ } /** - * Demo action. Displays an example external flv file. - * - * @param sfRequest $request A request object - */ - public function executeShow(sfWebRequest $request) - { - // chhose one of the following examples found on the web: - // $this->link = "http://www.mediacollege.com/video-gallery/testclips/20051210-w50s.flv"; - $this->link = "http://e1h13.simplecdn.net/flowplayer/flowplayer.flv"; - - // adding js flash embedding script - $this->getResponse()->addJavascript('/sfVideoPlugin/js/flowplayer-3.1.4.min.js'); - - // adding default flowplayer stylesheet - $this->getResponse()->addStylesheet('/sfVideoPlugin/css/flowplayer'); - } - - /** * Demo action. Displays an example local flv file. * * @param sfRequest $request A request object */ public function executeLocal(sfWebRequest $request) { - $this->link = $request->getParameter('file'); -echo $this->link; + $this->file = $request->getParameter('file'); // adding js flash embedding script $this->getResponse()->addJavascript('/sfVideoPlugin/js/flowplayer-3.1.4.min.js'); @@ -52,4 +34,5 @@ // adding default flowplayer stylesheet $this->getResponse()->addStylesheet('/sfVideoPlugin/css/flowplayer'); } + } Modified: plugins/sfVideoPlugin/trunk/modules/sfVideo/templates/localSuccess.php =================================================================== --- plugins/sfVideoPlugin/trunk/modules/sfVideo/templates/localSuccess.php 2010-01-13 20:45:38 UTC (rev 26582) +++ plugins/sfVideoPlugin/trunk/modules/sfVideo/templates/localSuccess.php 2010-01-13 21:22:17 UTC (rev 26583) @@ -1,22 +1,18 @@ - <div id="page"> - - <h1>Minimal Flowplayer setup</h1> - - <p>View commented source code to get familiar with Flowplayer installation.</p> - - <!-- this A tag is where your Flowplayer will be placed. it can be anywhere --> - <a href="<?php echo $link ?>" style="display:block;width:520px;height:330px" id="player"> - </a> - - <!-- this will install flowplayer inside previous A- tag. --> - <script> - flowplayer("player", "/sfVideoPlugin/swf/flowplayer-3.1.5.swf"); - </script> +<?php use_helper('Video') ?> - <p> - If you are running these examples <strong>locally</strong> and not on some webserver you must edit your - <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html"> - Flash security settings</a>. - </p> +<div id="page"> - </div> + <h1>sfVideoPlugin example - powered by Flowplayer</h1> + + <p>View commented source code to get familiar with Flowplayer installation.</p> + + <!-- this A tag is where your Flowplayer will be placed. it can be anywhere --> + <a href="<?php echo video_path('flv'.'/'.$file) ?>" style="display:block;width:520px;height:330px" id="player"> + </a> + + <!-- this will install flowplayer inside previous A- tag. --> + <script> + flowplayer("player", "<?php echo video_path('swf/flowplayer-3.1.5.swf') ?>"); + </script> + +</div> Deleted: plugins/sfVideoPlugin/trunk/modules/sfVideo/templates/showSuccess.php =================================================================== --- plugins/sfVideoPlugin/trunk/modules/sfVideo/templates/showSuccess.php 2010-01-13 20:45:38 UTC (rev 26582) +++ plugins/sfVideoPlugin/trunk/modules/sfVideo/templates/showSuccess.php 2010-01-13 21:22:17 UTC (rev 26583) @@ -1,22 +0,0 @@ - <div id="page"> - - <h1>Minimal Flowplayer setup</h1> - - <p>View commented source code to get familiar with Flowplayer installation.</p> - - <!-- this A tag is where your Flowplayer will be placed. it can be anywhere --> - <a href="<?php echo $link ?>" style="display:block;width:520px;height:330px" id="player"> - </a> - - <!-- this will install flowplayer inside previous A- tag. --> - <script> - flowplayer("player", "/sfVideoPlugin/swf/flowplayer-3.1.5.swf"); - </script> - - <p> - If you are running these examples <strong>locally</strong> and not on some webserver you must edit your - <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html"> - Flash security settings</a>. - </p> - - </div> Added: plugins/sfVideoPlugin/trunk/package.xml =================================================================== --- plugins/sfVideoPlugin/trunk/package.xml (rev 0) +++ plugins/sfVideoPlugin/trunk/package.xml 2010-01-13 21:22:17 UTC (rev 26583) @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="UTF-8"?> +<package packagerversion="1.4.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> + <name>sfVideoPlugin</name> + <channel>plugins.symfony-project.org</channel> + <summary>Provides easy interface for flash video player to embed in symfony projects.</summary> + <description>Provides easy interface for flash video player to embed in symfony projects.</description> + <lead> + <name>Tomasz Ducin</name> + <user>tkoomzaaskz</user> + <email>[email protected]</email> + <active>yes</active> + </lead> + <date>2010-01-13</date> + <time>11:00:00</time> + <version> + <release>1.0.0</release> + <api>1.0.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <license uri="http://www.symfony-project.com/license">MIT</license> + <notes>-</notes> + + <contents> + <dir name="/"> + + <dir name="config"> + <file name="routing.yml" role="data" /> + </dir> + + <dir name="lib"> + <dir name="helper"> + <file name="VideoHelper.php" role="data" /> + </dir> + </dir> + + <dir name="modules"> + <dir name="sfVideo"> + <dir name="actions"> + <file name="actions.class.php" role="data" /> + </dir> + <dir name="templates"> + <file name="indexSuccess.php" role="data" /> + <file name="localSuccess.php" role="data" /> + </dir> + </dir> + </dir> + + <dir name="web"> + <dir name="css"> + <file name="flowplayer.css" role="data" /> + </dir> + <dir name="flv"> + <file name="01.flv" role="data" /> + <file name="02.flv" role="data" /> + <file name="03.flv" role="data" /> + </dir> + <dir name="js"> + <file name="flowplayer-3.1.4.min.js" role="data" /> + </dir> + <dir name="swf"> + <file name="flowplayer-3.1.5.swf" role="data" /> + <file name="flowplayer.controls-3.1.5.swf" role="data" /> + </dir> + </dir> + + <file name="FLOWPLAYER_LICENSE" role="data" /> + <file name="LICENSE" role="data" /> + <file name="README" role="data" /> + </dir> + </contents> + + <dependencies> + <required> + <php> + <min>5.1.0</min> + </php> + <pearinstaller> + <min>1.4.1</min> + </pearinstaller> + <package> + <name>symfony</name> + <channel>pear.symfony-project.com</channel> + <min>1.3.0</min> + <max>1.5.0</max> + <exclude>1.5.0</exclude> + </package> + </required> + </dependencies> + + <phprelease> + </phprelease> + + <changelog> + + <release> + <version> + <release>1.0.0</release> + <api>1.0.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <license uri="http://www.symfony-project.org/license">MIT license</license> + <date>2010-01-13</date> + <license>MIT</license> + <notes> + * initial import + </notes> + </release> + + </changelog> + +</package> \ No newline at end of file Modified: plugins/sfVideoPlugin/trunk/web/css/flowplayer.css =================================================================== --- plugins/sfVideoPlugin/trunk/web/css/flowplayer.css 2010-01-13 20:45:38 UTC (rev 26582) +++ plugins/sfVideoPlugin/trunk/web/css/flowplayer.css 2010-01-13 21:22:17 UTC (rev 26583) @@ -7,10 +7,9 @@ #page { background-color:#efefef; - width:600px; + width:520px; margin:50px auto; padding:20px 150px 20px 50px; - min-height:600px; border:2px solid #fff; outline:1px solid #ccc; text-align:left;
-- You received this message because you are subscribed to the Google Groups "symfony SVN" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/symfony-svn?hl=en.
