> For the complete documentation index, see [llms.txt](https://docs.whereby.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.whereby.com/reference/camera-effects-reference/api-reference/getusablepresets.md).

# getUsablePresets

Camera effects are controlled through helpers and room-connection actions exposed by `@whereby.com/core` and `@whereby.com/browser-sdk/react`. You don't need to import `@whereby.com/camera-effects` directly.

### getUsableCameraEffectPresets

```jsx
import { getUsableCameraEffectPresets } from "@whereby.com/core";
// or: from "@whereby.com/browser-sdk/react"

const presets = await getUsableCameraEffectPresets();
```

`getUsableCameraEffectPresets(): Promise<string[]>`

Returns the list of camera effect preset ids that are usable in the current browser. The camera effects code is loaded on demand the first time this is called. Pass one of the returned ids to the `switchCameraEffect` action to apply it.

### Room connection actions

The following actions are available on the `RoomConnectionClient` (Core) and in the `actions` object returned by `useRoomConnection`:

| Action                     | Parameters           | Returns         | Description                                                                             |
| -------------------------- | -------------------- | --------------- | --------------------------------------------------------------------------------------- |
| `switchCameraEffect`       | `(effectId: string)` | `Promise<void>` | Enable a camera effect. Use `getUsableCameraEffectPresets()` to get a valid `effectId`. |
| `switchCameraEffectCustom` | `(imageUrl: string)` | `Promise<void>` | Enable a camera effect that uses a custom image (from the given URL) as the background. |
| `clearCameraEffect`        |                      | `Promise<void>` | Disable the active camera effect.                                                       |

{% hint style="info" %}
For advanced, low-level use you can still install and import `@whereby.com/camera-effects` directly. Its `getUsablePresets()` function is what `getUsableCameraEffectPresets()` wraps.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.whereby.com/reference/camera-effects-reference/api-reference/getusablepresets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
