当前位置: 首页>>代码示例>>PHP>>正文


PHP myPartnerUtils::getCdnHost方法代码示例

本文整理汇总了PHP中myPartnerUtils::getCdnHost方法的典型用法代码示例。如果您正苦于以下问题:PHP myPartnerUtils::getCdnHost方法的具体用法?PHP myPartnerUtils::getCdnHost怎么用?PHP myPartnerUtils::getCdnHost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在myPartnerUtils的用法示例。


在下文中一共展示了myPartnerUtils::getCdnHost方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 /**
  * Will forward to the regular swf player according to the widget_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         die;
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     $host = myPartnerUtils::getHost($partner_id);
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         $ui_conf_swf_url = "/swf/simpleeditor.swf";
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     // handle buggy case for backward compatiblity
     $partner_host = $host;
     if ($partner_host == "http://www.kaltura.com") {
         $partner_host = 1;
     }
     // otherwise the kse will build a flawed url with [[IMPORT]]
     $params = "contentUrl=" . urlencode($swf_url) . "&host=" . str_replace("http://", "", str_replace("https://", "", $partner_host)) . "&cdnHost=" . str_replace("http://", "", str_replace("https://", "", myPartnerUtils::getCdnHost($partner_id))) . "&uiConfId=" . $ui_conf_id . "&disableurlhashing=" . kConf::get('disable_url_hashing');
     $wrapper_swf = myContentStorage::getFSFlashRootPath() . "/flexwrapper/" . kConf::get('editors_flex_wrapper_version') . "/FlexWrapper.swf";
     $this->redirect($host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . "{$wrapper_swf}?{$params}");
 }
开发者ID:DBezemer,项目名称:server,代码行数:36,代码来源:kseAction.class.php

示例2: execute

 /**
  * Will forward to the regular swf player according to the widget_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         die;
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     if (!$subp_id) {
         $subp_id = 0;
     }
     $host = myPartnerUtils::getHost($partner_id);
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         $ui_conf_swf_url = "/swf/ContributionWizard.swf";
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     $params = "contentUrl=" . urlencode($swf_url) . "&host=" . str_replace("http://", "", str_replace("https://", "", $host)) . "&cdnHost=" . str_replace("http://", "", str_replace("https://", "", myPartnerUtils::getCdnHost($partner_id))) . "&uiConfId=" . $ui_conf_id;
     $wrapper_swf = myContentStorage::getFSFlashRootPath() . "/flexwrapper/" . kConf::get('kcw_flex_wrapper_version') . "/FlexWrapper.swf";
     $this->redirect($host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . "{$wrapper_swf}?{$params}");
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:33,代码来源:kcwAction.class.php

示例3: execute

 /**
  * Will forward to the uploader swf according to the ui_conf_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND, "UI conf not found");
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     $host = requestUtils::getRequestHost();
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         KExternalErrors::dieError(KExternalErrors::ILLEGAL_UI_CONF, "SWF URL not found in UI conf");
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     $conf_vars = $uiConf->getConfVars();
     if ($conf_vars) {
         $conf_vars = "&" . $conf_vars;
     }
     $params = "host=" . $host . "&uiConfId=" . $ui_conf_id . $conf_vars;
     KExternalErrors::terminateDispatch();
     $this->redirect("{$swf_url}?{$params}");
 }
开发者ID:DBezemer,项目名称:server,代码行数:34,代码来源:kuploadAction.class.php

示例4: execute

 /**
  * Will forward to the uploader swf according to the ui_conf_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         die;
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     $host = requestUtils::getRequestHost();
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         die;
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     $conf_vars = $uiConf->getConfVars();
     if ($conf_vars) {
         $conf_vars = "&" . $conf_vars;
     }
     $params = "host=" . $host . "&uiConfId=" . $ui_conf_id . $conf_vars;
     $this->redirect("{$swf_url}?{$params}");
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:33,代码来源:kuploadAction.class.php

示例5: getDataPath

 /**
  * This function returns the file system path for a requested content entity.
  * this function is here to support PS2 getEntry and 2Tor which uses datapath
  * @return string the content path
  */
 public function getDataPath($version = NULL)
 {
     $url = $this->getDownloadUrl($version);
     // this is to make sure direct embeds (formerly done by going to /content/entry/data/../file.swf)
     // will still work
     $url .= '/direct_serve/1/forceproxy/true';
     $host = myPartnerUtils::getCdnHost($this->getPartnerId());
     $url = str_replace($host, '', $url);
     return $url;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:15,代码来源:DocumentEntry.php

示例6: getAssetUrl

 protected static function getAssetUrl(asset $asset)
 {
     $cdnHost = myPartnerUtils::getCdnHost($asset->getPartnerId());
     $urlManager = kUrlManager::getUrlManagerByCdn($cdnHost, $asset->getEntryId());
     $urlManager->setDomain($cdnHost);
     $url = $urlManager->getAssetUrl($asset);
     $url = $cdnHost . $url;
     $url = preg_replace('/^https?:\\/\\//', '', $url);
     $url = 'http://' . $url . '/ext/' . $asset->getId() . '.' . $asset->getFileExt();
     return $url;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:11,代码来源:KalturaMetroPcsDistributionJobProviderData.php

示例7: execute

 /**
  * Will forward to the regular swf player according to the widget_id 
  */
 public function execute()
 {
     $uiconf_id = $this->getRequestParameter('uiconf_id');
     if (!$uiconf_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'uiconf_id');
     }
     $uiConf = uiConfPeer::retrieveByPK($uiconf_id);
     if (!$uiConf) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND);
     }
     $partner_id = $this->getRequestParameter('partner_id', $uiConf->getPartnerId());
     if (!$partner_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'partner_id');
     }
     $partner_host = myPartnerUtils::getHost($partner_id);
     $partner_cdnHost = myPartnerUtils::getCdnHost($partner_id);
     $use_cdn = $uiConf->getUseCdn();
     $host = $use_cdn ? $partner_cdnHost : $partner_host;
     $ui_conf_html5_url = $uiConf->getHtml5Url();
     if (kConf::hasMap("optimized_playback")) {
         $optimizedPlayback = kConf::getMap("optimized_playback");
         if (array_key_exists($partner_id, $optimizedPlayback)) {
             // force a specific kdp for the partner
             $params = $optimizedPlayback[$partner_id];
             if (array_key_exists('html5_url', $params)) {
                 $ui_conf_html5_url = $params['html5_url'];
             }
         }
     }
     if (kString::beginsWith($ui_conf_html5_url, "http")) {
         $url = $ui_conf_html5_url;
         // absolute URL
     } else {
         if ($ui_conf_html5_url) {
             $url = $host . $ui_conf_html5_url;
         } else {
             $html5_version = kConf::get('html5_version');
             $url = "{$host}/html5/html5lib/{$html5_version}/mwEmbedLoader.php";
         }
     }
     // append uiconf_id and partner id for optimizing loading of html5 library. append them only for "standard" urls by looking for the mwEmbedLoader.php suffix
     if (kString::endsWith($url, "mwEmbedLoader.php")) {
         $url .= "/p/{$partner_id}/uiconf_id/{$uiconf_id}";
         $entry_id = $this->getRequestParameter('entry_id');
         if ($entry_id) {
             $url .= "/entry_id/{$entry_id}";
         }
     }
     requestUtils::sendCachingHeaders(60);
     header("Pragma:");
     kFile::cacheRedirect($url);
     header("Location:{$url}");
     die;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:57,代码来源:embedIframeJsAction.class.php

