public function getClientSideSessionUsingApi($privileges = "", $expiry = 86400)
 {
     $userId = KalturaHelpers::getLoggedUserId();
     $partnerId = KalturaHelpers::getOption("kaltura_partner_id");
     $secret = KalturaHelpers::getOption("kaltura_secret");
     $this->_client->setKs(null);
     $this->_client->getConfig()->partnerId = null;
     return $this->_client->session->start($secret, $userId, Kaltura_Client_Enum_SessionType::USER, $partnerId, $expiry, $privileges);
 }
 public static function getKalturaPlayerFlashVars($uiConfId = null, $ks = null, $entryId = null)
 {
     $flashVars = array();
     $flashVars["partnerId"] = KalturaHelpers::getOption("kaltura_partner_id");
     $flashVars["subpId"] = KalturaHelpers::getOption("kaltura_partner_id") * 100;
     $flashVars["uid"] = KalturaHelpers::getLoggedUserId();
     if ($ks) {
         $flashVars["ks"] = $ks;
     }
     if ($uiConfId) {
         $flashVars["uiConfId"] = $ks;
     }
     if ($entryId) {
         $flashVars["entryId"] = $entryId;
     }
     return $flashVars;
 }