Hi there,
is there some way to show the download button below the video through API? The download button shows when you edit video and under download tab choose available formats low, medium, or high. I found something like KalturaFlavorParams but can’t figure out where that UI information about download button is.
Thanks a lot,
Zbynek
Hi,
The download button is implemented as a plugin in the player.
Easiest way to add it is to go to the KMC->Studio->Your Player->plugins and check the “download” plugin.
The Kaltura HTML5 player configuration is a JSON file and the Studio will update it for you accordingly.
You can also do the same using the uiconf.update() API is you have a lot of players to update.
Also, for general info about the player API and configuration see:
https://vpaas.kaltura.com/documentation/Web-Video-Player/
Hi Jess,
is there some way to control showing the download button through Kaltura rest api? We found on KMC on mediaentry details page “Entry Additional Info” and “downloamedia” key with values that match some of the flavorParamsIds (screenshot attached).
Thanks,
Zbynek
You can use something like the below…
In this particular case
echo ( $result."\n");
will output the source URL because the filter is:
$filter->tagsLike = ‘source’;
You can of course, select different filters but it is better to simply use the player download plugin instead. Is there a reason why you would rather not?
<?php
if ($argc < 4){
echo "\nUsage: ".$argv[0] . ' <partner id> <admin secret> <service url>'."\n\n";
exit (1);
}
require_once('/opt/kaltura/web/content/clientlibs/php5/KalturaClient.php');
$userId = null;
$expiry = null;
$privileges = null;
$partnerId=$argv[1];
$secret = $argv[2];
$type = KalturaSessionType::ADMIN;
$config = new KalturaConfiguration($partnerId);
$config->serviceUrl = $argv[3];
$client = new KalturaClient($config);
$ks = $client->session->start($secret, $userId, $type, $partnerId, $expiry, $privileges);
$client->setKs($ks);
$filter=null;
$total_media_entries = $client->media->count($filter);
$pager = new KalturaFilterPager();
$page_index=1;
$pager->pageSize = 500;
$processed_entries=0;
while ($processed_entries < $total_media_entries){
$pager->pageIndex=$page_index;
$result = $client->media->listAction($filter, $pager);
foreach ($result->objects as $entry) {
$filter = new KalturaAssetFilter();
$filter->entryIdEqual = $entry->id;
$filter->tagsLike = 'source';
$pager = null;
$result = $client->flavorAsset->listAction($filter, $pager);
if(isset($result->objects[0]->id)){
$result = $client->flavorAsset->geturl($result->objects[0]->id, null, null, null);
}
if(is_string($result)){
echo ( $result."\n");
}
$processed_entries++;
}
$page_index++;
}