Creating playlists for courses within KAF using API

I am attempting to publish recordings from our home-grown lecture-capture system to make them available within a Blackboard course that is using the Kaltura plugin, which interacts via the KAF.

I believe I am most of the way through publishing these files to the media gallery, but that does not seem like a very organized way for students to access the files (especially as these classes will have both manually created content as well as automatically published lecture-captures), so I am investigating whether I can publish these files to a playlist available under the Blackboard course.

When I look at a playlist created from within Blackboard, I see it shows up under the category Blackboard_KAF>playlists; however of course creating a new playlist under that same category is not sufficient to link it to the class; and dumping a Playlist object retrieved through the API doesn’t show any identifiers that I can see associate it with the class (the userId and creatorId appear as ‘kmsInternalChannelPlaylistUser’.

Is there a way to programatically create a playlist, associate it with a KAF-linked course, and determine that course association via the API?

Thank you!
-Matthew

Hi @matthewf-ucsd,

I am not involved in the Blackboard integration so I am not sure how it works but here is a thread where I explain how channel playlists work in Kaltura MediaSpace [KMS]:

I believe it works in a similar manner with Blackboard. I will ask one of the developers on that team but in the meantime, can you look at a playlist created via Blackboard and check the metadata and categoryEntry objects associated with it? This way, you’ll be able to quickly see whether it works the same way or not.

Ah, I think that link has pointed me in the right direction - the category created for the course under Blackboard_KAF>site>channels>[Blackboard Course ID] has metadata ‘channelPlaylistsIds’, whose value is the ID of the playlist. So (with the PHP client - putting out my example since I don’t find any that works with the current client):

$mdService = MetadataPlugin::get($client)->getMetadataService();

$mF = new MetadataFilter();
$mF->objectIdEqual = $cat->id;
$mF->metadataObjectTypeEqual = 2;
$md = $mdService->listAction($mF);

So it looks like, to check if a playlist is present:

foreach($md->objects as $data)
	{
	$mdSet = new \SimpleXMLElement($data->xml);
	foreach($mdSet->Detail as $mdItem)
		{
		if($mdItem->Key == 'channelPlaylistsIds')
			{
			print("Found playlists for channel: " . $mdItem->Value. "\n");
			}
		}
	}

Otherwise modify the XML by adding a Detail element with the new playlist, and calling $mdService->update on an updated Metadata object.

Hi @matthewf-ucsd,

That’s correct.
The requests in my original post are in pure HTTP form since we have clients for multiple languages and I wanted the post to be beneficial to as many people as possible.

You can generate the code samples for making each such request with your client by going to developer.kaltura.com and typing the SERVICE.ACTION in the search box and then clicking on “Try it out”.
I see from your example above that you are using the PHP client that supports namespaces [Kaltura has 3 separate PHP clients as you can see here: https://developer.kaltura.com/api-docs/Client_Libraries] for which we do not have an automatic code generator but we do have one for the other PHP client which can help you better understand what requests need to be made.
There is a step by step tutorial for using the metadata services here:
https://developer.kaltura.com/workflows/Enrich_and_Organize_Metadata/Working_with_metadata

Do let me know if you have additional questions,

Hi @matthewf-ucsd,
Just want to make sure we’re good?

Thanks,

Thanks for checking in. I have been occupied by other projects, but hopefully will be able to spend time on this again today, and this does sound very helpful.

It looks like I reached an older, less useful version of the client library and test console when I googled “Kaltura client libraries” (http://www.kaltura.com/api_v3/testme/client-libs.php), although at least the packages are the same.

Thanks!
-Matthew