public function getDataUrl($version = NULL) { if ($this->getType() == entryType::PLAYLIST) { return myPlaylistUtils::getExecutionUrl($this); } $current_version = $this->getVersion(); $entryId = $this->getId(); $media_type = $this->getMediaType(); if ($media_type == self::ENTRY_MEDIA_TYPE_VIDEO || $media_type == self::ENTRY_MEDIA_TYPE_AUDIO) { $protocolStr = infraRequestUtils::getProtocol(); $url = requestUtils::getApiCdnHost(); $url .= myPartnerUtils::getUrlForPartner($this->getPartnerId(), $this->getSubpId()); $url .= "/playManifest/entryId/{$entryId}/format/url/protocol/{$protocolStr}"; } else { if ($media_type == self::ENTRY_MEDIA_TYPE_IMAGE) { $width = self::DEFAULT_IMAGE_WIDTH; $height = self::DEFAULT_IMAGE_HEIGHT; $url = myPartnerUtils::getCdnHost($this->getPartnerId()); $url .= myPartnerUtils::getUrlForPartner($this->getPartnerId(), $this->getSubpId()); if (!$version) { $version = $current_version; } $url .= "/thumbnail/entry_id/{$entryId}/def_height/{$height}/def_width/{$width}/version/{$version}/type/1"; } else { return null; } } return $url; }
public function getDataUrl($version = NULL) { if ($this->getType() == entryType::PLAYLIST) { return myPlaylistUtils::getExecutionUrl($this); } //$path = $this->getThumbnailPath ( $version ); $path = myPartnerUtils::getUrlForPartner($this->getPartnerId(), $this->getSubpId()) . "/flvclipper/entry_id/" . $this->getId(); $current_version = $this->getVersion(); if ($version) { $path .= "/version/{$version}"; } else { $path .= "/version/{$current_version}"; } $url = myPartnerUtils::getCdnHost($this->getPartnerId()) . $path; return $url; }