kickParticipant method

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

kickParticipant

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.
participantId unique numeric ID of the participant.
secret admin secret should be provided if configured.

Implementation

Future<dynamic> kickParticipant(dynamic roomId, int participantId, {String? secret}) async {
  var payload = {"request": "kick", "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;
}