manage_players.html : removed player default size option
functions_video.php : replaced get_normal_vid() and get_hq_vid() with get_video_files() for Html5 player html5_player.html : added flashplayer option. html5_player.js : Added added option for multiserver video files, edited full screen function , solved video loading issue html5_player.php : Added added option for multiserver video files, player settings option, flashplayer.js html5_player_header.html : empty now! style.css : added and edited some classes { resolution, right click menu }
This commit is contained in:
parent
303dcb8035
commit
f3301f69dd
15 changed files with 1308 additions and 943 deletions
|
@ -137,15 +137,13 @@
|
|||
|
||||
<div class="col-md-6">
|
||||
<div class="panel-group" id="accordion">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title alert alert-info">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
|
||||
<b>Click Here to edit main website player size.</b>
|
||||
</a>
|
||||
</h4>
|
||||
<div class="panel ">
|
||||
<div class="">
|
||||
<h6 class="panel-title alert alert-danger">
|
||||
<b>This option has been deprecated.</b>
|
||||
</h6>
|
||||
</div>
|
||||
<div id="collapseOne" class="panel-collapse collapse in">
|
||||
<!-- <div id="collapseOne" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<div class="ui-widget-content" style="width:{$Cbucket->configs.player_width}px; height:{$Cbucket->configs.player_height}px;">
|
||||
<h3 class="ui-widget-header">Original Size of your Main Website Player</h3>
|
||||
|
@ -158,7 +156,8 @@
|
|||
<input type="text" name="height" id="height" value="{$Cbucket->configs.player_height}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>...-->
|
||||
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
|
|
|
@ -1205,4 +1205,64 @@ function get_hq_vid($vdetails,$return_default=true,$with_path=true,$multi=false,
|
|||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to get list of videos files
|
||||
* ..
|
||||
* ..
|
||||
* @since 2.7*/
|
||||
|
||||
function get_video_files($vdetails,$return_default=true,$with_path=true,$multi=false,$count_only=false,$hq=false){
|
||||
|
||||
global $Cbucket;
|
||||
# checking if there is any other functions
|
||||
# available
|
||||
if(is_array($Cbucket->custom_video_file_funcs))
|
||||
foreach($Cbucket->custom_video_file_funcs as $func)
|
||||
if(function_exists($func))
|
||||
{
|
||||
$func_returned = $func($vdetails, $hq);
|
||||
if($func_returned)
|
||||
return $func_returned;
|
||||
}
|
||||
|
||||
|
||||
$fileDirectory = "";
|
||||
if(isset($vdetails['file_directory']) && !empty($vdetails['file_directory'])){
|
||||
$fileDirectory = "{$vdetails['file_directory']}/";
|
||||
}
|
||||
//dump($vdetails['file_name']);
|
||||
|
||||
#Now there is no function so lets continue as
|
||||
if(isset($vdetails['file_name']))
|
||||
$vid_files = glob(VIDEOS_DIR."/".$fileDirectory . $vdetails['file_name']."*");
|
||||
// if($hq){
|
||||
// var_dump(glob(VIDEOS_DIR."/".$fileDirectory . $vdetails['file_name']."*"));
|
||||
// }
|
||||
|
||||
#replace Dir with URL
|
||||
if(is_array($vid_files))
|
||||
foreach($vid_files as $file)
|
||||
{
|
||||
// if($hq){
|
||||
// echo "filesize = " . filesize($file);
|
||||
// }
|
||||
if(filesize($file) < 100) continue;
|
||||
$files_part = explode('/',$file);
|
||||
$video_file = $files_part[count($files_part)-1];
|
||||
|
||||
if($with_path)
|
||||
$files[] = VIDEOS_URL.'/' . $fileDirectory. $video_file ;
|
||||
else
|
||||
$files[] = $video_file;
|
||||
}
|
||||
|
||||
|
||||
//echo $files;
|
||||
return $files;
|
||||
|
||||
|
||||
|
||||
}
|
1
upload/player/CB_html5_player/flashplayer.js
Normal file
1
upload/player/CB_html5_player/flashplayer.js
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,166 +1,212 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<link rel="stylesheet" href="{$html5_player_url}/style.css" />
|
||||
<script type="text/javascript" src="{$jquery}"></script>
|
||||
<script type="text/javascript" src="{$html5_player_url}/html5_player.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="cont fahad" id="cont" style="height:{$height};width:{$width};">
|
||||
|
||||
{ANCHOR place='overlay_ads'}
|
||||
|
||||
<video id="myVideo" class="myVideo largevid" preload="auto" poster="" >
|
||||
|
||||
<source src="{$normal_vid_file}" type="video/mp4" />
|
||||
<source src="{$hq_vid_file}" type="video/mp4" data-quality="hd" />
|
||||
|
||||
<!--<source src="{$normal_vid_file}" type="video/webm" />
|
||||
<source src="{$hq_vid_file}" type="video/webm" data-quality="hd" />
|
||||
|
||||
<source src="{$normal_vid_file}" type="video/ogg" />
|
||||
<source src="{$hq_vid_file}" type="video/ogg" data-quality="hd" />-->
|
||||
|
||||
|
||||
|
||||
<p>Your browser does not support the video tag.</p>
|
||||
|
||||
|
||||
<!-- Fallback to Flash. -->
|
||||
<!-- Add 24px to the height for the video player -->
|
||||
|
||||
<object width="800" height="374" type="application/x-shockwave-flash" data="{$html5_player_url}/fallback.swf">
|
||||
|
||||
<!-- Firefox uses the `data` attribute above, IE/Safari uses the param below -->
|
||||
|
||||
<param name="movie" value="{$html5_player_url}/fallback.swf"/>
|
||||
<param name="allowFullScreen" value="true"/>
|
||||
<param name="flashvars" value="autostart=true&file={$normal_vid_file}"/>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
</video>
|
||||
|
||||
|
||||
<div class="caption"><span class="title">{$title|truncate:30}</span></br><span class="user">Uploaded By {if !$username} Anonymous {else} {$username} {/if}
|
||||
</span></div>
|
||||
|
||||
|
||||
<div class="init"> </div>
|
||||
|
||||
|
||||
<div id="opacity">
|
||||
<div id="cancel_v"></div>
|
||||
<div id="replay_v"></div>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="related_1" >
|
||||
|
||||
<h4 id="h_4">Most Popular</h4>
|
||||
{foreach $related as $video}
|
||||
|
||||
<a id="link_v" href="{videoLink($video)}" >
|
||||
|
||||
<img id="thumb_v" src="{getThumb vdetails=$video}" border="1" height="100" width="160"/>
|
||||
<p id="name_v"> {$video.title|truncate:20}</p>
|
||||
</a>
|
||||
|
||||
{/foreach}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="control">
|
||||
|
||||
<div class="topControl">
|
||||
<div class="test">
|
||||
<div class="progress">
|
||||
|
||||
<span class="bufferBar"> </span>
|
||||
<span class="timeBar"><div class="buffer btn"></div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btmControl">
|
||||
<div class="btnPlay hbtn" title="Play/Pause video"></div>
|
||||
<div class="sound sound2 hbtn" title="Mute/Unmute sound"></div>
|
||||
<div class="volume" title="Set volume">
|
||||
<span class="volumeBar"></span>
|
||||
</div>
|
||||
<div class="time">
|
||||
<span class="fcurrent"></span> /
|
||||
<span class="fduration"></span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="btnFS enterbtnFs hbtn" id="fs" title="Switch to full screen"></div>
|
||||
|
||||
<!--<div class="smallscr largescr hbtn" title="Enlarge/Small Size"></div>-->
|
||||
|
||||
{if $testing }<div id="hd" class="hdoff hdon hbtn" title="HD On/Off"></div>{else}{/if}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="loading">
|
||||
|
||||
|
||||
<div class="windows8" align="center">
|
||||
<div class="wBall" id="wBall_1">
|
||||
<div class="wInnerBall">
|
||||
</div>
|
||||
</div>
|
||||
<div class="wBall" id="wBall_2">
|
||||
<div class="wInnerBall">
|
||||
</div>
|
||||
</div>
|
||||
<div class="wBall" id="wBall_3">
|
||||
<div class="wInnerBall">
|
||||
</div>
|
||||
</div>
|
||||
<div class="wBall" id="wBall_4">
|
||||
<div class="wInnerBall">
|
||||
</div>
|
||||
</div>
|
||||
<div class="wBall" id="wBall_5">
|
||||
<div class="wInnerBall">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{if $flashplayer}
|
||||
<div id="mediaplayer">loading player.....</div>
|
||||
|
||||
<script type="text/javascript" src="{$html5_player_url}/flashplayer.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var cb_player_file = '{$html5_player_url}/fallback.swf';
|
||||
var normal_vid_file = '{$normal_vid_file}';
|
||||
var hq_vid_file = '{$hq_vid_file}';
|
||||
var player_url = '{$player_url}' + '/cbplayer';
|
||||
|
||||
|
||||
jwplayer("mediaplayer").setup( {ldelim}
|
||||
|
||||
flashplayer: cb_player_file,
|
||||
file: normal_vid_file,
|
||||
skin : player_url+'/skins/{$cb_skin}',
|
||||
height: '{$height}',
|
||||
width: '{$width}',
|
||||
autostart : '{$player_data.autoplay}',
|
||||
|
||||
<!-- Setting Plugins -->
|
||||
'plugins':
|
||||
{ldelim}
|
||||
|
||||
<!-- Loading HQ Plugin -->
|
||||
'hd-2':
|
||||
{ldelim}
|
||||
'file': '{$hq_vid_file}'
|
||||
{rdelim},
|
||||
<!-- End Loading HQ Plugin -->
|
||||
|
||||
|
||||
<!-- Loading Related Plugin -->
|
||||
'{$html5_player_url}/plugins/related/related.swf':
|
||||
|
||||
{ldelim}
|
||||
file: '{$html5_player_url}/plugins/related/related_videos.php'+
|
||||
'?vid={$vdo.videoid}&title={$vdo.title|urlencode}&tags={$vdo.tags|urlencode}',
|
||||
usedock :false,
|
||||
heading :'More suggested videos'
|
||||
{rdelim}
|
||||
<!-- End Loading Related plugin -->
|
||||
|
||||
|
||||
{rdelim}
|
||||
|
||||
{rdelim} );
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
{else}
|
||||
|
||||
|
||||
<link rel="stylesheet" href="{$html5_player_url}/style.css" />
|
||||
|
||||
<div class="cont fahad" id="cont" style="height:{$height};width:{$width};">
|
||||
|
||||
<video id="myVideo" class="myVideo largevid" {if $autoplay==true}autoplay{else}{/if}>
|
||||
{if $ms_videos}
|
||||
<source src="{$ms_videos.360}" type="video/mp4" data-res="" id=""/>
|
||||
{else}
|
||||
{/if}
|
||||
|
||||
{if $application_videos}
|
||||
<source src="{$normal_vid_file}" type="video/mp4"/>
|
||||
<source src="{$hq_vid_file}" type="video/mp4" data-quality="hd" />
|
||||
{else}
|
||||
{/if}
|
||||
|
||||
|
||||
<p>Your browser does not support the video tag.</p>
|
||||
|
||||
<!-- Fallback to Flash. -->
|
||||
<!-- Add 24px to the height for the video player -->
|
||||
|
||||
<object width="800" height="374" type="application/x-shockwave-flash" data="{$html5_player_url}/fallback.swf">
|
||||
|
||||
<!-- Firefox uses the `data` attribute above, IE/Safari uses the param below -->
|
||||
<param name="movie" value="{$html5_player_url}/fallback.swf"/>
|
||||
<param name="allowFullScreen" value="true"/>
|
||||
<param name="flashvars" value="autostart=true&file={$normal_vid_file}"/>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
</video>
|
||||
|
||||
|
||||
<div class="caption">
|
||||
<span class="title">{$title|truncate:30}</span><br>
|
||||
<span class="user">Uploaded By {if !$username} Anonymous {else} {$username} {/if} </span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="init"></div>
|
||||
|
||||
|
||||
<div id="opacity">
|
||||
<div id="cancel_v"></div>
|
||||
<div id="replay_v"></div>
|
||||
</div>
|
||||
|
||||
<div id="related_1" >
|
||||
<h4 id="h_4">Most Popular</h4>
|
||||
{foreach $related as $video}
|
||||
<a id="link_v" href="{videoLink($video)}" >
|
||||
<img id="thumb_v" src="{getThumb vdetails=$video}" border="1" height="100" width="160"/>
|
||||
<p id="name_v"> {$video.title|truncate:20}</p>
|
||||
</a>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{if $ms_videos}
|
||||
<div id="files" class="video_files hbtn" title="files">
|
||||
<ul id="ul_files">
|
||||
{foreach $ms_videos as $res=>$video}
|
||||
<li id="li_{$res}" class="list_player" style="color:#fff;cursor:pointer;text-align:center;font-family:'Lucida' Grande, sans-serif;font-size:15px;">
|
||||
{$res}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{else}
|
||||
{/if}
|
||||
|
||||
|
||||
<div class="control">
|
||||
|
||||
<div class="topControl">
|
||||
<div class="">
|
||||
<div class="progress">
|
||||
<span class="bufferBar"> </span>
|
||||
<span class="timeBar"><div class="buffer btn"></div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="btmControl">
|
||||
<div class="btnPlay hbtn" title="Play/Pause video"></div>
|
||||
<div class="sound sound2 hbtn" title="Mute/Unmute sound"></div>
|
||||
<div class="volume" title="Set volume">
|
||||
<span class="volumeBar"></span>
|
||||
</div>
|
||||
<div class="time">
|
||||
<span class="fcurrent">00:00</span> /
|
||||
<span class="fduration">00:00</span>
|
||||
</div>
|
||||
|
||||
<div class="btnFS enterbtnFs hbtn" id="fs" title="Switch to full screen"></div>
|
||||
{if $testing }
|
||||
<div id="hd" class="hdoff hdon hbtn" title="HD On/Off"></div>
|
||||
{else}{/if}
|
||||
|
||||
{if $ms_videos}
|
||||
<div id="res" class="res ress hbtn" title="Resolution Selector"></div>
|
||||
{else}{/if}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="loading">
|
||||
<div class="windows8" align="center">
|
||||
<div class="wBall" id="wBall_1">
|
||||
<div class="wInnerBall">
|
||||
</div>
|
||||
</div>
|
||||
<div class="wBall" id="wBall_2">
|
||||
<div class="wInnerBall">
|
||||
</div>
|
||||
</div>
|
||||
<div class="wBall" id="wBall_3">
|
||||
<div class="wInnerBall">
|
||||
</div>
|
||||
</div>
|
||||
<div class="wBall" id="wBall_4">
|
||||
<div class="wInnerBall">
|
||||
</div>
|
||||
</div>
|
||||
<div class="wBall" id="wBall_5">
|
||||
<div class="wInnerBall">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var webpath="{$display}";var homepath="{$about}";var web="{$ov}";var $top="{$top}";
|
||||
var $left="{$left}";var $bottom="{$bottom}";var $right="{$right}";var key ="{$key}" ;
|
||||
var nor_vid = "{$normal_vid_file}"; var hq_vid = "{$hq_vid_file}";
|
||||
var enlarge_small = "{$enlarge_small}"; var autoplay = "{$autoplay}";
|
||||
//For multiserver, video files to html5_player.js (Json)
|
||||
if('{$json_videos}')
|
||||
var files = '{$json_videos}';
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="{$html5_player_url}/html5_player.js"></script>
|
||||
|
||||
{/if}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,184 +1,206 @@
|
|||
<?php
|
||||
/*
|
||||
Player Name: CB HTML5 Player 2.7
|
||||
Description: New html5 ClipBucket Player with all required features
|
||||
Author: Fahad Abbas
|
||||
ClipBucket Version: 2.7
|
||||
|
||||
|
||||
|
||||
|
||||
* @Author : Arslan Hassan
|
||||
* @Script : ClipBucket v2
|
||||
* @License : Attribution Assurance License -- http://www.opensource.org/licenses/attribution.php
|
||||
* @Since : September 15 2009
|
||||
|
||||
*/
|
||||
|
||||
$html5_player = false;
|
||||
|
||||
if(!function_exists('html5_player'))
|
||||
{
|
||||
define("HTML5_PLAYER",basename(dirname(__FILE__)));
|
||||
define("HTML5_PLAYER_DIR",PLAYER_DIR."/".HTML5_PLAYER);
|
||||
define("HTML5_PLAYER_URL",PLAYER_URL."/".HTML5_PLAYER);
|
||||
assign('html5_player_dir',HTML5_PLAYER_DIR);
|
||||
assign('html5_player_url',HTML5_PLAYER_URL);
|
||||
|
||||
function html5_player($in)
|
||||
{
|
||||
global $html5_player;
|
||||
$html5_player = true;
|
||||
|
||||
$vdetails = $in['vdetails'];
|
||||
$video_file = get_video_file($vdetails,true,true);
|
||||
$vid_file = get_normal_vid($vdetails,true,true);
|
||||
|
||||
if(function_exists('get_refer_url_from_embed_code'))
|
||||
{
|
||||
$ref_details = get_refer_url_from_embed_code(unhtmlentities(stripslashes($vdetails['embed_code'])));
|
||||
$ytcode = $ref_details['ytcode'];
|
||||
}
|
||||
|
||||
if($vid_file || $ytcode)
|
||||
{
|
||||
$hd = $data['hq'];
|
||||
|
||||
if($hd=='yes') $file = get_hq_video_file($vdetails); else $file = get_normal_vid($vdetails,true,true);
|
||||
$hd_file = get_hq_video_file($vdetails);
|
||||
|
||||
|
||||
if($ytcode)
|
||||
{
|
||||
assign('youtube',true);
|
||||
assign('ytcode',$ytcode);
|
||||
}
|
||||
|
||||
if(!strstr($in['width'],"%"))
|
||||
$in['width'] = $in['width'].'px';
|
||||
if(!strstr($in['height'],"%"))
|
||||
$in['height'] = $in['height'].'px';
|
||||
|
||||
if($in['autoplay'] =='yes' || $in['autoplay']===true ||
|
||||
($_COOKIE['auto_play_playlist'] && ($_GET['play_list'] || $_GET['playlist'])))
|
||||
{
|
||||
$in['autoplay'] = true;
|
||||
}else{
|
||||
$in['autoplay'] = false;
|
||||
}
|
||||
|
||||
// include('../../../../includes/config.inc.php');
|
||||
//$related_videos = get_videos(array('title'=>$title,'tags'=>$tags,'exclude'=>$videoid,'show_related'=>'yes','limit'=>8,'order'=>'date_added DESC'));
|
||||
|
||||
$v_cat = $vdo['category'];
|
||||
if($v_cat[2] =='#') {
|
||||
$video_cat = $v_cat[1];
|
||||
}else{
|
||||
$video_cat = $v_cat[1].$v_cat[2];}
|
||||
$vid_cat = str_replace('%#%','',$video_cat);
|
||||
assign('vid_cat',$vid_cat);
|
||||
$vid_cond['order'] = " date_added DESC ";
|
||||
$vlist = $vid_cond;
|
||||
$vlist['limit'] = 4;
|
||||
$videos = get_videos($vlist);
|
||||
Assign('related', $videos);
|
||||
|
||||
|
||||
|
||||
$l_details = BASEURL.'/images/icons/country/hp.png';
|
||||
$l_convert = base64_encode(file_get_contents($l_details));
|
||||
assign('display',$l_convert);
|
||||
|
||||
|
||||
$ov_details = BASEURL.'/images/icons/country/ov.png';
|
||||
$ov_convert = base64_encode(file_get_contents($ov_details));
|
||||
assign('ov',$ov_convert);
|
||||
|
||||
|
||||
|
||||
assign('about',BASEURL);
|
||||
|
||||
$jquery = BASEDIR.'/js/jquery.js';
|
||||
assign('jquery',$jquery);
|
||||
|
||||
$v_details = extract($vdetails);
|
||||
$v_details;
|
||||
assign('v_details',$v_details);
|
||||
|
||||
|
||||
// logo placement
|
||||
$pos = config('logo_placement');
|
||||
switch($pos)
|
||||
{
|
||||
case "tl":
|
||||
$position = array("top"=>'5px',"left"=>'5px',"bottom"=>'',"right"=>'');
|
||||
break;
|
||||
|
||||
case "tr":
|
||||
$position = array("top"=>'5px',"left"=>'',"bottom"=>'',"right"=>'5px');
|
||||
break;
|
||||
|
||||
case "br":
|
||||
$position = array("top"=>'',"left"=>'',"bottom"=>'5px',"right"=>'5px');
|
||||
break;
|
||||
|
||||
case "bl":
|
||||
$position = array("top"=>'',"left"=>'5px',"bottom"=>'5px',"right"=>'');
|
||||
break;
|
||||
}
|
||||
|
||||
//getting hq test for HD button
|
||||
$hq_file = get_hq_vid($vdetails,true,true);
|
||||
assign('testing',$hq_file);
|
||||
|
||||
assign('top',$position["top"]);
|
||||
assign('left',$position["left"]);
|
||||
assign('bottom',$position["bottom"]);
|
||||
assign('right',$position["right"]);
|
||||
|
||||
assign('username',$username);
|
||||
assign('title',$title);
|
||||
assign('thumb',$default_thumb);
|
||||
assign('key',$videokey);
|
||||
assign('has_hq',$has_hq);
|
||||
|
||||
assign('player_data',$in);
|
||||
|
||||
|
||||
|
||||
if (!$vid_file){
|
||||
assign('normal_vid_file',$video_file);
|
||||
assign('hq_vid_file',$video_file);
|
||||
|
||||
}
|
||||
else{
|
||||
assign('normal_vid_file',$vid_file.'-sd.mp4');
|
||||
assign('hq_vid_file',$vid_file.'-hd.mp4');
|
||||
}
|
||||
|
||||
assign('vdata',$vdetails);
|
||||
assign('height',$in['height']);
|
||||
assign('width',$in['width']);
|
||||
|
||||
|
||||
Template(HTML5_PLAYER_DIR.'/html5_player.html',false);
|
||||
Template(HTML5_PLAYER_DIR.'/html5_player_header.html',false);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
register_actions_play_video('html5_player');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
/*
|
||||
Player Name: CB HTML5 Player 2.7
|
||||
Description: New Official CB html5 ClipBucket Player with all required features
|
||||
Author: Fahad Abbas
|
||||
ClipBucket Version: 2.7
|
||||
|
||||
|
||||
|
||||
|
||||
* @Author : Arslan Hassan
|
||||
* @Script : ClipBucket v2
|
||||
* @License : Attribution Assurance License -- http://www.opensource.org/licenses/attribution.php
|
||||
* @Since : September 15 2009
|
||||
|
||||
*/
|
||||
|
||||
$html5_player = false;
|
||||
|
||||
if(!function_exists('html5_player'))
|
||||
{
|
||||
define("HTML5_PLAYER",basename(dirname(__FILE__)));
|
||||
define("HTML5_PLAYER_DIR",PLAYER_DIR."/".HTML5_PLAYER);
|
||||
define("HTML5_PLAYER_URL",PLAYER_URL."/".HTML5_PLAYER);
|
||||
assign('html5_player_dir',HTML5_PLAYER_DIR);
|
||||
assign('html5_player_url',HTML5_PLAYER_URL);
|
||||
|
||||
function html5_player($in)
|
||||
{
|
||||
global $html5_player;
|
||||
$html5_player = true;
|
||||
|
||||
$vdetails = $in['vdetails'];
|
||||
$video_play = get_video_files($vdetails,true,true);
|
||||
|
||||
|
||||
|
||||
if(function_exists('get_refer_url_from_embed_code'))
|
||||
{
|
||||
$ref_details = get_refer_url_from_embed_code(unhtmlentities(stripslashes($vdetails['embed_code'])));
|
||||
$ytcode = $ref_details['ytcode'];
|
||||
}
|
||||
|
||||
if($video_play || $ytcode)
|
||||
{
|
||||
$hd = $data['hq'];
|
||||
|
||||
if($hd=='yes') $file = get_hq_video_file($vdetails); else $file = get_video_files($vdetails,true,true);
|
||||
$hd_file = get_hq_video_file($vdetails);
|
||||
|
||||
|
||||
if($ytcode)
|
||||
{
|
||||
assign('youtube',true);
|
||||
assign('ytcode',$ytcode);
|
||||
}
|
||||
|
||||
if(!strstr($in['width'],"%"))
|
||||
$in['width'] = $in['width'].'px';
|
||||
if(!strstr($in['height'],"%"))
|
||||
$in['height'] = $in['height'].'px';
|
||||
|
||||
// Allowing CB defalut player settings to Html5player
|
||||
if($in['autoplay'] =='yes')
|
||||
assign('autoplay','true');
|
||||
|
||||
|
||||
assign('vdata',$vdetails);
|
||||
assign('height',$in['height']);
|
||||
assign('width',$in['width']);
|
||||
|
||||
|
||||
|
||||
$v_cat = $vdo['category'];
|
||||
if($v_cat[2] =='#') {
|
||||
$video_cat = $v_cat[1];
|
||||
}else{
|
||||
$video_cat = $v_cat[1].$v_cat[2];}
|
||||
$vid_cat = str_replace('%#%','',$video_cat);
|
||||
assign('vid_cat',$vid_cat);
|
||||
$vid_cond['order'] = " date_added DESC ";
|
||||
$vlist = $vid_cond;
|
||||
$vlist['limit'] = 4;
|
||||
$videos = get_videos($vlist);
|
||||
Assign('related', $videos);
|
||||
|
||||
$l_details = BASEURL.'/images/icons/country/hp.png';
|
||||
$l_convert = base64_encode(file_get_contents($l_details));
|
||||
assign('display',$l_convert);
|
||||
|
||||
if (THIS_PAGE == 'watch_video')
|
||||
assign('enlarge_small','true');
|
||||
else
|
||||
assign('enlarge_small','false');
|
||||
|
||||
assign('about',BASEURL);
|
||||
|
||||
$jquery = BASEDIR.'/js/jquery.js';
|
||||
assign('jquery',$jquery);
|
||||
|
||||
$v_details = extract($vdetails);
|
||||
$v_details;
|
||||
assign('v_details',$v_details);
|
||||
|
||||
|
||||
// logo placement
|
||||
$pos = config('logo_placement');
|
||||
switch($pos)
|
||||
{
|
||||
case "tl":
|
||||
$position = array("top"=>'5px',"left"=>'5px',"bottom"=>'',"right"=>'');
|
||||
break;
|
||||
|
||||
case "tr":
|
||||
$position = array("top"=>'5px',"left"=>'',"bottom"=>'',"right"=>'5px');
|
||||
break;
|
||||
|
||||
case "br":
|
||||
$position = array("top"=>'',"left"=>'',"bottom"=>'5px',"right"=>'5px');
|
||||
break;
|
||||
|
||||
case "bl":
|
||||
$position = array("top"=>'',"left"=>'5px',"bottom"=>'5px',"right"=>'');
|
||||
break;
|
||||
}
|
||||
|
||||
//getting hq test for HD button
|
||||
$hq_file = $video_play[1];
|
||||
assign('testing',$hq_file);
|
||||
|
||||
assign('top',$position["top"]);
|
||||
assign('left',$position["left"]);
|
||||
assign('bottom',$position["bottom"]);
|
||||
assign('right',$position["right"]);
|
||||
|
||||
assign('username',$username);
|
||||
assign('title',$title);
|
||||
assign('thumb',$default_thumb);
|
||||
assign('key',$videokey);
|
||||
assign('has_hq',$has_hq);
|
||||
|
||||
assign('player_data',$in);
|
||||
|
||||
// setting flash player fallback for Flashplayer Videos
|
||||
$ext = getExt($video_play[0]);
|
||||
|
||||
if ( $ext == 'flv' ){
|
||||
assign('player_data',$in);
|
||||
assign('cb_skin','glow/glow.xml');
|
||||
assign('player_url',PLAYER_URL);
|
||||
assign('flashplayer',true);
|
||||
}
|
||||
|
||||
if($video_play[0])
|
||||
{
|
||||
assign('application_videos',$video_play[0]);
|
||||
|
||||
if ($video_play[1] == '')
|
||||
{
|
||||
assign('normal_vid_file',$video_play[0]);
|
||||
assign('hq_vid_file','');
|
||||
}
|
||||
else
|
||||
{
|
||||
assign('normal_vid_file',$video_play[1]);
|
||||
assign('hq_vid_file',$video_play[0]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$json_array = json_encode($video_play);
|
||||
assign('json_videos',$json_array);
|
||||
$video_play = array_reverse($video_play, true);
|
||||
assign('ms_videos',$video_play);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Template(HTML5_PLAYER_DIR.'/html5_player.html',false);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
register_actions_play_video('html5_player');
|
||||
// $Cbucket->add_header(HTML5_PLAYER_DIR.'/html5_player_header.html');
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//overlay
|
||||
|
||||
/*$ov_details = BASEURL.'/images/icons/country/ov.png';
|
||||
$ov_convert = base64_encode(file_get_contents($ov_details));
|
||||
assign('ov',$ov_convert);*/
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
<script type="text/javascript">var webpath="{$display}";var homepath="{$about}";var web="{$ov}";var $top="{$top}";var $left="{$left}";var $bottom="{$bottom}";
|
||||
var $right="{$right}";var key ="{$key}"
|
||||
|
||||
</script>
|
BIN
upload/player/CB_html5_player/plugins/hd.swf
Normal file
BIN
upload/player/CB_html5_player/plugins/hd.swf
Normal file
Binary file not shown.
1
upload/player/CB_html5_player/plugins/related/related.js
Normal file
1
upload/player/CB_html5_player/plugins/related/related.js
Normal file
File diff suppressed because one or more lines are too long
BIN
upload/player/CB_html5_player/plugins/related/related.swf
Normal file
BIN
upload/player/CB_html5_player/plugins/related/related.swf
Normal file
Binary file not shown.
31
upload/player/CB_html5_player/plugins/related/related.xml
Normal file
31
upload/player/CB_html5_player/plugins/related/related.xml
Normal file
|
@ -0,0 +1,31 @@
|
|||
<plugin>
|
||||
<title>Related</title>
|
||||
<filename>related.swf</filename>
|
||||
<version>1.0</version>
|
||||
<compatibility>Compatible with 5.0</compatibility>
|
||||
<author>LongTail Video</author>
|
||||
<description>This plugin displays a menu with related videos.</description>
|
||||
<href>http://developer.longtailvideo.com/trac/browser/plugins/related/</href>
|
||||
|
||||
<flashvars>
|
||||
<flashvar>
|
||||
<name>file</name>
|
||||
<default />
|
||||
<description>
|
||||
URL link to an mRSS playlist containing related video metadata.
|
||||
If not set or empty, the "related videos" screen will display "No related videos found"
|
||||
</description>
|
||||
</flashvar>
|
||||
<flashvar>
|
||||
<name>oncomplete</name>
|
||||
<default>true</default>
|
||||
<description>Show the related videos screen when the video completes.</description>
|
||||
</flashvar>
|
||||
<flashvar>
|
||||
<name>usedock</name>
|
||||
<default>true</default>
|
||||
<description>If false, the dock button for popping the related videos will not be shown.</description>
|
||||
</flashvar>
|
||||
</flashvars>
|
||||
|
||||
</plugin>
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
include('../../../../includes/config.inc.php');
|
||||
header('Content-Type: text/xml');
|
||||
$title = mysql_clean($_GET['title']);
|
||||
$tags = mysql_clean($_GET['tags']);
|
||||
$videoid = mysql_clean($_GET['vid']);
|
||||
|
||||
$related_videos = get_videos(array('title'=>$title,'tags'=>$tags,
|
||||
'exclude'=>$videoid,'show_related'=>'yes','limit'=>8,'order'=>'date_added DESC'));
|
||||
if(!$related_videos)
|
||||
$related_videos = get_videos(array('exclude'=>$videoid,'limit'=>12,'order'=>'date_added DESC'));
|
||||
?>
|
||||
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
|
||||
<channel>
|
||||
<?php
|
||||
if($related_videos)
|
||||
foreach($related_videos as $video):
|
||||
?>
|
||||
<item>
|
||||
<title><?=$video['title']?></title>
|
||||
<link><?=videoLink($video);?></link>
|
||||
<media:thumbnail url="<?=get_thumb($video)?>" height="90" width="120" time="<?=setTime($video['duration'])?>"/>
|
||||
</item>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</channel>
|
||||
</rss>
|
BIN
upload/player/CB_html5_player/skin/check.png
Normal file
BIN
upload/player/CB_html5_player/skin/check.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
upload/player/CB_html5_player/skin/res.png
Normal file
BIN
upload/player/CB_html5_player/skin/res.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
|
@ -8,9 +8,6 @@
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.myVideo{
|
||||
background:#000;
|
||||
width: 100% ;
|
||||
|
@ -27,13 +24,12 @@
|
|||
}
|
||||
|
||||
.cont:-webkit-full-screen {
|
||||
width: 100% !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.cont{
|
||||
|
||||
position:relative;
|
||||
|
@ -76,6 +72,43 @@
|
|||
|
||||
}
|
||||
|
||||
.video_files
|
||||
{
|
||||
|
||||
display: none;
|
||||
position:absolute;
|
||||
bottom:0;
|
||||
right:0;
|
||||
background: #fff;
|
||||
width: 100px;
|
||||
padding-bottom: -10%;
|
||||
margin-bottom: 5.5%;
|
||||
margin-right: 5%;
|
||||
z-index: 10;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#ul_files
|
||||
{
|
||||
list-style-type: none;
|
||||
background:#1D1D1D;
|
||||
margin-left: 0%;
|
||||
z-index: 1000;
|
||||
padding: 0px;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
|
||||
.selected_player
|
||||
{
|
||||
font-style: italic;
|
||||
font-family: sans-serif;
|
||||
background :#09C;
|
||||
color: #fff;
|
||||
background:url(skin/check.png) no-repeat -3.5px -7px ;
|
||||
}
|
||||
|
||||
/*** VIDEO CONTROLS CSS ***/
|
||||
/* control holder */
|
||||
.control{
|
||||
|
@ -219,6 +252,23 @@
|
|||
|
||||
}
|
||||
|
||||
.control div.res{
|
||||
background:url(skin/res.png) no-repeat -3.5px -7px ;
|
||||
float:right;
|
||||
margin-right: 5px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.control div.ress{
|
||||
background:url(skin/res.png) no-repeat -3.5px -7px ;
|
||||
float:right;
|
||||
margin-right: 5px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.control div.hdoff{
|
||||
background:url(skin/hd.png) no-repeat -5px -6px !important;
|
||||
|
@ -338,7 +388,7 @@ color: #fff;
|
|||
border-left: 4px solid rgba(0, 0, 0, .0);
|
||||
width:100%;
|
||||
height:100%;
|
||||
background:url(skinloading.gif) no-repeat 50% 50% !important;
|
||||
/*background:url(skinloading.gif) no-repeat 50% 50% !important;*/
|
||||
z-index:4;
|
||||
display:none;
|
||||
|
||||
|
@ -375,60 +425,47 @@ float: left;
|
|||
}
|
||||
|
||||
|
||||
#itemsr
|
||||
{
|
||||
list-style: none;
|
||||
padding: 0px;
|
||||
margin: 5px 0 0 5px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
#rightcmenu
|
||||
{
|
||||
display: none;
|
||||
position: fixed;
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
height: 20px;
|
||||
width: 250px;
|
||||
background: #E4E4E4 ;
|
||||
color: #000;
|
||||
border-bottom: 1px solid #BBBBBB;
|
||||
z-index: 100;
|
||||
text-align: center;
|
||||
width: 180px;
|
||||
background: #E4E4E4;
|
||||
color: #393939;
|
||||
|
||||
z-index: 100;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#ritems{
|
||||
background: #fff;
|
||||
margin-top: 0px;
|
||||
|
||||
|
||||
#ritems
|
||||
{
|
||||
background: #fff;
|
||||
margin-top: 0px;
|
||||
left : -5;
|
||||
}
|
||||
|
||||
.rlist{
|
||||
|
||||
|
||||
border-left: 1px solid #DFDFDF;
|
||||
|
||||
text-align: left;
|
||||
margin-left: -5px;
|
||||
|
||||
.rlist
|
||||
{
|
||||
|
||||
margin-left: -25px;
|
||||
height: 22px;
|
||||
list-style-type:none;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.rlist:hover
|
||||
{
|
||||
background-color: rgba(92, 161, 255, 0.1);
|
||||
|
||||
|
||||
background-color: #428BCA;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#op{
|
||||
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue