コード例 #1
0
 protected function getPlayServerUrl($manifestUrl)
 {
     $entryId = $this->params->getEntryId();
     $entry = entryPeer::retrieveByPK($entryId);
     if (!$entry) {
         KalturaLog::err("Entry [{$entryId}] not found");
         return $manifestUrl;
     }
     $partnerId = $entry->getPartnerId();
     $uiConfId = $this->params->getUiConfId();
     $playServerHost = myPartnerUtils::getPlayServerHost($partnerId, $this->params->getMediaProtocol());
     $url = "{$playServerHost}/p/{$partnerId}/manifest/master/entryId/{$entryId}";
     if ($uiConfId) {
         $url .= '/uiConfId/' . $uiConfId;
     }
     if (count($this->params->getPlayerConfig())) {
         $url .= '/playerConfig/' . $this->params->getPlayerConfig();
     }
     // TODO encrypt the manifest URL
     return "{$url}/a.m3u8?url={$manifestUrl}";
 }