안녕하세요~
category를 설정을 변경 하시면 해결 될 듯 합니다.~
self.remonCast.onJoin { (chid) in
do {
if #available(iOS 10.0, *) {
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategorySoloAmbient, mode: AVAudioSessionModeDefault)
// try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.soloAmbient, mode: AVAudioSession.Mode.default) //ios 12
} else {
AVAudioSession.sharedInstance().perform(NSSelectorFromString("setCategory:error:"), with: AVAudioSessionCategorySoloAmbient)
// AVAudioSession.sharedInstance().perform(NSSelectorFromString("setCategory:error:"), with: AVAudioSession.Category.soloAmbient) //ios 12
}
try AVAudioSession.sharedInstance().setActive(true, with: [])
try AVAudioSession.sharedInstance().overrideOutputAudioPort(.speaker)
} catch {
print(error)
}
}
}