setEarMonitorVolume method

Future<int?> setEarMonitorVolume(
  1. int volume
)

@detail api @author majun.lvhiei @brief Set the monitoring volume. @param volume The monitoring volume with the adjustment range between 0% and 100%. @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details @note - Call setEarMonitorMode{@link #RTCEngine#setEarMonitorMode} before setting the volume.

Implementation

Future<int?> setEarMonitorVolume(int volume) async {
  $a() => ($instance as $p_a.RTCEngine).setEarMonitorVolume(volume);
  $i() => ($instance as $p_i.ByteRTCEngine).setEarMonitorVolume(volume);

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