createDataChannel method
Future<RTCDataChannel>
createDataChannel(
- String label,
- RTCDataChannelInit dataChannelDict
override
Implementation
@override
Future<RTCDataChannel> createDataChannel(
String label, RTCDataChannelInit dataChannelDict) {
final map = dataChannelDict.toMap();
if (dataChannelDict.binaryType == 'binary') {
map['binaryType'] = 'arraybuffer'; // Avoid Blob in data channel
}
final jsDc = _jsPc.createDataChannel(label, map);
return Future.value(RTCDataChannelWeb(jsDc));
}