Skip to content

ios: Set AVAudioSessionCategory to prevent audio from being muted by silent switch

Supersedes !6660 (closed)

This is the quickest viable solution. It defaults to the Playback mode to make sure sound doesn't get muted, but if it detects that a category has already been set (by us previously, or externally - doesn't matter) it aborts.

From my testing, on recent iOS versions the PlayAndRecord will be automatically set when the mic permission is requested, so we can safely default to just Playback for other purposes.

Merge request reports