take method

Future<bool> take(
  1. int index, {
  2. bool isForce = false,
})

Assigns the audience to the seat with the specified index, where the index represents the seat number starting from 0.

Implementation

Future<bool> take(
  int index, {
  bool isForce = false,
}) async {
  ZegoLoggerService.logInfo(
    'take, index:$index',
    tag: 'audio room',
    subTag: 'controller.seat',
  );

  return await private.seatManager?.takeOnSeat(
        index,
        isForce: isForce,
        isUpdateOwner: true,
        isDeleteAfterOwnerLeft: true,
      ) ??
      false;
}