# LocalMedia Types

## LocalMediaState

| Property                               | Description                                             |
| -------------------------------------- | ------------------------------------------------------- |
| `currentCameraDeviceId?: string`       | ID of the selected camera device                        |
| `currentMicrophoneDeviceId?: string`   | ID of the selected microphone device                    |
| `currentSpeakerDeviceId?: string`      | ID of the selected speaker device                       |
| `cameraDeviceError: unknown`           | If there's an error with the selected camera device     |
| `cameraDevices: MediaDeviceInfo[]`     | List of available camera devices                        |
| `isSettingCameraDevice: boolean`       | True if camera is being set                             |
| `isSettingMicrophoneDevice: boolean`   | True if microphone is being set                         |
| `isStarting: boolean`                  | True if `localMedia` is starting                        |
| `localStream?: MediaStream`            | Local stream of the client                              |
| `microphoneDeviceError: unknown`       | If there's an error with the selected microphone device |
| `microphoneDevices: MediaDeviceInfo[]` | List of available microphone devices                    |
| `speakerDevices: MediaDeviceInfo[]`    | List of available speaker devices                       |
| `startError: unknown`                  | If there's an error starting local media                |


---

# Agent Instructions: 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:

```
GET https://docs.whereby.com/reference/core-sdk-reference/types/localmedia-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
