Example #1
0
 /**
  * Adds new live channel.
  * 
  * @action add
  * @param KalturaLiveChannel $liveChannel Live channel metadata  
  * @return KalturaLiveChannel The new live channel
  */
 function addAction(KalturaLiveChannel $liveChannel)
 {
     $dbEntry = $this->prepareEntryForInsert($liveChannel);
     $dbEntry->save();
     $te = new TrackEntry();
     $te->setEntryId($dbEntry->getId());
     $te->setTrackEventTypeId(TrackEntry::TRACK_ENTRY_EVENT_TYPE_ADD_ENTRY);
     $te->setDescription(__METHOD__ . ":" . __LINE__ . "::LIVE_CHANNEL");
     TrackEntry::addTrackEntry($te);
     $liveChannel = new KalturaLiveChannel();
     $liveChannel->fromObject($dbEntry, $this->getResponseProfile());
     return $liveChannel;
 }
Example #2
0
 /**
  * Update live channel. Only the properties that were set will be updated.
  * 
  * @param string $id Live channel id to update
  * @param KalturaLiveChannel $liveChannel Live channel metadata to update
  * @return KalturaLiveChannel
  */
 function update($id, KalturaLiveChannel $liveChannel)
 {
     $kparams = array();
     $this->client->addParam($kparams, "id", $id);
     $this->client->addParam($kparams, "liveChannel", $liveChannel->toParams());
     $this->client->queueServiceActionCall("livechannel", "update", $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultObject = $this->client->doQueue();
     $this->client->throwExceptionIfError($resultObject);
     $this->client->validateObjectType($resultObject, "KalturaLiveChannel");
     return $resultObject;
 }