Contents

setCategory(_:mode:policy:options:)

Sets the session category, mode, route-sharing policy, and options.

Declaration

func setCategory(_ category: AVAudioSession.Category, mode: AVAudioSession.Mode, policy: AVAudioSession.RouteSharingPolicy, options: AVAudioSession.CategoryOptions = []) throws

Parameters

Discussion

You specify options only with a default routing policy. With a long-form route-sharing policy, you can use the playback category and the default, moviePlayback, and spokenAudio modes.

See Also

Configuring standard audio behaviors