# Setting\_GetSpeakerList only returns 1 device

**URL:** <https://devforum.zoom.us/t/setting-getspeakerlist-only-returns-1-device/36637>\
**Category:** Electron\
**Created:** [November 21, 2020, 6:14pm UTC](https://devforum.zoom.us/t/setting-getspeakerlist-only-returns-1-device/36637 "2020-11-21T18:14:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![karens](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/karens/32/42121_2.png) [@karens](https://devforum.zoom.us/u/karens)\
**Post date:** [November 21, 2020, 6:14pm UTC](https://devforum.zoom.us/t/setting-getspeakerlist-only-returns-1-device/36637/1 "2020-11-21T18:14:54Z")

</div>

**Description**  
Setting\_GetSpeakerList function has a bug and only returns 1 speaker instead of all speakers.

**Which version?**  
v5.2.41762.1027

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

```auto
const zoomSettingAudio = zoomsetting.GetAudioSetting();
const speakerDevices = zoomSettingAudio.Setting_GetSpeakerList();
console.log('Speaker devices:', speakerDevices);

```

Returns while there are 3 speakers outputs:  
Speaker devices: {  
deviceName: ‘Headphones (DENON AH-GC20 Stereo)’,  
deviceId: ‘{0.0.0.00000000}.{aaafb99b-fd0a-43b1-967f-498d800fc35a}’,  
isSelected: false  
}

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

- Device: Dell
- OS: Windows 10

---

<div class="post-metadata">

**Author:** ![karens](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/karens/32/42121_2.png) [@karens](https://devforum.zoom.us/u/karens)\
**Post date:** [November 24, 2020, 10:04am UTC](https://devforum.zoom.us/t/setting-getspeakerlist-only-returns-1-device/36637/2 "2020-11-24T10:04:51Z")

</div>

We have found the bug in the sdk.  
The function has to use a `map` function instead of `forEach`

```auto
const mappedSpeakerList = speakerList.map(item => ({
  deviceName: item.deviceName,
  deviceId: item.deviceId,
  isSelected: item.isSelected
}));

```

Hope you will fix this issue in the next release. Same is the case for microphone and video devices.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [December 10, 2020, 11:35pm UTC](https://devforum.zoom.us/t/setting-getspeakerlist-only-returns-1-device/36637/3 "2020-12-10T23:35:20Z")

</div>

Hey @karens,

Thanks for using the dev forum!  
Thank you for bringing this to our attention. This will be fixed in the next release.

Michael
