in AmazonChimeSDKDemo/AmazonChimeSDKDemo/MeetingModule.swift [251:265]
func configureAudioSession() {
let audioSession = AVAudioSession.sharedInstance()
do {
if audioSession.category != .playAndRecord {
try audioSession.setCategory(AVAudioSession.Category.playAndRecord,
options: AVAudioSession.CategoryOptions.allowBluetooth)
try audioSession.setActive(true, options: .notifyOthersOnDeactivation)
}
if audioSession.mode != .voiceChat {
try audioSession.setMode(.voiceChat)
}
} catch {
logger.error(msg: "Error configuring AVAudioSession: \(error.localizedDescription)")
}
}