示例8: _buildJarsHostPath

 private function _buildJarsHostPath()
 {
     $baseUrl = myPartnerUtils::getCdnHost($this->uiconfObj->getPartnerId());
     $jarPath = $this->_getJarsPathFromSwfUrl();
     $scheme = parse_url($jarPath, PHP_URL_SCHEME);
     if (!is_null($scheme)) {
         return $jarPath;
     } else {
         $jarPath = ltrim($jarPath, '/');
         $fullUrl = $baseUrl . '/' . $jarPath;
         return $fullUrl;
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:13,代码来源:ksrAction.class.php

示例9: createArgumentsForXSLT

 private function createArgumentsForXSLT()
 {
     $partnerPath = myPartnerUtils::getUrlForPartner($this->entry->getPartnerId(), $this->entry->getSubpId());
     $prefix = myPartnerUtils::getCdnHost($this->entry->getPartnerId(), null, 'api') . $partnerPath . "/playManifest" . "/entryId/";
     $arguments = array("distributionProfileId" => $this->distributionProfile->id, "playManifestPrefix" => $prefix);
     if ($this->distributionProfile->ipadnewPpvModule) {
         $arguments["ipadnewPpvModule"] = $this->distributionProfile->ipadnewPpvModule;
     }
     if ($this->distributionProfile->ipadnewFileName) {
         $arguments["ipadnewTypeName"] = $this->distributionProfile->ipadnewFileName;
     }
     if ($this->distributionProfile->ismPpvModule) {
         $arguments["ismPpvModule"] = $this->distributionProfile->ismPpvModule;
     }
     if ($this->distributionProfile->ismFileName) {
         $arguments["ismTypeName"] = $this->distributionProfile->ismFileName;
     }
     if ($this->distributionProfile->iphonenewPpvModule) {
         $arguments["iphonenewPpvModule"] = $this->distributionProfile->iphonenewPpvModule;
     }
     if ($this->distributionProfile->iphonenewFileName) {
         $arguments["iphonenewTypeName"] = $this->distributionProfile->iphonenewFileName;
     }
     if ($this->distributionProfile->mbrPpvModule) {
         $arguments["mbrPpvModule"] = $this->distributionProfile->mbrPpvModule;
     }
     if ($this->distributionProfile->mbrFileName) {
         $arguments["mbrTypeName"] = $this->distributionProfile->mbrFileName;
     }
     if ($this->distributionProfile->dashPpvModule) {
         $arguments["dashPpvModule"] = $this->distributionProfile->dashPpvModule;
     }
     if ($this->distributionProfile->dashFileName) {
         $arguments["dashTypeName"] = $this->distributionProfile->dashFileName;
     }
     if ($this->distributionProfile->widevinePpvModule) {
         $arguments["widevinePpvModule"] = $this->distributionProfile->widevinePpvModule;
     }
     if ($this->distributionProfile->widevineFileName) {
         $arguments["widevineTypeName"] = $this->distributionProfile->widevineFileName;
     }
     if ($this->distributionProfile->widevineMbrPpvModule) {
         $arguments["widevineMbrPpvModule"] = $this->distributionProfile->widevineMbrPpvModule;
     }
     if ($this->distributionProfile->widevineMbrFileName) {
         $arguments["widevineMbrTypeName"] = $this->distributionProfile->widevineMbrFileName;
     }
     return $arguments;
 }
开发者ID:DBezemer,项目名称:server,代码行数:49,代码来源:TvinciDistributionFeedHelper.php

示例10: clientUpdatesAction

 /**
  * Returns latest version and URL
  *
  * @action clientUpdates
  * @param string $os
  * @param string $version
  * @return KalturaCaptureSpaceUpdateResponse
  * @throws CaptureSpaceErrors::ALREADY_LATEST_VERSION
  * @throws CaptureSpaceErrors::NO_UPDATE_IS_AVAILABLE
  */
 function clientUpdatesAction($os, $version)
 {
     $hashValue = kCaptureSpaceVersionManager::getUpdateHash($os, $version);
     if (!$hashValue) {
         throw new KalturaAPIException(CaptureSpaceErrors::NO_UPDATE_IS_AVAILABLE, $version, $os);
     }
     $path = "/api_v3/service/captureSpace_captureSpace/action/serveUpdate/os/{$os}/version/{$version}";
     $downloadUrl = myPartnerUtils::getCdnHost(null) . $path;
     $info = new KalturaCaptureSpaceUpdateResponseInfo();
     $info->url = $downloadUrl;
     $info->hash = new KalturaCaptureSpaceUpdateResponseInfoHash();
     $info->hash->algorithm = KalturaCaptureSpaceHashAlgorithm::MD5;
     $info->hash->value = $hashValue;
     $response = new KalturaCaptureSpaceUpdateResponse();
     $response->info = $info;
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:27,代码来源:CaptureSpaceService.php

示例11: execute

 public function execute()
 {
     $this->uiconf_id = $this->getRequestParameter('uiconf_id');
     if (!$this->uiconf_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'uiconf_id');
     }
     $this->uiConf = uiConfPeer::retrieveByPK($this->uiconf_id);
     if (!$this->uiConf) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND);
     }
     $this->partner_id = $this->getRequestParameter('partner_id', $this->uiConf->getPartnerId());
     if (!$this->partner_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'partner_id');
     }
     // Single Player parameters
     $this->entry_id = $this->getRequestParameter('entry_id');
     if ($this->entry_id) {
         $entry = entryPeer::retrieveByPK($this->entry_id);
         if ($entry) {
             $this->entry_name = $entry->getName();
             $this->entry_description = $entry->getDescription();
             $this->entry_thumbnail_url = $entry->getThumbnailUrl();
             $flavor_tag = $this->getRequestParameter('flavor_tag', 'iphone');
             $flavor_assets = assetPeer::retrieveReadyFlavorsByEntryIdAndTag($this->entry_id, $flavor_tag);
             $flavor_asset = reset($flavor_assets);
             /* @var $flavor_asset flavorAsset */
             $this->flavor_asset_id = null;
             if ($flavor_asset) {
                 $this->flavor_asset_id = $flavor_asset->getId();
             }
         } else {
             $this->entry_id = null;
         }
     }
     $this->delivery_type = $this->getRequestParameter('delivery');
     // Playlist Parameters
     $this->playlist_id = $this->getRequestParameter('playlist_id');
     $this->playlist_name = $this->getRequestParameter('playlist_name');
     $this->partner_host = myPartnerUtils::getHost($this->partner_id);
     $this->partner_cdnHost = myPartnerUtils::getCdnHost($this->partner_id);
     $this->secure_host = kConf::get('cdn_host_https');
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:42,代码来源:previewAction.class.php

