* @param itemButton: 点击的button
* @param status: button状态
- (void)gameRoomBottomView:(GameRoomBottomView *_Nonnull)gameRoomBottomView
itemButton:(GameRoomItemButton *_Nullable)itemButton
didSelectStatus:(GameRoomBottomStatus)status {
if (status == GameRoomBottomStatusList ||
status == GameRoomBottomStatusListRed) {
__weak __typeof(self) wself = self;
[self.userListComponents show:^{
[wself restoreBottomViewMenuStatus];
} else if (status == GameRoomBottomStatusRaiseHand) { //点击举手
__weak __typeof(self) wself = self;
[GameRTSManager raiseHandsMicWithBlock:^(RTMACKModel * _Nonnull model) {
[[ToastComponent shareToastComponent] showWithMessage:@"上麦请求已发出,请耐心等待"];
[wself.bottomView updateButtonStatus:GameRoomBottomStatusRaiseHand close:YES];
[wself checkMicrophoneSystemAuthority];
[[ToastComponent shareToastComponent] showWithMessage:@"操作失败,请重试"];
} else if (status == GameRoomBottomStatusMic) {
[SystemAuthority authorizationStatusWithType:AuthorizationTypeAudio block:^(BOOL isAuthorize) {
if (itemButton.status == ButtonStatusNone) {
[GameRTSManager muteMic];
[[GameRTCManager shareRtc] muteLocalAudioStream:YES];
[GameRTSManager unmuteMic];
[[GameRTCManager shareRtc] muteLocalAudioStream:NO];
itemButton.status = itemButton.status == ButtonStatusNone ? ButtonStatusActive : ButtonStatusNone;
} else if (status == GameRoomBottomStatusVolume) {
[self.volumeComponents show];
} else if (status == GameRoomBottomStatusData) {
[self.paramComponents show];
} else if (status == GameRoomBottomStatusDownHand) { //点击下麦
AlertActionModel *alertModel = [[AlertActionModel alloc] init];
alertModel.title = @"确定";
AlertActionModel *cancelModel = [[AlertActionModel alloc] init];
cancelModel.title = @"取消";
__weak __typeof(self) wself = self;
[[AlertActionManager shareAlertActionManager] showWithMessage:@"是否确认下麦?" actions:@[cancelModel, alertModel]];
alertModel.alertModelClickBlock = ^(UIAlertAction * _Nonnull action) {
if ([action.title isEqualToString:@"确定"]) {
[GameRTSManager offSelfMicWithBlock:^(RTMACKModel * _Nonnull model) {
[wself sendDownloadHand];
[[ToastComponent shareToastComponent] showWithMessage:@"操作失败,请重试"];
* @param userModel: 选中user的model
* @param dataLists: 对应的用户列表
- (void)updateTableViewWithModel:(GameControlUserModel *)userModel dataLists:(NSArray<GameControlUserModel *> *)dataLists {
if (userModel.user_status == 0) {
[GameRTSManager inviteMic:userModel.user_id block:^(RTMACKModel * _Nonnull model) {
[[ToastComponent shareToastComponent] showWithMessage:@"操作失败,请重试"];
} else if (userModel.user_status == 1) {
__weak __typeof(self)wself = self;
[GameRTSManager agreeMic:userModel.user_id block:^(RTMACKModel * _Nonnull model) {
userModel.user_status = 2;
[wself updateDataLists:dataLists model:userModel];
[[ToastComponent shareToastComponent] showWithMessage:@"操作失败,请重试"];
} else if (userModel.user_status == 2) {
AlertActionModel *alertModel = [[AlertActionModel alloc] init];
alertModel.title = @"确定";
AlertActionModel *cancelModel = [[AlertActionModel alloc] init];
cancelModel.title = @"取消";
[[AlertActionManager shareAlertActionManager] showWithMessage:@"是否将该用户下麦?" actions:@[cancelModel, alertModel]];
__weak __typeof(self) wself = self;
alertModel.alertModelClickBlock = ^(UIAlertAction * _Nonnull action) {
if ([action.title isEqualToString:@"确定"]) {
[GameRTSManager offMic:userModel.user_id block:^(RTMACKModel * _Nonnull model) {
[wself removeDataLists:dataLists model:userModel];
[[ToastComponent shareToastComponent] showWithMessage:@"操作失败,请重试"];
* @param userModel: 对应user的model
- (void)receivedRaiseHandSucceedWithUser:(GameControlUserModel *)userModel {
[self.roomView audienceRaisedHandsSuccess:userModel];
[self.userListComponents update];
if ([userModel.user_id isEqualToString:[LocalUserComponent userModel].uid]) {
GameControlUserModel *localUser = [self currentLoginuserModel];
localUser.user_status = 2;
localUser.is_mic_on = YES;
[self.bottomView updateBottomLists:[self getBottomListsWithModel:localUser]];
[[ToastComponent shareToastComponent] showWithMessage:@"您已成功上麦"];
[[GameRTCManager shareRtc] makeCoHost:YES];
[[GameRTCManager shareRtc] muteLocalAudioStream:NO];
[self checkMicrophoneSystemAuthority];