2009-09-28 05:23:50 +00:00
|
|
|
<?php
|
2009-10-03 10:38:28 +00:00
|
|
|
/*
|
|
|
|
Player Name: ClipBucket Player
|
|
|
|
Description: ClipBucket default player - flv,mp4,f4v,mov,h264,red5
|
|
|
|
Author: Arslan Hassan
|
|
|
|
Author Website: http://clip-bucket.com/
|
|
|
|
ClipBucket Version: 2
|
|
|
|
Version: 1.0
|
|
|
|
Website: http://clip-bucket.com/
|
|
|
|
Player type: global
|
2010-02-13 12:03:01 +00:00
|
|
|
Released: 25-12-2009
|
2009-10-03 10:38:28 +00:00
|
|
|
*/
|
|
|
|
|
2009-09-28 05:23:50 +00:00
|
|
|
/**
|
|
|
|
* ClipBucket v2 Player
|
|
|
|
*
|
|
|
|
* @Author : Arslan Hassan
|
|
|
|
* @Script : ClipBucket v2
|
2010-03-16 18:56:41 +00:00
|
|
|
* @License : Attribution Assurance License -- http://www.opensource.org/licenses/attribution.php
|
2009-09-28 05:23:50 +00:00
|
|
|
* @Since : September 15 2009
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2009-10-03 10:38:28 +00:00
|
|
|
|
2009-09-28 05:23:50 +00:00
|
|
|
if(!function_exists('cbplayer'))
|
|
|
|
{
|
|
|
|
|
|
|
|
define("CBV2PLAYER",TRUE);
|
|
|
|
define("AUTOPLAY",false);
|
|
|
|
|
2009-10-03 10:38:28 +00:00
|
|
|
function cbplayer($data,$no_video=false)
|
2009-09-28 05:23:50 +00:00
|
|
|
{
|
2009-10-03 10:38:28 +00:00
|
|
|
$vdata = $data['vdetails'];
|
2009-09-28 05:23:50 +00:00
|
|
|
global $swfobj;
|
2009-10-03 10:38:28 +00:00
|
|
|
$vid_file = get_video_file($vdata,$no_video,false);
|
2009-09-28 05:23:50 +00:00
|
|
|
if($vid_file)
|
|
|
|
{
|
|
|
|
$code = "var flashvars = {\n";
|
|
|
|
$code .= " htmlPage: document.location,\n";
|
2009-10-03 10:38:28 +00:00
|
|
|
if($data['hq'])
|
2010-01-17 13:26:50 +00:00
|
|
|
$code .= "settingsFile: \"".PLAYER_URL."/cbplayer/settings.php?hqid=".$vdata['videoid']."&autplay=".$data['autoplay']."\"\n";
|
2009-10-03 10:38:28 +00:00
|
|
|
else
|
2010-01-17 13:26:50 +00:00
|
|
|
$code .= "settingsFile: \"".PLAYER_URL."/cbplayer/settings.php?vid=".$vdata['videoid']."&autplay=".$data['autoplay']."\"\n";
|
2009-09-28 05:23:50 +00:00
|
|
|
$code .= "};\n";
|
|
|
|
$code .= "var params = {\n";
|
|
|
|
$code .= " allowFullScreen: \"true\"\n";
|
|
|
|
$code .= "};\n";
|
|
|
|
$code .= "swfobject.embedSWF(\"".PLAYER_URL."/cbplayer/videoPlayer.swf\",
|
2009-11-04 10:27:40 +00:00
|
|
|
\"".$data['player_div']."\", \"".$data['width']."\", \"".$data['height']."\", \"9.0.115\",
|
2009-09-28 05:23:50 +00:00
|
|
|
\"swfobject/expressInstall.swf\", flashvars
|
|
|
|
, params)";
|
|
|
|
return $code;
|
2009-10-03 10:38:28 +00:00
|
|
|
}else
|
2009-09-28 05:23:50 +00:00
|
|
|
return false;
|
2009-10-03 10:38:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function default_embed_code($vdetails)
|
|
|
|
{
|
|
|
|
$code = '';
|
|
|
|
$code .= '<object width="300" height="250">';
|
2009-11-30 19:46:45 +00:00
|
|
|
$code .= '<param name="movie" value="'.PLAYER_URL.'/cbplayer/videoPlayer.swf?settingsFile='.PLAYER_URL.'/cbplayer/settings.php?vid='.$vdetails['videoid'].'"></param>';
|
2009-10-03 10:38:28 +00:00
|
|
|
$code .= '<param name="allowFullScreen" value="true"></param>';
|
|
|
|
$code .= '<param name="allowscriptaccess" value="always"></param>';
|
|
|
|
$code .= '<embed src="'.PLAYER_URL.'/cbplayer/videoPlayer.swf?settingsFile='.PLAYER_URL.'/cbplayer/settings.php?vid='.$vdetails['videoid'].'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="300" height="250"></embed>';
|
|
|
|
$code .= '</object>';
|
|
|
|
|
|
|
|
return $code;
|
2009-09-28 05:23:50 +00:00
|
|
|
}
|
|
|
|
|
2009-11-30 19:46:45 +00:00
|
|
|
/**
|
|
|
|
* Loading Editor's pick videos
|
|
|
|
*/
|
|
|
|
function show_editor_pick_2($data=NULL)
|
|
|
|
{
|
|
|
|
$code = '<div id="show_editor_pick_2">';
|
|
|
|
$code .= '<script type="text/javascript">'."\n";
|
|
|
|
$code .= "var flashvars = {\n";
|
|
|
|
$code .= " htmlPage: document.location,\n";
|
|
|
|
$code .= "settingsFile: \"".PLAYER_URL."/cbplayer/editor_pick_settings.php\"\n";
|
|
|
|
$code .= "};\n";
|
|
|
|
$code .= "var params = {\n";
|
|
|
|
$code .= " allowFullScreen: \"true\"\n";
|
|
|
|
$code .= "};\n";
|
|
|
|
$code .= "swfobject.embedSWF(\"".PLAYER_URL."/cbplayer/videoPlayer.swf\",
|
|
|
|
\"show_editor_pick_2\", \"650\", \"300\", \"9.0.115\",
|
|
|
|
\"swfobject/expressInstall.swf\", flashvars
|
|
|
|
, params)";
|
|
|
|
$code .= "</script>";
|
|
|
|
$code .= "</div>";
|
|
|
|
echo $code;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-09-28 05:23:50 +00:00
|
|
|
register_actions_play_video('cbplayer');
|
2009-11-30 19:46:45 +00:00
|
|
|
/**
|
|
|
|
* Works on if Editors pick plugin is installed
|
|
|
|
*/
|
|
|
|
register_anchor_function(array('show_editor_pick_2'=>'show_editor_pick_2'));
|
2009-09-28 05:23:50 +00:00
|
|
|
}
|
|
|
|
?>
|