Example #1
0
 function cb_player($in)
 {
     global $cb_player;
     $cb_player = true;
     $vdetails = $in['video'];
     //Checking for YT Referal
     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'];
     }
     $files = $in['files'];
     if ($files) {
         foreach ($files as $key => $file) {
             if ($key == 'flv' || $key == 'mp4' || $key == 'mobile') {
                 $video_file = $file;
                 break;
             }
             if ($file['status'] == 's' && $file['is_original'] != 'yes') {
                 $video_file = VIDEOS_URL . '/' . $file['file_directory'] . '/';
                 $video_file .= $file['file_name'] . $file['suffix'] . '.' . $file['ext'];
                 break;
             }
         }
     }
     if ($video_file || $ytcode) {
         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;
         }
         //Logo Placement
         assign('logo_placement', cb_player_logo_position());
         assign('logo_margin', config('logo_padding'));
         //Setting Skin
         assign('cb_skin', 'glow/glow.xml');
         assign('player_data', $in);
         assign('player_logo', website_logo());
         assign('normal_vid_file', $video_file);
         assign("hq_vid_file", $hd_file);
         assign('vdata', $vdetails);
         $player = fetch(CB_PLAYER_DIR . '/cbplayer.html', false);
         return $player;
     }
 }
Example #2
0
 function cb_player($in)
 {
     global $cb_player;
     $cb_player = true;
     $vdetails = $in['vdetails'];
     $vid_file = get_video_file($vdetails, true, true);
     //Checking for YT Referal
     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_video_file($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;
         }
         //Logo Placement
         assign('logo_placement', cb_player_logo_position());
         assign('logo_margin', config('logo_padding'));
         //Setting Skin
         assign('cb_skin', 'glow/glow.xml');
         assign('player_data', $in);
         assign('player_logo', website_logo());
         assign('normal_vid_file', $vid_file);
         assign("hq_vid_file", $hd_file);
         assign('vdata', $vdetails);
         Template(CB_PLAYER_DIR . '/cbplayer.html', false);
         return true;
     }
 }
Example #3
0
  <!-- For Licensensed Players -->
  <!-- Setting Logo -->
  <logo.file><?php 
echo website_logo();
?>
</logo.file>
  <logo.link><?php 
echo BASEURL;
?>
</logo.link>
  <logo.margin><?php 
echo config('logo_padding');
?>
</logo.margin>
  <logo.position><?php 
echo cb_player_logo_position();
?>
</logo.position>
  <logo.timeout>3</logo.timeout>
  <logo.over>1</logo.over>
  <logo.out>0.5</logo.out>
  <!-- Ending Logo Settings-->
  
  <!-- Setting context menu -->
  <abouttext><?php 
echo config('pakplayer_contextmsg');
?>
</abouttext>
  <aboutlink><?php 
echo BASEURL;
?>