onStreamMessage property
void Function(RtcConnection connection, int remoteUid, int streamId, Uint8List data, int length, int sentTs)?
onStreamMessage
final
Occurs when the local user receives the data stream from the remote user.
If you need a more comprehensive solution for low-latency, high-concurrency, and scalable real-time messaging and status synchronization, it is recommended to use. The SDK triggers this callback when the local user receives the stream message that the remote user sends by calling the sendStreamMessage method.
connection
The connection information. See RtcConnection.remoteUid
The ID of the remote user sending the message.streamId
The stream ID of the received message.data
The data received.length
The data length (byte).sentTs
The time when the data stream is sent.
Implementation
final void Function(RtcConnection connection, int remoteUid, int streamId,
Uint8List data, int length, int sentTs)? onStreamMessage;