Author Topic: Solution: Adding Splash IMG URL for Flowplayer  (Read 2128 times)

JoomExtend

  • Lurker
  • *
  • Posts: 1
Solution: Adding Splash IMG URL for Flowplayer
« on: 23 de March de 2010, 02:03:17 PM »
@ flowplayer.php in "plugins/content/" add lines from 86 ff:

Quote
   protected function get_video(&$matches)
   {
      //$matches[1] = URL of Image including "splash"-Tag
      //$matches[2] =Clean URL of Video
      
      $url_video = $matches[2];
      
      //Get the splash image
      $splashimg = '';
      $img_url = '';
      
      //Extracting Clean Img URl
      if (@$matches[1]) {

      $splashimg_matches = array();
           preg_match( "#splash=\|(.*?)\|#s", $matches[1] ,$splashimg_matches );
           if (isset($splashimg_matches[1])) $splashimg =  $splashimg_matches[1];
         $img_url = '<img src="'.$splashimg.'"/>';
      }

      $video = JHTML::link($url_video, $img_url, 'class="flowplayer"');
      $video = '<div align="center">'.$video.'</div>';
      return $video;
   }


Nothing more to do !

Now you can add an Splash Image for your Videos when using this pattern:
{flowplayer splash=|URLWhereEverYourImageIs.jpg|}URLWhatEverYourVideoURLIs.flv{/flowplayer}

or you can just show the video without splash image (as before):
{flowplayer}URLWhatEverYourVideoURLIs.flv{/flowplayer}


Example:
Image in "/images/stories/myimage.jpg"
Video in "/images/stories/videos/myvideo.flv"

{flowplayer splash=|/images/stories/myimage.jpg|}/images/stories/videos/myvideo.flv{/flowplayer}

Best use with the autoplay function which can be activated in the Plugin Section in the Backend:
1. Go to Backend
2. Extensions>Plugins>Content - FlowPlayer
3. Plugin-Paramter>AutoPlay: Yes

Maybe Daniel Gutierrez likes this and will add this feature in a further version of this plugin  :laugh:

That´s all folks

JoomExtend

miaj

  • Lurker
  • *
  • Posts: 1
Re: Solution: Adding Splash IMG URL for Flowplayer
« Reply #1 on: 25 de March de 2010, 12:12:27 AM »
Where do I put this code: {flowplayer}URLWhatEverYourVideoURLIs.flv{/flowplayer}
I want to play it in content.

Krazza

  • Lurker
  • *
  • Posts: 1
Re: Solution: Adding Splash IMG URL for Flowplayer
« Reply #2 on: 24 de April de 2010, 09:36:49 PM »
@ Jextend, i tried your hack but I get an error, it works fine before...

200 "Stream not found" Netsteam.Play.Streamnotfound "

etc...any ideas..