Commit 999b4358 by ludi

Merge branch 'feature/邀请有奖' of http://git.yabolive.net:88/pidan/FuSiLive into feature/邀请有奖

parents d83bd365 8b841d89
...@@ -293,6 +293,13 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange"; ...@@ -293,6 +293,13 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
success(); success();
} }
weakSelf.isJoining = NO; weakSelf.isJoining = NO;
if (FUSLiveHelper.shareInstance.roomInfoModel.channelId.integerValue != channelId.integerValue) {
FUSLogDebug(@"pp===channelId 改变,加入了就退出频道 %@", channelId);
[weakSelf fus_stopRTCStreamingWithCompletion:^{
}];
}
}]; }];
if (code < 0) { if (code < 0) {
...@@ -319,6 +326,7 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange"; ...@@ -319,6 +326,7 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
[FUSDialogView fus_showDialog:@"连麦:加入频道发生错误,进行重新设置"]; [FUSDialogView fus_showDialog:@"连麦:加入频道发生错误,进行重新设置"];
} }
} }
self.isJoining = NO;
} }
- (void)fus_stopLinkMicroStreamingWithChannelId:(NSInteger)channelId completionHandler:(void (^)(void))completion{ - (void)fus_stopLinkMicroStreamingWithChannelId:(NSInteger)channelId completionHandler:(void (^)(void))completion{
...@@ -338,7 +346,7 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange"; ...@@ -338,7 +346,7 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
- (void)fus_stopRTCStreamingWithCompletion:(void(^)(void))completion - (void)fus_stopRTCStreamingWithCompletion:(void(^)(void))completion
{ {
if (!_agoraEngine || !_myselfIsOnMic) { if (!_agoraEngine || !_myselfIsOnMic) {
self.isJoining = NO;
return; return;
} }
// _myselfIsOnMic = NO; // _myselfIsOnMic = NO;
...@@ -378,6 +386,16 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange"; ...@@ -378,6 +386,16 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
[weakSelf.agoraOtherPreview removeFromSuperview]; [weakSelf.agoraOtherPreview removeFromSuperview];
FUSLiveHelper.shareInstance.streamView.playView.agoraOtherPreview = nil; FUSLiveHelper.shareInstance.streamView.playView.agoraOtherPreview = nil;
__strong typeof(weakSelf) strongSelf = weakSelf;
// 销毁引擎
strongSelf->_agoraEngine = nil;
[AgoraRtcEngineKit destroy];
strongSelf.myselfIsOnMic = NO;
[strongSelf.agoraOtherPreview removeFromSuperview];
strongSelf->_role = AgoraClientRoleAudience;
if (completion) { if (completion) {
completion(); completion();
} }
......
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