Documentation
TalkingRoom Live Audio Room
Documentation
Demo APP
SDK Center
API Center
FAQ
Code Market
Console
Sign Up
Log In
中文站 English
  • Documentation
  • Live Audio Room
  • Guides
  • Manage audio

Manage audio

Last updated:2022-02-24 15:32

This document describes how to mute/unmute the microphone.


Prerequisites

  • Contact the ZEGO sales team or pre-sales engineer to configure the Live Audio Room (RTC + IM) service.
  • Refer to the Getting started to create a room and join a room.

Mute/Unmute the microphone

To mute the microphone, call the muteMic method, and set the isMuted property to true. To unmute the microphone, set it to false.

// The switch to control the microphone.
boolean isMuted = true;  // To mute the mircophone, set it to [true]. To unmute the microphone, set it to [false]. 
ZegoRoomManager.getInstance().speakerSeatService.muteMic(isMuted, new ZegoRoomCallback() 
{
   @Override
   public void roomCallback(int errorCode) {
   // This will be triggered when the microphone state changes.               
   }
});
Page Directory
  • Free trial
  • 提交工单
    咨询集成、功能及报价等问题
    电话咨询
    400 1006 604
    Get Consulting
    Scan Wechat QR code