You are here

function KalturaSessionService::startWidgetSession in Kaltura 6.2

File

kaltura_client/KalturaClient.php, line 4104

Class

KalturaSessionService

Code

function startWidgetSession($widgetId, $expiry = 86400) {
  $kparams = array();
  $this->client
    ->addParam($kparams, "widgetId", $widgetId);
  $this->client
    ->addParam($kparams, "expiry", $expiry);
  $this->client
    ->queueServiceActionCall("session", "startWidgetSession", $kparams);
  if ($this->client
    ->isMultiRequest()) {
    return null;
  }
  $resultObject = $this->client
    ->doQueue();
  $this->client
    ->throwExceptionIfError($resultObject);
  $this->client
    ->validateObjectType($resultObject, "KalturaStartWidgetSessionResponse");
  return $resultObject;
}