2010-07-01 07:35:27 +00:00
|
|
|
<a
|
|
|
|
href="{$normal_vid_file}"
|
2011-01-22 12:39:17 +00:00
|
|
|
style="display:block;width:{$player_data.width}; height:{$player_data.height}"
|
2010-07-01 07:35:27 +00:00
|
|
|
id="the_Video_Player">
|
2011-01-22 18:02:45 +00:00
|
|
|
{if !$player_data.autoplay}
|
2011-01-23 21:12:35 +00:00
|
|
|
<div align="center" style="background-color:#000; height:100%; vertical-align:middle; position:relative">
|
2011-01-22 18:02:45 +00:00
|
|
|
<img src="{getThumb vdetails=$vdata num=big}" style=" height:100%" />
|
|
|
|
<img src="{$pak_player_url}/play.png" style="position:absolute; top:50%; left:50%; margin:-42px 0px 0px -42px; z-index:100"/>
|
|
|
|
</div>
|
|
|
|
{/if}
|
2010-07-01 07:35:27 +00:00
|
|
|
</a>
|
|
|
|
|
2011-01-18 18:53:15 +00:00
|
|
|
|
2010-07-01 07:35:27 +00:00
|
|
|
<script language="JavaScript">
|
|
|
|
var pakplayer_path = '{$pak_player_url}';
|
|
|
|
var player_logo = '{$player_logo}';
|
|
|
|
var hq_video_file = '{$hq_vid_file}';
|
|
|
|
var normal_video_file = '{$normal_vid_file}';
|
2010-07-14 10:58:46 +00:00
|
|
|
var ytcode = '{$ytcode}';
|
|
|
|
var pre_item = "";
|
|
|
|
var next_item = "";
|
2011-01-22 12:39:17 +00:00
|
|
|
var splash_img = '{getThumb vdetails=$vdata num='big'}';
|
2010-07-01 07:35:27 +00:00
|
|
|
|
2010-07-14 10:58:46 +00:00
|
|
|
{literal}
|
|
|
|
//Now lets write an HQ video function that swaps the original video with hq
|
|
|
|
var video_quality = 'normal';
|
|
|
|
function toggleQuality(obj)
|
|
|
|
{
|
2011-02-01 08:32:34 +00:00
|
|
|
|
|
|
|
alert('test');
|
|
|
|
alert(flowplayer(obj).getClip(0).url);
|
|
|
|
var duration = flowplayer(obj).getClip(0).duration;
|
|
|
|
flowplayer(obj).getClip(0).update({url:hq_video_file});
|
|
|
|
alert(flowplayer(obj).getClip(0).url);
|
|
|
|
flowplayer(obj).unload().load();
|
2010-07-14 10:58:46 +00:00
|
|
|
}
|
2010-07-01 07:35:27 +00:00
|
|
|
|
2010-07-14 10:58:46 +00:00
|
|
|
function pakplayer_hq()
|
|
|
|
{
|
|
|
|
toggleQuality('the_Video_Player');
|
|
|
|
}
|
|
|
|
has_hq_function = true;
|
|
|
|
hq_function = pakplayer_hq;
|
2010-07-01 07:35:27 +00:00
|
|
|
|
2010-07-14 10:58:46 +00:00
|
|
|
{/literal}
|
2011-01-22 12:39:17 +00:00
|
|
|
var bufferingStopped = false;
|
2010-07-14 10:58:46 +00:00
|
|
|
var menu = new Array("menu","embed/share","settings/playlist","comments","donate");
|
2011-01-22 12:39:17 +00:00
|
|
|
flowplayer("the_Video_Player", "{$pak_player_url}/pakplayer{if $Cbucket->configs.pak_license}.unlimited{/if}.swf",
|
2010-11-13 12:27:36 +00:00
|
|
|
{literal}{{/literal}
|
|
|
|
{if $Cbucket->configs.pak_license}
|
|
|
|
key : '{$Cbucket->configs.pak_license}',
|
|
|
|
{/if}
|
|
|
|
{literal}
|
2010-07-14 10:58:46 +00:00
|
|
|
plugins: {
|
|
|
|
controls: {
|
2011-01-03 11:02:54 +00:00
|
|
|
|
|
|
|
{/literal}
|
|
|
|
{if $pakconfigs}
|
|
|
|
{foreach from=$pakconfigs item=value key=config}
|
|
|
|
{$config} : "{$value.default}",
|
|
|
|
{/foreach}
|
|
|
|
{else}
|
2010-07-14 10:58:46 +00:00
|
|
|
background: "url("+pakplayer_path+"/bg.png) repeat",
|
2011-01-22 12:39:17 +00:00
|
|
|
url: "pakplayer.controls.swf",
|
2011-01-03 11:02:54 +00:00
|
|
|
{/if}
|
|
|
|
{literal}
|
2010-07-01 07:35:27 +00:00
|
|
|
},
|
|
|
|
|
2010-07-14 10:58:46 +00:00
|
|
|
{/literal}
|
|
|
|
{if $youtube}
|
|
|
|
youtube :
|
|
|
|
{literal}
|
|
|
|
{
|
2011-01-22 12:39:17 +00:00
|
|
|
url:pakplayer_path+'/pakplayer.youtube.swf',
|
2010-07-14 10:58:46 +00:00
|
|
|
enableGdata: true,
|
|
|
|
}
|
|
|
|
{/literal}
|
|
|
|
{/if}
|
|
|
|
{literal}
|
2010-07-01 07:35:27 +00:00
|
|
|
|
2010-07-14 10:58:46 +00:00
|
|
|
},
|
|
|
|
canvas: {
|
|
|
|
backgroundGradient: "none",
|
|
|
|
backgroundColor: "#000000"
|
|
|
|
}
|
|
|
|
,
|
2011-01-22 12:39:17 +00:00
|
|
|
|
|
|
|
clip:
|
|
|
|
{
|
2010-07-14 10:58:46 +00:00
|
|
|
{/literal}
|
2011-01-22 18:02:45 +00:00
|
|
|
autoPlay :true,
|
2010-07-14 10:58:46 +00:00
|
|
|
{if $youtube}
|
|
|
|
url : 'api:{$ytcode}',
|
|
|
|
provider : 'youtube',
|
|
|
|
urlResolvers: 'youtube',
|
2010-07-14 12:36:57 +00:00
|
|
|
//scaling : 'scale',
|
|
|
|
|
2010-07-14 10:58:46 +00:00
|
|
|
{else}
|
|
|
|
url : normal_video_file,
|
2010-07-19 22:19:57 +00:00
|
|
|
scaling : 'fit',
|
2010-07-14 10:58:46 +00:00
|
|
|
{/if}
|
|
|
|
{literal}
|
|
|
|
onLastSecond: function()
|
|
|
|
{
|
|
|
|
if(next_item)
|
|
|
|
{
|
|
|
|
if($.cookie('auto_play_playlist'))
|
|
|
|
window.location = next_item;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
2010-07-01 07:35:27 +00:00
|
|
|
|
2010-11-13 12:27:36 +00:00
|
|
|
logo:
|
|
|
|
{
|
|
|
|
url: player_logo,
|
|
|
|
fullscreenOnly: false,
|
|
|
|
{/literal}
|
|
|
|
{$logo_position},
|
|
|
|
{literal}
|
2011-01-22 12:39:17 +00:00
|
|
|
|
2010-11-13 12:27:36 +00:00
|
|
|
},
|
2011-01-22 12:39:17 +00:00
|
|
|
|
2010-11-13 12:27:36 +00:00
|
|
|
|
|
|
|
|
2011-01-22 12:39:17 +00:00
|
|
|
});
|
|
|
|
|
2011-01-22 18:02:45 +00:00
|
|
|
|
|
|
|
function htmlDecode(value){
|
|
|
|
return $('<div/>').html(value).text();
|
|
|
|
}
|
|
|
|
|
2011-01-23 21:12:35 +00:00
|
|
|
function updateEmbedCode(width,height,autoplay)
|
|
|
|
{
|
|
|
|
if(autoplay=='yes')
|
|
|
|
autoPlayVid = 'true';
|
|
|
|
else
|
|
|
|
autoPlayVid = 'false';
|
|
|
|
|
|
|
|
embedPlayerWidth = width;
|
|
|
|
embedPlayerHeight = height;
|
|
|
|
autoPlayEmbed = autoplay;
|
|
|
|
|
|
|
|
$f('the_Video_Player').embed({width:width,height:height});
|
|
|
|
var embedCode = flowplayer('the_Video_Player').getEmbedCode();
|
|
|
|
$('#embed_code').val(htmlDecode(embedCode));
|
|
|
|
$('#embed_code').val( $('#embed_code').val().replace(/\"autoPlay\":(true|false)/g,'"autoPlay":'+autoPlayVid) );
|
|
|
|
}
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
updateEmbedCode(embedPlayerWidth,embedPlayerHeight,autoPlayEmbed);
|
|
|
|
});
|
|
|
|
|
2011-01-22 12:39:17 +00:00
|
|
|
{/literal}
|
2010-07-01 07:35:27 +00:00
|
|
|
</script>
|