sendRoomBinaryMessage method
@detail api @brief 给房间内的所有其他用户群发二进制消息。 @param buffer 发送的二进制消息内容,消息不超过 64KB。 @note - 在房间内广播二进制消息前,必须先调用 joinRTSRoom{@link #RTSRoom#joinRTSRoom} 加入房间。 - 调用后,会收到 onRoomMessageSendResult{@link #IRTSRoomEventHandler#onRoomMessageSendResult} 回调; - 同一房间内的其他用户会收到 onRoomBinaryMessageReceived{@link #IRTSRoomEventHandler#onRoomBinaryMessageReceived} 回调。
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}');
}
}