async toggleAudio(isOn: boolean) {
if (!this.mediaStream$) return;
this.isMicOn = isOn;
if (isOn) {
if (!this.audioStarted) {
await this.mediaStream$.startAudio({ originalSound: true });
this.audioStarted = false;
} else {
await this.mediaStream$.unmuteAudio(
this.videoClient$.getCurrentUserInfo().userId
);
}
return;
}
await this.mediaStream$.muteAudio(
this.videoClient$.getCurrentUserInfo().userId
);
}
i have this code snippet, tried everything, the problem is that microphone indicator is still visible while i am muting user, if i use stopAudio i can not hear participant sound. what method should i use?