Skip to main content
Version: 1.1.x

Mic Controls - Flutter

Whenever any participant wants to start / stop broadcasting their audio to other participant in room, they can simply do it with VideoSDK room.

This guide will provide an overview of how to use enable and disable Mic in a room.

  1. Enable Mic - By using unmuteMic() function, a participant can publish audio to other participants.
  2. Disable Mic - By using muteMic() function, a participant can stop publishing audio to other participants.
  3. Change Mic - By using changeMic() function, a participant can change mic.

Enable, Disable, Change Mic

ElevatedButton(
onPressed: room.unmuteMic,
child: Text("unmuteMic"),
),
ElevatedButton(
onPressed: room.muteMic,
child: Text("muteMic"),
),

// changeMic() method is coming soon in flutter.

Events

Events associated with unmuteMic():

Events associated with muteMic():

participant.on(Events.streamEnabled, (Stream stream){
if (stream.kind === "audio") {
//particiapnt turned on audio
}
});
participant.on(Events.streamDisabled, (Stream stream){
if (stream.kind === "audio") {
//particiapnt turned off audio
}
});

Got a Question? Ask us on discord