android_enableAudioReceive method
@platform android
@detail api
@author luomingkang
@brief Whether to receive the audio stream of a specific user. Call this insterface will not affect the state of the speaker or other audio output devices.
@param userId User ID, a non-empty string with a maximum length of 128 bytes. The supported character set range is:
1. 26 capital letters A ~ Z
2. 26 lowercase letters a ~ z
3. 10 numbers 0 ~ 9
4. Underscore "_", at sign "@", minus sign "-"
@param enable
- true:Receive the user's audio stream.
- false:Default setting. Do not receive the user's audio stream. The speaker will not be muted and can still be used for other audio outputs.
@return
- 0: Success.
- -2: Failure. The provided userId is an empty string.
Implementation
Future<int?> android_enableAudioReceive(string userId, bool enable) async {
$() => ($instance as $p_a.RTCRoom).enableAudioReceive(userId, enable);
if (Platform.isAndroid) {
return $();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}