setEarMonitorMode method

FutureOr<int> setEarMonitorMode(
  1. EarMonitorMode mode,
  2. EarMonitorAudioFilter filter
)

@detail api @author majun.lvhiei @brief Enables/disables in-ear monitoring. @param mode Whether to enable in-ear monitoring. See EarMonitorMode{@link #EarMonitorMode}. @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details. @note - In-ear monitoring is effective for audios captured by the RTC SDK. - We recommend that you use wired earbuds/headphones for a low-latency experience. - The RTC SDK supports both hardware-level and SDK-level in-ear monitoring. Hardware-level monitoring typically offers lower latency and better audio quality. If your App is in the manufacturer's trusted list for this feature and the environment meets the required conditions, the RTC SDK will automatically default to hardware-level in-ear monitoring when enabled.

Implementation

FutureOr<int> setEarMonitorMode(
    EarMonitorMode mode, EarMonitorAudioFilter filter) async {
  return await nativeCall('setEarMonitorMode', [mode.$value, filter.$value]);
}