【发布时间】:2019-08-03 16:10:34
【问题描述】:
我正在尝试使用 webrtc 和 adapter.js 在 MS Edge 中通过 sipML5 API 连接音频呼叫,但它给出了错误 addremoteCandidate 超时。考虑发送候选人结束通知。
我已经尝试过发送 here 中提到的 addIceCandidate(null) 但它不起作用或者我发送错误。我用谷歌搜索,但没有足够的文档。
我的问题是我可以在哪里以及如何发送 addIceCandidate(null) 以便 adapter.js 会考虑它?
我的 RTCPeerConnection 代码
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;
}
任何帮助将不胜感激。
谢谢
【问题讨论】:
-
你可以参考this issue in GitHub添加end-of-candidate。在MDN doc 中,它说 如果没有指定候选对象,或者它的值为 null,则使用 end-of-candidates a-line 将一个 end-of-candidates 信号发送到远程对等体,格式化就像这样:
a=end-of-candidates. -
您好,我无法在 safari working demo 上听到音频,您认为这与此问题有关吗?
标签: webrtc microsoft-edge ortc sipml5