Commit aebc6e3b by pierce

修复连麦不稳定容易自动被下的问题

parent 69a06fa0
...@@ -910,7 +910,9 @@ ...@@ -910,7 +910,9 @@
return; return;
} }
[FUSLinkMicroHttpHelper fus_replyLinkedMicroWithChannelId:self.channelId roomId:self.roomId status:buttonIndex success:nil failure:^(NSString * _Nonnull msg, int code) { [FUSLinkMicroHttpHelper fus_replyLinkedMicroWithChannelId:self.channelId roomId:self.roomId status:buttonIndex success:^{
[self fus_anchorAllowLinkMicOrYouAcceptLinkMic];
} failure:^(NSString * _Nonnull msg, int code) {
[FUSDialogView fus_showDialog:msg]; [FUSDialogView fus_showDialog:msg];
}]; }];
}]; }];
...@@ -1049,7 +1051,7 @@ ...@@ -1049,7 +1051,7 @@
[FUSDialogView fus_showDialog:[NSString fus_localString:@"连麦成功"]]; [FUSDialogView fus_showDialog:[NSString fus_localString:@"连麦成功"]];
[self.linkMicAgoraHelper fus_openMicro]; [self.linkMicAgoraHelper fus_openMicro];
} }
[self fus_anchorAllowLinkMicOrYouAcceptLinkMic];
}else{ }else{
[FUSDialogView fus_showDialog:[NSString fus_localString:@"主播拒绝了上麦申请,请稍后再试"]]; [FUSDialogView fus_showDialog:[NSString fus_localString:@"主播拒绝了上麦申请,请稍后再试"]];
[self.linkMicAgoraHelper fus_closeMicro]; [self.linkMicAgoraHelper fus_closeMicro];
...@@ -1176,6 +1178,24 @@ ...@@ -1176,6 +1178,24 @@
} failure:nil]; } failure:nil];
} }
}else{
// 后台说:没有移除中的状态,主播点了移除不管对方是否有真正退出频道成功,都算已经移除
// [FUSLinkMicroHttpHelper fus_stopLinkedMicroWithChannelId:self.channelId roomId:self.roomId type:@"1" success:^{
// [FUSDialogView fus_showDialog:@"上报闭麦成功!"];
// } failure:^(NSString * _Nonnull msg, int code) {
// [FUSDialogView fus_showDialog:msg];
// }];
}
[_models removeObject:_emptyModel];
[self fus_updateHeaderViewSizeWithModels:_models remove:YES];
}
/// 主播同意了你的连麦申请
/// 或者
/// 你接受了主播的连麦申请
- (void)fus_anchorAllowLinkMicOrYouAcceptLinkMic {
__weak typeof(self) weakSelf = self;
[FUSLinkMicroHttpHelper fus_startReportLinkedMicroWithChannelId:self.channelId roomId:self.roomId status:@"1" success:^{ [FUSLinkMicroHttpHelper fus_startReportLinkedMicroWithChannelId:self.channelId roomId:self.roomId status:@"1" success:^{
if (FUSConfig.sharedInstanced.devConfigs.enableTestCode) { if (FUSConfig.sharedInstanced.devConfigs.enableTestCode) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
...@@ -1194,17 +1214,6 @@ ...@@ -1194,17 +1214,6 @@
} failure:^(NSString * _Nonnull msg, int code) { } failure:^(NSString * _Nonnull msg, int code) {
[FUSDialogView fus_showDialog:msg]; [FUSDialogView fus_showDialog:msg];
}]; }];
}else{
// 后台说:没有移除中的状态,主播点了移除不管对方是否有真正退出频道成功,都算已经移除
// [FUSLinkMicroHttpHelper fus_stopLinkedMicroWithChannelId:self.channelId roomId:self.roomId type:@"1" success:^{
// [FUSDialogView fus_showDialog:@"上报闭麦成功!"];
// } failure:^(NSString * _Nonnull msg, int code) {
// [FUSDialogView fus_showDialog:msg];
// }];
}
[_models removeObject:_emptyModel];
[self fus_updateHeaderViewSizeWithModels:_models remove:YES];
} }
/// 麦位变化 /// 麦位变化
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment