You are here

function KalturaHelpers::getThumbnailUrl in Kaltura 5

Same name and namespace in other branches
  1. 6.2 kaltura_client/kaltura_helpers.php \KalturaHelpers::getThumbnailUrl()
  2. 6 kaltura_client/kaltura_helpers.php \KalturaHelpers::getThumbnailUrl()
  3. 7.3 kaltura_client/kaltura_helpers.php \KalturaHelpers::getThumbnailUrl()
  4. 7.2 kaltura_client/kaltura_helpers.php \KalturaHelpers::getThumbnailUrl()

File

kaltura_client/kaltura_helpers.php, line 121

Class

KalturaHelpers

Code

function getThumbnailUrl($widgetId = null, $entryId = null, $width = 240, $height = 180) {
  $config = KalturaHelpers::getServiceConfiguration();
  $url = KalturaHelpers::getKalturaServerUrl();
  $url .= "/p/" . $config->partnerId;
  $url .= "/sp/" . $config->subPartnerId;
  $url .= "/thumbnail";
  if ($widgetId) {
    $url .= "/widget_id/" . $widgetId;
  }
  else {
    if ($entryId) {
      $url .= "/entry_id/" . $entryId;
    }
  }
  $url .= "/width/" . $width;
  $url .= "/height/" . $height;
  $url .= "/type/2";
  $url .= "/bgcolor/000000";
  return $url;
}