示例12: execute

 /**
  * Will forward to the regular swf player according to the widget_id 
  */
 public function execute()
 {
     $uiconf_id = $this->getRequestParameter('uiconf_id');
     if (!$uiconf_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'uiconf_id');
     }
     $uiConf = uiConfPeer::retrieveByPK($uiconf_id);
     if (!$uiConf) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND);
     }
     $partner_id = $this->getRequestParameter('partner_id', $uiConf->getPartnerId());
     if (!$partner_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'partner_id');
     }
     $partner_host = myPartnerUtils::getHost($partner_id);
     $partner_cdnHost = myPartnerUtils::getCdnHost($partner_id);
     $html5_version = kConf::get('html5_version');
     $use_cdn = $uiConf->getUseCdn();
     $host = $use_cdn ? $partner_cdnHost : $partner_host;
     $url = $host;
     $url .= "/html5/html5lib/v{$html5_version}/mwEmbedLoader.php";
     $this->redirect($url);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:26,代码来源:embedIframeJsAction.class.php

示例13: execute

 public function execute()
 {
     $this->html5_version = kConf::get('html5_version');
     $this->uiconf_id = $this->getRequestParameter('uiconf_id');
     if (!$this->uiconf_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'uiconf_id');
     }
     $this->uiConf = uiConfPeer::retrieveByPK($this->uiconf_id);
     if (!$this->uiConf) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND);
     }
     $this->partner_id = $this->getRequestParameter('partner_id', $this->uiConf->getPartnerId());
     if (!$this->partner_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'partner_id');
     }
     $this->entry_id = $this->getRequestParameter('entry_id');
     if (!$this->entry_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'entry_id');
     }
     $this->delivery_type = $this->getRequestParameter('delivery');
     $this->partner_host = myPartnerUtils::getHost($this->partner_id);
     $this->partner_cdnHost = myPartnerUtils::getCdnHost($this->partner_id);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:23,代码来源:previewAction.class.php

