duckAudio property

bool duckAudio
final

This flag determines how your audio interacts with other audio playing on the device. If your audio is playing, and another audio plays on top (like an alarm, gps, etc), this determines what happens with your audio.

On Android, this will make an Audio Focus request with AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK when your audio starts playing.

On iOS, this will set the option .duckOthers option (the option .mixWithOthers is always set, regardless of these flags). Note that, on iOS, this forces the category to be .playAndRecord, and thus is forbidden when respectSilence is set.

Implementation

final bool duckAudio;