首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Stanza.io无法创建WebRTC应答

Stanza.io无法创建WebRTC应答
EN

Stack Overflow用户
提问于 2017-12-09 18:00:57
回答 1查看 292关注 0票数 0

我正在使用ejabberd + stanza.io来制作一个实时消息网站,一切都运行得很完美。现在,我愿意使用jingle协议实现Webrtc音频/视频。这是我用来连接的JS代码:

代码语言:javascript
复制
var client = XMPP.createClient({
  jid: xmpp_user+'@'+XMPP_DOMAIN,
  password: cu.auth.user_password,
  transport: 'websocket',
  wsURL: "ws://"+xms+":5280/websocket/"
});


client.jingle.config.debug = true;


client.on('session:started', function () {
  client.enableCarbons();
  client.getRoster(function (err, resp) {
    client.updateCaps();
    client.sendPresence({
      caps: client.disco.caps
    });
  });
});

client.connect();

问题是,当我从另一个应用程序(AstraChat:支持静乐的iOS应用程序)呼叫用户时,我在浏览器日志中得到以下内容:

代码语言:javascript
复制
Jingle: 67bzrsog243: session-initiate undefined undefined
Jingle: 67bzrsog243: Could not create WebRTC answer undefined undefined

这是astrachat发送的xml:

代码语言:javascript
复制
<iq xmlns='jabber:client' xml:lang='en' to='c4ca4238a0b923820dcc509a6f75849b@h2745110.stratoserver.net/352555070032013318140962' from='med@h2745110.stratoserver.net/AstraChat-iOS-21820150' type='get' id='3e8kjajc22'><query xmlns='http://jabber.org/protocol/disco#info'/></iq>
<r xmlns='urn:xmpp:sm:3'/>
<a h='1' xmlns='urn:xmpp:sm:3'/>
<a h='2' xmlns='urn:xmpp:sm:3'/>
jingle:created
iq:set:jingle
<iq xmlns='jabber:client' xml:lang='en' to='c4ca4238a0b923820dcc509a6f75849b@h2745110.stratoserver.net/352555070032013318140962' from='med@h2745110.stratoserver.net/AstraChat-iOS-21820150' type='set' id='3e8kjajc23'><jingle xmlns='urn:xmpp:jingle:1' action='session-initiate' initiator='med@h2745110.stratoserver.net/AstraChat-iOS-21820150' responder='c4ca4238a0b923820dcc509a6f75849b@h2745110.stratoserver.net/352555070032013318140962' sid='3e8kjajc24'><content creator='initiator' name='voice'><description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'><payload-type id='101' name='speex' clockrate='8000'/></description><transport xmlns='urn:xmpp:jingle:transports:ice-udp:1' pwd='TC5NsD6IEQGXeDO8d5/3OU' ufrag='yA0z'/></content></jingle></iq>
<r xmlns='urn:xmpp:sm:3'/>
Jingle: 3e8kjajc24: session-initiate undefined undefined
Could not create WebRTC answer undefined undefined

我真的不知道如何解决这个问题,任何帮助都将不胜感激。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-12-09 20:01:06

根据你的日志,来自Astra chat的session-initiate是这样的:<iq xmlns="jabber:client" xml:lang="en" to="c4ca4238a0b923820dcc509a6f75849b@h2745110.stratoserver.net/352555070032013318140962" from="med@h2745110.stratoserver.net/AstraChat-iOS-21820150" type="set" id="3e8kjajc23"> <jingle xmlns="urn:xmpp:jingle:1" action="session-initiate" initiator="med@h2745110.stratoserver.net/AstraChat-iOS-21820150" responder="c4ca4238a0b923820dcc509a6f75849b@h2745110.stratoserver.net/352555070032013318140962" sid="3e8kjajc24"> <content creator="initiator" name="voice"> <description xmlns="urn:xmpp:jingle:apps:rtp:1" media="audio"> <payload-type id="101" name="speex" clockrate="8000" /> </description> <transport xmlns="urn:xmpp:jingle:transports:ice-udp:1" pwd="TC5NsD6IEQGXeDO8d5/3OU" ufrag="yA0z" /> </content> </jingle> </iq>只提供WebRTC不支持的speex音频编解码器(opus或G.711是强制性的)。此外,在WebRTC中也没有强制性的加密。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47727407

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档