setAnsMode method
@valid since 3.52
@detail api
@author liuchuang
@brief Set the Active Noise Cancellation(ANC) mode during audio and video communications.
@param ansMode ANC modes. See ByteRTCAnsMode{@link #ByteRTCAnsMode}.
@return
- 0: Success.
- < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details
@note - You can call this API before or after entering a room. When you repeatedly call it, only the last call takes effect.
The AI noise cancellation can be enabled by calling this interface only in the following ByteRTCRoomProfile{@link #ByteRTCRoomProfile} scenarios.
- Game Voice: ByteRTCRoomProfileGame
- High-Quality Game: ByteRTCRoomProfileGameHD
- Cloud Gaming: ByteRTCRoomProfileCloudGame
- 1 vs 1 Audio and Video Call: ByteRTCRoomProfileChat
- Multi-End Synchronized Audio and Video Playback: ByteRTCRoomProfileLwTogether
- Personal Device in Cloud Meeting: ByteRTCRoomProfileMeeting
- Classroom Interaction: ByteRTCRoomProfileClassroom
- Conference Room Terminals in Cloud Meetings: ByteRTCRoomProfileMeetingRoom
Implementation
FutureOr<int> setAnsMode(ByteRTCAnsMode ansMode) async {
return await nativeCall('setAnsMode:', [ansMode.$value]);
}