onUserBinaryMessageReceived method

FutureOr<void> onUserBinaryMessageReceived(
  1. dynamic msgid,
  2. dynamic uid,
  3. dynamic message
)
override

@detail callback @brief Receive this callback when you receive a peer-to-peer binary message from another user in the room via sendUserBinaryMessage{@link #RTSRoom#sendUserBinaryMessage}. @param uid The user ID of the sender of the message. @param message The binary message content received.

Implementation

FutureOr<void> onUserBinaryMessageReceived(
    dynamic msgid, dynamic uid, dynamic message) async {
  if ($instance == null || $instance is! IRTSRoomEventHandler) {
    return;
  }
  return ($instance as IRTSRoomEventHandler)
      .onUserBinaryMessageReceived
      ?.call(int.tryParse(msgid.toString()) ?? 0, uid.toString(), message);
}