> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# WebRTCMediaDevices

> Subset of the MediaDevices interface actually used by the SDK.

Subset of the `MediaDevices` interface actually used by the SDK.

Implementations only need to provide these methods — the full browser
`MediaDevices` type is intentionally not required so that React Native
and other non-browser environments can conform without polyfilling
unused APIs.

## **Methods**

### addEventListener()

```ts
addEventListener(type, listener): void
```

#### Parameters

Event type to listen for.

Listener invoked when the event fires.

#### Returns

`void`

***

### enumerateDevices()

```ts
enumerateDevices(): Promise<MediaDeviceInfo[]>
```

#### Returns

`Promise<MediaDeviceInfo[]>`

***

### getDisplayMedia()?

```ts
optional getDisplayMedia(options): Promise<MediaStream>
```

#### Parameters

Options to pass to `getDisplayMedia`.

#### Returns

`Promise<MediaStream>`

***

### getUserMedia()

```ts
getUserMedia(constraints): Promise<MediaStream>
```

#### Parameters

Media-track constraints to pass to `getUserMedia`.

#### Returns

`Promise<MediaStream>`

***

### removeEventListener()

```ts
removeEventListener(type, listener): void
```

#### Parameters

Event type to listen for.

Listener invoked when the event fires.

#### Returns

`void`