Copyright © 2012 Kaltura Inc.
All Rights Reserved. Designated trademarks and brands are the property of their respective owners.
Use of this web site constitutes acceptance of the Terms of Use and Privacy Policy.
EduVideo.org
I must be doing something terribly stupid here...
In the "Test Me Console" this code works:
However, in my PHP code, the following gets ALL the videos we've ever uploaded, as far as I can tell:
$client = KalturaClientHelper::getClient(KalturaSessionType::ADMIN);
return $client;
}
function get_videos(){
$client = client();
error_log($client->getKS());
$filter = new KalturaMediaEntryFilter();
#$filter->mediaTypeEqual = KalturaMediaType::VIDEO;
$fitler->userIdEqual = 'demo';
$pager = new KalturaFilterPager();
$pager->pageSize = 40;
$pager->pageIndex = max(1, isset($_REQUEST['page']) ? (int) $_REQUEST['page'] : 1);
#$matches = $client->baseEntry->listAction($filter, $pager);
$matches = $client->media->listAction($filter, $pager);
#$total = $matches->totalCount;
#$videos = $matches->objects;
#$usage = $client->partner->getUsage();
#error_log(print_r($usage, 1));
return $matches;
}
Obviously I've tried a few different things here, including:
baseEntry vs media (same output)
ADMIN vs USER (admin all, USER nothing)
$pager = null; (same output)
Any insights would be most appreciated!
Who changed my php.ini error_reporting back to default?!
E_NOTICE should be on!
I've lobbied the PHP Dev Group about this for years, to no avail.
Grrrrr.
Sorry for the noise.
simply small typo of variable name:
$fitler->userIdEqual = 'demo';
should be:
$filter->userIdEqual = 'demo';
sometimes the advantage of PHP's simplicity comes as a disadvantage I guess...