buildIOS method

AudioContextIOS buildIOS()

Implementation

AudioContextIOS buildIOS() {
  if (Platform.isIOS) {
    validateIOS();
  }
  return AudioContextIOS(
    category: respectSilence
        ? AVAudioSessionCategory.ambient
        : AVAudioSessionCategory.playback,
    options: [AVAudioSessionOptions.mixWithOthers] +
        (duckAudio ? [AVAudioSessionOptions.duckOthers] : []) +
        (forceSpeaker ? [AVAudioSessionOptions.defaultToSpeaker] : []),
  );
}