enableAudioSend method

Future<int?> enableAudioSend(
  1. bool enable
)

@detail api @author luomingkang @brief Starts or stops sending audio streams. Calling this interface does not affect audio capture. Other users in the same room will receive the corresponding callback. @param enable Whether to send the saudio data:
- true: Starts sending audio data. - false: Default setting. Stops sending audio data. @return - 0: It means that the parameter check has passed, but it does not mean that opening the microphone will succeed. For example, the room does not exist. - -3: Failure. Not joined a room. @note Cannot be called at the same time as EnableMicrophone{@link #IGameRoom#EnableMicrophone}.

Implementation

Future<int?> enableAudioSend(bool enable) async {
  $a() => ($instance as $p_a.IGameRoom).enableAudioSend(enable);
  $i() => ($instance as $p_i.ByteRTCGameRoom).enableAudioSend(enable);

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}