Contents

videoChat

A mode that indicates that your app is engaging in online video conferencing.

Declaration

static let videoChat: AVAudioSession.Mode

Discussion

This mode is appropriate for video chat apps that use the playAndRecord or record categories. When you set this mode, the session optimizes the device’s tonal equalization for voice and reduces the set of allowed audio routes to only those suitable for video chat. Setting this mode also causes the system to automatically apply the allowBluetoothHFP and defaultToSpeaker category options.

VoIP apps should also use the Audio Unit Voice I/O as it provides useful voice features, including automatic gain correction, adjustment of voice processing, and muting. When an app uses this Audio Unit without explicitly setting its mode to a chat variant (voice, video, or game), the session sets the voiceChat mode implicitly. However, if an app previously set its category to playAndRecord and mode to videoChat or gameChat, instantiating the Audio Unit doesn’t cause the mode to change.

For apps that use one or more chat modes (voice, video, or game), but don’t use Audio Unit Voice I/O or AVAudioEngine with setVoiceProcessingEnabled(_:), the system reduces the processing it applies to audio signals. Specifically, it doesn’t apply voice-specific processing, like echo cancellation and automatic gain correction, and disables dynamic processing on input and output, which results in a lower playback level.

See Also

Getting Standard Session Modes