kickParticipant method

Future kickParticipant(
  1. dynamic roomId,
  2. String username, {
  3. String? secret,
})

If you're the administrator of a room (that is, you created it and have access to the secret) you can kick out individual participant. roomId unique numeric ID of the room to stop the forwarder from.
username username of the participant to kick.
secret admin secret should be provided if configured.

Implementation

Future<dynamic> kickParticipant(dynamic roomId, String username,
    {String? secret}) async {
  var payload = {
    "request": "kick",
    "secret": secret,
    "room": roomId,
    "username": username
  }..removeWhere((key, value) => value == null);
  _handleRoomIdTypeDifference(payload);
  JanusEvent response = JanusEvent.fromJson(await this.send(data: payload));
  JanusError.throwErrorFromEvent(response);
  return response.plugindata?.data;
}