I am trying to connect audio call through sipML5 API in MS edge using webrtc and adapter.js, but it gives error Timeout for addremoteCandidate. Consider sending an end-of-candidates notification.
I already tried sending addIceCandidate(null) as mentioned here but it is not working or may be i am sending it wrong. I googled but there is not enough documentation on this.
My question is where and how can i send addIceCandidate(null) so adapter.js will consider it ?
My RTCPeerConnection code
this.o_pc = new window.RTCPeerConn(a && !a.length ? null : {
iceServers: a,
rtcpMuxPolicy: "negotiate",
iceTransportPolicy: "all",
bundlePolicy: "balanced",
iceCandidatePoolSize: 0
//gatherPolicy: "all",
}, this.o_media_constraints);
this.o_pc.onicecandidate = tmedia_session_jsep01.mozThis ? tmedia_session_jsep01.onIceCandidate : function(e) {
tmedia_session_jsep01.onIceCandidate(e, c);
};
this.o_pc.onnegotiationneeded = tmedia_session_jsep01.mozThis ? tmedia_session_jsep01.onNegotiationNeeded : function(e) {
tmedia_session_jsep01.onNegotiationNeeded(e, c);
};
this.o_pc.onsignalingstatechange = tmedia_session_jsep01.mozThis ? tmedia_session_jsep01.onSignalingstateChange : function(e) {
tmedia_session_jsep01.onSignalingstateChange(e, c);
};
this.o_media_constraints = {
audio: true
};
if (tsk_utils_get_navigator_friendly_name() == "firefox") {
tmedia_session_jsep01.mozThis = this;
this.o_media_constraints.mandatory.MozDontOfferDataChannel = true;
}
Any help would be appreciated.
Thanks
This warning indicates that you never call addIceCandidate(null). When the other end finishes with candidate gathering, i.e. pc.onicecandidate(event) is called event.candidate not set. Then you need to send a signaling message like e.g. {type: 'end-of-candidates'} which will cause addIceCandidate(null) to be called in Edge.
If you do not do that, adapter.js (or rather the Edge/ORTC shim) will do this for you after some time but this is far from optimal.