108 lines
No EOL
2.2 KiB
HTML
108 lines
No EOL
2.2 KiB
HTML
<a
|
|
href="{$normal_vid_file}"
|
|
style="display:block;width:{$data.width};height:{$data.height};"
|
|
id="the_Video_Player">
|
|
</a>
|
|
|
|
<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}';
|
|
var ytcode = '{$ytcode}';
|
|
var pre_item = "";
|
|
var next_item = "";
|
|
|
|
{literal}
|
|
//Now lets write an HQ video function that swaps the original video with hq
|
|
var video_quality = 'normal';
|
|
function toggleQuality(obj)
|
|
{
|
|
if(video_quality=='normal')
|
|
{
|
|
video_quality = 'hq';
|
|
var playerTime = flowplayer(obj).getTime();
|
|
flowplayer(obj).stop();
|
|
flowplayer(obj).getClip(0).update({ url:hq_video_file });
|
|
flowplayer(obj).play();
|
|
if(flowplayer(obj).isPlaying())
|
|
{
|
|
//flowplayer(obj).seek(playerTime);
|
|
}
|
|
}else
|
|
{
|
|
var playerTime = flowplayer(obj).getTime();
|
|
flowplayer(obj).stop();
|
|
flowplayer(obj).getClip(0).update({ url:normal_video_file });
|
|
video_quality = 'normal';
|
|
flowplayer(obj).play();
|
|
if(flowplayer(obj).isPlaying())
|
|
{
|
|
//flowplayer(obj).seek(playerTime);
|
|
}
|
|
}
|
|
}
|
|
|
|
function pakplayer_hq()
|
|
{
|
|
toggleQuality('the_Video_Player');
|
|
}
|
|
has_hq_function = true;
|
|
hq_function = pakplayer_hq;
|
|
|
|
{/literal}
|
|
|
|
var menu = new Array("menu","embed/share","settings/playlist","comments","donate");
|
|
flowplayer("the_Video_Player", "{$pak_player_url}/pak_player.swf", {literal}{
|
|
|
|
plugins: {
|
|
controls: {
|
|
background: "url("+pakplayer_path+"/bg.png) repeat",
|
|
},
|
|
|
|
{/literal}
|
|
{if $youtube}
|
|
youtube :
|
|
{literal}
|
|
{
|
|
url:pakplayer_path+'/pak_player.youtube.swf',
|
|
enableGdata: true,
|
|
}
|
|
{/literal}
|
|
{/if}
|
|
{literal}
|
|
|
|
},
|
|
canvas: {
|
|
backgroundGradient: "none",
|
|
backgroundColor: "#000000"
|
|
}
|
|
,
|
|
clip:{
|
|
|
|
{/literal}
|
|
{if $youtube}
|
|
url : 'api:{$ytcode}',
|
|
provider : 'youtube',
|
|
urlResolvers: 'youtube',
|
|
//scaling : 'scale',
|
|
|
|
{else}
|
|
url : normal_video_file,
|
|
scaling : 'fit',
|
|
{/if}
|
|
{literal}
|
|
onLastSecond: function()
|
|
{
|
|
if(next_item)
|
|
{
|
|
if($.cookie('auto_play_playlist'))
|
|
window.location = next_item;
|
|
}
|
|
},
|
|
|
|
},
|
|
|
|
|
|
}{/literal});
|
|
</script> |