Contents

record

The category for recording audio while also silencing playback audio.

Declaration

static let record: AVAudioSession.Category

Discussion

This category has the effect of silencing virtually all output on the system, for as long as the session is active. Unless you need to prevent any unexpected sounds from being played, use playAndRecord instead.

To continue recording audio when your app transitions to the background (for example, when the screen locks), add the audio value to the UIBackgroundModes key in your information property list file.

The user must grant permission for audio recording.

See Also

Getting Standard Categories