enableAudioReceive method

FutureOr<int> enableAudioReceive(
  1. String userId,
  2. boolean enable
)

@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

FutureOr<int> enableAudioReceive(String userId, boolean enable) async {
  return await nativeCall('enableAudioReceive', [userId, enable]);
}