clipbucket/upload/player/jw_player_4/jwplayer.php

63 lines
1.5 KiB
PHP
Raw Normal View History

2009-08-25 12:16:42 +00:00
<?php
/*
2010-04-21 16:19:43 +00:00
Player Name: JW Player 4.x
Description: JW Player 4.x Plugin 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/
*/
/**
* 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 : Attribution Assurance License -- http://www.opensource.org/licenses/attribution.php
* @Since : September 15 2009
*/
2010-04-21 21:08:28 +00:00
if(!function_exists('jw_player'))
2009-08-25 12:16:42 +00:00
{
function jw_player($data)
2009-08-25 12:16:42 +00:00
{
$vdata = $data['vdetails'];
2009-08-25 12:16:42 +00:00
global $swfobj;
$vid_file = get_video_file($vdata,$no_video,false);
if($vid_file)
2009-08-25 12:16:42 +00:00
{
$hd = $data['hq'];
$swfobj->width = $data['width'];
$swfobj->height = $data['height'];
2010-04-21 16:19:43 +00:00
$swfobj->playerFile = PLAYER_URL.'/jw_player_4/player.swf';
$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');
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;
}else
2009-08-25 12:16:42 +00:00
return false;
}
add_js(array('swfobject.obj.js'=>'global'));
2009-08-25 12:16:42 +00:00
register_actions_play_video('jw_player');
}
?>