sendRoomBinaryMessage method
@detail api @brief Group binary messages to all other users in the room. @param buffer The content of the binary message sent. The message does not exceed 46KB. @note - Before broadcasting binary messages 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 onRoomBinaryMessageReceived{@link #IRTSRoomEventHandler#onRoomBinaryMessageReceived} callback.
Implementation
Future<int?> sendRoomBinaryMessage(ArrayBuffer buffer) async {
$a() => ($instance as $p_a.RTCRoom).sendRoomBinaryMessage(buffer);
$i() => ($instance as $p_i.ByteRTCRoom).sendRoomBinaryMessage(buffer);
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}