removeSpeaker method

Future<void> removeSpeaker(
  1. String userID, {
  2. bool showDialogConfirm = true,
})

Removes the speaker with the user ID userID from the seat.

Implementation

Future<void> removeSpeaker(
  String userID, {
  bool showDialogConfirm = true,
}) async {
  ZegoLoggerService.logInfo(
    'removeSpeaker, userID:$userID',
    tag: 'live audio',
    subTag: 'controller.seat',
  );

  final index = private.seatManager?.getIndexByUserID(userID) ?? -1;
  return private.seatManager?.kickSeat(
    index,
    showDialogConfirm: showDialogConfirm,
  );
}