我正在使用ejabberd + stanza io构建一个实时消息和音频通话的网站。我已经成功地完成了第一次音频通话。
from chrome(on PC) -> chrome(on mac) with no errors
当我尝试进行呼叫时,出现了问题。
from chrome(on mac) to firefox(on pc) or vice versa
Chrome浏览器日志显示:无法处理WebRTC答案
通过使用chrome://webrtc-internals
调试工具,我发现setremotedescription
失败并出现错误:
`Failed to set remote answer sdp: Called with SDP without ice-ufrag and ice-pwd`
这是我用来开始通话的代码:
var session = client.jingle.createMediaSession('full JID');
session.addStream(localAudio_stream); // getUserMedia stream
session.start();
我正在做什么不对吗?为什么Firefox可以成功建立通话,而Chrome却不能(在Opera上测试也是同样的结果(失败))。 完整的JS代码。