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


PHP myPartnerUtils::getUrlForPartner方法代码示例

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


在下文中一共展示了myPartnerUtils::getUrlForPartner方法的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 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

示例3: doGetFlavorAssetUrl

 /**
  * @param flavorAsset $flavorAsset
  * @return string
  */
 protected function doGetFlavorAssetUrl(flavorAsset $flavorAsset)
 {
     $entry = $flavorAsset->getentry();
     $partnerId = $entry->getPartnerId();
     $subpId = $entry->getSubpId();
     $flavorAssetId = $flavorAsset->getId();
     $partnerPath = myPartnerUtils::getUrlForPartner($partnerId, $subpId);
     $this->setFileExtension($flavorAsset->getFileExt());
     $versionString = $this->getFlavorVersionString($flavorAsset);
     $url = "/s{$partnerPath}/serveFlavor/entryId/" . $flavorAsset->getEntryId() . "{$versionString}/flavorId/{$flavorAssetId}";
     if ($this->clipTo) {
         $url .= "/clipTo/{$this->clipTo}";
     }
     if ($this->extention) {
         $url .= "/name/a.{$this->extention}";
     }
     $url = str_replace('\\', '/', $url);
     if ($this->protocol != StorageProfile::PLAY_FORMAT_RTMP) {
         $url .= '?novar=0';
         $syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
         $seekFromBytes = $this->getSeekFromBytes(kFileSyncUtils::getLocalFilePathForKey($syncKey));
         if ($seekFromBytes) {
             $url .= '&fs=' . $seekFromBytes;
         }
     } else {
         if ($this->extention && strtolower($this->extention) != 'flv' || $this->containerFormat && strtolower($this->containerFormat) != 'flash video') {
             $url = "mp4:{$url}";
         }
     }
     return $url;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:35,代码来源:kLimeLightUrlManager.php

示例4: purgeAssetFromEdgeCast

 private static function purgeAssetFromEdgeCast(asset $asset)
 {
     // get partner
     $partnerId = $asset->getPartnerId();
     $partner = PartnerPeer::retrieveByPK($partnerId);
     if (!$partner) {
         KalturaLog::err('Cannot find partner with id [' . $partnerId . ']');
         return false;
     }
     $mediaType = $asset instanceof thumbAsset ? self::EDGE_SERVICE_HTTP_SMALL_OBJECT_MEDIA_TYPE : self::EDGE_SERVICE_HTTP_LARGE_OBJECT_MEDIA_TYPE;
     $mediaTypePathList = array();
     try {
         $mediaTypePathList[] = array('MediaType' => $mediaType, 'MediaPath' => $asset->getDownloadUrl());
         // asset download url
     } catch (Exception $e) {
         KalturaLog::err('Cannot get asset URL for asset id [' . $asset->getId() . '] - ' . $e->getMessage());
     }
     if ($asset instanceof flavorAsset) {
         // get a list of all URLs leading to the asset for purging
         $subPartnerId = $asset->getentry()->getSubpId();
         $partnerPath = myPartnerUtils::getUrlForPartner($partnerId, $subPartnerId);
         $assetId = $asset->getId();
         $serveFlavorUrl = "{$partnerPath}/serveFlavor/entryId/" . $asset->getEntryId() . "/flavorId/{$assetId}" . '*';
         // * wildcard should delete all serveFlavor urls
         $hosts = array($partner->getCdnHost(), $partner->getRtmpUrl(), $partner->getIisHost());
         foreach ($hosts as $host) {
             if (!empty($host)) {
                 $mediaTypePathList[] = array('MediaType' => $mediaType, 'MediaPath' => $host . $serveFlavorUrl);
             }
         }
     }
     return self::purgeFromEdgeCast($mediaTypePathList, $partner);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:33,代码来源:kEdgeCastFlowManager.php

示例5: getFlavorAssetUrl

 /**
  * @param flavorAsset $flavorAsset
  * @return string
  */
 public function getFlavorAssetUrl(flavorAsset $flavorAsset)
 {
     $entry = $flavorAsset->getentry();
     $partnerId = $entry->getPartnerId();
     $subpId = $entry->getSubpId();
     $flavorAssetId = $flavorAsset->getId();
     $partnerPath = myPartnerUtils::getUrlForPartner($partnerId, $subpId);
     $this->setFileExtension($flavorAsset->getFileExt());
     $url = "/s{$partnerPath}/serveFlavor/flavorId/{$flavorAssetId}";
     if ($this->clipTo) {
         $url .= "/clipTo/{$this->clipTo}";
     }
     if ($this->extention) {
         $url .= "/name/{$flavorAssetId}.{$this->extention}";
     }
     $url = str_replace('\\', '/', $url);
     if ($this->protocol != StorageProfile::PLAY_FORMAT_RTMP) {
         $url .= '?novar=0';
         $url .= '&e=' . (time() + 120);
         $secret = $this->getMediaVault();
         $fullUrl = $this->protocol . '://' . $this->domain . $url;
         $url .= '&h=' . md5($secret . $fullUrl);
         $syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
         $seekFromBytes = $this->getSeekFromBytes(kFileSyncUtils::getLocalFilePathForKey($syncKey));
         if ($seekFromBytes) {
             $url .= '&fs=' . $seekFromBytes;
         }
     } else {
         $url .= '/forceproxy/true';
     }
     return $url;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:36,代码来源:kLimeLightUrlManager.php

示例6: 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

示例7: 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

示例8: getBaseUrl

 /**
  * @param flavorAsset $flavorAsset
  * @return string representing the basic url.
  */
 protected function getBaseUrl(flavorAsset $flavorAsset)
 {
     $partnerId = $flavorAsset->getPartnerId();
     $subpId = $flavorAsset->getentry()->getSubpId();
     $partnerPath = myPartnerUtils::getUrlForPartner($partnerId, $subpId);
     $flavorAssetId = $flavorAsset->getId();
     $versionString = $this->getFlavorVersionString($flavorAsset);
     $urlParams = $this->params->getUrlParams();
     $url = "{$partnerPath}/serveFlavor/entryId/" . $flavorAsset->getEntryId() . "{$versionString}/flavorId/{$flavorAssetId}" . $urlParams;
     return $url;
 }
开发者ID:GElkayam,项目名称:server,代码行数:15,代码来源:DeliveryProfileVod.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: purgeAssetFromEdgeCast

 private static function purgeAssetFromEdgeCast(asset $asset)
 {
     // get partner
     $partnerId = $asset->getPartnerId();
     $partner = PartnerPeer::retrieveByPK($partnerId);
     if (!$partner) {
         KalturaLog::err('Cannot find partner with id [' . $partnerId . ']');
         return false;
     }
     $mediaType = $asset instanceof thumbAsset ? self::EDGE_SERVICE_HTTP_SMALL_OBJECT_MEDIA_TYPE : self::EDGE_SERVICE_HTTP_LARGE_OBJECT_MEDIA_TYPE;
     $mediaTypePathList = array();
     try {
         $mediaTypePathList[] = array('MediaType' => $mediaType, 'MediaPath' => $asset->getDownloadUrl());
         // asset download url
     } catch (Exception $e) {
         KalturaLog::err('Cannot get asset URL for asset id [' . $asset->getId() . '] - ' . $e->getMessage());
     }
     if ($asset instanceof flavorAsset) {
         // get a list of all URLs leading to the asset for purging
         $subPartnerId = $asset->getentry()->getSubpId();
         $partnerPath = myPartnerUtils::getUrlForPartner($partnerId, $subPartnerId);
         $assetId = $asset->getId();
         $serveFlavorUrl = "{$partnerPath}/serveFlavor/entryId/" . $asset->getEntryId() . "/flavorId/{$assetId}" . '*';
         // * wildcard should delete all serveFlavor urls
         $types = array(kPluginableEnumsManager::apiToCore(EdgeCastDeliveryProfileType::EDGE_CAST_HTTP), kPluginableEnumsManager::apiToCore(EdgeCastDeliveryProfileType::EDGE_CAST_RTMP));
         $deliveryProfile = $partner->getDeliveryProfileIds();
         $deliveryProfileIds = array();
         foreach ($deliveryProfile as $key => $value) {
             $deliveryProfileIds = array_merge($deliveryProfileIds, $value);
         }
         $c = new Criteria();
         $c->add(DeliveryProfilePeer::PARTNER_ID, $partnerId);
         $c->add(DeliveryProfilePeer::ID, $deliveryProfileIds, Criteria::IN);
         $c->addSelectColumn(DeliveryProfilePeer::HOST_NAME);
         $stmt = PermissionPeer::doSelectStmt($c);
         $hosts = $stmt->fetchAll(PDO::FETCH_COLUMN);
         foreach ($hosts as $host) {
             if (!empty($host)) {
                 $mediaTypePathList[] = array('MediaType' => $mediaType, 'MediaPath' => $host . $serveFlavorUrl);
             }
         }
     }
     return self::purgeFromEdgeCast($mediaTypePathList, $partner);
 }
开发者ID:DBezemer,项目名称:server,代码行数:44,代码来源:kEdgeCastFlowManager.php

示例11: getBaseUrl

 /**
  * @param flavorAsset $flavorAsset
  * @return string representing the basic url.
  */
 protected function getBaseUrl(flavorAsset $flavorAsset)
 {
     $entry = entryPeer::retrieveByPK($this->params->getEntryId());
     $partnerId = $flavorAsset->getPartnerId();
     $subpId = $entry->getSubpId();
     $partnerPath = myPartnerUtils::getUrlForPartner($partnerId, $subpId);
     $url = "{$partnerPath}/serveFlavor/entryId/" . $entry->getId();
     if ($entry->getType() == entryType::PLAYLIST) {
         $partner = $entry->getPartner();
         $entryVersion = $entry->getVersion();
         $partnerFlavorVersion = $partner->getCacheFlavorVersion();
         $url .= ($entryVersion ? "/v/{$entryVersion}" : '') . ($partnerFlavorVersion ? "/pv/{$partnerFlavorVersion}" : '');
         $url .= '/flavorParamIds/' . $flavorAsset->getFlavorParamsId();
     } else {
         $url .= $this->getFlavorVersionString($flavorAsset);
         $url .= '/flavorId/' . $flavorAsset->getId();
     }
     $url .= $this->params->getUrlParams();
     return $url;
 }
开发者ID:wzur,项目名称:server,代码行数:24,代码来源:DeliveryProfileVod.php

示例12: doGetFileSyncUrl

 protected function doGetFileSyncUrl(FileSync $fileSync)
 {
     $storage = StorageProfilePeer::retrieveByPK($fileSync->getDc());
     if (!$storage) {
         return parent::doGetFileSyncUrl($fileSync);
     }
     $partnerPath = myPartnerUtils::getUrlForPartner($fileSync->getPartnerId(), $fileSync->getPartnerId() * 100);
     $objectSubType = $fileSync->getObjectSubType();
     if ($fileSync->getObjectType() == FileSyncObjectType::ENTRY && $objectSubType == entry::FILE_SYNC_ENTRY_SUB_TYPE_ISM) {
         return $this->doGetServeIsmUrl($fileSync, $partnerPath, $storage);
     }
     //To Remove - Until the migration process from asset sub type 3 to asset sub type 1 will be completed we need to support both formats
     if ($fileSync->getObjectType() == FileSyncObjectType::FLAVOR_ASSET && $objectSubType == flavorAsset::FILE_SYNC_ASSET_SUB_TYPE_ISM) {
         return $this->doGetServeIsmUrl($fileSync, $partnerPath, $storage);
     }
     if ($fileSync->getObjectType() == FileSyncObjectType::FLAVOR_ASSET && $objectSubType == flavorAsset::FILE_SYNC_ASSET_SUB_TYPE_ASSET) {
         $asset = assetPeer::retrieveById($fileSync->getObjectId());
         if ($asset->hasTag(assetParams::TAG_ISM_MANIFEST)) {
             return $this->doGetServeIsmUrl($fileSync, $partnerPath, $storage);
         }
     }
     return parent::doGetFileSyncUrl($fileSync);
 }
开发者ID:DBezemer,项目名称:server,代码行数:23,代码来源:DeliveryProfileAkamaiSilverLight.php

示例13: serve

 /**
  * @return kManifestRenderer
  */
 public function serve()
 {
     if ($this->params->getManifestFileSync()) {
         /** @var FileSync $manifestFileSync */
         $manifestFileSync = $this->params->getManifestFileSync();
         $this->initDeliveryDynamicAttributes($this->params->getManifestFileSync());
         if ($manifestFileSync->getFileType() == FileSync::FILE_SYNC_FILE_TYPE_FILE) {
             // return kaltura urls with serveSmil / serveManifest
             $partnerPath = myPartnerUtils::getUrlForPartner($manifestFileSync->getPartnerId(), $manifestFileSync->getPartnerId() * 100);
             $manifestObjectId = $manifestFileSync->getObjectId() . '_' . $manifestFileSync->getObjectSubType() . '_' . $manifestFileSync->getVersion();
             $extension = pathinfo($manifestFileSync->getFilePath(), PATHINFO_EXTENSION);
             $url = $partnerPath . '/serveManifest/objectId/' . $manifestObjectId . '.' . $extension;
             $url = kDeliveryUtils::formatGenericUrl($url, $this->getPattern(), $this->params);
         } else {
             $url = $this->getFileSyncUrl($manifestFileSync, false);
         }
         $manifestInfo = $this->getFlavorAssetInfo($url);
         return $this->getRenderer(array($manifestInfo));
     } else {
         KalturaLog::debug("No manifest file was found");
         return null;
     }
 }
开发者ID:kubrickfr,项目名称:server,代码行数:26,代码来源:DeliveryProfileGenericHdsManifest.php

示例14: getFlavorAssetUrl

 /**
  * @param flavorAsset $flavorAsset
  * @return string
  */
 public function getFlavorAssetUrl(flavorAsset $flavorAsset)
 {
     $entry = $flavorAsset->getentry();
     $partnerId = $entry->getPartnerId();
     $subpId = $entry->getSubpId();
     $flavorAssetId = $flavorAsset->getId();
     $partnerPath = myPartnerUtils::getUrlForPartner($partnerId, $subpId);
     $this->setFileExtension($flavorAsset->getFileExt());
     $url = "{$partnerPath}/serveFlavor/flavorId/{$flavorAssetId}";
     if ($this->clipTo) {
         $url .= "/clipTo/{$this->clipTo}";
     }
     if ($this->extention) {
         $url .= "/name/{$flavorAssetId}.{$this->extention}";
     }
     if ($this->protocol != StorageProfile::PLAY_FORMAT_RTMP) {
         $url .= '?novar=0';
         if ($entry->getSecurityPolicy()) {
             $url = "/s{$url}";
             // set expire time in GMT hence the date("Z") offset
             $url .= "&nva=" . strftime("%Y%m%d%H%M%S", time() - date("Z") + 30);
             $secret = kConf::get("level3_authentication_key");
             $hash = "0" . substr(self::hmac('sha1', $secret, $url), 0, 20);
             $url .= "&h={$hash}";
         }
         $syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
         $seekFromBytes = $this->getSeekFromBytes(kFileSyncUtils::getLocalFilePathForKey($syncKey));
         if ($seekFromBytes) {
             $url .= '&start=' . $seekFromBytes;
         }
     } else {
         $url .= '/forceproxy/true';
     }
     $url = str_replace('\\', '/', $url);
     return $url;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:40,代码来源:kLevel3UrlManager.php

示例15: getPlayManifestUrl

 private function getPlayManifestUrl($entry, $playbackProtocol, $tag, $fileExt)
 {
     $partnerPath = myPartnerUtils::getUrlForPartner($entry->getPartnerId(), $entry->getSubpId());
     $downloadUrl = myPartnerUtils::getCdnHost($entry->getPartnerId()) . $partnerPath . "/playManifest" . "/entryId/{$entry->getId()}" . "/format/{$playbackProtocol}" . "/tags/{$tag}" . "/protocol/http" . "/f/a.{$fileExt}";
     return $downloadUrl;
 }
开发者ID:AdiTal,项目名称:server,代码行数:6,代码来源:KalturaTvinciDistributionJobProviderData.php


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