You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having an issue switching off a speaker on a voice call using TwilioVideo (for an iOS application). As the audio routes default to the speaker, I am overriding it while configuring an audio session using the reference from the issues #307 and #379. However, using the following code does not seem to achieve the preferred result.
let audioDevice = DefaultAudioDevice()
TwilioVideoSDK.audioDevice = audioDevice
audioDevice.block = {
DefaultAudioDevice.DefaultAVAudioSessionConfigurationBlock()
do {
let session = AVAudioSession.sharedInstance()
print("set audio session")
try session.setCategory(.playAndRecord, mode: .voiceChat)
try session.overrideOutputAudioPort(.none)
// tried adding the lines with an if-statement below as well as overriding the input above to `.none`
if isSpeaker {
try AVAudioSession.sharedInstance().overrideOutputAudioPort(.none)
}
try session.setActive(true, options: .notifyOthersOnDeactivation)
} catch let error {
print("Error while configuring audio session: \(error)")
}
}
audioDevice.block()
}
Thank you in advance for your help!
The text was updated successfully, but these errors were encountered:
Hello,
I'm having an issue switching off a speaker on a voice call using TwilioVideo (for an iOS application). As the audio routes default to the speaker, I am overriding it while configuring an audio session using the reference from the issues #307 and #379. However, using the following code does not seem to achieve the preferred result.
Thank you in advance for your help!
The text was updated successfully, but these errors were encountered: