sendRoomBinaryMessage method
@detail api
@author hanchenchen.c
@brief Sends binary messages to all other users in the room.
@param message
The binary broadcast message sent by the user
The message does not exceed 46KB.
@return The number of the message sent this time is incremented from 1.
@note
- Before broadcasting binary messages in the room, you must call joinRoom:userInfo:userVisibility:roomConfig:{@link #ByteRTCRoom#joinRoom:userInfo:userVisibility:roomConfig} to join the room.
- After calling this function, you will receive an rtcRoom:onRoomMessageSendResult:error:{@link #ByteRTCRoomDelegate#rtcRoom:onRoomMessageSendResult:error} callback to notify the sender of the success or failure of the message;
- If the binary message is successfully sent, all users in the room will receive rtcRoom:onRoomBinaryMessageReceived:message:{@link #ByteRTCRoomDelegate#rtcRoom:onRoomBinaryMessageReceived:message} callback.
Implementation
FutureOr<NSInteger> sendRoomBinaryMessage(NSData message) async {
return await nativeCall('sendRoomBinaryMessage:', [message]);
}