示例14: execute

 public function execute()
 {
     sfView::SUCCESS;
     /** check parameters and verify user is logged-in **/
     $this->partner_id = $this->getP("pid");
     $this->subp_id = $this->getP("subpid", (int) $this->partner_id * 100);
     $this->uid = $this->getP("uid");
     $this->ks = $this->getP("kmcks");
     if (!$this->ks) {
         // if kmcks from cookie doesn't exist, try ks from REQUEST
         $this->ks = $this->getP('ks');
     }
     $this->screen_name = $this->getP("screen_name");
     $this->email = $this->getP("email");
     /** if no KS found, redirect to login page **/
     if (!$this->ks) {
         $this->redirect("kmc/kmc");
         die;
     }
     $ksObj = kSessionUtils::crackKs($this->ks);
     /** END - check parameters and verify user is logged-in **/
     /** Get array of allowed partners for the current user **/
     $this->allowedPartners = array();
     $currentUser = kuserPeer::getKuserByPartnerAndUid($this->partner_id, $ksObj->user, true);
     if ($currentUser) {
         $partners = myPartnerUtils::getPartnersArray($currentUser->getAllowedPartnerIds());
         foreach ($partners as $partner) {
             $this->allowedPartners[] = array('id' => $partner->getId(), 'name' => $partner->getName());
         }
         $this->full_name = $currentUser->getFullName();
     }
     /** load partner from DB, and set templatePartnerId **/
     $this->partner = $partner = null;
     $this->templatePartnerId = self::SYSTEM_DEFAULT_PARTNER;
     $this->ignoreSeoLinks = false;
     $this->ignoreEntrySeoLinks = false;
     $this->useEmbedCodeProtocolHttps = false;
     $this->v2Flavors = false;
     if ($this->partner_id !== NULL) {
         $this->partner = $partner = PartnerPeer::retrieveByPK($this->partner_id);
         kmcUtils::redirectPartnerToCorrectKmc($partner, $this->ks, $this->uid, $this->screen_name, $this->email, self::CURRENT_KMC_VERSION);
         $this->templatePartnerId = $this->partner ? $this->partner->getTemplatePartnerId() : self::SYSTEM_DEFAULT_PARTNER;
         $this->ignoreSeoLinks = $this->partner->getIgnoreSeoLinks();
         $this->ignoreEntrySeoLinks = PermissionPeer::isValidForPartner(PermissionName::FEATURE_IGNORE_ENTRY_SEO_LINKS, $this->partner_id);
         $this->useEmbedCodeProtocolHttps = PermissionPeer::isValidForPartner(PermissionName::FEATURE_EMBED_CODE_DEFAULT_PROTOCOL_HTTPS, $this->partner_id);
         $this->v2Flavors = PermissionPeer::isValidForPartner(PermissionName::FEATURE_V2_FLAVORS, $this->partner_id);
     }
     /** END - load partner from DB, and set templatePartnerId **/
     /** set default flags **/
     $this->payingPartner = 'false';
     $this->kdp508_players = array();
     $this->first_login = false;
     /** END - set default flags **/
     /** set values for template **/
     $this->service_url = myPartnerUtils::getHost($this->partner_id);
     $this->host = $this->stripProtocol($this->service_url);
     $this->embed_host = $this->host;
     if (kConf::hasParam('cdn_api_host') && kConf::hasParam('www_host') && $this->host == kConf::get('cdn_api_host')) {
         $this->host = kConf::get('www_host');
     }
     $this->cdn_url = myPartnerUtils::getCdnHost($this->partner_id);
     $this->cdn_host = $this->stripProtocol($this->cdn_url);
     $this->rtmp_host = myPartnerUtils::getRtmpUrl($this->partner_id);
     $this->flash_dir = $this->cdn_url . myContentStorage::getFSFlashRootPath();
     // Decide if to hide akamai delivery type
     $this->hideAkamaiHDNetwork = $partner->getDisableAkamaiHDNetwork();
     /** set payingPartner flag **/
     if ($partner && $partner->getPartnerPackage() != PartnerPackages::PARTNER_PACKAGE_FREE) {
         $this->payingPartner = 'true';
     }
     /** END - set payingPartner flag **/
     /** get partner languae **/
     $this->language = null;
     if ($partner->getKMCLanguage()) {
         $this->language = $partner->getKMCLanguage();
     }
     /** END - get partner languae **/
     /** set first_login flag **/
     $this->first_login = $partner->getIsFirstLogin();
     if ($this->first_login === true) {
         $partner->setIsFirstLogin(false);
         $partner->save();
     }
     /** END - set first_login flag **/
     /** get logout url **/
     $this->logoutUrl = null;
     if ($partner->getLogoutUrl()) {
         $this->logoutUrl = $partner->getLogoutUrl();
     }
     /** END - get logout url**/
     /** partner-specific: change KDP version for partners working with auto-moderaion **/
     // set content kdp version according to partner id
     $moderated_partners = array(31079, 28575, 32774);
     $this->content_kdp_version = 'v2.7.0';
     if (in_array($this->partner_id, $moderated_partners)) {
         $this->content_kdp_version = 'v2.1.2.29057';
     }
     /** END - partner-specific: change KDP version for partners working with auto-moderaion **/
     $this->kmc_swf_version = kConf::get('kmc_version');
     /** uiconf listing work **/
//.........这里部分代码省略.........
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:101,代码来源:kmc4Action.class.php

示例15: execute

 public function execute()
 {
     $this->entryId = $this->getRequestParameter("entryId", null);
     $this->flavorId = $this->getRequestParameter("flavorId", null);
     $this->storageId = $this->getRequestParameter("storageId", null);
     $this->maxBitrate = $this->getRequestParameter("maxBitrate", null);
     $flavorIdsStr = $this->getRequestParameter("flavorIds", null);
     if ($flavorIdsStr) {
         $this->flavorIds = explode(",", $flavorIdsStr);
     }
     $this->entry = entryPeer::retrieveByPKNoFilter($this->entryId);
     if (!$this->entry) {
         KExternalErrors::dieError(KExternalErrors::ENTRY_NOT_FOUND);
     }
     if (!$this->flavorId) {
         $flavorParamId = $this->getRequestParameter("flavorParamId", null);
         if ($flavorParamId) {
             $flavorAsset = flavorAssetPeer::retrieveByEntryIdAndFlavorParams($entry->getId(), $flavorParamId);
             if (!$flavorAsset) {
                 KExternalErrors::dieError(KExternalErrors::FLAVOR_NOT_FOUND);
             }
             $this->flavorId = $flavorAsset->getId();
         }
     }
     $this->validateStorageId();
     $this->protocol = $this->getRequestParameter("protocol", null);
     if (!$this->protocol) {
         $this->protocol = StorageProfile::PLAY_FORMAT_HTTP;
     }
     $this->format = $this->getRequestParameter("format");
     if (!$this->format) {
         $this->format = StorageProfile::PLAY_FORMAT_HTTP;
     }
     $this->cdnHost = $this->getRequestParameter("cdnHost", null);
     $partner = $this->entry->getPartner();
     if (!$this->cdnHost || $partner->getForceCdnHost()) {
         $this->cdnHost = myPartnerUtils::getCdnHost($this->entry->getPartnerId(), $this->protocol);
     }
     if ($this->maxBitrate && (!is_numeric($this->maxBitrate) || $this->maxBitrate <= 0)) {
         KExternalErrors::dieError(KExternalErrors::INVALID_MAX_BITRATE);
     }
     $ksStr = $this->getRequestParameter("ks");
     $base64Referrer = $this->getRequestParameter("referrer");
     $referrer = base64_decode($base64Referrer);
     if (!is_string($referrer)) {
         $referrer = "";
     }
     // base64_decode can return binary data
     $securyEntryHelper = new KSecureEntryHelper($this->entry, $ksStr, $referrer);
     if ($securyEntryHelper->shouldPreview()) {
         $this->clipTo = $securyEntryHelper->getPreviewLength() * 1000;
     } else {
         $securyEntryHelper->validateForPlay($this->entry, $ksStr);
     }
     // grab seekFrom parameter and normalize url
     $this->seekFrom = $this->getRequestParameter("seekFrom", -1);
     if ($this->seekFrom <= 0) {
         $this->seekFrom = -1;
     }
     if ($this->entry->getStatus() == entryStatus::DELETED) {
         // because the fiter was turned off - a manual check for deleted entries must be done.
         die;
     }
     $xml = null;
     switch ($this->format) {
         case StorageProfile::PLAY_FORMAT_HTTP:
             $xml = $this->serveHttp();
             break;
         case StorageProfile::PLAY_FORMAT_RTMP:
             $xml = $this->serveRtmp();
             break;
         case StorageProfile::PLAY_FORMAT_SILVER_LIGHT:
             $xml = $this->serveSilverLight();
             break;
         case StorageProfile::PLAY_FORMAT_APPLE_HTTP:
             $xml = $this->serveAppleHttp();
             break;
         case "url":
             return $this->serveUrl();
             break;
         case "hdnetworksmil":
             $xml = $this->serveHDNetwork();
             break;
         case "hdnetwork":
             $duration = $this->entry->getDurationInt();
             $mediaUrl = "<media url=\"" . requestUtils::getHost() . str_replace("f4m", "smil", str_replace("hdnetwork", "hdnetworksmil", $_SERVER["REQUEST_URI"])) . "\"/>";
             $xml = $this->buildXml(self::PLAY_STREAM_TYPE_RECORDED, array(), 'video/x-flv', $duration, null, $mediaUrl);
             break;
     }
     if ($this->format == StorageProfile::PLAY_FORMAT_APPLE_HTTP) {
         header("Content-Type: text/plain; charset=UTF-8");
     } else {
         header("Content-Type: text/xml; charset=UTF-8");
         header("Content-Disposition: inline; filename=manifest.xml");
     }
     echo $xml;
     die;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:98,代码来源:playManifestAction.class.php


注:本文中的myPartnerUtils::getCdnHost方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。