I'm trying to record sound with my Ipad while a video/music is playing with SwiftUI. But when I start AVAudioSession, my device sounds cut off, while I would like my video/music sound to continue. To sum up, I would like, if possible, to record sound and listen to a video / music simultaneously (a bit like when you make a snap with music).
I found almost nothing, I tried changing the recording session settings : recordingSession.setCategory(.playAndRecord, mode: .default, options: .mixWithOthers)
but I can't find the solution.
My Ipad is on IOS 15.5, so rather recent...