sendStreamMessage method
Sends data stream messages.
The SDK has the following restrictions on this method:
- Up to 30 packets can be sent per second in a channel with each packet having a maximum size of 1 kB.
- Each client can send up to 6 kB of data per second.
- Each user can have up to five data channels simultaneously.
A successful method call triggers the RtcEngineEventHandler.streamMessage callback on the remote client, from which the remote user gets the stream message.
A failed method call triggers the RtcEngineEventHandler.streamMessageError callback on the remote client.
Note
- Ensure that you have created the data stream using RtcEngine.createDataStream before calling this method.
- This method applies only to the ChannelProfile.Communication profile or to hosts in the ChannelProfile.LiveBroadcasting profile.
Parameter streamId
ID of the sent data stream returned by the RtcEngine.createDataStream method.
Parameter message
Sent data.
Implementation
@override
Future<void> sendStreamMessage(int streamId, String message) {
return _invokeMethod(
'sendStreamMessage', {'streamId': streamId, 'message': message});
}