| | |
| | | providerDelegate.callInfos.updateValue(callInfo, forKey: uuid) |
| | | providerDelegate.uuids.updateValue(uuid, forKey: callId) |
| | | let state: UIApplication.State = UIApplication.shared.applicationState |
| | | if state == .background{ |
| | | providerDelegate.reportIncomingCall(call:call, uuid: uuid, handle: handle, hasVideo: hasVideo) |
| | | } |
| | | // if state == .background{ |
| | | // providerDelegate.reportIncomingCall(call:call, uuid: uuid, handle: handle, hasVideo: hasVideo) |
| | | // } |
| | | // providerDelegate.reportIncomingCall(call:call, uuid: uuid, handle: handle, hasVideo: hasVideo) |
| | | } |
| | | |
| | |
| | | } |
| | | let call = Call.getSwiftObject(cObject: call!) |
| | | acceptCall(call: call, hasVideo: hasVideo) |
| | | // HDLCallManager.instance().lc?.activateAudioSession(actived: true) |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | // To be removed. |
| | | static func configAudioSession(audioSession: AVAudioSession) { |
| | | @objc static func configAudioSession(audioSession: AVAudioSession) { |
| | | do { |
| | | try audioSession.setCategory(AVAudioSession.Category.playAndRecord, mode: AVAudioSession.Mode.voiceChat, options: AVAudioSession.CategoryOptions(rawValue: AVAudioSession.CategoryOptions.allowBluetooth.rawValue | AVAudioSession.CategoryOptions.allowBluetoothA2DP.rawValue)) |
| | | try audioSession.setMode(AVAudioSession.Mode.voiceChat) |