setAudioDualMonoMode method

Future<int?> setAudioDualMonoMode(
  1. AudioMixingDualMonoMode mode
)

@detail api @brief Sets the channel mode of the mixing of the media file. @param mode The mode of channel. The default channel mode is the same as the source file. See AudioMixingDualMonoMode{@link #AudioMixingDualMonoMode}. @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details. @note - Call this API only when audio is mixing. - Audio file is supported, but not PCM data.

Implementation

Future<int?> setAudioDualMonoMode(AudioMixingDualMonoMode mode) async {
  $a() => ($instance as $p_a.IMediaPlayer)
      .setAudioDualMonoMode(t_AudioMixingDualMonoMode.code_to_android(mode));
  $i() => ($instance as $p_i.ByteRTCMediaPlayer)
      .setAudioDualMonoMode(t_AudioMixingDualMonoMode.code_to_ios(mode));

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}