Hai every one Im sule. I use kaltura package from packgae kaltura
because caltura client api not support in framework laravel.
when i change server url from kaltura^com to mp^streamamg^com
i got error message RC : 301
Not sure I understand. Please provide a full code snippet that reproduces the issue.
Also, what is the mpstreamamg*com endpoint? is this your own local deployment of Kaltura CE?
Hi.
We are integrating Kaltura to Symfony and it returns a .RC: 301 error when making a query.
Code:
<?php
namespace KalturaBundle\Services;
use Symfony\Component\Config\Definition\Exception\Exception;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Kaltura\Client\Configuration as KalturaConfiguration;
use Kaltura\Client\Client as KalturaClient;
use Kaltura\Client\FilterPager as FilterPager;
use Kaltura\Client\Enum\SessionType as KalturaSessionType;
use Kaltura\Client\Type\BaseEntryFilter as KalturaBaseEntryFilter;
use Kaltura\Client\ApiException;
use Kaltura\Client\ClientException;
use Kaltura\Client\Type\MediaEntryFilter as KalturaMediaEntryFilter;
use Kaltura\Client\Type\FilterPager as KalturaFilterPager;
use Kaltura\Client\Enum\MediaType as KalturaMediaType;
use Kaltura\Client\Type\PlaylistFilter as KalturaPlaylistFilter;
class Helpers {
private $em;
private $response;
private $version;
private $curlTimeout;
private $config;
private $serverUrl;
private $partnerId;
private $adminSecret;
private $parterPrivLevel;
private $client;
private $clientFilter;
public function __construct($em, $serverUrl, $partnerId, $adminSecret){
$this->em = $em;
$this->response = new JsonResponse();
$this->version = null;
$this->curlTimeout = 600;
$this->serverUrl = $serverUrl;
$this->partnerId = $partnerId;
$this->adminSecret = $adminSecret;
$this->parterPrivLevel = KalturaSessionType::ADMIN;
try {
$this->config = new KalturaConfiguration($this->partnerId);
$this->config->setServiceUrl($this->serverUrl);
$this->config->setCurlTimeout($this->curlTimeout);
$this->client = new KalturaClient($this->config);
$keys = $this->client->generateSession($this->adminSecret, 'myUser', $this->parterPrivLevel, $this->partnerId);
$this->client->setKs($keys);
$this->clientFilter = new KalturaMediaEntryFilter();
} catch (Exception $e) {
$this->response->setData(array('error' => $e->getMessage()));
}
}
public function getEntrybyId($entryId){
try {
$data = $this->client->getMediaService()->get($entryId, $this->version);
echo json_encode($data);
}
catch (Exception $e){
$this->response->setData(array('error' => $e->getMessage()));
}
}
}