How do I make AVCaptureSession and AVPlayer respect AVAudioSessionCategoryAmbient?
问题 I'm making an app that records ( AVCaptureSession ) and plays ( AVPlayerLayer ) video. I'd like to be able to do this without pausing background audio from other apps and I'd like the playback to respect the mute switch. In the AppDelegate I have set AVAudioSessionCategoryAmbient , according to the docs this should: The category for an app in which sound playback is nonprimary—that is, your app can be used successfully with the sound turned off. This category is also appropriate for “play