---
title: Data & Credentials
url: https://docs.kaltura.com/docs/embeddable-kaltura-products/media-manager/data
---


## Data & Credentials

### Filter by media type

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

```js
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

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

### Browse by category

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

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

Breadcrumbs can be added through the [Header](/docs/embeddable-kaltura-products/media-manager/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:

```js
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

| Interceptor | Context | Description |
|---|---|---|
| `preGetMediaList` | both | Modify the media list query before it fires |
| `preGetProcessingList` | both | Modify the processing-entries query (polling for transcoding status) |
| `preGetFolders` | `category` only | Modify the folder/category list query |

#### Example: scope by tags in category mode

```js
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:

```js
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:

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