In-ear Monitoring
Update time: 2025/06/11 16:45:39
In-ear monitoring, or IEM, is a feature that allows the user to hear the sound captured by their microphone after inserting earphones or a headset to their device, and is mainly used to monitor the locally captured audio. IEM audio features low latency and high audio quality, which is real-time feedback of local audio data to members involved in audio interaction, including the host. This function enables the host to hear local sound in real time. IEM is typically used in recreational scenarios such as online KTV, PK co-hosting, and concerts.
NERTC SDK supports this feature and allows volume regulation.
Considerations
- Call this method in a room.
- After IEM is enabled, the user must connect earphones or a headset to use this function normally. It is advised to monitor changes in the playing device by using the onAudioDeviceChanged and enable IEM only with when earphones are used as the playing device.
- In the V4.0.0 version, the volume parameter of the enableEarback is invalid, resort to the setEarbackVolume API to set the volume of IEM.
Method
After successfully joining a room, call enableEarback to enable/disable IEM. IEM can be enabled at any time but will have no effect until earphones or a headset is connected. It will be automatically paused when the earphones or headset is disconnected and restored upon reconnection. This function can be disabled in real time.
When IEM is enabled, the volume of IEM can be set by using the volume parameter. The value range is 0 to 100. with the default value as 100. The volume of IEM may also be set by using the setEarbackVolume.
Sample code
NERtcEx.getInstance().enableEarback(enable,volume);





