# ZoomVideo.getDevices() fails with Requested device not found when no user Video Inputs Available

**URL:** <https://devforum.zoom.us/t/zoomvideo-getdevices-fails-with-requested-device-not-found-when-no-user-video-inputs-available/107058>\
**Category:** Web\
**Created:** [April 3, 2024, 4:03am UTC](https://devforum.zoom.us/t/zoomvideo-getdevices-fails-with-requested-device-not-found-when-no-user-video-inputs-available/107058 "2024-04-03T04:03:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tejn2000](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tejn2000/32/58215_2.png) [@tejn2000](https://devforum.zoom.us/u/tejn2000)\
**Post date:** [April 3, 2024, 4:03am UTC](https://devforum.zoom.us/t/zoomvideo-getdevices-fails-with-requested-device-not-found-when-no-user-video-inputs-available/107058/1 "2024-04-03T04:03:09Z")

</div>

**Description**  
In the preview of my application, whenever I call the “ZoomVideo.getDevices()” function and the user has no available video input device on their system, the invocation fails and returns with the following error “DOMException: Requested device not found”. Even if the user has an audio input device and audio output devices on their system, but they do not have a video device, the entire function call fails. Please advise on what I can do to fix this issue I have with my users on this application that do not have video input devices. Thank you, all advice is appreciated!

**Browser Console Error**  
DOMException: Requested device not found

**Which Web Video SDK version?**  
1.10.8

**Video SDK Code Snippets**

```
ZoomVideo.getDevices().then((devices) => {

  let videoinputs = devices.filter((device) => {
    return device.kind === 'videoinput'
  })

  let audioinputs = devices
  .filter((device, index) => index !== 0 && device.kind === 'audioinput')
  .map((device) => {
    return device;
  });

  let audiooutputs = devices
  .filter((device, index) => index !== 0 && device.kind === 'audioinput')
  .map((device) => {
    return device;
  });
  
}).catch((error) => {
  if (error.name === 'NotAllowedError') {
    console.error('Devices permission denied');
  } else {
    console.error('Error getting devices:', error);
  }
})

```

**Screenshots**  
If applicable, add screenshots to help explain your problem.

**Device (please complete the following information):**

- Device: Macbook Pro M1
- OS: macOS Sonoma 14.4.1
- Browser: Chrome
- Browser Version : Version 123.0.6312.87 (Official Build) (arm64)

---

<div class="post-metadata">

**Author:** ![tejn2000](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tejn2000/32/58215_2.png) [@tejn2000](https://devforum.zoom.us/u/tejn2000)\
**Post date:** [April 3, 2024, 4:08am UTC](https://devforum.zoom.us/t/zoomvideo-getdevices-fails-with-requested-device-not-found-when-no-user-video-inputs-available/107058/2 "2024-04-03T04:08:10Z")

</div>

If possible, I would like to suggest a change to this function such that if there is no video input available from the user, the function still returns the devices (microphones and speakers). Thank you. As a work around solution I have resorted to using navigator.mediaDevices.enumerateDevices().

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [April 3, 2024, 5:19am UTC](https://devforum.zoom.us/t/zoomvideo-getdevices-fails-with-requested-device-not-found-when-no-user-video-inputs-available/107058/3 "2024-04-03T05:19:04Z")

</div>

Hey @tejn2000

Thank you for your suggestion. We will improve this method in the next version.

Additionally, your recommendation to utilize `navigator.mediaDevices.enumerateDevices()` to retrieve devices is a valuable solution.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 3, 2024, 3:19pm UTC](https://devforum.zoom.us/t/zoomvideo-getdevices-fails-with-requested-device-not-found-when-no-user-video-inputs-available/107058/4 "2024-05-03T15:19:35Z")

</div>

Closed on May 3, 2024, 3:19pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
