fixed haptic ....wtf....need to understand every line...this is a lesson don't get frustrated
I don't know how audiosession works and so should learn about it before adding things like this
This commit is contained in:
@@ -24,10 +24,11 @@ class InnerCircleViewModel: ObservableObject {
|
|||||||
|
|
||||||
init() {
|
init() {
|
||||||
do {
|
do {
|
||||||
try audioSession.setAllowHapticsAndSystemSoundsDuringRecording(true)
|
|
||||||
try audioSession.setCategory(.playAndRecord, mode: .default)
|
try audioSession.setCategory(.playAndRecord, mode: .default)
|
||||||
try audioSession.setActive(true)
|
try audioSession.setActive(true)
|
||||||
try audioSession.overrideOutputAudioPort(AVAudioSession.PortOverride.speaker) // allow playing in silent mode
|
try audioSession.overrideOutputAudioPort(AVAudioSession.PortOverride.speaker) // allow playing in silent mode
|
||||||
|
try audioSession.setAllowHapticsAndSystemSoundsDuringRecording(true)
|
||||||
} catch {
|
} catch {
|
||||||
print("Can not setup the Recording")
|
print("Can not setup the Recording")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user