2009-08-25 12:16:42 +00:00
|
|
|
<?php
|
|
|
|
/*
|
2009-10-03 10:38:28 +00:00
|
|
|
Player Name: JW Player Plugin
|
2009-08-27 15:01:32 +00:00
|
|
|
Description: jw Player for Clipbucket
|
2009-08-25 12:16:42 +00:00
|
|
|
Author: Arslan Hassan
|
|
|
|
ClipBucket Version: 2
|
|
|
|
Plugin Version: 1.0 - JW 4.5.230
|
|
|
|
Website: http://clip-bucket.com/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2009-10-03 10:38:28 +00:00
|
|
|
/**
|
|
|
|
* This file is used to instruct ClipBucket
|
|
|
|
* for how to operate JW PLayer
|
|
|
|
* this file is protype
|
|
|
|
* you can get complete instructions
|
|
|
|
* from docs.clip-bucket.com
|
|
|
|
*
|
|
|
|
* @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-10-03 10:38:28 +00:00
|
|
|
* @Since : September 15 2009
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2009-08-25 12:16:42 +00:00
|
|
|
if(!function_exists(jw_player))
|
|
|
|
{
|
2009-11-30 19:46:45 +00:00
|
|
|
function jw_player($data)
|
2009-08-25 12:16:42 +00:00
|
|
|
{
|
2009-10-03 10:38:28 +00:00
|
|
|
|
|
|
|
$vdata = $data['vdetails'];
|
2009-08-25 12:16:42 +00:00
|
|
|
global $swfobj;
|
2009-10-03 10:38:28 +00:00
|
|
|
|
|
|
|
$vid_file = get_video_file($vdata,$no_video,false);
|
|
|
|
if($vid_file)
|
2009-08-25 12:16:42 +00:00
|
|
|
{
|
2009-12-09 13:43:19 +00:00
|
|
|
$hd = $data['hq'];
|
|
|
|
|
2009-11-30 19:46:45 +00:00
|
|
|
$swfobj->width = $data['width'];
|
|
|
|
$swfobj->height = $data['height'];
|
2009-10-03 10:38:28 +00:00
|
|
|
$swfobj->playerFile = PLAYER_URL.'/jwplayer/player.swf';
|
2009-12-09 13:43:19 +00:00
|
|
|
$swfobj->DivId = $data['player_div'] ? $data['player_div'] : config('player_div_id');
|
|
|
|
|
2009-08-25 12:16:42 +00:00
|
|
|
$swfobj->FlashObj();
|
|
|
|
//Writing Param
|
|
|
|
$swfobj->addParam('allowfullscreen','true');
|
|
|
|
$swfobj->addParam('allowscriptaccess','always');
|
|
|
|
$swfobj->addParam('wmode','opaque');
|
|
|
|
|
2009-12-09 13:43:19 +00:00
|
|
|
if($hd=='yes') $file = get_hq_video_file($vdata); else $file = get_video_file($vdata,true,true);
|
|
|
|
|
|
|
|
$swfobj->addVar('file',$file);
|
2009-08-25 12:16:42 +00:00
|
|
|
|
|
|
|
$swfobj->CreatePlayer();
|
|
|
|
return $swfobj->code;
|
2009-10-03 10:38:28 +00:00
|
|
|
}else
|
2009-08-25 12:16:42 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2009-10-03 10:38:28 +00:00
|
|
|
add_js(array('swfobject.obj.js'=>'global'));
|
2009-08-25 12:16:42 +00:00
|
|
|
register_actions_play_video('jw_player');
|
|
|
|
}
|
|
|
|
?>
|