# muteUserAudioLocally does not work and does not return error

**URL:** <https://devforum.zoom.us/t/muteuseraudiolocally-does-not-work-and-does-not-return-error/132080>\
**Category:** Web\
**Tags:** video-sdk\
**Created:** [April 29, 2025, 1:23am UTC](https://devforum.zoom.us/t/muteuseraudiolocally-does-not-work-and-does-not-return-error/132080 "2025-04-29T01:23:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev\_lxpead](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dev_lxpead/32/63797_2.png) [@dev\_lxpead](https://devforum.zoom.us/u/dev_lxpead)\
**Post date:** [April 29, 2025, 1:23am UTC](https://devforum.zoom.us/t/muteuseraudiolocally-does-not-work-and-does-not-return-error/132080/1 "2025-04-29T01:23:10Z")

</div>

I’m having trouble with the function to mute another user’s microphone locally (muteUserAudioLocally)

The implementation is like this:

```auto
handleMuteLocalMic = async (
    action: "start" | "stop",
    users: number | number[] | null
  ) => {
    console.log("MUTE MIC LOCALLY", users);
    if (!users || !this.stream) return;
    if (Array.isArray(users)) {
      for (const id of users) {
        if (action === "start") {
          this.stream.muteUserAudioLocally(id);
        } else {
          this.stream.unmuteUserAudioLocally(id);
        }
      }
    } else {
      if (action === "start") {
        this.stream.muteUserAudioLocally(users);
      } else {
        this.stream.unmuteUserAudioLocally(users);
      }
    }
  };

```

However, the user who turned off the others’ microphone continues to hear everyone and no error is returned.

---

<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 29, 2025, 6:25am UTC](https://devforum.zoom.us/t/muteuseraudiolocally-does-not-work-and-does-not-return-error/132080/2 "2025-04-29T06:25:32Z")

</div>

Hey @dev_lxpead

Thanks for your feedback.

Could you share some problematic session IDs with us for troubleshooting purposes?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![dev\_lxpead](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dev_lxpead/32/63797_2.png) [@dev\_lxpead](https://devforum.zoom.us/u/dev_lxpead)\
**Post date:** [April 29, 2025, 2:20pm UTC](https://devforum.zoom.us/t/muteuseraudiolocally-does-not-work-and-does-not-return-error/132080/3 "2025-04-29T14:20:30Z")

</div>

Follows the id of a session: 680bb0c6668f2ceaeb2dc32a  
Do I need to leave it open so they can use it or can you proceed with just the ID?

Complementing some information:

[Video SDK](https://developers.zoom.us/docs/video-sdk) version: 1.12.5  
React version: 18  
Next JS version: 14.2.2  
OS: Windows 11  
Browser: Google Chrome  
Browser Version 129.0.6668.70 (Official Build) (64 bits)

---

<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 30, 2025, 12:40am UTC](https://devforum.zoom.us/t/muteuseraudiolocally-does-not-work-and-does-not-return-error/132080/4 "2025-04-30T00:40:59Z")

</div>

Hi @dev_lxpead

> 680bb0c6668f2ceaeb2dc32a

It seems this is the session topic, not the session ID. You can get the session ID using `client.getSessionInfo().sessionId` or from the web portal under the Dashboard.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![dev\_lxpead](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dev_lxpead/32/63797_2.png) [@dev\_lxpead](https://devforum.zoom.us/u/dev_lxpead)\
**Post date:** [May 2, 2025, 3:33pm UTC](https://devforum.zoom.us/t/muteuseraudiolocally-does-not-work-and-does-not-return-error/132080/5 "2025-05-02T15:33:21Z")

</div>

Sorry, here is the correct session ID:  
[680bb0c6668f2ceaeb2dc32a](https://www.zoom.us/account/metrics/dashboard/home/#/liveMeetings/detail/mZb5Yv1NQs%2Btxd3P3SYtMg%3D%3D)

mZb5Yv1NQs+txd3P3SYtMg==

---

<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:** [May 6, 2025, 7:39am UTC](https://devforum.zoom.us/t/muteuseraudiolocally-does-not-work-and-does-not-return-error/132080/6 "2025-05-06T07:39:22Z")

</div>

Hi @dev_lxpead

> mZb5Yv1NQs+txd3P3SYtMg==

After analyzing the logs, we found that the `mute audio locally` function was not actually called. Did you invoke it before the remote user started their audio? Currently, doing so will not take effect.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![dev\_lxpead](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dev_lxpead/32/63797_2.png) [@dev\_lxpead](https://devforum.zoom.us/u/dev_lxpead)\
**Post date:** [May 6, 2025, 2:06pm UTC](https://devforum.zoom.us/t/muteuseraudiolocally-does-not-work-and-does-not-return-error/132080/7 "2025-05-06T14:06:51Z")

</div>

Thanks for the feedback!  
I’m checking why it didn’t appear in the log for you. When I test again by displaying what is being executed in the console, I see the function being called. I’ll leave attachments showing this.  
The function is like this:

```auto
handleMuteLocalMic = async (
    action: "start" | "stop",
    users: number | number[] | null
  ) => {
    if (!users || !this.stream) return;
    console.log("MUTE MIC LOCALLY 1", users);
    // await this.stream.muteAllUserAudioLocally();
    if (Array.isArray(users)) {
      console.log("MUTE MIC LOCALLY 2", users);
      for (const id of users) {
        if (action === "start") {
          await this.stream.adjustUserAudioVolumeLocally(id, 0);
          let a = await this.stream.muteUserAudioLocally(id);
          console.log('START a', a);
        } else {
          let b = await this.stream.unmuteUserAudioLocally(id);
          console.log('STOP b', b);
        }
      }
    } else {
      if (action === "start") {
        await this.stream.adjustUserAudioVolumeLocally(users, 0);
        let c = await this.stream.muteUserAudioLocally(users);
        console.log('START c', c);
      } else {
        let d = await this.stream.unmuteUserAudioLocally(users);
        console.log('STOP d', d);
      }
    }
  };

```

We adapted it to also call adjustUserAudioVolumeLocally as an alternative, but it also didn’t work as if it wasn’t being called.

As shown in the prints, the console returns no error when executing the functions.

 ![Captura de tela 2025-05-06 110226](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/0/a/0ac5922e76b3b4e2963771f857fcb8913bf2aeaa.png)  
 ![Captura de tela 2025-05-06 110134](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/b/8bd46774b542b44dc96d715123c097fdc62227db.png)

 ![Captura de tela 2025-05-06 110201](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/5/5/555e5445335df7fb426f0ee078d5df8ee0d70e51.png)  
 ![Captura de tela 2025-05-06 110043](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/6/d6bc21c793888550e0bb5dca7df9e73b8e40720f.png)

This test was done in this session:  
[680bb0c6668f2ceaeb2dc32a](https://www.zoom.us/account/metrics/dashboard/home/#/liveMeetings/detail/hsnGtmLFQ%2FWSkXyv1EP9BQ%3D%3D)

hsnGtmLFQ/WSkXyv1EP9BQ==

---

<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:** [May 7, 2025, 3:32am UTC](https://devforum.zoom.us/t/muteuseraudiolocally-does-not-work-and-does-not-return-error/132080/8 "2025-05-07T03:32:11Z")

</div>

Hi @dev_lxpead

> hsnGtmLFQ/WSkXyv1EP9BQ==

Since I can’t see the parameters passed to the `stream.muteUserAudioLocally` method, could you confirm whether `stream.muteUserAudioLocally` is intended for **a remote user** instead of the self user?

I tested it using the same browser and Video SDK version, and it worked as expected.

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 7, 2026, 3:32am UTC](https://devforum.zoom.us/t/muteuseraudiolocally-does-not-work-and-does-not-return-error/132080/9 "2026-05-07T03:32:29Z")

</div>

Closed on May 7, 2026, 3:32am UTC

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