enableMicrophone method
@detail api
@author luomingkang
@brief Turns on/off the microphone after joining a game room. Other users in the same room will receive callback rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error:{@link #ByteRTCEngineDelegate#rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error}.
@param enable Whether to turn on the microphone:
- true: Turns on the microphone, captures and publishes audio stream.
- false: Default setting. Turns off the microphone and stops capturing and publishing audio streams.
@return
- 0: Success.
- -3: Failure. Not joined the room.
@note Cannot be called simultaneously with enableAudioSend:{@link #ByteRTCGameRoom#enableAudioSend}.
Implementation
FutureOr<int> enableMicrophone(BOOL enable) async {
return await nativeCall('enableMicrophone:', [enable]);
}