Swift 在iOS 13上,麦克风无法与CallKit VoIP通话配合使用
我已经实现了Web RTC,它工作得非常好。问题是,当应用程序处于未打开或终止状态时,当我接到一个电话时,我无法将我的声音传递给其他用户,而我能够收听。我已在CXAnswer call委托之前配置了AVAudioSessionSwift 在iOS 13上,麦克风无法与CallKit VoIP通话配合使用,swift,webrtc,ios13,callkit,swift5.2,Swift,Webrtc,Ios13,Callkit,Swift5.2,我已经实现了Web RTC,它工作得非常好。问题是,当应用程序处于未打开或终止状态时,当我接到一个电话时,我无法将我的声音传递给其他用户,而我能够收听。我已在CXAnswer call委托之前配置了AVAudioSession func configureAudioSession() { let sharedSession = AVAudioSession.sharedInstance() do { try sharedSession.setCategory(AV
func configureAudioSession() {
let sharedSession = AVAudioSession.sharedInstance()
do {
try sharedSession.setCategory(AVAudioSession.Category.playAndRecord)
try sharedSession.setMode(AVAudioSession.Mode.voiceChat)
try sharedSession.setPreferredIOBufferDuration(TimeInterval(0.005))
try sharedSession.setPreferredSampleRate(44100.0)
} catch {
debugPrint("Failed to configure `AVAudioSession`")
}
你找到解决问题的办法了吗?我在iOS13中也面临类似问题**问题尚未解决**当我们从移动设备创建房间并使用另一个移动设备接受时,问题不会发生。只有当我们从网站创建房间并在应用程序的锁定或关闭状态下接受移动设备上的呼叫时,问题才会发生
func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {
guard let call = ProviderDelegate.callManager.callWithUUID(action.callUUID) else {
action.fail()
return
}
configureAudioSession()
call.answer { error in
if let error = error {
print("ERROR: failed to answer: \(error.localizedDescription)")
}
action.fulfill()
}
}