onIMRecvCustomCommand method

void onIMRecvCustomCommand(
  1. String roomID,
  2. ZegoUser fromUser,
  3. String command
)

The callback triggered when a Custom Command is received.

Available since: 1.2.1 Description: This callback is used to receive custom command sent by other users in the same room. Use cases: Generally used when the number of people in the live room does not exceed 500 When to trigger: After calling loginRoom to log in to the room, if other users in the room send custom signaling to the developer through the sendCustomCommand function, this callback will be triggered. Restrictions: None Caution: The custom command sent by the user himself will not be notified through this callback. Related callbacks: You can receive room broadcast messages through onIMRecvBroadcastMessage, and you can receive room barrage message through onIMRecvBarrageMessage.

  • roomID Room ID. Value range: The maximum length is 128 bytes.
  • fromUser Sender of the command.
  • command Command content received.Value range: The maximum length is 1024 bytes.

Implementation

void onIMRecvCustomCommand(
  String roomID,
  ZegoUser fromUser,
  String command,
) {}