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
|
|
|
|
* @License : CBLA
|
|
|
|
* @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-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-08-25 12:16:42 +00:00
|
|
|
$swfobj->FlashObj();
|
|
|
|
//Writing Param
|
|
|
|
$swfobj->addParam('allowfullscreen','true');
|
|
|
|
$swfobj->addParam('allowscriptaccess','always');
|
|
|
|
$swfobj->addParam('wmode','opaque');
|
|
|
|
|
2009-10-03 10:38:28 +00:00
|
|
|
$swfobj->addVar('file',BASEURL.'/files/videos/'.$vid_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');
|
|
|
|
}
|
|
|
|
?>
|