# Javascript to detect mic on/off on physical headphone

**URL:** <https://devforum.zoom.us/t/javascript-to-detect-mic-on-off-on-physical-headphone/59635>\
**Category:** Web\
**Created:** [November 1, 2021, 12:47pm UTC](https://devforum.zoom.us/t/javascript-to-detect-mic-on-off-on-physical-headphone/59635 "2021-11-01T12:47:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robindra](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/robindra/32/32340_2.png) [@Robindra](https://devforum.zoom.us/u/Robindra)\
**Post date:** [November 1, 2021, 12:47pm UTC](https://devforum.zoom.us/t/javascript-to-detect-mic-on-off-on-physical-headphone/59635/1 "2021-11-01T12:47:16Z")

</div>

**Description**  
I have observed that in zoom meetings both in Desktop and Web, if any user off his/her mic on the physical device, the audio state remains on but audio sending stops. I just want to know is there any specific Web API that detects the physical mic on/off

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [November 3, 2021, 10:06pm UTC](https://devforum.zoom.us/t/javascript-to-detect-mic-on-off-on-physical-headphone/59635/2 "2021-11-03T22:06:31Z")

</div>

Hey @Robindra,

Thank you for reaching out to the Zoom Developer Forum. We do not have any out-of-the-box feature that would determine if a microphone is hardware muted.

On that same note, I don’t think that browsers have the ability, in most cases, to determine if the mic is hardware muted or there is a permissions error.

I hope that helps! Let me know if you have any questions.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![Robindra](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/robindra/32/32340_2.png) [@Robindra](https://devforum.zoom.us/u/Robindra)\
**Post date:** [November 17, 2021, 1:41pm UTC](https://devforum.zoom.us/t/javascript-to-detect-mic-on-off-on-physical-headphone/59635/3 "2021-11-17T13:41:37Z")

</div>

Hi @MaxM ,

Thanks for your update. I found that it works without any handling. The issue was it was not working in a specific case and I was testing on that case only. I will work and try to resolve the same.

We can close the thread.

Thanks!  
Robindra Singha

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [November 19, 2021, 8:56pm UTC](https://devforum.zoom.us/t/javascript-to-detect-mic-on-off-on-physical-headphone/59635/4 "2021-11-19T20:56:42Z")

</div>

Hey @Robindra,

I’m glad to hear that you have a path forward! I’ll go ahead and close this topic now but feel free to open a new topic if you encounter any further issues or questions.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [November 19, 2021, 8:56pm UTC](https://devforum.zoom.us/t/javascript-to-detect-mic-on-off-on-physical-headphone/59635/5 "2021-11-19T20:56:45Z")

</div>

Closed on November 19, 2021, 8:56pm UTC


