onStreamMessage property

void Function(RtcConnection connection, int remoteUid, int streamId, Uint8List data, int length, int sentTs)? onStreamMessage
final

Occurs when a stream message is received from a remote user.

This callback indicates that the local user has received a stream message sent by a remote user using the sendStreamMessage method. If you need a more comprehensive solution for low-latency, high-concurrency, and scalable real-time messaging and state synchronization, we recommend using Real-time Messaging.

  • connection Connection information. See RtcConnection.
  • remoteUid The ID of the user who sent the message.
  • streamId The stream ID of the received message.
  • data The received data.
  • length The length of the data in bytes.
  • sentTs The timestamp when the data stream was sent.

Implementation

final void Function(RtcConnection connection, int remoteUid, int streamId,
    Uint8List data, int length, int sentTs)? onStreamMessage;