$file) { $res[] = get_cbvjs_quality($file); } $all_res = $res; if (in_array('360', $all_res)){ $quality = '360'; }else{ $quality = 'low'; } }else{ $quality = "low"; } return $quality; }else{ return False; } } /** * Used to return functions of custom/premium plugins * @param : { Array } { function } { videoid } * @example : get_my_function($params) { will check the required function name and return the case } * @return : { functions/Boolean } * @since : 01st August, 2016 ClipBucket 2.8.1 * @author : Fahad Abbas */ function get_my_function($params){ $function = $params['function']; $videoid = $params['videoid']; if (!$function){ return False; } switch ($function) { case 'get_ultimate_ads':{ if (CB_ULTIMATE_ADS == 'installed'){ global $CbUads; $ads_array = array("filter_ad"=>true,"status"=>"1","non_expiry"=>'true'); $current_ad = $CbUads->get_ultimate_ads($ads_array); if ( !empty($current_ad) ){ return $current_ad; }else{ return false; } }else{ return false; } } break; case 'get_timeCommnets':{ if (CB_TIMECOMMENTS_PLUGIN == 'installed'){ $timecomments = get_timeComments($videoid); if (!empty($timecomments)){ return json_encode($timecomments); }else{ return false; } }else{ return false; } } break; case 'get_video_editor':{ if ( IA_ADS_INSTALLED == 'installed' ){ $video_editor_enabled = video_editor_enabled(); return $video_editor_enabled; }else{ return false; } } case 'get_slot':{ if ( IA_ADS_INSTALLED == 'installed' ){ global $ia_ads; $slot_id = $ia_ads->get_slot(array("videoid"=>$videoid,'state'=>'1'))[0]['slot_id']; if (!empty($slot_id)){ $instances = $ia_ads->get_instance(array("slot_id"=>$slot_id,'order'=>'starttime ASC')); } return $instances; }else{ return false; } } default: # code... break; } } register_actions_play_video('cb_video_js'); } ?>