File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -411,13 +411,14 @@ class RTCPeerConnectionNative extends RTCPeerConnection {
411
411
Future <RTCDataChannel > createDataChannel (
412
412
String label, RTCDataChannelInit dataChannelDict) async {
413
413
try {
414
- await WebRTC .invokeMethod ('createDataChannel' , < String , dynamic > {
414
+ final response = await WebRTC .invokeMethod ('createDataChannel' , < String , dynamic > {
415
415
'peerConnectionId' : _peerConnectionId,
416
416
'label' : label,
417
417
'dataChannelDict' : dataChannelDict.toMap ()
418
418
});
419
+
419
420
_dataChannel =
420
- RTCDataChannelNative (_peerConnectionId, label, dataChannelDict.id );
421
+ RTCDataChannelNative (_peerConnectionId, label, response[ 'id' ] );
421
422
return _dataChannel! ;
422
423
} on PlatformException catch (e) {
423
424
throw 'Unable to RTCPeerConnection::createDataChannel: ${e .message }' ;
You can’t perform that action at this time.
0 commit comments