# How to determine if audio is connected or not from SDK methods?

**URL:** <https://devforum.zoom.us/t/how-to-determine-if-audio-is-connected-or-not-from-sdk-methods/99356>\
**Category:** Web\
**Created:** [December 1, 2023, 2:25am UTC](https://devforum.zoom.us/t/how-to-determine-if-audio-is-connected-or-not-from-sdk-methods/99356 "2023-12-01T02:25:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bharat.bhadresha](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bharat.bhadresha/32/45714_2.png) [@bharat.bhadresha](https://devforum.zoom.us/u/bharat.bhadresha)\
**Post date:** [December 1, 2023, 2:25am UTC](https://devforum.zoom.us/t/how-to-determine-if-audio-is-connected-or-not-from-sdk-methods/99356/1 "2023-12-01T02:25:49Z")

</div>

Is there any method in the web SDK to ensure that audio is connected?

Also, Is there any method to connect audio automatically?

I read some previous communication posts where it was stated that this feature might be added.

---

<div class="post-metadata">

**Author:** ![amanda-recallai](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/amanda-recallai/32/44747_2.png) [@amanda-recallai](https://devforum.zoom.us/u/amanda-recallai)\
**Post date:** [December 1, 2023, 9:12am UTC](https://devforum.zoom.us/t/how-to-determine-if-audio-is-connected-or-not-from-sdk-methods/99356/2 "2023-12-01T09:12:12Z")

</div>

@bharat.bhadresha, are you running into an issue where you’re building a Zoom bot, and sometimes the audio is not connected?

If so, this is an issue we’ve encountered before as we use the Web SDK extensively to power our bots.

There isn’t a way to ensure the audio is connected through a regular SDK API, however it is possible to check the audio connection status by inspecting the DOM. The element names in the Zoom bottom-bar will change when the audio is connected, and it’s possible to detect if the audio is connected by inspecting that.

If you want to automatically connect audio, there are two options:

1. You can rely on the DOM again, and click the relevant buttons if you detect the audio is not connected.
2. It’s possible to set some internal configuration parameters in the Zoom Web SDK to have it automatically join audio when let in to the call, however this is not officially supported and requires more maintenance work as the patched code must be edited whenever you update the SDK version.

Another option is [Recall.ai](https://www.recall.ai/). It’s a simple 3rd party API that lets you use meeting bots to get the raw audio/video from meetings + output video/audio without you needing to spend months to build, scale and maintain these bots.  
Let me know if you have any questions!

---

<div class="post-metadata">

**Author:** ![bharat.bhadresha](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bharat.bhadresha/32/45714_2.png) [@bharat.bhadresha](https://devforum.zoom.us/u/bharat.bhadresha)\
**Post date:** [December 1, 2023, 9:38am UTC](https://devforum.zoom.us/t/how-to-determine-if-audio-is-connected-or-not-from-sdk-methods/99356/3 "2023-12-01T09:38:19Z")

</div>

Thank you @amanda-recallai

Will a mutation observer help in detection if audio is connected or not?

Also, Do you have any script which can be used for this detection?

---

<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:** [December 31, 2023, 7:38pm UTC](https://devforum.zoom.us/t/how-to-determine-if-audio-is-connected-or-not-from-sdk-methods/99356/4 "2023-12-31T19:38:40Z")

</div>

Closed on December 31, 2023, 7:38pm UTC

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