[SOLVED] Setting a KalturaEntryFilter to retrieve only specific media types

2 replies [Last post]
Joined: 05/20/2009
Points: 6

I want to query the system to get all my entries which are either videos, images or audios.

In the following code it's quite easy to select only one media type but how to select multiple ones ?

$K_filter = new KalturaEntryFilter();
$K_filter->equalMediaType = KalturaEntryMediaType::VIDEO;

Any help would be appreciated.

Thanks.

Joined: 02/22/2009
Points: 32

You can use inMediaType

$types = array (KalturaEntryMediaType::VIDEO, KalturaEntryMediaType::IMAGE, KalturaEntryMediaType::AUDIO);
$K_filter->inMediaType = implode(","$types);
Joined: 05/20/2009
Points: 6

Tested and integrated !

This works perfectly.

Thanks.