Skip to main content
View as Markdown

Data & Credentials - Media Manager

Data & Credentials​

Filter by media type​

Control which media types are shown in the table using the filtersByType configuration within settings.context:

settings: {
context: {
type: 'myMedia',
filtersByType: {
allowDocuments: false,
allowVideo: true,
allowImage: true,
allowAudio: false,
},
},
}

Setting allowDocuments: true includes document types and makes the individual flags unnecessary.

Set page size​

settings: {
context: {
type: 'myMedia',
pageSize: 50,
},
}

Browse by category​

Instead of the flat "My Media" view, you can switch to a category-tree browser:

settings: {
context: {
type: 'category',
initialCategoryId: '12345',
},
}

Breadcrumbs can be added through the Header configuration (category context only).

Interceptors​

Interceptors allow modification of Kaltura API requests before they execute — helpful for scoping results by tags, categories, or other custom criteria:

settings: {
context: {
type: 'myMedia',
interceptors: {
preGetMediaList: (action) => {
action.filter.tagsMultiLikeAnd = 'published';
return action;
},
},
},
}

Each interceptor receives the action object and must return it (or a modified copy).

Available interceptors​

InterceptorContextDescription
preGetMediaListbothModify the media list query before it fires
preGetProcessingListbothModify the processing-entries query (polling for transcoding status)
preGetFolderscategory onlyModify the folder/category list query

Example: scope by tags in category mode​

settings: {
context: {
type: 'category',
initialCategoryId: '12345',
interceptors: {
preGetMediaList: (action) => {
action.filter.tagsMultiLikeAnd = 'approved';
return action;
},
preGetFolders: (action) => {
return action;
},
},
},
}

Rotate credentials​

When the KS expires or rotates while the page remains open:

runtime.updateSettings({ ks: newKs, partnerId });

Mounted visuals automatically remount to use the new credentials. In-flight uploads are preserved.

A functional form is also available:

runtime.updateSettings((current) => ({ ...current, ks: newKs }));