AudioSessionConfiguration constructor
const
AudioSessionConfiguration({
- AVAudioSessionCategory? avAudioSessionCategory,
- AVAudioSessionCategoryOptions? avAudioSessionCategoryOptions,
- AVAudioSessionMode? avAudioSessionMode,
- AVAudioSessionRouteSharingPolicy? avAudioSessionRouteSharingPolicy,
- AVAudioSessionSetActiveOptions? avAudioSessionSetActiveOptions,
- AndroidAudioAttributes? androidAudioAttributes,
- AndroidAudioFocusGainType androidAudioFocusGainType = AndroidAudioFocusGainType.gain,
- bool? androidWillPauseWhenDucked,
Creates an audio session configuration from scratch.
Options prefixed with av
correspond to classes in Apple's AVFoundation
library and their values will be ignored on all platforms other than iOS.
Only certain combinations of these configuration options are permitted,
and you should consult Apple's
documentation
for further information.
Options prefixed with android
correspond to options in Android's SDK
and their values are ignored on all platforms other than Android. Note
that the underlying Android platform allows different audio players to
use different audio attributes, and so the values supplied here act as
hints on the type of configuration you would like audio plugins in your
session to adopt by default.
Implementation
const AudioSessionConfiguration({
this.avAudioSessionCategory,
this.avAudioSessionCategoryOptions,
this.avAudioSessionMode,
this.avAudioSessionRouteSharingPolicy,
this.avAudioSessionSetActiveOptions,
this.androidAudioAttributes,
this.androidAudioFocusGainType = AndroidAudioFocusGainType.gain,
this.androidWillPauseWhenDucked,
});