muteParticipant method
If you're the administrator of a room (that is, you created it and have access to the secret) you can mute or unmute individual participants.
roomId
unique numeric ID of the room to stop the forwarder from.
participantId
unique numeric ID of the participant.
mute
toggle mute status of the participant.
secret
admin secret should be provided if configured.
Implementation
Future<dynamic> muteParticipant(dynamic roomId, int participantId, bool mute,
{String? secret}) async {
var payload = {
"request": mute ? 'mute' : 'unmute',
"secret": secret,
"room": roomId,
"id": participantId
}..removeWhere((key, value) => value == null);
_handleRoomIdTypeDifference(payload);
JanusEvent response = JanusEvent.fromJson(await this.send(data: payload));
JanusError.throwErrorFromEvent(response);
return response.plugindata?.data;
}