我们正在尝试将浏览器(客户端)与aiortc库(服务器,发送单个视频流)连接起来。目前,连接已成功建立(on signalingstatechange稳定)。但是,媒体连接从未建立,因为ICE连接失败。这两台主机在同一个局域网上,并且已经验证了直接连接。使用的STUN服务器是STUN.l。谷歌:19302. 在

服务器上的日志如下:DEBUG:asyncio:Using selector: EpollSelector

DEBUG:ice:Connection(0) protocol(0) connection_made(<_selectordatagramtransport fd="11" read="idle" write="<idle," bufsize="0">>)

DEBUG:ice:Connection(0) protocol(0) > ('66.102.1.127', 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\xb1\x1f\xdek(\x9c\x10\xe8\x86\xd1Wn')

DEBUG:ice:Connection(0) protocol(0) < ('66.102.1.127', 19302) Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b'\xb1\x1f\xdek(\x9c\x10\xe8\x86\xd1Wn')

Raw messages:

SDP offer:

v=0

o=- 7142951019689507792 2 IN IP4 127.0.0.1

s=-

t=0 0

a=group:BUNDLE video

a=msid-semantic: WMS

m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 123 127 122 125 107 108 109 124

c=IN IP4 0.0.0.0

a=rtcp:9 IN IP4 0.0.0.0

a=ice-ufrag:A5nH

a=ice-pwd:P0LIjOkkOl/wTtup5n1JA1mC

a=ice-options:trickle

a=fingerprint:sha-256 E3:8E:87:44:E8:D3:A7:02:C0:70:EA:D8:7F:84:F6:80:17:42:33:07:D8:C3:5D:44:FF:DC:25:4C:68:7E:09:19

a=setup:actpass

a=mid:video

a=extmap:2 urn:ietf:params:rtp-hdrext:toffset

a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time

a=extmap:4 urn:3gpp:video-orientation

a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01

a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay

a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type

a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing

a=extmap:10 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07

a=recvonly

a=rtcp-mux

a=rtcp-rsize

a=rtpmap:96 VP8/90000

a=rtcp-fb:96 goog-remb

a=rtcp-fb:96 transport-cc

a=rtcp-fb:96 ccm fir

a=rtcp-fb:96 nack

a=rtcp-fb:96 nack pli

a=rtpmap:97 rtx/90000

a=fmtp:97 apt=96

a=rtpmap:98 VP9/90000

a=rtcp-fb:98 goog-remb

a=rtcp-fb:98 transport-cc

a=rtcp-fb:98 ccm fir

a=rtcp-fb:98 nack

a=rtcp-fb:98 nack pli

a=fmtp:98 profile-id=0

a=rtpmap:99 rtx/90000

a=fmtp:99 apt=98

a=rtpmap:100 H264/90000

a=rtcp-fb:100 goog-remb

a=rtcp-fb:100 transport-cc

a=rtcp-fb:100 ccm fir

a=rtcp-fb:100 nack

a=rtcp-fb:100 nack pli

a=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f

a=rtpmap:101 rtx/90000

a=fmtp:101 apt=100

a=rtpmap:102 H264/90000

a=rtcp-fb:102 goog-remb

a=rtcp-fb:102 transport-cc

a=rtcp-fb:102 ccm fir

a=rtcp-fb:102 nack

a=rtcp-fb:102 nack pli

a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f

a=rtpmap:123 rtx/90000

a=fmtp:123 apt=102

a=rtpmap:127 H264/90000

a=rtcp-fb:127 goog-remb

a=rtcp-fb:127 transport-cc

a=rtcp-fb:127 ccm fir

a=rtcp-fb:127 nack

a=rtcp-fb:127 nack pli

a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f

a=rtpmap:122 rtx/90000

a=fmtp:122 apt=127

a=rtpmap:125 H264/90000

a=rtcp-fb:125 goog-remb

a=rtcp-fb:125 transport-cc

a=rtcp-fb:125 ccm fir

a=rtcp-fb:125 nack

a=rtcp-fb:125 nack pli

a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f

a=rtpmap:107 rtx/90000

a=fmtp:107 apt=125

a=rtpmap:108 red/90000

a=rtpmap:109 rtx/90000

a=fmtp:109 apt=108

a=rtpmap:124 ulpfec/90000

SDP answer:

v=0

o=- 3760099490 3760099490 IN IP4 0.0.0.0

s=-

t=0 0

a=group:BUNDLE video

a=msid-semantic:WMS *

m=video 36695 UDP/TLS/RTP/SAVPF 96 97 100 101 127 122

c=IN IP4 147.175.160.240

a=sendonly

a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time

a=mid:video

a=msid:25c4a009-f81c-4fe7-b811-a39c525da778 6ffba6fa-08fb-401f-9555-8df85942bd71

a=rtcp:9 IN IP4 0.0.0.0

a=rtcp-mux

a=ssrc-group:FID 461163217 873864728

a=ssrc:461163217 cname:{af4834d3-8db4-41cc-a9cd-6565cb8d82bd}

a=ssrc:873864728 cname:{af4834d3-8db4-41cc-a9cd-6565cb8d82bd}

a=rtpmap:96 VP8/90000

a=rtcp-fb:96 nack

a=rtcp-fb:96 nack pli

a=rtcp-fb:96 goog-remb

a=rtpmap:97 rtx/90000

a=fmtp:97 apt=96

a=rtpmap:100 H264/90000

a=rtcp-fb:100 nack

a=rtcp-fb:100 nack pli

a=rtcp-fb:100 goog-remb

a=fmtp:100 packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42001f

a=rtpmap:101 rtx/90000

a=fmtp:101 apt=100

a=rtpmap:127 H264/90000

a=rtcp-fb:127 nack

a=rtcp-fb:127 nack pli

a=rtcp-fb:127 goog-remb

a=fmtp:127 packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42e01f

a=rtpmap:122 rtx/90000

a=fmtp:122 apt=127

a=candidate:a2cdfa74ef4f12d00d150bfa588cf805 1 udp 2130706431 147.175.160.240 36695 typ host

a=candidate:237395b2276e331724a06e8dbed92f44 1 udp 1694498815 147.175.160.240 36695 typ srflx raddr 147.175.160.240 rport 36695

a=end-of-candidates

a=ice-ufrag:IHJz

a=ice-pwd:RNwQMxbAm2EjNIBxklFZKd

a=fingerprint:sha-256 9B:BB:E0:63:DE:5D:BC:1F:CC:A2:FA:FA:0B:29:EB:F1:46:24:D6:A4:E7:9C:B3:C1:50:9D:A3:FB:83:EC:74:2D

a=setup:active

{"candidate":"candidate:1963203886 1 udp 2113937151 147.175.160.205 36583 typ host generation 0 ufrag A5nH network-cost 999","sdpMid":"video","sdpMLineIndex":0,"type":"candidate"}

服务器代码:

^{pr2}$

前端代码(重要部分):var configuration = { iceServers: [

{urls: 'stun:stun.l.google.com:19302'}]

};

this.pc = new RTCPeerConnection(configuration);

const offerOptions = {

offerToReceiveVideo: 1,

offerToReceiveAudio: 0

};

let offer = this.pc.createOffer(offerOptions);

offer.then(async value => {

await this.pc.setLocalDescription(value);

this.connection.send(JSON.stringify(value))

});

this.connection.onmessage = async event => {

let data = JSON.parse(event.data);

if (data) {

if (data.type === 'offer') {

await this.pc.setRemoteDescription(data);

await this.pc.setLocalDescription(await this.pc.createAnswer());

this.connection.send({ 'desc': this.pc.localDescription }.toString());

} else if (data.type === 'answer') {

await this.pc.setRemoteDescription(data);

}

}

};

this.pc.onnegotiationneeded = async () => {

await this.pc.setLocalDescription(await this.pc.createOffer());

this.connection.send({ 'desc': this.pc.localDescription }.toString());

};

this.pc.onicecandidate = (event) => {

if (event.candidate !== null) {

let data = JSON.parse(JSON.stringify(event.candidate));

data['type'] = 'candidate';

this.connection.send(JSON.stringify(data));

}

};

9b9t服务器显示连接超时,在WebRTC中ICE连接失败相关推荐

  1. Teamviewer连接服务器显示不能够全屏 或 向日葵连接服务器不能够全屏 或 Teamviewer只显示一个640x480的分辨率选项

    欢迎大家关注笔者,你的关注是我持续更博的最大动力 原创文章,转载告知,盗版必究 Teamviewer连接服务器显示不能够全屏 或 向日葵连接服务器不能够全屏 或 Teamviewer只显示一个640x ...

  2. python连接池框架_Python中的连接池是非常重要的!神级程序员详解!

    概述 连接池的作用就是为了提高性能,将已经创建好的连接保存在池中,当有请求来时,直接使用已经创建好的连接对Server端进行访问.这样 省略了创建连接和销毁连接的过程(TCP连接建立时的三次握手和销毁 ...

  3. win10英雄联盟登陆服务器未响应怎么办,Win10系统中登陆LOL失败怎么办

    导致最新版本的Windows10系统上无法正常启动运行LOL英雄联盟程序时的重要原因,是由于显卡驱动不兼容所造成的,当然也与Win10系统的版本相关.Win10系统中登陆LOL失败的解决方法其实很简单 ...

  4. 9b9t服务器显示连接超时,Fabric-sdk-go实例化链码连接7053端口等待超时

    错误报告: ``` [fabsdk/fab] 2020/03/23 11:09:24 UTC - endpoint.(*DiscoveryWrapper).GetPeers -> DEBU Ch ...

  5. 开电视显示网管服务器数据下发超时,关于网络管理中的常见问题解决

    关于网络管理中的常见问题解决 网络管理有很多技巧和窍门,下面介绍一些网络管理中的常见问题和解决方法,希望能起到抛砖引玉的作用. 配置交换机 将交换机端口配置为100M全双工,服务器安装一块Intel- ...

  6. 使命召唤ol显示服务器连接超时,使命召唤online无法连接大厅服务怎么办 无法连接大厅解决方法...

    就在刚才小编想登录使命召唤online玩两把,结果发现死活连不上游戏大厅,进入界面就显示与大厅失去联系,让小编很恼火.最后小编看到好心玩家分享的无法连接游戏的心得,然后去试了下,发现连接上了.所以如果 ...

  7. 连接服务器显示出现内部错误怎么解决方案,远程连接服务器提示“出现了内部错误”解决方法锐讯网络罗海清...

    远程连接服务器提示"出现了内部错误"解决方法: 解决方法: Win+R键 打开DOS窗口 输入"ncpa.cpl"并敲击回车 紧接着会看到"本地连接& ...

  8. node mysql 连接池 超时,关于NodeJS中mysql连接池卡死问题

    最近在做毕设,遇到一个问题,就是当我多次请求数据库后就断开了数据库的连接.在网上找了很久答案,最后终于解决了.感谢大神,放上链接. 其实就是被连接池中的释放给坑了 代码中不应该用con.realeas ...

  9. 发那科主轴服务器显示24,FANUC正常加工中主轴为什么突然不转了?

    「来源: |数控笔记 ID:shukongbiji」 1.问题或故障描述 ***用户在使用一台配备FS0i-Mate-MD系统机床正常加工时,主轴突然停止不转,但伺服轴仍然正常移动. 2.处理过程 用 ...

最新文章

  1. WebService大讲堂之Axis2(9):编写Axis2模块(Module)
  2. Java API —— Map接口
  3. python按键_【python】python控制鼠标和键盘
  4. C++11 多线程库使用说明
  5. 华为 HarmonyOS2.0(鸿蒙OS) 开发者beta公测招募的报名流程
  6. arm-linux-ld segment fault,segment fault 定位 与 远程 gdb
  7. [Swift]LeetCode268. 缺失数字 | Missing Number
  8. 学习LaTex:常用符号总结
  9. WPS Office 11.1.0.10314 免费完整版
  10. php把文字转换unicode,unicode编码转换:PHP将汉字转换成Unico_php
  11. 你见过马化腾18年前编写的代码吗?
  12. leetcode 面试题57 - II. 和为s的连续正数序列
  13. GBase 8c 开发接口
  14. 微信小程序【常见面试题】
  15. 语音识别英语_英语语音识别_英语 语音识别 - 云+社区 - 腾讯云
  16. IT外企那点儿事(18): 当“we are a team”成为口头禅
  17. 2020/7/14 可积、连续、存在原函数的关系
  18. WPC无线充电联盟公布2022年Qi会员名单
  19. 接口分析--今日头条天气数据接口
  20. Wireshark抓取Android数据包

热门文章

  1. 路由器 ------ 动态路由 (1) ---- RIP
  2. qt 进程间切换焦点_Qt下的进程界面之间的鼠标焦点切换
  3. 使用“谷歌移动设备易用性”工具优化移动网站
  4. 强势的女人 论未来人类发展
  5. mysql经典基础语录
  6. javascript模板系统 ejs v3
  7. 浏览器中的data类型的Url格式,data:image/png,data:image/jpeg! 收藏 苏生不惑 发表于 4年前 阅读 3943 收藏 3 点赞 0 评论 0 腾讯云·
  8. 机器与人类视觉能力的差距(2)
  9. AJAX+jQuery+ASP实现实时验证身份证信息是否已存在---人事系统
  10. python画图表情包_如何用python绘制一系列三维的逗比风格表情包