WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Droplets & Snippets => Topic started by: itprox on February 12, 2010, 02:01:20 PM

Title: FLV Video Droplet?
Post by: itprox on February 12, 2010, 02:01:20 PM
Hi,
i have a proble, i need /search for a droplet witch can be use for showing flv video ..

an example: [[videodrop?v=http://www.mysite.com/videos/test.flv]]

maybe its possible to use the JW Player....

Bye bye
PS: Sorry for my bad english...

=> das ganze nochmal auf deutsch:
Ich suche ein Droplet mit welchem ich FLV Video in meine Seiten einbinden kann bei dem ich auch den Player anpassen kann z. B. JW oder Flowplayer...
Title: Re: FLV Video Droplet?
Post by: instantflorian on February 12, 2010, 07:39:31 PM
Hi,

I've written a droplet for embedding the MC media player (http://www.mcmediaplayer.com/)
mcmp_0.8.swf and mcmp_0.8.js have to be copied to a directory "flvplayer" in the root of your WebsiteBaker site. The movies and optional film stills have to be saved in a directory "filme" in the media directory.

Then you can call [[flvplayer?film=beispiel.swf&still=filmstill.jpg&width=400&height=300]]

Code: [Select]
$returnvalue = '<script type="text/javascript">';
$returnvalue .= 'playerFile = "'.WB_URL.'/flvplayer/mcmp_0.8.swf";';
$returnvalue .= 'fpFileURL = "'.WB_URL.'/media/filme/'.$film.'";';
if ($still) {
$returnvalue .= 'fpPreviewImageURL = "'.WB_URL.'/media/filme/'.$still.'";';
}
$returnvalue .= 'playerSize = "'.$width.'x'.$height.'";';
$returnvalue .= 'colorScheme = "666666";';
$returnvalue .= '</script>';
$returnvalue .= '<script type="text/javascript" src="'.WB_URL.'/flvplayer/mcmp_0.8.js"></script>';
return $returnvalue;

Have fun
-instantflorian.
Title: Re: FLV Video Droplet?
Post by: capt_funk on April 10, 2012, 03:07:32 PM
Maybe a little late but it might help some people here:
I've just finished developing a droplet for the flowplayer. Install the player as described on the webiste (http://flowplayer.org (http://flowplayer.org))

Code: [Select]
$width = $width?$width:'425';
$height = $height?$height:'300';
$path = $path?$path:WB_URL.'/media/video/';
$output = '<a href="'.$path.$file.'"
style="display:block;width:'.$width.'px;height:'.$height.'px;"
id="player">
</a>
<script language="JavaScript">
      flowplayer("player", "'.WB_URL.'/media/flowplayer/flowplayer-3.2.9.swf", {
      clip: {
      autoPlay: false,
      autoBuffering: true},
      onLoad: function() {
      this.setVolume(50);}
      });
    </script>';
return $output;

Adjust the path to the flowplayer, done!

Call droplet with:
[[flashvideo?file=filename.flv]]
file: file name with extension (.flv) in folder 'media/video'.
Optional:
path: path to file with '/' at the end
width: width of video (in px) Default value: 425
height: height of video (in px) Default value: 300
Example:
[[flashvideo?file=test.flv&path=http://www.test.com/video/&width=320&height=200]]