I am trying to implement RTCDataChannel(webRTC).
It's working good in Firefox but not in chrome.
Both Chrome and Firefox are of the latest version.
RTCDataChannel object in Chrome :-
RTCDataChannel {
binaryType: "arraybuffer"
bufferedAmount: 0
bufferedAmountLowThreshold: 0
id: 65535
label: "sendDataChannel"
maxRetransmitTime: 65535
maxRetransmits: 65535
negotiated: false
onbufferedamountlow: null
onclose: null
onerror: ƒ (event)
onmessage: ƒ (event)
onopen: ƒ dataChannelStateChanged()
ordered: true
protocol: ""
readyState: "connecting"
reliable: false__proto__:}
RTCDataChannel object in Firefox :-
DataChannel {
binaryType: "blob"
id: 0
label: "sendDataChannel",
reliable: true,
readyState: "open",
bufferedAmount: 0,
bufferedAmountLowThreshold: 0,
onopen: dataChannelStateChanged(),
onerror: create_peer_connection/dataChannel.onerror(),
onclose: null,
onmessage: create_peer_connection/dataChannel.onmessage(),
onbufferedamountlow: null
protocol:""
ordered:true}
I have already gone through below links:-
Please suggest what could be the reason behind the issue in chrome?
I was able to resolve it using the following post :
WebRTC DataChannel: working in Firefox but not Chrome
I had to change
pc = new RTCPeerConnection(configuration,
{optional: [{RtpDataChannels: true}]});
to
pc = new RTCPeerConnection(configuration);