sendRoomMessage method

Future<int?> sendRoomMessage(
  1. string messageStr
)

@detail api @brief Mass text messages to all other users in the room. @param messageStr The content of the text message sent. The message does not exceed 64 KB. @note - Before broadcasting a text message in the room, you must call joinRTSRoom{@link #RTSRoom#joinRTSRoom} to join the room. - After the call, you will receive the onRoomMessageSendResult{@link #IRTSRoomEventHandler#onRoomMessageSendResult} callback; - Other users in the same room will receive the onRoomMessageReceived{@link #IRTSRoomEventHandler#onRoomMessageReceived} callback.

Implementation

Future<int?> sendRoomMessage(string messageStr) async {
  $a() => ($instance as $p_a.RTCRoom).sendRoomMessage(messageStr);
  $i() => ($instance as $p_i.ByteRTCRoom).sendRoomMessage(messageStr);

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