diff --git a/xplan-ios/Main/RTC/RtcImpl/AgoraRtcImpl.m b/xplan-ios/Main/RTC/RtcImpl/AgoraRtcImpl.m index 3c1df4aa..4b893234 100644 --- a/xplan-ios/Main/RTC/RtcImpl/AgoraRtcImpl.m +++ b/xplan-ios/Main/RTC/RtcImpl/AgoraRtcImpl.m @@ -83,8 +83,8 @@ if (filePath) { self.MusicCompletion = completion; [self changePlayState:BackMusicPlayState_Stop];//切换歌曲need stop - BOOL state = [self.engine startAudioMixing:filePath loopback:NO replace:NO cycle:1]; - return state; + [self.engine startAudioMixing:filePath loopback:NO replace:NO cycle:1]; + return YES; } else { return NO; } @@ -110,7 +110,7 @@ case BackMusicPlayState_Resume: { [self.engine resumeAudioMixing]; - isPlaying = NO; + isPlaying = YES; } default: break; diff --git a/xplan-ios/Main/RTC/RtcImpl/ZegoRtcImpl.m b/xplan-ios/Main/RTC/RtcImpl/ZegoRtcImpl.m index 515c09e1..f31cc90e 100644 --- a/xplan-ios/Main/RTC/RtcImpl/ZegoRtcImpl.m +++ b/xplan-ios/Main/RTC/RtcImpl/ZegoRtcImpl.m @@ -114,8 +114,10 @@ self.filePath = filePath; [self.engine muteAux:true]; [self.mediaPlayer start:filePath repeat:NO]; + return YES; + } else { + return NO; } - return YES; } /// 改变播放器的状态 @@ -139,7 +141,7 @@ case BackMusicPlayState_Resume: { [self.mediaPlayer resume]; - isPlaying = NO; + isPlaying = YES; } default: break; diff --git a/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m b/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m index 3fe941af..abe26af4 100644 --- a/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m +++ b/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m @@ -332,16 +332,10 @@ [self updateContrionEntranceWithRoomUid:[NSString stringWithFormat:@"%ld", roomInfo.uid] type:@"day"]; } } - - if (roomInfo.type == RoomType_MiniGame) { - - } else { - - } - [self updateRoomTopic]; [self showLittleGameMiniView:roomInfo.type micCount:roomInfo.mgMicNum]; [self configLittleGameState]; + [self configPlayMusicRoomTypeChange]; } - (void)onRoomEntered { @@ -407,7 +401,6 @@ [self updateRoomTopic]; [self showLittleGameMiniView:roomInfo.type micCount:roomInfo.mgMicNum]; [self configLittleGameState]; - [self configPlayMusicRoomTypeChange]; } - (void)onRoomMiniEntered {