> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperwisor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WebRTC Camera

> Publish a live camera stream over WebRTC from the dashboard.

<Info>
  **Category:** Controls · **Publishes:** a WebRTC stream · **Pairs with:** WebRTC Viewer
</Info>

## Mental model

A **WebRTC Camera is a live broadcast source.** It publishes a real-time video
stream that a [WebRTC Viewer](/dashboard/widgets/display) elsewhere can watch —
low-latency, peer-to-peer.

## When to use it

* Stream from a device or the viewing device's camera
* Build a live monitoring or two-way video experience

## Settings

### General

* **Widget Title / ID**
* **Camera ID** · **Room name** — stream identity
* **Server URL** — the WebRTC signaling server
* **Preferred camera** — front / back / specific device

### Behavior

* **Auto connect** · **Auto stream** — start automatically
* **Enable audio** — include the microphone

### Triggers

| Event      | Fires when                                                |
| ---------- | --------------------------------------------------------- |
| `loaded`   | The stream is ready                                       |
| `error`    | Connection/stream error                                   |
| *(common)* | `load`, `ready`, `destroy`, `update`, `visible`, `hidden` |

## Related

Pair it with a **WebRTC Viewer** (same room name) to watch the stream on another
dashboard.

## Script API example

The same interactions from a [dashboard script](/script/overview):

```js theme={null}
widget.on('cam', 'loaded', () => widget.setText('camStatus', 'Live'));
widget.on('cam', 'error',  () => widget.setText('camStatus', 'Stream error'));
```

<Card title="WebRTC Viewer" icon="video" href="/dashboard/widgets/display">
  The counterpart that displays the stream.
</Card>
