Skip to content

Commit 3628505

Browse files
committed
[Plugin 450] add keep.audiosession for IOS
1 parent 05807b6 commit 3628505

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

Agora-Unreal-SDK-CPP/AgoraPlugin/Source/AgoraPlugin/Private/AgoraCppPlugin/AgoraUERTCEngine.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@ namespace agora {
129129
_VideoFrameRenderManager = nullptr;
130130
_VideoObserver = nullptr;
131131
#endif
132-
133-
#if PLATFORM_IOS
134-
EnableIOSAudioSession(true);
135-
#endif
136132
}
137133
}
138134

@@ -197,6 +193,8 @@ namespace agora {
197193
#if PLATFORM_IOS
198194
EnableIOSAudioSession(true);
199195
AgoraUERtcEngine::Get()->setAudioScenario(agora::rtc::AUDIO_SCENARIO_TYPE::AUDIO_SCENARIO_GAME_STREAMING);
196+
int ret00 = AgoraUERtcEngine::Get()->setParameters("{\"che.audio.keep.audiosession\": true}");
197+
UE_LOG(LogTemp, Warning, TEXT("Agora RTC Engine Keep Audio Session ret %d"), ret00);
200198
#endif
201199

202200
}
@@ -358,9 +356,6 @@ namespace agora {
358356
int AgoraUERtcEngine::leaveChannel() {
359357
if (RtcEngine != nullptr) {
360358
int ret = RtcEngine->leaveChannel();
361-
#if PLATFORM_IOS
362-
EnableIOSAudioSession(true);
363-
#endif
364359
return ret;
365360
}
366361
return AGORA_UE_ERR_CODE(ERROR_NULLPTR);

0 commit comments

Comments
 (0)