fixing audioo not playing out loud
This commit is contained in:
@@ -25,10 +25,11 @@ class InnerCircleViewModel: ObservableObject {
|
|||||||
init() {
|
init() {
|
||||||
// separate set up for listening vs recording
|
// separate set up for listening vs recording
|
||||||
do {
|
do {
|
||||||
try audioSession.setCategory(.playAndRecord, mode: .voiceChat, options: [.duckOthers, .allowBluetooth, .allowBluetoothA2DP])
|
try audioSession.setCategory(.playAndRecord, mode: .default, options: [.duckOthers, .allowBluetooth, .allowBluetoothA2DP])
|
||||||
try audioSession.setActive(true)
|
try audioSession.setActive(true)
|
||||||
try audioSession.overrideOutputAudioPort(AVAudioSession.PortOverride.speaker) // allow playing in silent mode
|
|
||||||
try audioSession.setAllowHapticsAndSystemSoundsDuringRecording(true)
|
try audioSession.setAllowHapticsAndSystemSoundsDuringRecording(true)
|
||||||
|
try audioSession.overrideOutputAudioPort(AVAudioSession.PortOverride.speaker) // allow playing in silent mode
|
||||||
|
|
||||||
} catch {
|
} catch {
|
||||||
print("Can not setup the Recording")
|
print("Can not setup the Recording")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user