2018-07-19 06:15:45,477179 19 [0x00007f78c0ff9700] debug KurentoWebSocketTransport WebSocketTransport.cpp:422 processMessage() Message: >{"jsonrpc":"2.0","method":"invoke","params":{"object":"ab12
39e3-30bb-4525-867b-795632709813_kurento.MediaPipeline/3a82c4f8-0514-4275-9223-30691f7727c0_kurento.WebRtcEndpoint","operation":"createDataChannel","operationParams":{"label":"mydatachannel","ordered"
:true},"sessionId":"58cd9c7e-55ed-46b9-af78-c956fc71e7f4"},"id":23}<
2018-07-19 06:15:45,480015 19 [0x00007f78c0ff9700] debug KurentoWebSocketTransport WebSocketTransport.cpp:424 processMessage() Response: >{"id":23,"jsonrpc":"2.0","result":{"sessionId":"58cd9c7e-5
5ed-46b9-af78-c956fc71e7f4","value":null}}2018-07-19 06:15:46,483356 19 [0x00007f78c8a67700] debug KurentoWebSocketTransport WebSocketTransport.cpp:422 processMessage() Message: >{"jsonrpc":"2.0","method":"invoke","params":{"object":"ab12
39e3-30bb-4525-867b-795632709813_kurento.MediaPipeline/3a82c4f8-0514-4275-9223-30691f7727c0_kurento.WebRtcEndpoint","operation":"getStats","operationParams":{"mediaType":"DATA"},"sessionId":"58cd9c7e
-55ed-46b9-af78-c956fc71e7f4"},"id":24}<
2018-07-19 06:15:46,483652 19 [0x00007f78c8a67700] debug KurentoWebSocketTransport WebSocketTransport.cpp:424 processMessage() Response: >{"id":24,"jsonrpc":"2.0","result":{"sessionId":"58cd9c7e-5
5ed-46b9-af78-c956fc71e7f4","value":{"7f4c0845-cdca-4957-8577-378dba08390f":{"__module__":"kurento","__type__":"RTCDataChannelStats","bytesReceived":0,"bytesSent":0,"datachannelid":0,"id":"7f4c0845-c
dca-4957-8577-378dba08390f","label":"mydatachannel","messagesReceived":0,"messagesSent":0,"protocol":"","state":"connecting","timestamp":1531980946,"type":"datachannel"},"ffbb95f3-777b-4fe9-8fa5-58f1b
734d6e5":{"__module__":"kurento","__type__":"RTCPeerConnectionStats","dataChannelsClosed":0,"dataChannelsOpened":0,"id":"ffbb95f3-777b-4fe9-8fa5-58f1b734d6e5","timestamp":1531980946,"type":"session"}
}}}
room.pipeline.create('WebRtcEndpoint', {useDataChannels: true}, (error, webRtc) => {
webRtc.on('DataChannelOpen', function () {
console.log("--------------Data channel opened.--------------");
});
});
pc = new RTCPeerConnection(pc_config);
dataChannel = pc.createDataChannel('send', {reliable: false});
dataChannel.binaryType = 'arraybuffer';
dataChannel.onerror = function (error) {
console.log(error);
};
dataChannel.onmessage = function (event) {
console.log(event);
};
dataChannel.onclose = function () {
console.log('close data');
};
dataChannel.onopen = function () {
console.log('OPEN');
};
pc.ondatachannel = e => {
console.log('ondatachannel')
}
Please check out the fix branch fix-datachannel-sdp and give some feedback to let us know if the problem is solved.
You can try it out either with apt-get install, using this repository line (Ubuntu Xenial only):
deb http://ubuntu.openvidu.io/fix-datachannel-sdp xenial kms6
or with the experimental Docker image (https://hub.docker.com/r/kurento/kurento-media-server-exp):
kurento/kurento-media-server-exp:fix-datachannel-sdp