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

# getDevicesWithPermissions

> getDevicesWithPermissions function in the WebRTC namespace.

### getDevicesWithPermissions

* `Const` **getDevicesWithPermissions**(`kind?`, `fullList?`): `Promise<MediaDeviceInfo[]>` — See [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/mediadeviceinfo) for more details.

Deprecated. Use [getDevices](/docs/browser-sdk/v3/js/reference/webrtc/get-devices) for better cross-browser compatibility.

After prompting the user for permission, returns an array of media input and output devices available on this machine. If `kind` is provided, only the devices of the specified kind are returned. Possible values for `kind` are `"camera"`, `"microphone"`, and `"speaker"`, which respectively correspond to [getCameraDevicesWithPermissions](/docs/browser-sdk/v3/js/reference/webrtc/get-camera-devices-with-permissions), [getMicrophoneDevicesWithPermissions](/docs/browser-sdk/v3/js/reference/webrtc/get-microphone-devices-with-permissions), and [getSpeakerDevicesWithPermissions](/docs/browser-sdk/v3/js/reference/webrtc/get-speaker-devices-with-permissions).

#### Parameters

**`kind`** `DevicePermissionName` — default: undefined

Filter for this device category.

---

**`fullList`** `boolean` — default: false

By default, only devices for which we have been granted permissions are returned. Pass `true` to obtain a list of devices regardless of permissions. Note that some values such as `name` and `deviceId` could be omitted.

---

#### Returns

`Promise<MediaDeviceInfo[]>`

#### Example

```javascript
await SignalWire.WebRTC.getDevicesWithPermissions("camera");
// [
//   {
//     "deviceId": "Rug5Bk...4TMhY=",
//     "kind": "videoinput",
//     "label": "HD FaceTime Camera",
//     "groupId": "Su/dzw...ccfnY="
//   }
// ]
```