createDataStreamWithConfig method
Creates a data stream.
Since v3.3.1.
Each user can create up to five data streams in a single channel.
This method does not support data reliability. If the receiver receives a data packet five seconds or more after it was sent, the SDK directly discards the data.
Parameter config
The configurations for the data stream: DataStreamConfig.
Returns
- Returns the stream ID if you successfully create the data stream.
- < 0: Fails to create the data stream.
Implementation
@override
Future<int?> createDataStreamWithConfig(DataStreamConfig config) {
return _invokeMethod('createDataStream', {'config': config.toJson()});
}