. // // @ignore // =================================================================================================== /** * @package Kaltura * @subpackage Client */ class Kaltura_Client_LiveStreamService extends Kaltura_Client_ServiceBase { function __construct(Kaltura_Client_Client $client = null) { parent::__construct($client); } function add(Kaltura_Client_Type_LiveStreamAdminEntry $liveStreamEntry, $sourceType = null) { $kparams = array(); $this->client->addParam($kparams, "liveStreamEntry", $liveStreamEntry->toParams()); $this->client->addParam($kparams, "sourceType", $sourceType); $this->client->queueServiceActionCall("livestream", "add", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_LiveStreamAdminEntry"); return $resultObject; } function get($entryId, $version = -1) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "version", $version); $this->client->queueServiceActionCall("livestream", "get", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_LiveStreamEntry"); return $resultObject; } function update($entryId, Kaltura_Client_Type_LiveStreamAdminEntry $liveStreamEntry) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "liveStreamEntry", $liveStreamEntry->toParams()); $this->client->queueServiceActionCall("livestream", "update", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_LiveStreamAdminEntry"); return $resultObject; } function delete($entryId) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->queueServiceActionCall("livestream", "delete", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); return $resultObject; } function listAction(Kaltura_Client_Type_LiveStreamEntryFilter $filter = null, Kaltura_Client_Type_FilterPager $pager = null) { $kparams = array(); if ($filter !== null) $this->client->addParam($kparams, "filter", $filter->toParams()); if ($pager !== null) $this->client->addParam($kparams, "pager", $pager->toParams()); $this->client->queueServiceActionCall("livestream", "list", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_LiveStreamListResponse"); return $resultObject; } function updateOfflineThumbnailJpeg($entryId, $fileData) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $kfiles = array(); $this->client->addParam($kfiles, "fileData", $fileData); $this->client->queueServiceActionCall("livestream", "updateOfflineThumbnailJpeg", $kparams, $kfiles); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_LiveStreamEntry"); return $resultObject; } function updateOfflineThumbnailFromUrl($entryId, $url) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "url", $url); $this->client->queueServiceActionCall("livestream", "updateOfflineThumbnailFromUrl", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_LiveStreamEntry"); return $resultObject; } function isLive($id, $protocol) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->addParam($kparams, "protocol", $protocol); $this->client->queueServiceActionCall("livestream", "isLive", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $resultObject = (bool) $resultObject; return $resultObject; } }