修复bug
This commit is contained in:
@@ -35,7 +35,8 @@ typedef NS_ENUM(NSInteger, BackMusicPlayState) {
|
||||
- ❌ 业务逻辑不要侵入 RctImpl 。
|
||||
*/
|
||||
@interface RtcManager : NSObject
|
||||
|
||||
///因为跨房pk结束后会闭麦,用这个限制不要关麦
|
||||
@property(nonatomic,assign) BOOL isAnckorPk;
|
||||
/**
|
||||
* 是否静音(静别人)
|
||||
* YES:🔇虽然你们麦位上在说话,但是我就是不听。🙉
|
||||
|
@@ -18,10 +18,10 @@
|
||||
@"csRank" : [AcrossRoomPkRankModel class]
|
||||
};
|
||||
}
|
||||
///如果一个模型中需要字段映射的话 比如id -> ID name -> other.name
|
||||
+ (NSDictionary *)replacedKeyFromPropertyName {
|
||||
return @{@"aMicStatus":@"amicStatus"};
|
||||
}
|
||||
/////如果一个模型中需要字段映射的话 比如id -> ID name -> other.name
|
||||
//+ (NSDictionary *)replacedKeyFromPropertyName {
|
||||
// return @{@"aMicStatus":@"amicStatus"};
|
||||
//}
|
||||
@end
|
||||
|
||||
|
||||
|
@@ -527,8 +527,12 @@
|
||||
} else {
|
||||
self.otherMicButton.hidden = ![pkPanelInfo.cUid isEqualToString:[AccountInfoStorage instance].getUid];
|
||||
}
|
||||
|
||||
[RtcManager instance].isAnckorPk = YES;
|
||||
self.otherMicButton.selected = pkPanelInfo.aMicStatus == AnchorPKOtherMicStatus_Close;
|
||||
[[RtcManager instance] muteOne:pkPanelInfo.aMicStatus == AnchorPKOtherMicStatus_Close userId:pkPanelInfo.aUid];
|
||||
|
||||
|
||||
} else {
|
||||
self.redCountLabel.text = @"0";
|
||||
self.blueCountLabel.text = @"0";
|
||||
|
@@ -609,6 +609,10 @@
|
||||
[Api getAcrossRoomPKDetail:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
AcrossRoomPKPanelModel * acrossPKPanelInfo = [AcrossRoomPKPanelModel modelWithJSON:data.data];
|
||||
if (data.data[@"amicStatus"] != nil){
|
||||
acrossPKPanelInfo.aMicStatus = [data.data[@"amicStatus"] intValue];
|
||||
}
|
||||
|
||||
[self updateAnchorPkInfo:acrossPKPanelInfo];
|
||||
if (acrossPKPanelInfo.pkType == AcrossRoomPkTypeAnchor) {
|
||||
if (acrossPKPanelInfo.aUid.integerValue > 0) {
|
||||
@@ -623,6 +627,9 @@
|
||||
}
|
||||
} else {
|
||||
AcrossRoomPKPanelModel * acrossPKPanelInfo = [AcrossRoomPKPanelModel modelWithJSON:data.data];
|
||||
if (data.data[@"amicStatus"] != nil){
|
||||
acrossPKPanelInfo.aMicStatus = [data.data[@"amicStatus"] intValue];
|
||||
}
|
||||
if (acrossPKPanelInfo.aUid.integerValue > 0) {
|
||||
if (!self.acrossPKPanelView.superview) {
|
||||
[self addSubview:self.acrossPKPanelView];
|
||||
@@ -786,6 +793,9 @@
|
||||
}];
|
||||
}
|
||||
AcrossRoomPKPanelModel * acrossPKPanelInfo = [AcrossRoomPKPanelModel modelWithJSON:attachment.data];
|
||||
if (attachment.data[@"amicStatus"] != nil){
|
||||
acrossPKPanelInfo.aMicStatus = [attachment.data[@"amicStatus"] intValue];
|
||||
}
|
||||
self.acrossPKPanelView.pkPanelInfo = acrossPKPanelInfo;
|
||||
}
|
||||
break;
|
||||
@@ -796,6 +806,9 @@
|
||||
[self.acrossPKPanelView resetAcrossPKViewData];
|
||||
[self.acrossPKPanelView removeFromSuperview];
|
||||
AcrossRoomPKPanelModel * model = [AcrossRoomPKPanelModel modelWithJSON:attachment.data];
|
||||
if (attachment.data[@"amicStatus"] != nil){
|
||||
model.aMicStatus = [attachment.data[@"amicStatus"] intValue];
|
||||
}
|
||||
if (model.isForce) {
|
||||
XPAcrossRoomPKForceEndResultView *view = [[XPAcrossRoomPKForceEndResultView alloc] initWithFrame:CGRectMake(0, 0, 281, 208)];
|
||||
view.data = model;
|
||||
@@ -837,6 +850,9 @@
|
||||
NIMChatroomMember * member = [members firstObject];
|
||||
if (member.type == NIMTeamMemberTypeOwner) {
|
||||
AcrossRoomPKPanelModel * acrossPKPanelInfo = [AcrossRoomPKPanelModel modelWithJSON:attachment.data];
|
||||
if (attachment.data[@"amicStatus"] != nil){
|
||||
acrossPKPanelInfo.aMicStatus = [attachment.data[@"amicStatus"] intValue];
|
||||
}
|
||||
[[RtcManager instance] connectOtherRoom:acrossPKPanelInfo.aRoomId userId:acrossPKPanelInfo.aUid];
|
||||
[self updateAnchorPkInfo:acrossPKPanelInfo];
|
||||
}
|
||||
@@ -881,6 +897,9 @@
|
||||
}];
|
||||
}
|
||||
AcrossRoomPKPanelModel * acrossPKPanelInfo = [AcrossRoomPKPanelModel modelWithJSON:attachment.data];
|
||||
if (attachment.data[@"amicStatus"] != nil){
|
||||
acrossPKPanelInfo.aMicStatus = [attachment.data[@"amicStatus"] intValue];
|
||||
}
|
||||
self.anchorPKPanelView.pkPanelInfo = acrossPKPanelInfo;
|
||||
[self updateAnchorPkInfo:acrossPKPanelInfo];
|
||||
}
|
||||
@@ -895,6 +914,9 @@
|
||||
}];
|
||||
}
|
||||
AcrossRoomPKPanelModel * acrossPKPanelInfo = [AcrossRoomPKPanelModel modelWithJSON:attachment.data];
|
||||
if (attachment.data[@"amicStatus"] != nil){
|
||||
acrossPKPanelInfo.aMicStatus = [attachment.data[@"amicStatus"] intValue];
|
||||
}
|
||||
self.anchorPKPanelView.pkPanelInfo = acrossPKPanelInfo;
|
||||
[self updateAnchorPkInfo:acrossPKPanelInfo];
|
||||
if (acrossPKPanelInfo.isForce) {
|
||||
|
@@ -170,6 +170,9 @@
|
||||
[Api getAcrossRoomPKDetail:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
AcrossRoomPKPanelModel * acrossPKPanelInfo = [AcrossRoomPKPanelModel modelWithJSON:data.data];
|
||||
if (data.data[@"amicStatus"] != nil){
|
||||
acrossPKPanelInfo.aMicStatus = [data.data[@"amicStatus"] intValue];
|
||||
}
|
||||
if (acrossPKPanelInfo.pkType == AcrossRoomPkTypeAnchor) {
|
||||
self.hostDelegate.getRoomInfo.roundId = acrossPKPanelInfo.roundId;
|
||||
self.hostDelegate.getRoomInfo.pkUid = acrossPKPanelInfo.aUid;
|
||||
|
@@ -76,7 +76,15 @@
|
||||
if (self) {
|
||||
_hostDelegate = delegate;
|
||||
_isMiniEnter = NO;
|
||||
|
||||
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
|
||||
if (roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode ){
|
||||
NSLog(@"%d",[RtcManager instance].isAnckorPk);
|
||||
if ([RtcManager instance].isAnckorPk == NO){
|
||||
[RtcManager instance].localMuted = YES;
|
||||
}
|
||||
|
||||
}
|
||||
NSInteger microCount = self.countOfMircoView;
|
||||
for (int i = 0; i < microCount; i++) {
|
||||
UIView* microView = [self microViewForIndex:i];
|
||||
@@ -278,8 +286,12 @@
|
||||
if (self.hostDelegate.getUserInfo.uid && model.userInfo.uid == self.hostDelegate.getUserInfo.uid) {
|
||||
selfNeedBroadcast = model.microState.micState == MicroMicStateType_Open;
|
||||
if (model.microState.micState == MicroMicStateType_Close) {
|
||||
|
||||
if (roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode){
|
||||
[RtcManager instance].localMuted = YES;
|
||||
}
|
||||
|
||||
}
|
||||
if (roomInfo.type == RoomType_Anchor && [[AccountInfoStorage instance].getUid isEqualToString:[NSString stringWithFormat:@"%ld", roomInfo.uid]]) {
|
||||
selfNeedBroadcast = YES;///个播房房主默认角色为主播
|
||||
}
|
||||
@@ -497,7 +509,16 @@
|
||||
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
|
||||
if (changeType == 2){
|
||||
if (userInfo.uid == [AccountInfoStorage instance].getUid.integerValue && roomInfo.roomModeType == RoomModeType_Open_Blind){
|
||||
if (roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode ){
|
||||
if ([RtcManager instance].isAnckorPk == NO){
|
||||
[RtcManager instance].localMuted = YES;
|
||||
|
||||
}
|
||||
|
||||
[RtcManager instance].isAnckorPk = NO;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}else if (changeType == 1) { // 上麦
|
||||
MicroQueueModel *sequence = [self.micQueue objectForKey:position];
|
||||
@@ -531,11 +552,13 @@
|
||||
if (sequence && sequence.userInfo.uid == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
if (roomInfo.roomModeType != RoomModeType_Open_Blind){
|
||||
if (userInfo.isNoProhibitMic == NO){
|
||||
if (roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode){
|
||||
[RtcManager instance].localMuted = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(userInfo.isNoProhibitMic == YES){
|
||||
for (int i = 0; i < self.countOfMircoView; i++) {
|
||||
UIView<MicroViewProtocol> * view = [self findMicroViewByIndex:i];
|
||||
|
Reference in New Issue
Block a user