Commit a1f04581 by pierce

fixed 连麦问题

parent ca60edda
......@@ -402,7 +402,7 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
}else{
[_agoraEngine enableLocalVideo:NO];
}
[_agoraEngine enableAudio];
[_agoraEngine muteLocalAudioStream:NO];
[self switchLocalMic:YES];
[self updateToSpeakerPlay];
......@@ -436,7 +436,7 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
- (void)setLocalMicEnable:(BOOL)localMicEnable {
_localMicEnable = localMicEnable;
[_agoraEngine enableLocalAudio:localMicEnable];
[_agoraEngine muteLocalAudioStream:!localMicEnable];
// [_agoraEngine muteLocalAudioStream:!localMicEnable];
}
- (void)setAgoraHelperDelegate:(id<FUSAgoraHelperDelegate>)agoraHelperDelegate{
......
......@@ -1093,7 +1093,7 @@
[FUSDialogView fus_showDialog:[NSString fus_localString:@"主播或管理员已将你开麦"]];
// 不管主播那边怎么做,都无法改变用户的自己闭麦状态
if (!_selfCloseMic) {
[self.linkMicAgoraHelper fus_openMicro];
// [self.linkMicAgoraHelper fus_openMicro];
[self.linkMicAgoraHelper fus_muteAudioStreams:NO uid:uid];
}
......@@ -1119,7 +1119,8 @@
[FUSDialogView fus_showDialog:[NSString fus_localString:@"主播或管理员已将你闭麦"]];
// 不管主播那边怎么做,都无法改变用户的自己闭麦状态
if (!_selfCloseMic) {
[self.linkMicAgoraHelper fus_closeMicro];
// [self.linkMicAgoraHelper fus_closeMicro];
[self.linkMicAgoraHelper fus_muteAudioStreams:YES uid:uid];
}
// 不管主播那边怎么做,都无法改变用户的自己闭麦状态
......@@ -1675,19 +1676,25 @@
[_micListDelegate fus_linkMicroUserListView:self reportAudioVolumeIndicationOfSpeakers:speakers];
}
if (speakers.count == 1 && [speakers containsObject:[FUSLiveHelper shareInstance].roomInfoModel.roomId]) {
return;
}
BOOL hasChanged = NO;
for (FUSLinkMicroModel *model in _models) {
model.isSpeaking = NO;
if ([speakers containsObject:model.uid]){
if (!model.isSpeaking) {
hasChanged = YES;
model.isSpeaking = YES;
}
} else {
if (model.isSpeaking) {
hasChanged = YES;
model.isSpeaking = NO;
}
}
}
if (hasChanged) {
[self fus_updateHeaderViewSizeWithModels:_models];
}
}
- (void)fus_agoraHelper:(FUSAgoraHelper *)helper remoteVideoStateChangedOfUid:(NSUInteger)uid state:(AgoraVideoRemoteState)state{
......
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