问题描述
当我连接两个相同的浏览器时,我的 WebRTC 应用程序工作正常,但当我尝试组合时,既不响应彼此的信令消息.可能值得一提的是,我还没有实施 TURN,但我不明白为什么这会有所作为,所以我不会改变它,除非我相当确定会这样做.
My WebRTC app works fine when I connect two of the same browsers, but when I try a combination neither respond to each others signaling messages. Something probably worth mentioning is that I have not implemented TURN, however I don't see why that should make a difference so I'm not going to change that unless I'm fairly certain it will.
我不知道错误在哪里,所以为了可读性,我只会根据要求添加代码.
I don't have much of a clue where the error lies, so I will just add code on request for the sake of readability.
推荐答案
通过将以下内容传递给 PeerConnection 构造函数,确保启用 DTLS-SRTP(Firefox 仅支持 DTLS-SRTP):
Make sure you enable DTLS-SRTP (Firefox only supports DTLS-SRTP) by passing the following to the PeerConnection constructor:
{ 'optional': [{'DtlsSrtpKeyAgreement': 'true'}]}
有关详细信息,请参阅此页面.
See this page for more details.
这篇关于WebRTC Firefox 到 Chrome 视频通话不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!