Headphone Monitor and Audio Channel Settings
2024-02-26
Overview
Headphone monitor is the monitoring of microphone capture. After inserting headphones (regular headphones or Bluetooth headphones) into the device, you can hear the sound captured by the device's microphone from the headphones.
Prerequisites
Before using headphone monitor, ensure:
- You have created a project in the ZEGOCLOUD Console and applied for a valid AppID and AppSign. For details, please refer to Console - Project Information.
- You have integrated ZEGO Express SDK into the project and implemented basic audio and video streaming functionality. For details, please refer to Quick Start - Integration and Quick Start - Implementation.
Usage
After starting preview or starting stream publishing, call the enableHeadphoneMonitor interface to enable headphone monitor (i.e., enable capture monitoring), connect headphones, and after the user speaks, they can hear their own voice.
Note
After enabling the headphone monitor feature, it will only take effect when headphones are connected.
ZegoExpressEngine.instance().enableHeadphoneMonitor(true)