# Trouble Muting Audio Without Delay

**URL:** <https://devforum.zoom.us/t/trouble-muting-audio-without-delay/108337>\
**Category:** Video SDK\
**Created:** [April 21, 2024, 7:33am UTC](https://devforum.zoom.us/t/trouble-muting-audio-without-delay/108337 "2024-04-21T07:33:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![harshit.bhatt](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/harshit.bhatt/32/58396_2.png) [@harshit.bhatt](https://devforum.zoom.us/u/harshit.bhatt)\
**Post date:** [April 21, 2024, 7:33am UTC](https://devforum.zoom.us/t/trouble-muting-audio-without-delay/108337/1 "2024-04-21T07:33:40Z")

</div>

**Video SDK Type and Version**  
Video SDK 1.10.8 for Web

**Description**  
I need to mute my `MeetingUserRole.participant` role upon joining. But muting does not work without sleep for at least a second. This is a major problem since the meeting can be disturbed by the mic of such users for one second.

```auto
async setupAudio() {
		switch (this.myRole) {
			case MeetingUserRole.superHost:
				await this.startAudio();
				store.dispatch(Zoom.startUserMic(this.myProviderId));
				break;
			case MeetingUserRole.host:
				await this.startAudio();
				await this.stream.muteAudio();
				break;
			case MeetingUserRole.participant:
				await this.startAudio();
				await sleep(1000); // Without sleeping, mute using below function does not work
				await this.stream.muteAudio();
				break;
			default:
				break;
		}
	}

```

**Error?**  
No errors in the console.

**Troubleshooting Routes**  
I have tried the same in sample app ([GitHub - zoom/videosdk-web-sample: Zoom Video SDK web sample](https://github.com/zoom/videosdk-web-sample)). Does not work.

---

<div class="post-metadata">

**Author:** ![harshit.bhatt](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/harshit.bhatt/32/58396_2.png) [@harshit.bhatt](https://devforum.zoom.us/u/harshit.bhatt)\
**Post date:** [April 21, 2024, 7:36am UTC](https://devforum.zoom.us/t/trouble-muting-audio-without-delay/108337/2 "2024-04-21T07:36:52Z")

</div>

Please see if you can help here @vic.yang

---

<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 22, 2024, 2:35am UTC](https://devforum.zoom.us/t/trouble-muting-audio-without-delay/108337/3 "2024-04-22T02:35:24Z")

</div>

Hey @harshit.bhatt

Thanks for your feedback.

In the `stream.startAudio` method, we provide a `mute` option, which allows joining the audio with the microphone muted.

> **[AudioOption | Zoom Video SDK for Web - 1.10.8](https://marketplacefront.zoom.us/sdk/custom/web/interfaces/AudioOption.html#mute)**
>
> Documentation for Zoom Video SDK for Web - 1.10.8

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![harshit.bhatt](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/harshit.bhatt/32/58396_2.png) [@harshit.bhatt](https://devforum.zoom.us/u/harshit.bhatt)\
**Post date:** [April 22, 2024, 3:11am UTC](https://devforum.zoom.us/t/trouble-muting-audio-without-delay/108337/4 "2024-04-22T03:11:44Z")

</div>

Thanks, that solved it. Now I feel dumb 🙂
